├── .gitignore
├── .vscode
└── c_cpp_properties.json
├── LICENSE
├── README.md
├── binding.gyp
├── dist
├── index.d.ts
└── index.js
├── include
└── include
│ ├── base
│ ├── cef_atomic_ref_count.h
│ ├── cef_atomicops.h
│ ├── cef_basictypes.h
│ ├── cef_bind.h
│ ├── cef_bind_helpers.h
│ ├── cef_build.h
│ ├── cef_callback.h
│ ├── cef_callback_forward.h
│ ├── cef_callback_helpers.h
│ ├── cef_callback_list.h
│ ├── cef_cancelable_callback.h
│ ├── cef_lock.h
│ ├── cef_logging.h
│ ├── cef_macros.h
│ ├── cef_move.h
│ ├── cef_platform_thread.h
│ ├── cef_ref_counted.h
│ ├── cef_scoped_ptr.h
│ ├── cef_string16.h
│ ├── cef_template_util.h
│ ├── cef_thread_checker.h
│ ├── cef_trace_event.h
│ ├── cef_tuple.h
│ ├── cef_weak_ptr.h
│ └── internal
│ │ ├── README-TRANSFER.txt
│ │ ├── cef_atomicops_arm64_msvc.h
│ │ ├── cef_atomicops_x86_msvc.h
│ │ ├── cef_bind_internal.h
│ │ ├── cef_bind_internal_win.h
│ │ ├── cef_callback_internal.h
│ │ ├── cef_lock_impl.h
│ │ ├── cef_net_error_list.h
│ │ ├── cef_raw_scoped_refptr_mismatch_checker.h
│ │ └── cef_thread_checker_impl.h
│ ├── capi
│ ├── cef_accessibility_handler_capi.h
│ ├── cef_app_capi.h
│ ├── cef_auth_callback_capi.h
│ ├── cef_base_capi.h
│ ├── cef_browser_capi.h
│ ├── cef_browser_process_handler_capi.h
│ ├── cef_callback_capi.h
│ ├── cef_client_capi.h
│ ├── cef_command_line_capi.h
│ ├── cef_context_menu_handler_capi.h
│ ├── cef_cookie_capi.h
│ ├── cef_crash_util_capi.h
│ ├── cef_dialog_handler_capi.h
│ ├── cef_display_handler_capi.h
│ ├── cef_dom_capi.h
│ ├── cef_download_handler_capi.h
│ ├── cef_download_item_capi.h
│ ├── cef_drag_data_capi.h
│ ├── cef_drag_handler_capi.h
│ ├── cef_extension_capi.h
│ ├── cef_extension_handler_capi.h
│ ├── cef_file_util_capi.h
│ ├── cef_find_handler_capi.h
│ ├── cef_focus_handler_capi.h
│ ├── cef_frame_capi.h
│ ├── cef_image_capi.h
│ ├── cef_jsdialog_handler_capi.h
│ ├── cef_keyboard_handler_capi.h
│ ├── cef_life_span_handler_capi.h
│ ├── cef_load_handler_capi.h
│ ├── cef_media_router_capi.h
│ ├── cef_menu_model_capi.h
│ ├── cef_menu_model_delegate_capi.h
│ ├── cef_navigation_entry_capi.h
│ ├── cef_origin_whitelist_capi.h
│ ├── cef_parser_capi.h
│ ├── cef_path_util_capi.h
│ ├── cef_print_handler_capi.h
│ ├── cef_print_settings_capi.h
│ ├── cef_process_message_capi.h
│ ├── cef_process_util_capi.h
│ ├── cef_registration_capi.h
│ ├── cef_render_handler_capi.h
│ ├── cef_render_process_handler_capi.h
│ ├── cef_request_callback_capi.h
│ ├── cef_request_capi.h
│ ├── cef_request_context_capi.h
│ ├── cef_request_context_handler_capi.h
│ ├── cef_request_handler_capi.h
│ ├── cef_resource_bundle_capi.h
│ ├── cef_resource_bundle_handler_capi.h
│ ├── cef_resource_handler_capi.h
│ ├── cef_resource_request_handler_capi.h
│ ├── cef_response_capi.h
│ ├── cef_response_filter_capi.h
│ ├── cef_scheme_capi.h
│ ├── cef_server_capi.h
│ ├── cef_ssl_info_capi.h
│ ├── cef_ssl_status_capi.h
│ ├── cef_stream_capi.h
│ ├── cef_string_visitor_capi.h
│ ├── cef_task_capi.h
│ ├── cef_thread_capi.h
│ ├── cef_trace_capi.h
│ ├── cef_urlrequest_capi.h
│ ├── cef_v8_capi.h
│ ├── cef_values_capi.h
│ ├── cef_waitable_event_capi.h
│ ├── cef_web_plugin_capi.h
│ ├── cef_x509_certificate_capi.h
│ ├── cef_xml_reader_capi.h
│ ├── cef_zip_reader_capi.h
│ ├── test
│ │ ├── cef_test_helpers_capi.h
│ │ └── cef_translator_test_capi.h
│ └── views
│ │ ├── cef_box_layout_capi.h
│ │ ├── cef_browser_view_capi.h
│ │ ├── cef_browser_view_delegate_capi.h
│ │ ├── cef_button_capi.h
│ │ ├── cef_button_delegate_capi.h
│ │ ├── cef_display_capi.h
│ │ ├── cef_fill_layout_capi.h
│ │ ├── cef_label_button_capi.h
│ │ ├── cef_layout_capi.h
│ │ ├── cef_menu_button_capi.h
│ │ ├── cef_menu_button_delegate_capi.h
│ │ ├── cef_panel_capi.h
│ │ ├── cef_panel_delegate_capi.h
│ │ ├── cef_scroll_view_capi.h
│ │ ├── cef_textfield_capi.h
│ │ ├── cef_textfield_delegate_capi.h
│ │ ├── cef_view_capi.h
│ │ ├── cef_view_delegate_capi.h
│ │ ├── cef_window_capi.h
│ │ └── cef_window_delegate_capi.h
│ ├── cef_accessibility_handler.h
│ ├── cef_api_hash.h
│ ├── cef_app.h
│ ├── cef_auth_callback.h
│ ├── cef_base.h
│ ├── cef_browser.h
│ ├── cef_browser_process_handler.h
│ ├── cef_callback.h
│ ├── cef_client.h
│ ├── cef_command_line.h
│ ├── cef_config.h
│ ├── cef_context_menu_handler.h
│ ├── cef_cookie.h
│ ├── cef_crash_util.h
│ ├── cef_dialog_handler.h
│ ├── cef_display_handler.h
│ ├── cef_dom.h
│ ├── cef_download_handler.h
│ ├── cef_download_item.h
│ ├── cef_drag_data.h
│ ├── cef_drag_handler.h
│ ├── cef_extension.h
│ ├── cef_extension_handler.h
│ ├── cef_file_util.h
│ ├── cef_find_handler.h
│ ├── cef_focus_handler.h
│ ├── cef_frame.h
│ ├── cef_image.h
│ ├── cef_jsdialog_handler.h
│ ├── cef_keyboard_handler.h
│ ├── cef_life_span_handler.h
│ ├── cef_load_handler.h
│ ├── cef_media_router.h
│ ├── cef_menu_model.h
│ ├── cef_menu_model_delegate.h
│ ├── cef_navigation_entry.h
│ ├── cef_origin_whitelist.h
│ ├── cef_pack_resources.h
│ ├── cef_pack_strings.h
│ ├── cef_parser.h
│ ├── cef_path_util.h
│ ├── cef_print_handler.h
│ ├── cef_print_settings.h
│ ├── cef_process_message.h
│ ├── cef_process_util.h
│ ├── cef_registration.h
│ ├── cef_render_handler.h
│ ├── cef_render_process_handler.h
│ ├── cef_request.h
│ ├── cef_request_callback.h
│ ├── cef_request_context.h
│ ├── cef_request_context_handler.h
│ ├── cef_request_handler.h
│ ├── cef_resource_bundle.h
│ ├── cef_resource_bundle_handler.h
│ ├── cef_resource_handler.h
│ ├── cef_resource_request_handler.h
│ ├── cef_response.h
│ ├── cef_response_filter.h
│ ├── cef_sandbox_win.h
│ ├── cef_scheme.h
│ ├── cef_server.h
│ ├── cef_ssl_info.h
│ ├── cef_ssl_status.h
│ ├── cef_stream.h
│ ├── cef_string_visitor.h
│ ├── cef_task.h
│ ├── cef_thread.h
│ ├── cef_trace.h
│ ├── cef_urlrequest.h
│ ├── cef_v8.h
│ ├── cef_values.h
│ ├── cef_version.h
│ ├── cef_waitable_event.h
│ ├── cef_web_plugin.h
│ ├── cef_x509_certificate.h
│ ├── cef_xml_reader.h
│ ├── cef_zip_reader.h
│ ├── internal
│ ├── cef_export.h
│ ├── cef_logging_internal.h
│ ├── cef_ptr.h
│ ├── cef_string.h
│ ├── cef_string_list.h
│ ├── cef_string_map.h
│ ├── cef_string_multimap.h
│ ├── cef_string_types.h
│ ├── cef_string_wrappers.h
│ ├── cef_thread_internal.h
│ ├── cef_time.h
│ ├── cef_trace_event_internal.h
│ ├── cef_types.h
│ ├── cef_types_win.h
│ ├── cef_types_wrappers.h
│ └── cef_win.h
│ ├── test
│ ├── cef_test_helpers.h
│ └── cef_translator_test.h
│ ├── views
│ ├── cef_box_layout.h
│ ├── cef_browser_view.h
│ ├── cef_browser_view_delegate.h
│ ├── cef_button.h
│ ├── cef_button_delegate.h
│ ├── cef_display.h
│ ├── cef_fill_layout.h
│ ├── cef_label_button.h
│ ├── cef_layout.h
│ ├── cef_menu_button.h
│ ├── cef_menu_button_delegate.h
│ ├── cef_panel.h
│ ├── cef_panel_delegate.h
│ ├── cef_scroll_view.h
│ ├── cef_textfield.h
│ ├── cef_textfield_delegate.h
│ ├── cef_view.h
│ ├── cef_view_delegate.h
│ ├── cef_window.h
│ └── cef_window_delegate.h
│ └── wrapper
│ ├── cef_byte_read_handler.h
│ ├── cef_closure_task.h
│ ├── cef_helpers.h
│ ├── cef_message_router.h
│ ├── cef_resource_manager.h
│ ├── cef_scoped_temp_dir.h
│ ├── cef_stream_resource_handler.h
│ ├── cef_xml_object.h
│ └── cef_zip_archive.h
├── package.json
├── src
├── cxx
│ ├── ceforama.cpp
│ ├── ceforama_util.cpp
│ ├── ceforama_util.h
│ ├── client.cpp
│ ├── client.h
│ ├── loop.cpp
│ └── loop.h
└── index.ts
├── tsconfig.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 | *.lcov
24 |
25 | # nyc test coverage
26 | .nyc_output
27 |
28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 | .grunt
30 |
31 | # Bower dependency directory (https://bower.io/)
32 | bower_components
33 |
34 | # node-waf configuration
35 | .lock-wscript
36 |
37 | # Compiled binary addons (https://nodejs.org/api/addons.html)
38 | build/
39 |
40 | # Dependency directories
41 | node_modules/
42 | jspm_packages/
43 |
44 | # TypeScript v1 declaration files
45 | typings/
46 |
47 | # TypeScript cache
48 | *.tsbuildinfo
49 |
50 | # Optional npm cache directory
51 | .npm
52 |
53 | # Optional eslint cache
54 | .eslintcache
55 |
56 | # Microbundle cache
57 | .rpt2_cache/
58 | .rts2_cache_cjs/
59 | .rts2_cache_es/
60 | .rts2_cache_umd/
61 |
62 | # Optional REPL history
63 | .node_repl_history
64 |
65 | # Output of 'npm pack'
66 | *.tgz
67 |
68 | # Yarn Integrity file
69 | .yarn-integrity
70 |
71 | # dotenv environment variables file
72 | .env
73 | .env.test
74 |
75 | # parcel-bundler cache (https://parceljs.org/)
76 | .cache
77 |
78 | # Next.js build output
79 | .next
80 |
81 | # Nuxt.js build / generate output
82 | .nuxt
83 | dist
84 |
85 | # Gatsby files
86 | .cache/
87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
88 | # https://nextjs.org/blog/next-9-1#public-directory-support
89 | # public
90 |
91 | # vuepress build output
92 | .vuepress/dist
93 |
94 | # Serverless directories
95 | .serverless/
96 |
97 | # FuseBox cache
98 | .fusebox/
99 |
100 | # DynamoDB Local files
101 | .dynamodb/
102 |
103 | # TernJS port file
104 | .tern-port
105 |
106 | # Ignore lib for now
107 | lib/*
108 |
109 | # Don't checkin dist
110 | dist/*
111 |
112 | GPUCache/*
--------------------------------------------------------------------------------
/.vscode/c_cpp_properties.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "Win32",
5 | "includePath": [
6 | "${workspaceFolder}/include/**",
7 | "src/cxx/**",
8 | "C:\\Users\\spark\\AppData\\Local\\node-gyp\\Cache\\12.13.1\\include\\node"
9 | ],
10 | "defines": [
11 | "_DEBUG",
12 | "UNICODE",
13 | "_UNICODE"
14 | ],
15 | "windowsSdkVersion": "10.0.18362.0",
16 | "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe",
17 | "cStandard": "c11",
18 | "cppStandard": "c++17",
19 | "intelliSenseMode": "msvc-x64"
20 | }
21 | ],
22 | "version": 4
23 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ceforama
2 |
3 | CEF-based HTML off-screen render engine for node.
4 |
5 | ## License
6 |
7 | Apache 2.0.
8 |
--------------------------------------------------------------------------------
/dist/index.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | export declare function version(): string;
3 | export declare function doWork(): void;
4 | export declare function runLoop(): void;
5 | export declare function stopLoop(): void;
6 | export declare function isLoopRunning(): boolean;
7 | export interface ClientOptions {
8 | width?: number;
9 | height?: number;
10 | fps?: number;
11 | url: string;
12 | }
13 | export interface CeforamaClient {
14 | type: 'clientorama';
15 | width: number;
16 | height: number;
17 | fps: number;
18 | url: string;
19 | frame: () => Promise;
20 | update: () => void;
21 | }
22 | export interface CeforamaFrame {
23 | type: 'frame';
24 | width: number;
25 | height: number;
26 | size: number;
27 | seq: number;
28 | frame: Buffer;
29 | }
30 | export declare function client(options?: ClientOptions): CeforamaClient;
31 | export declare function test(): Promise;
32 |
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.test = exports.client = exports.isLoopRunning = exports.stopLoop = exports.runLoop = exports.doWork = exports.version = void 0;
4 | const ceforamaNative = require('../build/Release/ceforama');
5 | const fs = require('fs');
6 | function version() {
7 | return ceforamaNative.version();
8 | }
9 | exports.version = version;
10 | function doWork() {
11 | return ceforamaNative.doWork();
12 | }
13 | exports.doWork = doWork;
14 | let loopRunning = false;
15 | const loopy = () => {
16 | if (loopRunning) {
17 | setTimeout(() => {
18 | ceforamaNative.doWork();
19 | loopy();
20 | }, 0);
21 | }
22 | };
23 | function runLoop() {
24 | if (!loopRunning) {
25 | loopRunning = true;
26 | loopy();
27 | }
28 | }
29 | exports.runLoop = runLoop;
30 | function stopLoop() {
31 | if (loopRunning) {
32 | loopRunning = false;
33 | }
34 | }
35 | exports.stopLoop = stopLoop;
36 | function isLoopRunning() {
37 | return loopRunning;
38 | }
39 | exports.isLoopRunning = isLoopRunning;
40 | function client(options) {
41 | return ceforamaNative.client(options);
42 | }
43 | exports.client = client;
44 | async function test() {
45 | let cl = await client({ url: 'https://app.singular.live/output/5AJz1INQDZ8EmHunA5H3et/Default?aspect=16:9' });
46 | let fr;
47 | let updater;
48 | let start = process.hrtime();
49 | for (let x = 0; x < 1000; x++) {
50 | fr = await cl.frame();
51 | if (x === 3) {
52 | updater = setInterval(() => cl.update(), 40);
53 | }
54 | // let isBlack = true
55 | // for ( let y = 0 ; y < fr.frame.length; y++ ) {
56 | // if (fr.frame[y] !== 0) {
57 | // isBlack = false;
58 | // break;
59 | // }
60 | // }
61 | console.log(fr.seq, process.hrtime(start), fr.frame.length);
62 | // if ((x - 9) % 10 === 0) {
63 | // fs.writeFileSync(`test-${x}.rgba`, fr.frame)
64 | // }
65 | }
66 | console.log('Done asking!', fr === null || fr === void 0 ? void 0 : fr.frame.length);
67 | fs.writeFileSync('test.rgba', fr === null || fr === void 0 ? void 0 : fr.frame);
68 | if (updater)
69 | clearInterval(updater);
70 | }
71 | exports.test = test;
72 |
--------------------------------------------------------------------------------
/include/include/base/cef_basictypes.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
2 | // Google Inc. All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the name Chromium Embedded
15 | // Framework nor the names of its contributors may be used to endorse
16 | // or promote products derived from this software without specific prior
17 | // written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | #ifndef CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
32 | #define CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
33 | #pragma once
34 |
35 | #include // For UINT_MAX
36 | #include // For size_t
37 |
38 | #include "include/base/cef_build.h"
39 |
40 | // The NSPR system headers define 64-bit as |long| when possible, except on
41 | // Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
42 | //
43 | // On Mac OS X, |long long| is used for 64-bit types for compatibility with
44 | // format macros even in the LP64 model.
45 | #if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
46 | typedef long int64;
47 | typedef unsigned long uint64;
48 | #else
49 | typedef long long int64;
50 | typedef unsigned long long uint64;
51 | #endif
52 |
53 | // TODO: Remove these type guards. These are to avoid conflicts with
54 | // obsolete/protypes.h in the Gecko SDK.
55 | #ifndef _INT32
56 | #define _INT32
57 | typedef int int32;
58 | #endif
59 |
60 | // TODO: Remove these type guards. These are to avoid conflicts with
61 | // obsolete/protypes.h in the Gecko SDK.
62 | #ifndef _UINT32
63 | #define _UINT32
64 | typedef unsigned int uint32;
65 | #endif
66 |
67 | #ifndef _INT16
68 | #define _INT16
69 | typedef short int16;
70 | #endif
71 |
72 | #ifndef _UINT16
73 | #define _UINT16
74 | typedef unsigned short uint16;
75 | #endif
76 |
77 | // UTF-16 character type.
78 | // This should be kept synchronized with base/strings/string16.h
79 | #ifndef char16
80 | #if defined(WCHAR_T_IS_UTF16)
81 | typedef wchar_t char16;
82 | #elif defined(WCHAR_T_IS_UTF32)
83 | typedef unsigned short char16;
84 | #endif
85 | #endif
86 |
87 | #endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
88 |
--------------------------------------------------------------------------------
/include/include/base/cef_callback_forward.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2011
2 | // Google Inc. All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the name Chromium Embedded
15 | // Framework nor the names of its contributors may be used to endorse
16 | // or promote products derived from this software without specific prior
17 | // written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | #ifndef INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
32 | #define INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
33 | #pragma once
34 |
35 | #if defined(BASE_CALLBACK_FORWARD_H_)
36 | // Do nothing if the Chromium header has already been included.
37 | // This can happen in cases where Chromium code is used directly by the
38 | // client application. When using Chromium code directly always include
39 | // the Chromium header first to avoid type conflicts.
40 | #elif defined(USING_CHROMIUM_INCLUDES)
41 | // When building CEF include the Chromium header directly.
42 | #include "base/callback_forward.h"
43 | #else // !USING_CHROMIUM_INCLUDES
44 | // The following is substantially similar to the Chromium implementation.
45 | // If the Chromium implementation diverges the below implementation should be
46 | // updated to match.
47 |
48 | namespace base {
49 |
50 | template
51 | class Callback;
52 |
53 | typedef Callback Closure;
54 |
55 | } // namespace base
56 |
57 | #endif // !!USING_CHROMIUM_INCLUDES
58 |
59 | #endif // INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
60 |
--------------------------------------------------------------------------------
/include/include/base/cef_callback_helpers.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
2 | // Google Inc. All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the name Chromium Embedded
15 | // Framework nor the names of its contributors may be used to endorse
16 | // or promote products derived from this software without specific prior
17 | // written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | // This defines helpful methods for dealing with Callbacks. Because Callbacks
32 | // are implemented using templates, with a class per callback signature, adding
33 | // methods to Callback<> itself is unattractive (lots of extra code gets
34 | // generated). Instead, consider adding methods here.
35 | //
36 | // ResetAndReturn(&cb) is like cb.Reset() but allows executing a callback (via a
37 | // copy) after the original callback is Reset(). This can be handy if Run()
38 | // reads/writes the variable holding the Callback.
39 |
40 | #ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
41 | #define CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
42 | #pragma once
43 |
44 | #if defined(BASE_CALLBACK_HELPERS_H_)
45 | // Do nothing if the Chromium header has already been included.
46 | // This can happen in cases where Chromium code is used directly by the
47 | // client application. When using Chromium code directly always include
48 | // the Chromium header first to avoid type conflicts.
49 | #elif defined(USING_CHROMIUM_INCLUDES)
50 | // When building CEF include the Chromium header directly.
51 | #include "base/callback_helpers.h"
52 | #else // !USING_CHROMIUM_INCLUDES
53 | // The following is substantially similar to the Chromium implementation.
54 | // If the Chromium implementation diverges the below implementation should be
55 | // updated to match.
56 |
57 | #include "include/base/cef_basictypes.h"
58 | #include "include/base/cef_build.h"
59 | #include "include/base/cef_callback.h"
60 | #include "include/base/cef_macros.h"
61 |
62 | namespace base {
63 |
64 | template
65 | base::Callback ResetAndReturn(base::Callback* cb) {
66 | base::Callback ret(*cb);
67 | cb->Reset();
68 | return ret;
69 | }
70 |
71 | // ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the
72 | // Closure is executed and deleted no matter how the current scope exits.
73 | class ScopedClosureRunner {
74 | public:
75 | ScopedClosureRunner();
76 | explicit ScopedClosureRunner(const Closure& closure);
77 | ~ScopedClosureRunner();
78 |
79 | void Reset();
80 | void Reset(const Closure& closure);
81 | Closure Release() WARN_UNUSED_RESULT;
82 |
83 | private:
84 | Closure closure_;
85 |
86 | DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner);
87 | };
88 |
89 | } // namespace base
90 |
91 | #endif // !USING_CHROMIUM_INCLUDES
92 |
93 | #endif // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
94 |
--------------------------------------------------------------------------------
/include/include/base/internal/README-TRANSFER.txt:
--------------------------------------------------------------------------------
1 | Files in this directory have been copied from other locations in the Chromium
2 | source tree. They have been modified only to the extent necessary to work in
3 | the CEF Binary Distribution directory structure. Below is a listing of the
4 | original file locations.
5 |
6 | ../net/base/net_error_list.h
7 |
--------------------------------------------------------------------------------
/include/include/base/internal/cef_lock_impl.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 Google Inc. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // Do not include this header file directly. Use base/cef_lock.h instead.
31 |
32 | #ifndef CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_
33 | #define CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_
34 |
35 | #include "include/base/cef_build.h"
36 |
37 | #if defined(OS_WIN)
38 | #include
39 | #elif defined(OS_POSIX)
40 | #include
41 | #endif
42 |
43 | #include "include/base/cef_macros.h"
44 |
45 | namespace base {
46 | namespace cef_internal {
47 |
48 | // This class implements the underlying platform-specific spin-lock mechanism
49 | // used for the Lock class. Most users should not use LockImpl directly, but
50 | // should instead use Lock.
51 | class LockImpl {
52 | public:
53 | #if defined(OS_WIN)
54 | typedef CRITICAL_SECTION NativeHandle;
55 | #elif defined(OS_POSIX)
56 | typedef pthread_mutex_t NativeHandle;
57 | #endif
58 |
59 | LockImpl();
60 | ~LockImpl();
61 |
62 | // If the lock is not held, take it and return true. If the lock is already
63 | // held by something else, immediately return false.
64 | bool Try();
65 |
66 | // Take the lock, blocking until it is available if necessary.
67 | void Lock();
68 |
69 | // Release the lock. This must only be called by the lock's holder: after
70 | // a successful call to Try, or a call to Lock.
71 | void Unlock();
72 |
73 | // Return the native underlying lock.
74 | // TODO(awalker): refactor lock and condition variables so that this is
75 | // unnecessary.
76 | NativeHandle* native_handle() { return &native_handle_; }
77 |
78 | private:
79 | NativeHandle native_handle_;
80 |
81 | DISALLOW_COPY_AND_ASSIGN(LockImpl);
82 | };
83 |
84 | } // namespace cef_internal
85 | } // namespace base
86 |
87 | #endif // CEF_INCLUDE_BASE_INTERNAL_CEF_LOCK_IMPL_H_
88 |
--------------------------------------------------------------------------------
/include/include/base/internal/cef_thread_checker_impl.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 Google Inc. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // Do not include this header file directly. Use base/cef_thread_checker.h
31 | // instead.
32 |
33 | #ifndef CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
34 | #define CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
35 |
36 | #include "include/base/cef_lock.h"
37 | #include "include/base/cef_platform_thread.h"
38 |
39 | namespace base {
40 | namespace cef_internal {
41 |
42 | // Real implementation of ThreadChecker, for use in debug mode, or
43 | // for temporary use in release mode (e.g. to CHECK on a threading issue
44 | // seen only in the wild).
45 | //
46 | // Note: You should almost always use the ThreadChecker class to get the
47 | // right version for your build configuration.
48 | class ThreadCheckerImpl {
49 | public:
50 | ThreadCheckerImpl();
51 | ~ThreadCheckerImpl();
52 |
53 | bool CalledOnValidThread() const;
54 |
55 | // Changes the thread that is checked for in CalledOnValidThread. This may
56 | // be useful when an object may be created on one thread and then used
57 | // exclusively on another thread.
58 | void DetachFromThread();
59 |
60 | private:
61 | void EnsureThreadIdAssigned() const;
62 |
63 | mutable base::Lock lock_;
64 | // This is mutable so that CalledOnValidThread can set it.
65 | // It's guarded by |lock_|.
66 | mutable PlatformThreadRef valid_thread_id_;
67 | };
68 |
69 | } // namespace cef_internal
70 | } // namespace base
71 |
72 | #endif // CEF_INCLUDE_BASE_INTERNAL_THREAD_CHECKER_IMPL_H_
73 |
--------------------------------------------------------------------------------
/include/include/capi/cef_accessibility_handler_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=00d5124d346e3f3cc3f53d67bcb766d1d798bf12$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_values_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Implement this structure to receive accessibility notification when
51 | // accessibility events have been registered. The functions of this structure
52 | // will be called on the UI thread.
53 | ///
54 | typedef struct _cef_accessibility_handler_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_base_ref_counted_t base;
59 |
60 | ///
61 | // Called after renderer process sends accessibility tree changes to the
62 | // browser process.
63 | ///
64 | void(CEF_CALLBACK* on_accessibility_tree_change)(
65 | struct _cef_accessibility_handler_t* self,
66 | struct _cef_value_t* value);
67 |
68 | ///
69 | // Called after renderer process sends accessibility location changes to the
70 | // browser process.
71 | ///
72 | void(CEF_CALLBACK* on_accessibility_location_change)(
73 | struct _cef_accessibility_handler_t* self,
74 | struct _cef_value_t* value);
75 | } cef_accessibility_handler_t;
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_
82 |
--------------------------------------------------------------------------------
/include/include/capi/cef_auth_callback_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=58be0e24b46373bbdad28031891396ea246f446c$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Callback structure used for asynchronous continuation of authentication
51 | // requests.
52 | ///
53 | typedef struct _cef_auth_callback_t {
54 | ///
55 | // Base structure.
56 | ///
57 | cef_base_ref_counted_t base;
58 |
59 | ///
60 | // Continue the authentication request.
61 | ///
62 | void(CEF_CALLBACK* cont)(struct _cef_auth_callback_t* self,
63 | const cef_string_t* username,
64 | const cef_string_t* password);
65 |
66 | ///
67 | // Cancel the authentication request.
68 | ///
69 | void(CEF_CALLBACK* cancel)(struct _cef_auth_callback_t* self);
70 | } cef_auth_callback_t;
71 |
72 | #ifdef __cplusplus
73 | }
74 | #endif
75 |
76 | #endif // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_
77 |
--------------------------------------------------------------------------------
/include/include/capi/cef_callback_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=5c540e617cf2782876defad365e85cd43932ffce$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Generic callback structure used for asynchronous continuation.
51 | ///
52 | typedef struct _cef_callback_t {
53 | ///
54 | // Base structure.
55 | ///
56 | cef_base_ref_counted_t base;
57 |
58 | ///
59 | // Continue processing.
60 | ///
61 | void(CEF_CALLBACK* cont)(struct _cef_callback_t* self);
62 |
63 | ///
64 | // Cancel processing.
65 | ///
66 | void(CEF_CALLBACK* cancel)(struct _cef_callback_t* self);
67 | } cef_callback_t;
68 |
69 | ///
70 | // Generic callback structure used for asynchronous completion.
71 | ///
72 | typedef struct _cef_completion_callback_t {
73 | ///
74 | // Base structure.
75 | ///
76 | cef_base_ref_counted_t base;
77 |
78 | ///
79 | // Method that will be called once the task is complete.
80 | ///
81 | void(CEF_CALLBACK* on_complete)(struct _cef_completion_callback_t* self);
82 | } cef_completion_callback_t;
83 |
84 | #ifdef __cplusplus
85 | }
86 | #endif
87 |
88 | #endif // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_
89 |
--------------------------------------------------------------------------------
/include/include/capi/cef_drag_handler_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=78022908355fbf836799545e67ce2e4663b85fdf$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 | #include "include/capi/cef_browser_capi.h"
45 | #include "include/capi/cef_drag_data_capi.h"
46 | #include "include/capi/cef_frame_capi.h"
47 |
48 | #ifdef __cplusplus
49 | extern "C" {
50 | #endif
51 |
52 | ///
53 | // Implement this structure to handle events related to dragging. The functions
54 | // of this structure will be called on the UI thread.
55 | ///
56 | typedef struct _cef_drag_handler_t {
57 | ///
58 | // Base structure.
59 | ///
60 | cef_base_ref_counted_t base;
61 |
62 | ///
63 | // Called when an external drag event enters the browser window. |dragData|
64 | // contains the drag event data and |mask| represents the type of drag
65 | // operation. Return false (0) for default drag handling behavior or true (1)
66 | // to cancel the drag event.
67 | ///
68 | int(CEF_CALLBACK* on_drag_enter)(struct _cef_drag_handler_t* self,
69 | struct _cef_browser_t* browser,
70 | struct _cef_drag_data_t* dragData,
71 | cef_drag_operations_mask_t mask);
72 |
73 | ///
74 | // Called whenever draggable regions for the browser window change. These can
75 | // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
76 | // draggable regions are never defined in a document this function will also
77 | // never be called. If the last draggable region is removed from a document
78 | // this function will be called with an NULL vector.
79 | ///
80 | void(CEF_CALLBACK* on_draggable_regions_changed)(
81 | struct _cef_drag_handler_t* self,
82 | struct _cef_browser_t* browser,
83 | struct _cef_frame_t* frame,
84 | size_t regionsCount,
85 | cef_draggable_region_t const* regions);
86 | } cef_drag_handler_t;
87 |
88 | #ifdef __cplusplus
89 | }
90 | #endif
91 |
92 | #endif // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_
93 |
--------------------------------------------------------------------------------
/include/include/capi/cef_find_handler_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=2aa57426a91e10985a5e92830bc3bcd9287708d4$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 | #include "include/capi/cef_browser_capi.h"
45 |
46 | #ifdef __cplusplus
47 | extern "C" {
48 | #endif
49 |
50 | ///
51 | // Implement this structure to handle events related to find results. The
52 | // functions of this structure will be called on the UI thread.
53 | ///
54 | typedef struct _cef_find_handler_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_base_ref_counted_t base;
59 |
60 | ///
61 | // Called to report find results returned by cef_browser_host_t::find().
62 | // |identifer| is the identifier passed to find(), |count| is the number of
63 | // matches currently identified, |selectionRect| is the location of where the
64 | // match was found (in window coordinates), |activeMatchOrdinal| is the
65 | // current position in the search results, and |finalUpdate| is true (1) if
66 | // this is the last find notification.
67 | ///
68 | void(CEF_CALLBACK* on_find_result)(struct _cef_find_handler_t* self,
69 | struct _cef_browser_t* browser,
70 | int identifier,
71 | int count,
72 | const cef_rect_t* selectionRect,
73 | int activeMatchOrdinal,
74 | int finalUpdate);
75 | } cef_find_handler_t;
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
82 |
--------------------------------------------------------------------------------
/include/include/capi/cef_focus_handler_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=091dd994f37070e9d7c27d0e2f7411ea9cf068f5$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 | #include "include/capi/cef_browser_capi.h"
45 | #include "include/capi/cef_dom_capi.h"
46 | #include "include/capi/cef_frame_capi.h"
47 |
48 | #ifdef __cplusplus
49 | extern "C" {
50 | #endif
51 |
52 | ///
53 | // Implement this structure to handle events related to focus. The functions of
54 | // this structure will be called on the UI thread.
55 | ///
56 | typedef struct _cef_focus_handler_t {
57 | ///
58 | // Base structure.
59 | ///
60 | cef_base_ref_counted_t base;
61 |
62 | ///
63 | // Called when the browser component is about to loose focus. For instance, if
64 | // focus was on the last HTML element and the user pressed the TAB key. |next|
65 | // will be true (1) if the browser is giving focus to the next component and
66 | // false (0) if the browser is giving focus to the previous component.
67 | ///
68 | void(CEF_CALLBACK* on_take_focus)(struct _cef_focus_handler_t* self,
69 | struct _cef_browser_t* browser,
70 | int next);
71 |
72 | ///
73 | // Called when the browser component is requesting focus. |source| indicates
74 | // where the focus request is originating from. Return false (0) to allow the
75 | // focus to be set or true (1) to cancel setting the focus.
76 | ///
77 | int(CEF_CALLBACK* on_set_focus)(struct _cef_focus_handler_t* self,
78 | struct _cef_browser_t* browser,
79 | cef_focus_source_t source);
80 |
81 | ///
82 | // Called when the browser component has received focus.
83 | ///
84 | void(CEF_CALLBACK* on_got_focus)(struct _cef_focus_handler_t* self,
85 | struct _cef_browser_t* browser);
86 | } cef_focus_handler_t;
87 |
88 | #ifdef __cplusplus
89 | }
90 | #endif
91 |
92 | #endif // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_
93 |
--------------------------------------------------------------------------------
/include/include/capi/cef_path_util_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=1b218a91d7f3ba0e68f0c3be21a0df91e515d28a$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Retrieve the path associated with the specified |key|. Returns true (1) on
51 | // success. Can be called on any thread in the browser process.
52 | ///
53 | CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path);
54 |
55 | #ifdef __cplusplus
56 | }
57 | #endif
58 |
59 | #endif // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_
60 |
--------------------------------------------------------------------------------
/include/include/capi/cef_process_message_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=79ec6d99ea47e1cf9b2cca0433704f205e14d3bd$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 | #include "include/capi/cef_values_capi.h"
45 |
46 | #ifdef __cplusplus
47 | extern "C" {
48 | #endif
49 |
50 | ///
51 | // Structure representing a message. Can be used on any process and thread.
52 | ///
53 | typedef struct _cef_process_message_t {
54 | ///
55 | // Base structure.
56 | ///
57 | cef_base_ref_counted_t base;
58 |
59 | ///
60 | // Returns true (1) if this object is valid. Do not call any other functions
61 | // if this function returns false (0).
62 | ///
63 | int(CEF_CALLBACK* is_valid)(struct _cef_process_message_t* self);
64 |
65 | ///
66 | // Returns true (1) if the values of this object are read-only. Some APIs may
67 | // expose read-only objects.
68 | ///
69 | int(CEF_CALLBACK* is_read_only)(struct _cef_process_message_t* self);
70 |
71 | ///
72 | // Returns a writable copy of this object.
73 | ///
74 | struct _cef_process_message_t*(CEF_CALLBACK* copy)(
75 | struct _cef_process_message_t* self);
76 |
77 | ///
78 | // Returns the message name.
79 | ///
80 | // The resulting string must be freed by calling cef_string_userfree_free().
81 | cef_string_userfree_t(CEF_CALLBACK* get_name)(
82 | struct _cef_process_message_t* self);
83 |
84 | ///
85 | // Returns the list of arguments.
86 | ///
87 | struct _cef_list_value_t*(CEF_CALLBACK* get_argument_list)(
88 | struct _cef_process_message_t* self);
89 | } cef_process_message_t;
90 |
91 | ///
92 | // Create a new cef_process_message_t object with the specified name.
93 | ///
94 | CEF_EXPORT cef_process_message_t* cef_process_message_create(
95 | const cef_string_t* name);
96 |
97 | #ifdef __cplusplus
98 | }
99 | #endif
100 |
101 | #endif // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_
102 |
--------------------------------------------------------------------------------
/include/include/capi/cef_process_util_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=75b16fd9d592c1d22b94d740e1deb61efe3afb97$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Launches the process specified via |command_line|. Returns true (1) upon
51 | // success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.
52 | //
53 | // Unix-specific notes: - All file descriptors open in the parent process will
54 | // be closed in the
55 | // child process except for stdin, stdout, and stderr.
56 | // - If the first argument on the command line does not contain a slash,
57 | // PATH will be searched. (See man execvp.)
58 | ///
59 | CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line);
60 |
61 | #ifdef __cplusplus
62 | }
63 | #endif
64 |
65 | #endif // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_
66 |
--------------------------------------------------------------------------------
/include/include/capi/cef_registration_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=029e237cf80f94a25453bac5a9b1e0765bb56f37$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Generic callback structure used for managing the lifespan of a registration.
51 | ///
52 | typedef struct _cef_registration_t {
53 | ///
54 | // Base structure.
55 | ///
56 | cef_base_ref_counted_t base;
57 | } cef_registration_t;
58 |
59 | #ifdef __cplusplus
60 | }
61 | #endif
62 |
63 | #endif // CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_
64 |
--------------------------------------------------------------------------------
/include/include/capi/cef_request_callback_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=3efd81a4bfdfca579a77f14bd37b8192122ebda4$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Callback structure used for asynchronous continuation of url requests.
51 | ///
52 | typedef struct _cef_request_callback_t {
53 | ///
54 | // Base structure.
55 | ///
56 | cef_base_ref_counted_t base;
57 |
58 | ///
59 | // Continue the url request. If |allow| is true (1) the request will be
60 | // continued. Otherwise, the request will be canceled.
61 | ///
62 | void(CEF_CALLBACK* cont)(struct _cef_request_callback_t* self, int allow);
63 |
64 | ///
65 | // Cancel the url request.
66 | ///
67 | void(CEF_CALLBACK* cancel)(struct _cef_request_callback_t* self);
68 | } cef_request_callback_t;
69 |
70 | #ifdef __cplusplus
71 | }
72 | #endif
73 |
74 | #endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_
75 |
--------------------------------------------------------------------------------
/include/include/capi/cef_ssl_info_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=badaadcff4641fea876fb626b8ffe5a6f34a376c$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 | #include "include/capi/cef_values_capi.h"
45 | #include "include/capi/cef_x509_certificate_capi.h"
46 |
47 | #ifdef __cplusplus
48 | extern "C" {
49 | #endif
50 |
51 | ///
52 | // Structure representing SSL information.
53 | ///
54 | typedef struct _cef_sslinfo_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_base_ref_counted_t base;
59 |
60 | ///
61 | // Returns a bitmask containing any and all problems verifying the server
62 | // certificate.
63 | ///
64 | cef_cert_status_t(CEF_CALLBACK* get_cert_status)(struct _cef_sslinfo_t* self);
65 |
66 | ///
67 | // Returns the X.509 certificate.
68 | ///
69 | struct _cef_x509certificate_t*(CEF_CALLBACK* get_x509certificate)(
70 | struct _cef_sslinfo_t* self);
71 | } cef_sslinfo_t;
72 |
73 | ///
74 | // Returns true (1) if the certificate status represents an error.
75 | ///
76 | CEF_EXPORT int cef_is_cert_status_error(cef_cert_status_t status);
77 |
78 | #ifdef __cplusplus
79 | }
80 | #endif
81 |
82 | #endif // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
83 |
--------------------------------------------------------------------------------
/include/include/capi/cef_ssl_status_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=3755121a7b89de52a67885ac1c6d12de23f4b657$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 | #include "include/capi/cef_values_capi.h"
45 | #include "include/capi/cef_x509_certificate_capi.h"
46 |
47 | #ifdef __cplusplus
48 | extern "C" {
49 | #endif
50 |
51 | ///
52 | // Structure representing the SSL information for a navigation entry.
53 | ///
54 | typedef struct _cef_sslstatus_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_base_ref_counted_t base;
59 |
60 | ///
61 | // Returns true (1) if the status is related to a secure SSL/TLS connection.
62 | ///
63 | int(CEF_CALLBACK* is_secure_connection)(struct _cef_sslstatus_t* self);
64 |
65 | ///
66 | // Returns a bitmask containing any and all problems verifying the server
67 | // certificate.
68 | ///
69 | cef_cert_status_t(CEF_CALLBACK* get_cert_status)(
70 | struct _cef_sslstatus_t* self);
71 |
72 | ///
73 | // Returns the SSL version used for the SSL connection.
74 | ///
75 | cef_ssl_version_t(CEF_CALLBACK* get_sslversion)(
76 | struct _cef_sslstatus_t* self);
77 |
78 | ///
79 | // Returns a bitmask containing the page security content status.
80 | ///
81 | cef_ssl_content_status_t(CEF_CALLBACK* get_content_status)(
82 | struct _cef_sslstatus_t* self);
83 |
84 | ///
85 | // Returns the X.509 certificate.
86 | ///
87 | struct _cef_x509certificate_t*(CEF_CALLBACK* get_x509certificate)(
88 | struct _cef_sslstatus_t* self);
89 | } cef_sslstatus_t;
90 |
91 | #ifdef __cplusplus
92 | }
93 | #endif
94 |
95 | #endif // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_
96 |
--------------------------------------------------------------------------------
/include/include/capi/cef_string_visitor_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=bba3a9719860f9a81c63cbb052a4c501416b2ada$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Implement this structure to receive string values asynchronously.
51 | ///
52 | typedef struct _cef_string_visitor_t {
53 | ///
54 | // Base structure.
55 | ///
56 | cef_base_ref_counted_t base;
57 |
58 | ///
59 | // Method that will be executed.
60 | ///
61 | void(CEF_CALLBACK* visit)(struct _cef_string_visitor_t* self,
62 | const cef_string_t* string);
63 | } cef_string_visitor_t;
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 | #endif // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_
70 |
--------------------------------------------------------------------------------
/include/include/capi/test/cef_test_helpers_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=44811580a3bddb5efed7d697ef8fa0b7e0925ef2$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_
41 | #pragma once
42 |
43 | #if !defined(BUILDING_CEF_SHARED) && !defined(WRAPPING_CEF_SHARED) && \
44 | !defined(UNIT_TEST)
45 | #error This file can be included for unit tests only
46 | #endif
47 |
48 | #include "include/capi/cef_base_capi.h"
49 |
50 | #ifdef __cplusplus
51 | extern "C" {
52 | #endif
53 |
54 | ///
55 | // Execute JavaScript with a user gesture to trigger functionality like
56 | // onbeforeunload handlers that will otherwise be blocked.
57 | ///
58 | CEF_EXPORT void cef_execute_java_script_with_user_gesture_for_tests(
59 | struct _cef_frame_t* frame,
60 | const cef_string_t* javascript);
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif
65 |
66 | #endif // CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_
67 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_box_layout_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=ddf96505520b7f8df0662d9f66221917a665b029$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/views/cef_layout_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | struct _cef_view_t;
50 |
51 | ///
52 | // A Layout manager that arranges child views vertically or horizontally in a
53 | // side-by-side fashion with spacing around and between the child views. The
54 | // child views are always sized according to their preferred size. If the host's
55 | // bounds provide insufficient space, child views will be clamped. Excess space
56 | // will not be distributed. Methods must be called on the browser process UI
57 | // thread unless otherwise indicated.
58 | ///
59 | typedef struct _cef_box_layout_t {
60 | ///
61 | // Base structure.
62 | ///
63 | cef_layout_t base;
64 |
65 | ///
66 | // Set the flex weight for the given |view|. Using the preferred size as the
67 | // basis, free space along the main axis is distributed to views in the ratio
68 | // of their flex weights. Similarly, if the views will overflow the parent,
69 | // space is subtracted in these ratios. A flex of 0 means this view is not
70 | // resized. Flex values must not be negative.
71 | ///
72 | void(CEF_CALLBACK* set_flex_for_view)(struct _cef_box_layout_t* self,
73 | struct _cef_view_t* view,
74 | int flex);
75 |
76 | ///
77 | // Clears the flex for the given |view|, causing it to use the default flex
78 | // specified via cef_box_layout_tSettings.default_flex.
79 | ///
80 | void(CEF_CALLBACK* clear_flex_for_view)(struct _cef_box_layout_t* self,
81 | struct _cef_view_t* view);
82 | } cef_box_layout_t;
83 |
84 | #ifdef __cplusplus
85 | }
86 | #endif
87 |
88 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_
89 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_button_delegate_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=71def746b63431f9aa779bbb67e85bc2e0176615$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/views/cef_view_delegate_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | struct _cef_button_t;
50 |
51 | ///
52 | // Implement this structure to handle Button events. The functions of this
53 | // structure will be called on the browser process UI thread unless otherwise
54 | // indicated.
55 | ///
56 | typedef struct _cef_button_delegate_t {
57 | ///
58 | // Base structure.
59 | ///
60 | cef_view_delegate_t base;
61 |
62 | ///
63 | // Called when |button| is pressed.
64 | ///
65 | void(CEF_CALLBACK* on_button_pressed)(struct _cef_button_delegate_t* self,
66 | struct _cef_button_t* button);
67 |
68 | ///
69 | // Called when the state of |button| changes.
70 | ///
71 | void(CEF_CALLBACK* on_button_state_changed)(
72 | struct _cef_button_delegate_t* self,
73 | struct _cef_button_t* button);
74 | } cef_button_delegate_t;
75 |
76 | #ifdef __cplusplus
77 | }
78 | #endif
79 |
80 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_
81 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_fill_layout_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=14016ebf5d63f625436aebd14396e403b673703f$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/views/cef_layout_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // A simple Layout that causes the associated Panel's one child to be sized to
51 | // match the bounds of its parent. Methods must be called on the browser process
52 | // UI thread unless otherwise indicated.
53 | ///
54 | typedef struct _cef_fill_layout_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_layout_t base;
59 | } cef_fill_layout_t;
60 |
61 | #ifdef __cplusplus
62 | }
63 | #endif
64 |
65 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_
66 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_layout_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=7db4a977d7fbbff0783d0334e53fa47f00fc9fac$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/cef_base_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | struct _cef_box_layout_t;
50 | struct _cef_fill_layout_t;
51 |
52 | ///
53 | // A Layout handles the sizing of the children of a Panel according to
54 | // implementation-specific heuristics. Methods must be called on the browser
55 | // process UI thread unless otherwise indicated.
56 | ///
57 | typedef struct _cef_layout_t {
58 | ///
59 | // Base structure.
60 | ///
61 | cef_base_ref_counted_t base;
62 |
63 | ///
64 | // Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
65 | ///
66 | struct _cef_box_layout_t*(CEF_CALLBACK* as_box_layout)(
67 | struct _cef_layout_t* self);
68 |
69 | ///
70 | // Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
71 | ///
72 | struct _cef_fill_layout_t*(CEF_CALLBACK* as_fill_layout)(
73 | struct _cef_layout_t* self);
74 |
75 | ///
76 | // Returns true (1) if this Layout is valid.
77 | ///
78 | int(CEF_CALLBACK* is_valid)(struct _cef_layout_t* self);
79 | } cef_layout_t;
80 |
81 | #ifdef __cplusplus
82 | }
83 | #endif
84 |
85 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_
86 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_menu_button_delegate_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=6668ddfd94bb501f0cb35b2c23043333c1cafe63$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/views/cef_button_delegate_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | struct _cef_menu_button_t;
50 |
51 | ///
52 | // MenuButton pressed lock is released when this object is destroyed.
53 | ///
54 | typedef struct _cef_menu_button_pressed_lock_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_base_ref_counted_t base;
59 | } cef_menu_button_pressed_lock_t;
60 |
61 | ///
62 | // Implement this structure to handle MenuButton events. The functions of this
63 | // structure will be called on the browser process UI thread unless otherwise
64 | // indicated.
65 | ///
66 | typedef struct _cef_menu_button_delegate_t {
67 | ///
68 | // Base structure.
69 | ///
70 | cef_button_delegate_t base;
71 |
72 | ///
73 | // Called when |button| is pressed. Call cef_menu_button_t::show_menu() to
74 | // show a popup menu at |screen_point|. When showing a custom popup such as a
75 | // window keep a reference to |button_pressed_lock| until the popup is hidden
76 | // to maintain the pressed button state.
77 | ///
78 | void(CEF_CALLBACK* on_menu_button_pressed)(
79 | struct _cef_menu_button_delegate_t* self,
80 | struct _cef_menu_button_t* menu_button,
81 | const cef_point_t* screen_point,
82 | struct _cef_menu_button_pressed_lock_t* button_pressed_lock);
83 | } cef_menu_button_delegate_t;
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_
90 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_panel_delegate_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=8a0ded4e62ff61b04fc1694228905daa995197b4$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/views/cef_view_delegate_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | ///
50 | // Implement this structure to handle Panel events. The functions of this
51 | // structure will be called on the browser process UI thread unless otherwise
52 | // indicated.
53 | ///
54 | typedef struct _cef_panel_delegate_t {
55 | ///
56 | // Base structure.
57 | ///
58 | cef_view_delegate_t base;
59 | } cef_panel_delegate_t;
60 |
61 | #ifdef __cplusplus
62 | }
63 | #endif
64 |
65 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_
66 |
--------------------------------------------------------------------------------
/include/include/capi/views/cef_textfield_delegate_capi.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool and should not edited
33 | // by hand. See the translator.README.txt file in the tools directory for
34 | // more information.
35 | //
36 | // $hash=ba43938d4c400bcdd25e48b4f84758b18609813b$
37 | //
38 |
39 | #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
40 | #define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
41 | #pragma once
42 |
43 | #include "include/capi/views/cef_view_delegate_capi.h"
44 |
45 | #ifdef __cplusplus
46 | extern "C" {
47 | #endif
48 |
49 | struct _cef_textfield_t;
50 |
51 | ///
52 | // Implement this structure to handle Textfield events. The functions of this
53 | // structure will be called on the browser process UI thread unless otherwise
54 | // indicated.
55 | ///
56 | typedef struct _cef_textfield_delegate_t {
57 | ///
58 | // Base structure.
59 | ///
60 | cef_view_delegate_t base;
61 |
62 | ///
63 | // Called when |textfield| recieves a keyboard event. |event| contains
64 | // information about the keyboard event. Return true (1) if the keyboard event
65 | // was handled or false (0) otherwise for default handling.
66 | ///
67 | int(CEF_CALLBACK* on_key_event)(struct _cef_textfield_delegate_t* self,
68 | struct _cef_textfield_t* textfield,
69 | const struct _cef_key_event_t* event);
70 |
71 | ///
72 | // Called after performing a user action that may change |textfield|.
73 | ///
74 | void(CEF_CALLBACK* on_after_user_action)(
75 | struct _cef_textfield_delegate_t* self,
76 | struct _cef_textfield_t* textfield);
77 | } cef_textfield_delegate_t;
78 |
79 | #ifdef __cplusplus
80 | }
81 | #endif
82 |
83 | #endif // CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_
84 |
--------------------------------------------------------------------------------
/include/include/cef_accessibility_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_ACCESSIBILITY_HANDLER_H_
38 | #define CEF_INCLUDE_CEF_ACCESSIBILITY_HANDLER_H_
39 | #pragma once
40 |
41 | #include "include/cef_values.h"
42 |
43 | ///
44 | // Implement this interface to receive accessibility notification when
45 | // accessibility events have been registered. The methods of this class will
46 | // be called on the UI thread.
47 | ///
48 | /*--cef(source=client)--*/
49 | class CefAccessibilityHandler : public virtual CefBaseRefCounted {
50 | public:
51 | ///
52 | // Called after renderer process sends accessibility tree changes to the
53 | // browser process.
54 | ///
55 | /*--cef()--*/
56 | virtual void OnAccessibilityTreeChange(CefRefPtr value) = 0;
57 |
58 | ///
59 | // Called after renderer process sends accessibility location changes to the
60 | // browser process.
61 | ///
62 | /*--cef()--*/
63 | virtual void OnAccessibilityLocationChange(CefRefPtr value) = 0;
64 | };
65 |
66 | #endif // CEF_INCLUDE_CEF_ACCESSIBILITY_HANDLER_H_
67 |
--------------------------------------------------------------------------------
/include/include/cef_api_hash.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file was generated by the CEF translator tool. If making changes by
33 | // hand only do so within the body of existing method and function
34 | // implementations. See the translator.README.txt file in the tools directory
35 | // for more information.
36 | //
37 | // $hash=fd013f5bdcf2333b1f0fb452442d300dffe598e5$
38 | //
39 |
40 | #ifndef CEF_INCLUDE_API_HASH_H_
41 | #define CEF_INCLUDE_API_HASH_H_
42 |
43 | #include "include/internal/cef_export.h"
44 |
45 | // The API hash is created by analyzing CEF header files for C API type
46 | // definitions. The hash value will change when header files are modified in a
47 | // way that may cause binary incompatibility with other builds. The universal
48 | // hash value will change if any platform is affected whereas the platform hash
49 | // values will change only if that particular platform is affected.
50 | #define CEF_API_HASH_UNIVERSAL "c80d4c5f1dc72279ac7a44d7b174fb80cf728abc"
51 | #if defined(OS_WIN)
52 | #define CEF_API_HASH_PLATFORM "bde71fdc88914ed7353ee7308d060cd6b4f8c8af"
53 | #elif defined(OS_MACOSX)
54 | #define CEF_API_HASH_PLATFORM "2fb3e42a6d2e594aa55792b5852d7f57524ab011"
55 | #elif defined(OS_LINUX)
56 | #define CEF_API_HASH_PLATFORM "222824f83536a111c6480dba64833251c01cd6fd"
57 | #endif
58 |
59 | #ifdef __cplusplus
60 | extern "C" {
61 | #endif
62 |
63 | ///
64 | // Returns CEF API hashes for the libcef library. The returned string is owned
65 | // by the library and should not be freed. The |entry| parameter describes which
66 | // hash value will be returned:
67 | // 0 - CEF_API_HASH_PLATFORM
68 | // 1 - CEF_API_HASH_UNIVERSAL
69 | // 2 - CEF_COMMIT_HASH (from cef_version.h)
70 | ///
71 | CEF_EXPORT const char* cef_api_hash(int entry);
72 |
73 | #ifdef __cplusplus
74 | }
75 | #endif
76 | #endif // CEF_INCLUDE_API_HASH_H_
77 |
--------------------------------------------------------------------------------
/include/include/cef_auth_callback.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_AUTH_CALLBACK_H_
38 | #define CEF_INCLUDE_CEF_AUTH_CALLBACK_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 |
43 | ///
44 | // Callback interface used for asynchronous continuation of authentication
45 | // requests.
46 | ///
47 | /*--cef(source=library)--*/
48 | class CefAuthCallback : public virtual CefBaseRefCounted {
49 | public:
50 | ///
51 | // Continue the authentication request.
52 | ///
53 | /*--cef(capi_name=cont,optional_param=username,optional_param=password)--*/
54 | virtual void Continue(const CefString& username,
55 | const CefString& password) = 0;
56 |
57 | ///
58 | // Cancel the authentication request.
59 | ///
60 | /*--cef()--*/
61 | virtual void Cancel() = 0;
62 | };
63 |
64 | #endif // CEF_INCLUDE_CEF_AUTH_CALLBACK_H_
65 |
--------------------------------------------------------------------------------
/include/include/cef_callback.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_CALLBACK_H_
38 | #define CEF_INCLUDE_CEF_CALLBACK_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 |
43 | ///
44 | // Generic callback interface used for asynchronous continuation.
45 | ///
46 | /*--cef(source=library)--*/
47 | class CefCallback : public virtual CefBaseRefCounted {
48 | public:
49 | ///
50 | // Continue processing.
51 | ///
52 | /*--cef(capi_name=cont)--*/
53 | virtual void Continue() = 0;
54 |
55 | ///
56 | // Cancel processing.
57 | ///
58 | /*--cef()--*/
59 | virtual void Cancel() = 0;
60 | };
61 |
62 | ///
63 | // Generic callback interface used for asynchronous completion.
64 | ///
65 | /*--cef(source=client)--*/
66 | class CefCompletionCallback : public virtual CefBaseRefCounted {
67 | public:
68 | ///
69 | // Method that will be called once the task is complete.
70 | ///
71 | /*--cef()--*/
72 | virtual void OnComplete() = 0;
73 | };
74 |
75 | #endif // CEF_INCLUDE_CEF_CALLBACK_H_
76 |
--------------------------------------------------------------------------------
/include/include/cef_config.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file is generated by the make_config_header.py tool.
33 | //
34 |
35 | #ifndef CEF_INCLUDE_CEF_CONFIG_H_
36 | #define CEF_INCLUDE_CEF_CONFIG_H_
37 |
38 | #define CEF_X11 1
39 | #endif // CEF_INCLUDE_CEF_CONFIG_H_
40 |
--------------------------------------------------------------------------------
/include/include/cef_drag_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_DRAG_HANDLER_H_
38 | #define CEF_INCLUDE_CEF_DRAG_HANDLER_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_browser.h"
43 | #include "include/cef_drag_data.h"
44 | #include "include/cef_frame.h"
45 |
46 | ///
47 | // Implement this interface to handle events related to dragging. The methods of
48 | // this class will be called on the UI thread.
49 | ///
50 | /*--cef(source=client)--*/
51 | class CefDragHandler : public virtual CefBaseRefCounted {
52 | public:
53 | typedef cef_drag_operations_mask_t DragOperationsMask;
54 |
55 | ///
56 | // Called when an external drag event enters the browser window. |dragData|
57 | // contains the drag event data and |mask| represents the type of drag
58 | // operation. Return false for default drag handling behavior or true to
59 | // cancel the drag event.
60 | ///
61 | /*--cef()--*/
62 | virtual bool OnDragEnter(CefRefPtr browser,
63 | CefRefPtr dragData,
64 | DragOperationsMask mask) {
65 | return false;
66 | }
67 |
68 | ///
69 | // Called whenever draggable regions for the browser window change. These can
70 | // be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
71 | // draggable regions are never defined in a document this method will also
72 | // never be called. If the last draggable region is removed from a document
73 | // this method will be called with an empty vector.
74 | ///
75 | /*--cef()--*/
76 | virtual void OnDraggableRegionsChanged(
77 | CefRefPtr browser,
78 | CefRefPtr frame,
79 | const std::vector& regions) {}
80 | };
81 |
82 | #endif // CEF_INCLUDE_CEF_DRAG_HANDLER_H_
83 |
--------------------------------------------------------------------------------
/include/include/cef_find_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_FIND_HANDLER_H_
38 | #define CEF_INCLUDE_CEF_FIND_HANDLER_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_browser.h"
43 |
44 | ///
45 | // Implement this interface to handle events related to find results. The
46 | // methods of this class will be called on the UI thread.
47 | ///
48 | /*--cef(source=client)--*/
49 | class CefFindHandler : public virtual CefBaseRefCounted {
50 | public:
51 | ///
52 | // Called to report find results returned by CefBrowserHost::Find().
53 | // |identifer| is the identifier passed to Find(), |count| is the number of
54 | // matches currently identified, |selectionRect| is the location of where the
55 | // match was found (in window coordinates), |activeMatchOrdinal| is the
56 | // current position in the search results, and |finalUpdate| is true if this
57 | // is the last find notification.
58 | ///
59 | /*--cef()--*/
60 | virtual void OnFindResult(CefRefPtr browser,
61 | int identifier,
62 | int count,
63 | const CefRect& selectionRect,
64 | int activeMatchOrdinal,
65 | bool finalUpdate) {}
66 | };
67 |
68 | #endif // CEF_INCLUDE_CEF_FIND_HANDLER_H_
69 |
--------------------------------------------------------------------------------
/include/include/cef_focus_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
38 | #define CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_browser.h"
43 | #include "include/cef_dom.h"
44 | #include "include/cef_frame.h"
45 |
46 | ///
47 | // Implement this interface to handle events related to focus. The methods of
48 | // this class will be called on the UI thread.
49 | ///
50 | /*--cef(source=client)--*/
51 | class CefFocusHandler : public virtual CefBaseRefCounted {
52 | public:
53 | typedef cef_focus_source_t FocusSource;
54 |
55 | ///
56 | // Called when the browser component is about to loose focus. For instance, if
57 | // focus was on the last HTML element and the user pressed the TAB key. |next|
58 | // will be true if the browser is giving focus to the next component and false
59 | // if the browser is giving focus to the previous component.
60 | ///
61 | /*--cef()--*/
62 | virtual void OnTakeFocus(CefRefPtr browser, bool next) {}
63 |
64 | ///
65 | // Called when the browser component is requesting focus. |source| indicates
66 | // where the focus request is originating from. Return false to allow the
67 | // focus to be set or true to cancel setting the focus.
68 | ///
69 | /*--cef()--*/
70 | virtual bool OnSetFocus(CefRefPtr browser, FocusSource source) {
71 | return false;
72 | }
73 |
74 | ///
75 | // Called when the browser component has received focus.
76 | ///
77 | /*--cef()--*/
78 | virtual void OnGotFocus(CefRefPtr browser) {}
79 | };
80 |
81 | #endif // CEF_INCLUDE_CEF_FOCUS_HANDLER_H_
82 |
--------------------------------------------------------------------------------
/include/include/cef_keyboard_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
38 | #define CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_browser.h"
43 |
44 | ///
45 | // Implement this interface to handle events related to keyboard input. The
46 | // methods of this class will be called on the UI thread.
47 | ///
48 | /*--cef(source=client)--*/
49 | class CefKeyboardHandler : public virtual CefBaseRefCounted {
50 | public:
51 | ///
52 | // Called before a keyboard event is sent to the renderer. |event| contains
53 | // information about the keyboard event. |os_event| is the operating system
54 | // event message, if any. Return true if the event was handled or false
55 | // otherwise. If the event will be handled in OnKeyEvent() as a keyboard
56 | // shortcut set |is_keyboard_shortcut| to true and return false.
57 | ///
58 | /*--cef()--*/
59 | virtual bool OnPreKeyEvent(CefRefPtr browser,
60 | const CefKeyEvent& event,
61 | CefEventHandle os_event,
62 | bool* is_keyboard_shortcut) {
63 | return false;
64 | }
65 |
66 | ///
67 | // Called after the renderer and JavaScript in the page has had a chance to
68 | // handle the event. |event| contains information about the keyboard event.
69 | // |os_event| is the operating system event message, if any. Return true if
70 | // the keyboard event was handled or false otherwise.
71 | ///
72 | /*--cef()--*/
73 | virtual bool OnKeyEvent(CefRefPtr browser,
74 | const CefKeyEvent& event,
75 | CefEventHandle os_event) {
76 | return false;
77 | }
78 | };
79 |
80 | #endif // CEF_INCLUDE_CEF_KEYBOARD_HANDLER_H_
81 |
--------------------------------------------------------------------------------
/include/include/cef_path_util.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_PATH_UTIL_H_
38 | #define CEF_INCLUDE_CEF_PATH_UTIL_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 |
43 | typedef cef_path_key_t PathKey;
44 |
45 | ///
46 | // Retrieve the path associated with the specified |key|. Returns true on
47 | // success. Can be called on any thread in the browser process.
48 | ///
49 | /*--cef()--*/
50 | bool CefGetPath(PathKey key, CefString& path);
51 |
52 | #endif // CEF_INCLUDE_CEF_PATH_UTIL_H_
53 |
--------------------------------------------------------------------------------
/include/include/cef_process_message.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_MESSAGE_H_
38 | #define CEF_INCLUDE_CEF_MESSAGE_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_values.h"
43 |
44 | typedef cef_process_id_t CefProcessId;
45 |
46 | ///
47 | // Class representing a message. Can be used on any process and thread.
48 | ///
49 | /*--cef(source=library)--*/
50 | class CefProcessMessage : public virtual CefBaseRefCounted {
51 | public:
52 | ///
53 | // Create a new CefProcessMessage object with the specified name.
54 | ///
55 | /*--cef()--*/
56 | static CefRefPtr Create(const CefString& name);
57 |
58 | ///
59 | // Returns true if this object is valid. Do not call any other methods if this
60 | // function returns false.
61 | ///
62 | /*--cef()--*/
63 | virtual bool IsValid() = 0;
64 |
65 | ///
66 | // Returns true if the values of this object are read-only. Some APIs may
67 | // expose read-only objects.
68 | ///
69 | /*--cef()--*/
70 | virtual bool IsReadOnly() = 0;
71 |
72 | ///
73 | // Returns a writable copy of this object.
74 | ///
75 | /*--cef()--*/
76 | virtual CefRefPtr Copy() = 0;
77 |
78 | ///
79 | // Returns the message name.
80 | ///
81 | /*--cef()--*/
82 | virtual CefString GetName() = 0;
83 |
84 | ///
85 | // Returns the list of arguments.
86 | ///
87 | /*--cef()--*/
88 | virtual CefRefPtr GetArgumentList() = 0;
89 | };
90 |
91 | #endif // CEF_INCLUDE_CEF_MESSAGE_H_
92 |
--------------------------------------------------------------------------------
/include/include/cef_process_util.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_PROCESS_UTIL_H_
38 | #define CEF_INCLUDE_CEF_PROCESS_UTIL_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_command_line.h"
43 |
44 | ///
45 | // Launches the process specified via |command_line|. Returns true upon
46 | // success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.
47 | //
48 | // Unix-specific notes:
49 | // - All file descriptors open in the parent process will be closed in the
50 | // child process except for stdin, stdout, and stderr.
51 | // - If the first argument on the command line does not contain a slash,
52 | // PATH will be searched. (See man execvp.)
53 | ///
54 | /*--cef()--*/
55 | bool CefLaunchProcess(CefRefPtr command_line);
56 |
57 | #endif // CEF_INCLUDE_CEF_PROCESS_UTIL_H_
58 |
--------------------------------------------------------------------------------
/include/include/cef_registration.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_REGISTRATION_H_
38 | #define CEF_INCLUDE_CEF_REGISTRATION_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 |
43 | ///
44 | // Generic callback interface used for managing the lifespan of a registration.
45 | ///
46 | /*--cef(source=library)--*/
47 | class CefRegistration : public virtual CefBaseRefCounted {};
48 |
49 | #endif // CEF_INCLUDE_CEF_REGISTRATION_H_
50 |
--------------------------------------------------------------------------------
/include/include/cef_request_callback.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_REQUEST_CALLBACK_H_
38 | #define CEF_INCLUDE_CEF_REQUEST_CALLBACK_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 |
43 | ///
44 | // Callback interface used for asynchronous continuation of url requests.
45 | ///
46 | /*--cef(source=library)--*/
47 | class CefRequestCallback : public virtual CefBaseRefCounted {
48 | public:
49 | ///
50 | // Continue the url request. If |allow| is true the request will be continued.
51 | // Otherwise, the request will be canceled.
52 | ///
53 | /*--cef(capi_name=cont)--*/
54 | virtual void Continue(bool allow) = 0;
55 |
56 | ///
57 | // Cancel the url request.
58 | ///
59 | /*--cef()--*/
60 | virtual void Cancel() = 0;
61 | };
62 |
63 | #endif // CEF_INCLUDE_CEF_REQUEST_CALLBACK_H_
64 |
--------------------------------------------------------------------------------
/include/include/cef_sandbox_win.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CEF_INCLUDE_CEF_SANDBOX_WIN_H_
31 | #define CEF_INCLUDE_CEF_SANDBOX_WIN_H_
32 | #pragma once
33 |
34 | #include "include/base/cef_build.h"
35 |
36 | #if defined(OS_WIN)
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | // The sandbox is used to restrict sub-processes (renderer, plugin, GPU, etc)
43 | // from directly accessing system resources. This helps to protect the user
44 | // from untrusted and potentially malicious Web content.
45 | // See http://www.chromium.org/developers/design-documents/sandbox for
46 | // complete details.
47 | //
48 | // To enable the sandbox on Windows the following requirements must be met:
49 | // 1. Use the same executable for the browser process and all sub-processes.
50 | // 2. Link the executable with the cef_sandbox static library.
51 | // 3. Call the cef_sandbox_info_create() function from within the executable
52 | // (not from a separate DLL) and pass the resulting pointer into both the
53 | // CefExecutProcess() and CefInitialize() functions via the
54 | // |windows_sandbox_info| parameter.
55 |
56 | ///
57 | // Create the sandbox information object for this process. It is safe to create
58 | // multiple of this object and to destroy the object immediately after passing
59 | // into the CefExecutProcess() and/or CefInitialize() functions.
60 | ///
61 | void* cef_sandbox_info_create();
62 |
63 | ///
64 | // Destroy the specified sandbox information object.
65 | ///
66 | void cef_sandbox_info_destroy(void* sandbox_info);
67 |
68 | #ifdef __cplusplus
69 | }
70 |
71 | ///
72 | // Manages the life span of a sandbox information object.
73 | ///
74 | class CefScopedSandboxInfo {
75 | public:
76 | CefScopedSandboxInfo() { sandbox_info_ = cef_sandbox_info_create(); }
77 | ~CefScopedSandboxInfo() { cef_sandbox_info_destroy(sandbox_info_); }
78 |
79 | void* sandbox_info() const { return sandbox_info_; }
80 |
81 | private:
82 | void* sandbox_info_;
83 | };
84 | #endif // __cplusplus
85 |
86 | #endif // defined(OS_WIN)
87 |
88 | #endif // CEF_INCLUDE_CEF_SANDBOX_WIN_H_
89 |
--------------------------------------------------------------------------------
/include/include/cef_ssl_info.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_SSL_INFO_H_
38 | #define CEF_INCLUDE_CEF_SSL_INFO_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_values.h"
43 |
44 | #include "include/cef_x509_certificate.h"
45 |
46 | ///
47 | // Class representing SSL information.
48 | ///
49 | /*--cef(source=library)--*/
50 | class CefSSLInfo : public virtual CefBaseRefCounted {
51 | public:
52 | ///
53 | // Returns a bitmask containing any and all problems verifying the server
54 | // certificate.
55 | ///
56 | /*--cef(default_retval=CERT_STATUS_NONE)--*/
57 | virtual cef_cert_status_t GetCertStatus() = 0;
58 |
59 | ///
60 | // Returns the X.509 certificate.
61 | ///
62 | /*--cef()--*/
63 | virtual CefRefPtr GetX509Certificate() = 0;
64 | };
65 |
66 | ///
67 | // Returns true if the certificate status represents an error.
68 | ///
69 | /*--cef()--*/
70 | bool CefIsCertStatusError(cef_cert_status_t status);
71 |
72 | #endif // CEF_INCLUDE_CEF_SSL_INFO_H_
73 |
--------------------------------------------------------------------------------
/include/include/cef_ssl_status.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_SSL_STATUS_H_
38 | #define CEF_INCLUDE_CEF_SSL_STATUS_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 | #include "include/cef_values.h"
43 | #include "include/cef_x509_certificate.h"
44 |
45 | ///
46 | // Class representing the SSL information for a navigation entry.
47 | ///
48 | /*--cef(source=library)--*/
49 | class CefSSLStatus : public virtual CefBaseRefCounted {
50 | public:
51 | ///
52 | // Returns true if the status is related to a secure SSL/TLS connection.
53 | ///
54 | /*--cef()--*/
55 | virtual bool IsSecureConnection() = 0;
56 |
57 | ///
58 | // Returns a bitmask containing any and all problems verifying the server
59 | // certificate.
60 | ///
61 | /*--cef(default_retval=CERT_STATUS_NONE)--*/
62 | virtual cef_cert_status_t GetCertStatus() = 0;
63 |
64 | ///
65 | // Returns the SSL version used for the SSL connection.
66 | ///
67 | /*--cef(default_retval=SSL_CONNECTION_VERSION_UNKNOWN)--*/
68 | virtual cef_ssl_version_t GetSSLVersion() = 0;
69 |
70 | ///
71 | // Returns a bitmask containing the page security content status.
72 | ///
73 | /*--cef(default_retval=SSL_CONTENT_NORMAL_CONTENT)--*/
74 | virtual cef_ssl_content_status_t GetContentStatus() = 0;
75 |
76 | ///
77 | // Returns the X.509 certificate.
78 | ///
79 | /*--cef()--*/
80 | virtual CefRefPtr GetX509Certificate() = 0;
81 | };
82 |
83 | #endif // CEF_INCLUDE_CEF_SSL_STATUS_H_
84 |
--------------------------------------------------------------------------------
/include/include/cef_string_visitor.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_CEF_STRING_VISITOR_H_
38 | #define CEF_INCLUDE_CEF_STRING_VISITOR_H_
39 |
40 | #include "include/cef_base.h"
41 |
42 | ///
43 | // Implement this interface to receive string values asynchronously.
44 | ///
45 | /*--cef(source=client)--*/
46 | class CefStringVisitor : public virtual CefBaseRefCounted {
47 | public:
48 | ///
49 | // Method that will be executed.
50 | ///
51 | /*--cef(optional_param=string)--*/
52 | virtual void Visit(const CefString& string) = 0;
53 | };
54 |
55 | #endif // CEF_INCLUDE_CEF_STRING_VISITOR_H_
56 |
--------------------------------------------------------------------------------
/include/include/cef_version.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // This file is generated by the make_version_header.py tool.
33 | //
34 |
35 | #ifndef CEF_INCLUDE_CEF_VERSION_H_
36 | #define CEF_INCLUDE_CEF_VERSION_H_
37 |
38 | #define CEF_VERSION "81.3.10+gb223419+chromium-81.0.4044.138"
39 | #define CEF_VERSION_MAJOR 81
40 | #define CEF_VERSION_MINOR 3
41 | #define CEF_VERSION_PATCH 10
42 | #define CEF_COMMIT_NUMBER 2188
43 | #define CEF_COMMIT_HASH "b223419041d549e565c1c53e5ff7a17436f681fb"
44 | #define COPYRIGHT_YEAR 2020
45 |
46 | #define CHROME_VERSION_MAJOR 81
47 | #define CHROME_VERSION_MINOR 0
48 | #define CHROME_VERSION_BUILD 4044
49 | #define CHROME_VERSION_PATCH 138
50 |
51 | #define DO_MAKE_STRING(p) #p
52 | #define MAKE_STRING(p) DO_MAKE_STRING(p)
53 |
54 | #ifndef APSTUDIO_HIDDEN_SYMBOLS
55 |
56 | #include "include/internal/cef_export.h"
57 |
58 | #ifdef __cplusplus
59 | extern "C" {
60 | #endif
61 |
62 | // Returns CEF version information for the libcef library. The |entry|
63 | // parameter describes which version component will be returned:
64 | // 0 - CEF_VERSION_MAJOR
65 | // 1 - CEF_VERSION_MINOR
66 | // 2 - CEF_VERSION_PATCH
67 | // 3 - CEF_COMMIT_NUMBER
68 | // 4 - CHROME_VERSION_MAJOR
69 | // 5 - CHROME_VERSION_MINOR
70 | // 6 - CHROME_VERSION_BUILD
71 | // 7 - CHROME_VERSION_PATCH
72 | ///
73 | CEF_EXPORT int cef_version_info(int entry);
74 |
75 | #ifdef __cplusplus
76 | }
77 | #endif
78 |
79 | #endif // APSTUDIO_HIDDEN_SYMBOLS
80 |
81 | #endif // CEF_INCLUDE_CEF_VERSION_H_
82 |
--------------------------------------------------------------------------------
/include/include/internal/cef_export.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
2 | // reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the name Chromium Embedded
15 | // Framework nor the names of its contributors may be used to endorse
16 | // or promote products derived from this software without specific prior
17 | // written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | #ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
32 | #define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
33 | #pragma once
34 |
35 | #include "include/base/cef_build.h"
36 |
37 | #if defined(COMPILER_MSVC)
38 |
39 | #ifdef BUILDING_CEF_SHARED
40 | #define CEF_EXPORT __declspec(dllexport)
41 | #elif USING_CEF_SHARED
42 | #define CEF_EXPORT __declspec(dllimport)
43 | #else
44 | #define CEF_EXPORT
45 | #endif
46 |
47 | #elif defined(COMPILER_GCC)
48 |
49 | #define CEF_EXPORT __attribute__((visibility("default")))
50 |
51 | #endif // COMPILER_GCC
52 |
53 | #if defined(OS_WIN)
54 | #define CEF_CALLBACK __stdcall
55 | #else
56 | #define CEF_CALLBACK
57 | #endif
58 |
59 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
60 |
--------------------------------------------------------------------------------
/include/include/internal/cef_logging_internal.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
31 | #define CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
32 | #pragma once
33 |
34 | #include
35 |
36 | #include "include/internal/cef_export.h"
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | // See include/base/cef_logging.h for macros and intended usage.
43 |
44 | ///
45 | // Gets the current log level.
46 | ///
47 | CEF_EXPORT int cef_get_min_log_level();
48 |
49 | ///
50 | // Gets the current vlog level for the given file (usually taken from
51 | // __FILE__). Note that |N| is the size *with* the null terminator.
52 | ///
53 | CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N);
54 |
55 | ///
56 | // Add a log message. See the LogSeverity defines for supported |severity|
57 | // values.
58 | ///
59 | CEF_EXPORT void cef_log(const char* file,
60 | int line,
61 | int severity,
62 | const char* message);
63 |
64 | #ifdef __cplusplus
65 | }
66 | #endif // __cplusplus
67 |
68 | #endif // CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
69 |
--------------------------------------------------------------------------------
/include/include/internal/cef_string_list.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_
31 | #define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_
32 | #pragma once
33 |
34 | #include "include/internal/cef_export.h"
35 | #include "include/internal/cef_string.h"
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | ///
42 | // CEF string maps are a set of key/value string pairs.
43 | ///
44 | typedef void* cef_string_list_t;
45 |
46 | ///
47 | // Allocate a new string map.
48 | ///
49 | CEF_EXPORT cef_string_list_t cef_string_list_alloc();
50 |
51 | ///
52 | // Return the number of elements in the string list.
53 | ///
54 | CEF_EXPORT size_t cef_string_list_size(cef_string_list_t list);
55 |
56 | ///
57 | // Retrieve the value at the specified zero-based string list index. Returns
58 | // true (1) if the value was successfully retrieved.
59 | ///
60 | CEF_EXPORT int cef_string_list_value(cef_string_list_t list,
61 | size_t index,
62 | cef_string_t* value);
63 |
64 | ///
65 | // Append a new value at the end of the string list.
66 | ///
67 | CEF_EXPORT void cef_string_list_append(cef_string_list_t list,
68 | const cef_string_t* value);
69 |
70 | ///
71 | // Clear the string list.
72 | ///
73 | CEF_EXPORT void cef_string_list_clear(cef_string_list_t list);
74 |
75 | ///
76 | // Free the string list.
77 | ///
78 | CEF_EXPORT void cef_string_list_free(cef_string_list_t list);
79 |
80 | ///
81 | // Creates a copy of an existing string list.
82 | ///
83 | CEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list);
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_
90 |
--------------------------------------------------------------------------------
/include/include/internal/cef_string_map.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_
31 | #define CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_
32 | #pragma once
33 |
34 | #include "include/internal/cef_export.h"
35 | #include "include/internal/cef_string.h"
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | ///
42 | // CEF string maps are a set of key/value string pairs.
43 | ///
44 | typedef void* cef_string_map_t;
45 |
46 | ///
47 | // Allocate a new string map.
48 | ///
49 | CEF_EXPORT cef_string_map_t cef_string_map_alloc();
50 |
51 | ///
52 | // Return the number of elements in the string map.
53 | ///
54 | CEF_EXPORT size_t cef_string_map_size(cef_string_map_t map);
55 |
56 | ///
57 | // Return the value assigned to the specified key.
58 | ///
59 | CEF_EXPORT int cef_string_map_find(cef_string_map_t map,
60 | const cef_string_t* key,
61 | cef_string_t* value);
62 |
63 | ///
64 | // Return the key at the specified zero-based string map index.
65 | ///
66 | CEF_EXPORT int cef_string_map_key(cef_string_map_t map,
67 | size_t index,
68 | cef_string_t* key);
69 |
70 | ///
71 | // Return the value at the specified zero-based string map index.
72 | ///
73 | CEF_EXPORT int cef_string_map_value(cef_string_map_t map,
74 | size_t index,
75 | cef_string_t* value);
76 |
77 | ///
78 | // Append a new key/value pair at the end of the string map.
79 | ///
80 | CEF_EXPORT int cef_string_map_append(cef_string_map_t map,
81 | const cef_string_t* key,
82 | const cef_string_t* value);
83 |
84 | ///
85 | // Clear the string map.
86 | ///
87 | CEF_EXPORT void cef_string_map_clear(cef_string_map_t map);
88 |
89 | ///
90 | // Free the string map.
91 | ///
92 | CEF_EXPORT void cef_string_map_free(cef_string_map_t map);
93 |
94 | #ifdef __cplusplus
95 | }
96 | #endif
97 |
98 | #endif // CEF_INCLUDE_INTERNAL_CEF_STRING_MAP_H_
99 |
--------------------------------------------------------------------------------
/include/include/internal/cef_thread_internal.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
31 | #define CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
32 | #pragma once
33 |
34 | #if defined(OS_WIN)
35 | #include
36 | #elif defined(OS_POSIX)
37 | #include
38 | #include
39 | #endif
40 |
41 | #include "include/internal/cef_export.h"
42 |
43 | #ifdef __cplusplus
44 | extern "C" {
45 | #endif
46 |
47 | #if defined(OS_WIN)
48 | typedef DWORD cef_platform_thread_id_t;
49 | #define kInvalidPlatformThreadId 0U
50 | #elif defined(OS_POSIX)
51 | typedef pid_t cef_platform_thread_id_t;
52 | #define kInvalidPlatformThreadId 0
53 | #endif
54 |
55 | ///
56 | // Returns the current platform thread ID.
57 | ///
58 | CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id();
59 |
60 | #if defined(OS_WIN)
61 | typedef DWORD cef_platform_thread_handle_t;
62 | #define kInvalidPlatformThreadHandle 0U
63 | #elif defined(OS_POSIX)
64 | typedef pthread_t cef_platform_thread_handle_t;
65 | #define kInvalidPlatformThreadHandle 0
66 | #endif
67 |
68 | ///
69 | // Returns the current platform thread handle.
70 | ///
71 | CEF_EXPORT cef_platform_thread_handle_t
72 | cef_get_current_platform_thread_handle();
73 |
74 | #ifdef __cplusplus
75 | }
76 | #endif // __cplusplus
77 |
78 | #endif // CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
79 |
--------------------------------------------------------------------------------
/include/include/internal/cef_time.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CEF_INCLUDE_INTERNAL_CEF_TIME_H_
31 | #define CEF_INCLUDE_INTERNAL_CEF_TIME_H_
32 | #pragma once
33 |
34 | #ifdef __cplusplus
35 | extern "C" {
36 | #endif
37 |
38 | #include
39 | #include "include/internal/cef_export.h"
40 |
41 | ///
42 | // Time information. Values should always be in UTC.
43 | ///
44 | typedef struct _cef_time_t {
45 | int year; // Four or five digit year "2007" (1601 to 30827 on
46 | // Windows, 1970 to 2038 on 32-bit POSIX)
47 | int month; // 1-based month (values 1 = January, etc.)
48 | int day_of_week; // 0-based day of week (0 = Sunday, etc.)
49 | int day_of_month; // 1-based day of month (1-31)
50 | int hour; // Hour within the current day (0-23)
51 | int minute; // Minute within the current hour (0-59)
52 | int second; // Second within the current minute (0-59 plus leap
53 | // seconds which may take it up to 60).
54 | int millisecond; // Milliseconds within the current second (0-999)
55 | } cef_time_t;
56 |
57 | ///
58 | // Converts cef_time_t to/from time_t. Returns true (1) on success and false (0)
59 | // on failure.
60 | ///
61 | CEF_EXPORT int cef_time_to_timet(const cef_time_t* cef_time, time_t* time);
62 | CEF_EXPORT int cef_time_from_timet(time_t time, cef_time_t* cef_time);
63 |
64 | ///
65 | // Converts cef_time_t to/from a double which is the number of seconds since
66 | // epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0
67 | // means "not initialized". Returns true (1) on success and false (0) on
68 | // failure.
69 | ///
70 | CEF_EXPORT int cef_time_to_doublet(const cef_time_t* cef_time, double* time);
71 | CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time);
72 |
73 | ///
74 | // Retrieve the current system time.
75 | //
76 | CEF_EXPORT int cef_time_now(cef_time_t* cef_time);
77 |
78 | ///
79 | // Retrieve the delta in milliseconds between two time values.
80 | //
81 | CEF_EXPORT int cef_time_delta(const cef_time_t* cef_time1,
82 | const cef_time_t* cef_time2,
83 | long long* delta);
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif // CEF_INCLUDE_INTERNAL_CEF_TIME_H_
90 |
--------------------------------------------------------------------------------
/include/include/test/cef_test_helpers.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 | // THIS FILE IS FOR TESTING PURPOSES ONLY.
37 | //
38 | // The APIs defined in this file are for testing purposes only. They should only
39 | // be included from unit test targets.
40 | //
41 |
42 | #ifndef CEF_INCLUDE_TEST_CEF_TEST_HELPERS_H_
43 | #define CEF_INCLUDE_TEST_CEF_TEST_HELPERS_H_
44 | #pragma once
45 |
46 | #if !defined(BUILDING_CEF_SHARED) && !defined(WRAPPING_CEF_SHARED) && \
47 | !defined(UNIT_TEST)
48 | #error This file can be included for unit tests only
49 | #endif
50 |
51 | #include "include/cef_frame.h"
52 |
53 | ///
54 | // Execute JavaScript with a user gesture to trigger functionality like
55 | // onbeforeunload handlers that will otherwise be blocked.
56 | ///
57 | /*--cef(optional_param=javascript)--*/
58 | void CefExecuteJavaScriptWithUserGestureForTests(CefRefPtr frame,
59 | const CefString& javascript);
60 |
61 | #endif // CEF_INCLUDE_TEST_CEF_TEST_HELPERS_H_
62 |
--------------------------------------------------------------------------------
/include/include/views/cef_box_layout.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_layout.h"
42 |
43 | class CefView;
44 |
45 | ///
46 | // A Layout manager that arranges child views vertically or horizontally in a
47 | // side-by-side fashion with spacing around and between the child views. The
48 | // child views are always sized according to their preferred size. If the
49 | // host's bounds provide insufficient space, child views will be clamped.
50 | // Excess space will not be distributed. Methods must be called on the browser
51 | // process UI thread unless otherwise indicated.
52 | ///
53 | /*--cef(source=library)--*/
54 | class CefBoxLayout : public CefLayout {
55 | public:
56 | ///
57 | // Set the flex weight for the given |view|. Using the preferred size as
58 | // the basis, free space along the main axis is distributed to views in the
59 | // ratio of their flex weights. Similarly, if the views will overflow the
60 | // parent, space is subtracted in these ratios. A flex of 0 means this view is
61 | // not resized. Flex values must not be negative.
62 | ///
63 | /*--cef()--*/
64 | virtual void SetFlexForView(CefRefPtr view, int flex) = 0;
65 |
66 | ///
67 | // Clears the flex for the given |view|, causing it to use the default flex
68 | // specified via CefBoxLayoutSettings.default_flex.
69 | ///
70 | /*--cef()--*/
71 | virtual void ClearFlexForView(CefRefPtr view) = 0;
72 | };
73 |
74 | #endif // CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_
75 |
--------------------------------------------------------------------------------
/include/include/views/cef_button.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_BUTTON_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_view.h"
42 |
43 | class CefLabelButton;
44 |
45 | ///
46 | // A View representing a button. Depending on the specific type, the button
47 | // could be implemented by a native control or custom rendered. Methods must be
48 | // called on the browser process UI thread unless otherwise indicated.
49 | ///
50 | /*--cef(source=library)--*/
51 | class CefButton : public CefView {
52 | public:
53 | ///
54 | // Returns this Button as a LabelButton or NULL if this is not a LabelButton.
55 | ///
56 | /*--cef()--*/
57 | virtual CefRefPtr AsLabelButton() = 0;
58 |
59 | ///
60 | // Sets the current display state of the Button.
61 | ///
62 | /*--cef()--*/
63 | virtual void SetState(cef_button_state_t state) = 0;
64 |
65 | ///
66 | // Returns the current display state of the Button.
67 | ///
68 | /*--cef(default_retval=CEF_BUTTON_STATE_NORMAL)--*/
69 | virtual cef_button_state_t GetState() = 0;
70 |
71 | ///
72 | // Sets the Button will use an ink drop effect for displaying state changes.
73 | ///
74 | /*--cef()--*/
75 | virtual void SetInkDropEnabled(bool enabled) = 0;
76 |
77 | ///
78 | // Sets the tooltip text that will be displayed when the user hovers the mouse
79 | // cursor over the Button.
80 | ///
81 | /*--cef()--*/
82 | virtual void SetTooltipText(const CefString& tooltip_text) = 0;
83 |
84 | ///
85 | // Sets the accessible name that will be exposed to assistive technology (AT).
86 | ///
87 | /*--cef()--*/
88 | virtual void SetAccessibleName(const CefString& name) = 0;
89 | };
90 |
91 | #endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_H_
92 |
--------------------------------------------------------------------------------
/include/include/views/cef_button_delegate.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_view_delegate.h"
42 |
43 | class CefButton;
44 |
45 | ///
46 | // Implement this interface to handle Button events. The methods of this class
47 | // will be called on the browser process UI thread unless otherwise indicated.
48 | ///
49 | /*--cef(source=client)--*/
50 | class CefButtonDelegate : public CefViewDelegate {
51 | public:
52 | ///
53 | // Called when |button| is pressed.
54 | ///
55 | /*--cef()--*/
56 | virtual void OnButtonPressed(CefRefPtr button) = 0;
57 |
58 | ///
59 | // Called when the state of |button| changes.
60 | ///
61 | /*--cef()--*/
62 | virtual void OnButtonStateChanged(CefRefPtr button) {}
63 | };
64 |
65 | #endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_
66 |
--------------------------------------------------------------------------------
/include/include/views/cef_fill_layout.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_layout.h"
42 |
43 | ///
44 | // A simple Layout that causes the associated Panel's one child to be sized to
45 | // match the bounds of its parent. Methods must be called on the browser process
46 | // UI thread unless otherwise indicated.
47 | ///
48 | /*--cef(source=library)--*/
49 | class CefFillLayout : public CefLayout {};
50 |
51 | #endif // CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_
52 |
--------------------------------------------------------------------------------
/include/include/views/cef_layout.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_
39 | #pragma once
40 |
41 | #include "include/cef_base.h"
42 |
43 | class CefBoxLayout;
44 | class CefFillLayout;
45 |
46 | ///
47 | // A Layout handles the sizing of the children of a Panel according to
48 | // implementation-specific heuristics. Methods must be called on the browser
49 | // process UI thread unless otherwise indicated.
50 | ///
51 | /*--cef(source=library)--*/
52 | class CefLayout : public CefBaseRefCounted {
53 | public:
54 | ///
55 | // Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
56 | ///
57 | /*--cef()--*/
58 | virtual CefRefPtr AsBoxLayout() = 0;
59 |
60 | ///
61 | // Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
62 | ///
63 | /*--cef()--*/
64 | virtual CefRefPtr AsFillLayout() = 0;
65 |
66 | ///
67 | // Returns true if this Layout is valid.
68 | ///
69 | /*--cef()--*/
70 | virtual bool IsValid() = 0;
71 | };
72 |
73 | #endif // CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_
74 |
--------------------------------------------------------------------------------
/include/include/views/cef_menu_button_delegate.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_button_delegate.h"
42 |
43 | class CefMenuButton;
44 |
45 | ///
46 | // MenuButton pressed lock is released when this object is destroyed.
47 | ///
48 | /*--cef(source=library)--*/
49 | class CefMenuButtonPressedLock : public CefBaseRefCounted {};
50 |
51 | ///
52 | // Implement this interface to handle MenuButton events. The methods of this
53 | // class will be called on the browser process UI thread unless otherwise
54 | // indicated.
55 | ///
56 | /*--cef(source=client)--*/
57 | class CefMenuButtonDelegate : public CefButtonDelegate {
58 | public:
59 | ///
60 | // Called when |button| is pressed. Call CefMenuButton::ShowMenu() to show a
61 | // popup menu at |screen_point|. When showing a custom popup such as a window
62 | // keep a reference to |button_pressed_lock| until the popup is hidden to
63 | // maintain the pressed button state.
64 | ///
65 | /*--cef()--*/
66 | virtual void OnMenuButtonPressed(
67 | CefRefPtr menu_button,
68 | const CefPoint& screen_point,
69 | CefRefPtr button_pressed_lock) = 0;
70 | };
71 |
72 | #endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_
73 |
--------------------------------------------------------------------------------
/include/include/views/cef_panel_delegate.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_view_delegate.h"
42 |
43 | ///
44 | // Implement this interface to handle Panel events. The methods of this class
45 | // will be called on the browser process UI thread unless otherwise indicated.
46 | ///
47 | /*--cef(source=client)--*/
48 | class CefPanelDelegate : public CefViewDelegate {};
49 |
50 | #endif // CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_
51 |
--------------------------------------------------------------------------------
/include/include/views/cef_scroll_view.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_view.h"
42 |
43 | ///
44 | // A ScrollView will show horizontal and/or vertical scrollbars when necessary
45 | // based on the size of the attached content view. Methods must be called on the
46 | // browser process UI thread unless otherwise indicated.
47 | ///
48 | /*--cef(source=library)--*/
49 | class CefScrollView : public CefView {
50 | public:
51 | ///
52 | // Create a new ScrollView.
53 | ///
54 | /*--cef(optional_param=delegate)--*/
55 | static CefRefPtr CreateScrollView(
56 | CefRefPtr delegate);
57 |
58 | ///
59 | // Set the content View. The content View must have a specified size (e.g.
60 | // via CefView::SetBounds or CefViewDelegate::GetPreferredSize).
61 | ///
62 | /*--cef()--*/
63 | virtual void SetContentView(CefRefPtr view) = 0;
64 |
65 | ///
66 | // Returns the content View.
67 | ///
68 | /*--cef()--*/
69 | virtual CefRefPtr GetContentView() = 0;
70 |
71 | ///
72 | // Returns the visible region of the content View.
73 | ///
74 | /*--cef()--*/
75 | virtual CefRect GetVisibleContentRect() = 0;
76 |
77 | ///
78 | // Returns true if the horizontal scrollbar is currently showing.
79 | ///
80 | /*--cef()--*/
81 | virtual bool HasHorizontalScrollbar() = 0;
82 |
83 | ///
84 | // Returns the height of the horizontal scrollbar.
85 | ///
86 | /*--cef()--*/
87 | virtual int GetHorizontalScrollbarHeight() = 0;
88 |
89 | ///
90 | // Returns true if the vertical scrollbar is currently showing.
91 | ///
92 | /*--cef()--*/
93 | virtual bool HasVerticalScrollbar() = 0;
94 |
95 | ///
96 | // Returns the width of the vertical scrollbar.
97 | ///
98 | /*--cef()--*/
99 | virtual int GetVerticalScrollbarWidth() = 0;
100 | };
101 |
102 | #endif // CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_
103 |
--------------------------------------------------------------------------------
/include/include/views/cef_textfield_delegate.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file must follow a specific format in order to
33 | // support the CEF translator tool. See the translator.README.txt file in the
34 | // tools directory for more information.
35 | //
36 |
37 | #ifndef CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_
38 | #define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_
39 | #pragma once
40 |
41 | #include "include/views/cef_view_delegate.h"
42 |
43 | class CefTextfield;
44 |
45 | ///
46 | // Implement this interface to handle Textfield events. The methods of this
47 | // class will be called on the browser process UI thread unless otherwise
48 | // indicated.
49 | ///
50 | /*--cef(source=client)--*/
51 | class CefTextfieldDelegate : public CefViewDelegate {
52 | public:
53 | ///
54 | // Called when |textfield| recieves a keyboard event. |event| contains
55 | // information about the keyboard event. Return true if the keyboard event was
56 | // handled or false otherwise for default handling.
57 | ///
58 | /*--cef()--*/
59 | virtual bool OnKeyEvent(CefRefPtr textfield,
60 | const CefKeyEvent& event) {
61 | return false;
62 | }
63 |
64 | ///
65 | // Called after performing a user action that may change |textfield|.
66 | ///
67 | /*--cef()--*/
68 | virtual void OnAfterUserAction(CefRefPtr textfield) {}
69 | };
70 |
71 | #endif // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_DELEGATE_H_
72 |
--------------------------------------------------------------------------------
/include/include/wrapper/cef_byte_read_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file are only available to applications that link
33 | // against the libcef_dll_wrapper target.
34 | //
35 |
36 | #ifndef CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_
37 | #define CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_
38 | #pragma once
39 |
40 | #include "include/base/cef_lock.h"
41 | #include "include/base/cef_macros.h"
42 | #include "include/cef_base.h"
43 | #include "include/cef_stream.h"
44 |
45 | ///
46 | // Thread safe implementation of the CefReadHandler class for reading an
47 | // in-memory array of bytes.
48 | ///
49 | class CefByteReadHandler : public CefReadHandler {
50 | public:
51 | ///
52 | // Create a new object for reading an array of bytes. An optional |source|
53 | // reference can be kept to keep the underlying data source from being
54 | // released while the reader exists.
55 | ///
56 | CefByteReadHandler(const unsigned char* bytes,
57 | size_t size,
58 | CefRefPtr source);
59 |
60 | // CefReadHandler methods.
61 | virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;
62 | virtual int Seek(int64 offset, int whence) OVERRIDE;
63 | virtual int64 Tell() OVERRIDE;
64 | virtual int Eof() OVERRIDE;
65 | virtual bool MayBlock() OVERRIDE { return false; }
66 |
67 | private:
68 | const unsigned char* bytes_;
69 | int64 size_;
70 | int64 offset_;
71 | CefRefPtr source_;
72 |
73 | base::Lock lock_;
74 |
75 | IMPLEMENT_REFCOUNTING(CefByteReadHandler);
76 | DISALLOW_COPY_AND_ASSIGN(CefByteReadHandler);
77 | };
78 |
79 | #endif // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_
80 |
--------------------------------------------------------------------------------
/include/include/wrapper/cef_stream_resource_handler.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the name Chromium Embedded
14 | // Framework nor the names of its contributors may be used to endorse
15 | // or promote products derived from this software without specific prior
16 | // written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // ---------------------------------------------------------------------------
31 | //
32 | // The contents of this file are only available to applications that link
33 | // against the libcef_dll_wrapper target.
34 | //
35 |
36 | #ifndef CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
37 | #define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
38 | #pragma once
39 |
40 | #include "include/base/cef_macros.h"
41 | #include "include/cef_resource_handler.h"
42 | #include "include/cef_response.h"
43 | #include "include/cef_stream.h"
44 |
45 | ///
46 | // Implementation of the CefResourceHandler class for reading from a CefStream.
47 | ///
48 | class CefStreamResourceHandler : public CefResourceHandler {
49 | public:
50 | ///
51 | // Create a new object with default response values.
52 | ///
53 | CefStreamResourceHandler(const CefString& mime_type,
54 | CefRefPtr stream);
55 | ///
56 | // Create a new object with explicit response values.
57 | ///
58 | CefStreamResourceHandler(int status_code,
59 | const CefString& status_text,
60 | const CefString& mime_type,
61 | CefResponse::HeaderMap header_map,
62 | CefRefPtr stream);
63 |
64 | // CefResourceHandler methods.
65 | bool Open(CefRefPtr request,
66 | bool& handle_request,
67 | CefRefPtr callback) OVERRIDE;
68 | void GetResponseHeaders(CefRefPtr response,
69 | int64& response_length,
70 | CefString& redirectUrl) OVERRIDE;
71 | bool Read(void* data_out,
72 | int bytes_to_read,
73 | int& bytes_read,
74 | CefRefPtr callback) OVERRIDE;
75 | void Cancel() OVERRIDE;
76 |
77 | private:
78 | const int status_code_;
79 | const CefString status_text_;
80 | const CefString mime_type_;
81 | const CefResponse::HeaderMap header_map_;
82 | const CefRefPtr stream_;
83 |
84 | IMPLEMENT_REFCOUNTING(CefStreamResourceHandler);
85 | DISALLOW_COPY_AND_ASSIGN(CefStreamResourceHandler);
86 | };
87 |
88 | #endif // CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
89 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ceforama",
3 | "version": "0.0.1",
4 | "description": "CEF-based HTML off-screen render engine for node",
5 | "engines": {
6 | "node": ">=12.13.1"
7 | },
8 | "main": "dist/index.js",
9 | "type": "dist/index.d.ts",
10 | "repository": "https://github.com/Streampunk/ceforama.git",
11 | "author": "Richard Cartwright ",
12 | "license": "Apache-2.0",
13 | "private": false,
14 | "scripts": {
15 | "buildclean": "yarn installclean && yarn build",
16 | "build": "trash dist && node-gyp build && yarn build:main",
17 | "build:main": "tsc -p tsconfig.json"
18 | },
19 | "dependencies": {
20 | "bindings": "^1.5.0"
21 | },
22 | "devDependencies": {
23 | "@types/node": "^12.12.42",
24 | "eslint": "^7.1.0",
25 | "trash-cli": "^3.0.0",
26 | "typescript": "^3.9.3"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/cxx/ceforama_util.cpp:
--------------------------------------------------------------------------------
1 | #include "ceforama_util.h"
2 |
3 | napi_status checkStatus(napi_env env, napi_status status,
4 | const char* file, uint32_t line) {
5 |
6 | napi_status infoStatus, throwStatus;
7 | const napi_extended_error_info *errorInfo;
8 |
9 | if (status == napi_ok) {
10 | // printf("Received status OK.\n");
11 | return status;
12 | }
13 |
14 | infoStatus = napi_get_last_error_info(env, &errorInfo);
15 | assert(infoStatus == napi_ok);
16 | printf("NAPI error in file %s on line %i. Error %i: %s\n", file, line,
17 | errorInfo->error_code, errorInfo->error_message);
18 |
19 | if (status == napi_pending_exception) {
20 | printf("NAPI pending exception. Engine error code: %i\n", errorInfo->engine_error_code);
21 | return status;
22 | }
23 |
24 | char errorCode[20];
25 | sprintf(errorCode, "%d", errorInfo->error_code);
26 | throwStatus = napi_throw_error(env, errorCode, errorInfo->error_message);
27 | assert(throwStatus == napi_ok);
28 |
29 | return napi_pending_exception; // Expect to be cast to void
30 | }
31 |
32 | void tidyCarrier(napi_env env, carrier* c) {
33 | napi_status status;
34 | if (c->passthru != nullptr) {
35 | status = napi_delete_reference(env, c->passthru);
36 | FLOATING_STATUS;
37 | }
38 | if (c->_request != nullptr) {
39 | status = napi_delete_async_work(env, c->_request);
40 | FLOATING_STATUS;
41 | }
42 | // printf("Tidying carrier %p %p\n", c->passthru, c->_request);
43 | delete c;
44 | }
45 |
46 | int32_t rejectStatus(napi_env env, carrier* c, char* file, int32_t line) {
47 | if (c->status != CEFORAMA_SUCCESS) {
48 | napi_value errorValue, errorCode, errorMsg;
49 | napi_status status;
50 | if (c->status < CEFORAMA_ERROR_START) {
51 | const napi_extended_error_info *errorInfo;
52 | status = napi_get_last_error_info(env, &errorInfo);
53 | FLOATING_STATUS;
54 | c->errorMsg = std::string(
55 | (errorInfo->error_message != nullptr) ? errorInfo->error_message : "(no message)");
56 | }
57 | char* extMsg = (char *) malloc(sizeof(char) * c->errorMsg.length() + 200);
58 | sprintf(extMsg, "In file %s on line %i, found error: %s", file, line, c->errorMsg.c_str());
59 | char errorCodeChars[20];
60 | sprintf(errorCodeChars, "%d", c->status);
61 | status = napi_create_string_utf8(env, errorCodeChars,
62 | NAPI_AUTO_LENGTH, &errorCode);
63 | FLOATING_STATUS;
64 | status = napi_create_string_utf8(env, extMsg, NAPI_AUTO_LENGTH, &errorMsg);
65 | FLOATING_STATUS;
66 | status = napi_create_error(env, errorCode, errorMsg, &errorValue);
67 | FLOATING_STATUS;
68 | status = napi_reject_deferred(env, c->_deferred, errorValue);
69 | FLOATING_STATUS;
70 |
71 | delete[] extMsg;
72 | tidyCarrier(env, c);
73 | }
74 | return c->status;
75 | }
76 |
77 | // Should never get called
78 | napi_value nop(napi_env env, napi_callback_info info) {
79 | napi_value value;
80 | napi_status status;
81 | status = napi_get_undefined(env, &value);
82 | if (status != napi_ok) NAPI_THROW_ERROR("Failed to retrieve undefined in nop.");
83 | return value;
84 | }
--------------------------------------------------------------------------------
/src/cxx/ceforama_util.h:
--------------------------------------------------------------------------------
1 | #ifndef CEFORAMA_UTIL
2 | #define CEFORAMA_UTIL
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include "node_api.h"
16 |
17 | #define DECLARE_NAPI_METHOD(name, func) { name, 0, func, 0, 0, 0, napi_default, 0 }
18 | #define CHECK_STATUS if (checkStatus(env, status, __FILE__, __LINE__ - 1) != napi_ok) { return nullptr; }
19 | #define PASS_STATUS if (status != napi_ok) return status
20 |
21 | napi_status checkStatus(napi_env env, napi_status status,
22 | const char* file, uint32_t line);
23 |
24 | // Async error handling
25 | #define CEFORAMA_ERROR_START 9000
26 | #define CEFORAMA_INVALID_ARGS 9001
27 | #define CEFORAMA_LOOP_STATE 9002
28 | #define CEFORAMA_SUCCESS 0
29 |
30 | #define NAPI_THROW_ERROR(msg) { \
31 | char errorMsg[256]; \
32 | sprintf(errorMsg, "%s", msg); \
33 | napi_throw_error(env, nullptr, errorMsg); \
34 | return nullptr; \
35 | }
36 |
37 | struct carrier {
38 | napi_ref passthru = nullptr;
39 | int32_t status = CEFORAMA_SUCCESS;
40 | std::string errorMsg;
41 | long long totalTime;
42 | napi_deferred _deferred;
43 | napi_async_work _request = nullptr;
44 | virtual ~carrier() {
45 | }
46 | };
47 |
48 | void tidyCarrier(napi_env env, carrier* c);
49 | int32_t rejectStatus(napi_env env, carrier* c, char* file, int32_t line);
50 |
51 | #define REJECT_STATUS if (rejectStatus(env, c, (char*) __FILE__, __LINE__) != CEFORAMA_SUCCESS) return;
52 | #define REJECT_BAIL if (rejectStatus(env, c, (char*) __FILE__, __LINE__) != CEFORAMA_SUCCESS) goto bail;
53 | #define REJECT_RETURN if (rejectStatus(env, c, (char*) __FILE__, __LINE__) != CEFORAMA_SUCCESS) return promise;
54 | #define FLOATING_STATUS if (status != napi_ok) { \
55 | printf("Unexpected N-API status not OK in file %s at line %d value %i.\n", \
56 | __FILE__, __LINE__ - 1, status); \
57 | }
58 |
59 | #define REJECT_ERROR(msg, status) { \
60 | c->errorMsg = msg; \
61 | c->status = status; \
62 | REJECT_STATUS; \
63 | }
64 |
65 | #define REJECT_ERROR_RETURN(msg, stat) { \
66 | c->errorMsg = msg; \
67 | c->status = stat; \
68 | REJECT_RETURN; \
69 | }
70 |
71 | napi_value nop(napi_env env, napi_callback_info info);
72 |
73 | const std::string TICK_MESSAGE_NAME = "CeforamaTick";
74 | const std::string REMOVE_MESSAGE_NAME = "CeforamaRemove";
75 |
76 | #endif // CEFORAMA
77 |
--------------------------------------------------------------------------------
/src/cxx/loop.cpp:
--------------------------------------------------------------------------------
1 | #include "loop.h"
2 |
3 | bool isRunning = false;
4 |
5 | void startLoopExecute(napi_env env, void* data) {
6 | printf("Starting CEF message loop\n");
7 | CefRunMessageLoop();
8 | printf("I don't get here\n");
9 | }
10 |
11 | void startLoopComplete(napi_env env, napi_status asyncStatus, void* data) {
12 | printf("Start loop complete\n");
13 | }
14 |
15 | napi_value startLoop(napi_env env, napi_callback_info info) {
16 | napi_value options, resourceName, promise;
17 | loopCarrier* c = new loopCarrier;
18 |
19 | c->status = napi_get_undefined(env, &promise);
20 | REJECT_RETURN;
21 |
22 | if (isRunning) {
23 | REJECT_ERROR_RETURN("Loop is already running.", CEFORAMA_LOOP_STATE);
24 | }
25 |
26 | c->status = napi_create_string_utf8(env, "StartLoopThread", NAPI_AUTO_LENGTH, &resourceName);
27 | REJECT_RETURN;
28 | c->status = napi_create_async_work(env, nullptr, resourceName, startLoopExecute, startLoopComplete, c, &c->_request);
29 | REJECT_RETURN;
30 | c->status = napi_queue_async_work(env, c->_request);
31 | REJECT_RETURN;
32 | isRunning = true;
33 |
34 | return promise;
35 | }
36 |
37 | napi_value stopLoop(napi_env env, napi_callback_info info) {
38 | napi_status status;
39 | napi_value result;
40 |
41 | status = napi_get_undefined(env, &result);
42 | CHECK_STATUS;
43 |
44 | printf("State of isRunning %s\n", isRunning ? "true" : "false");
45 |
46 | if (!isRunning) {
47 | NAPI_THROW_ERROR("Loop is not running.");
48 | }
49 |
50 | printf("About to stop message loop");
51 | CefQuitMessageLoop();
52 | return result;
53 | }
54 |
55 | napi_value doWork(napi_env env, napi_callback_info info) {
56 | napi_status status;
57 | napi_value result;
58 |
59 | status = napi_get_undefined(env, &result);
60 | CHECK_STATUS;
61 |
62 | CefDoMessageLoopWork();
63 |
64 | return result;
65 | }
--------------------------------------------------------------------------------
/src/cxx/loop.h:
--------------------------------------------------------------------------------
1 | #ifndef LOOP_H
2 | #define LOOP_H
3 |
4 | #include
5 | #include
6 | #include "ceforama_util.h"
7 | #include "node_api.h"
8 |
9 | napi_value startLoop(napi_env env, napi_callback_info info);
10 | napi_value stopLoop(napi_env env, napi_callback_info info);
11 | napi_value doWork(napi_env env, napi_callback_info info);
12 |
13 | struct loopCarrier : carrier {
14 | ~loopCarrier() { }
15 | };
16 |
17 | #endif
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | const ceforamaNative = require('../build/Release/ceforama')
2 | const fs = require('fs');
3 |
4 | export function version() : string {
5 | return ceforamaNative.version()
6 | }
7 |
8 | export function doWork(): void {
9 | return ceforamaNative.doWork()
10 | }
11 |
12 | let loopRunning = false
13 |
14 | const loopy = () => {
15 | if (loopRunning) {
16 | setTimeout(() => {
17 | ceforamaNative.doWork()
18 | loopy()
19 | }, 0)
20 | }
21 | }
22 |
23 | export function runLoop(): void {
24 | if (!loopRunning) {
25 | loopRunning = true
26 | loopy()
27 | }
28 | }
29 |
30 | export function stopLoop(): void {
31 | if (loopRunning) {
32 | loopRunning = false
33 | }
34 | }
35 |
36 | export function isLoopRunning(): boolean {
37 | return loopRunning
38 | }
39 |
40 | export interface ClientOptions {
41 | width?: number
42 | height?: number
43 | fps?: number
44 | url: string
45 | }
46 |
47 | export interface CeforamaClient {
48 | type: 'clientorama'
49 | width: number
50 | height: number
51 | fps: number
52 | url: string
53 | frame: () => Promise
54 | update: () => void
55 | }
56 |
57 | export interface CeforamaFrame {
58 | type: 'frame'
59 | width: number
60 | height: number
61 | size: number
62 | seq: number
63 | frame: Buffer
64 | }
65 |
66 | export function client(options?: ClientOptions): CeforamaClient {
67 | return ceforamaNative.client(options)
68 | }
69 |
70 | export async function test() {
71 | let cl = await client({ url: 'https://app.singular.live/output/5AJz1INQDZ8EmHunA5H3et/Default?aspect=16:9' })
72 | let fr
73 | let updater
74 | let start = process.hrtime();
75 | for ( let x = 0 ; x < 1000 ; x++ ) {
76 | fr = await cl.frame();
77 | if (x === 3) { updater = setInterval(() => cl.update(), 40) }
78 | // let isBlack = true
79 | // for ( let y = 0 ; y < fr.frame.length; y++ ) {
80 | // if (fr.frame[y] !== 0) {
81 | // isBlack = false;
82 | // break;
83 | // }
84 | // }
85 | console.log(fr.seq, process.hrtime(start), fr.frame.length);
86 | // if ((x - 9) % 10 === 0) {
87 | // fs.writeFileSync(`test-${x}.rgba`, fr.frame)
88 | // }
89 | }
90 | console.log('Done asking!', fr?.frame.length)
91 | fs.writeFileSync('test.rgba', fr?.frame)
92 | if (updater) clearInterval(updater)
93 | }
--------------------------------------------------------------------------------