├── .gitignore ├── CMakeLists.txt ├── README.txt ├── cef3 └── 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_thread_collision_warner.h │ ├── cef_trace_event.h │ ├── cef_tuple.h │ ├── cef_weak_ptr.h │ └── internal │ │ ├── cef_atomicops_atomicword_compat.h │ │ ├── cef_atomicops_x86_gcc.h │ │ ├── cef_bind_internal.h │ │ ├── cef_callback_internal.h │ │ ├── cef_lock_impl.h │ │ ├── cef_raw_scoped_refptr_mismatch_checker.h │ │ └── cef_thread_checker_impl.h │ ├── capi │ ├── 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_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_focus_handler_capi.h │ ├── cef_frame_capi.h │ ├── cef_geolocation_capi.h │ ├── cef_geolocation_handler_capi.h │ ├── cef_jsdialog_handler_capi.h │ ├── cef_keyboard_handler_capi.h │ ├── cef_life_span_handler_capi.h │ ├── cef_load_handler_capi.h │ ├── cef_menu_model_capi.h │ ├── cef_origin_whitelist_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_render_handler_capi.h │ ├── cef_render_process_handler_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_handler_capi.h │ ├── cef_resource_handler_capi.h │ ├── cef_response_capi.h │ ├── cef_scheme_capi.h │ ├── cef_stream_capi.h │ ├── cef_string_visitor_capi.h │ ├── cef_task_capi.h │ ├── cef_trace_capi.h │ ├── cef_url_capi.h │ ├── cef_urlrequest_capi.h │ ├── cef_v8_capi.h │ ├── cef_values_capi.h │ ├── cef_web_plugin_capi.h │ ├── cef_xml_reader_capi.h │ └── cef_zip_reader_capi.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_context_menu_handler.h │ ├── cef_cookie.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_focus_handler.h │ ├── cef_frame.h │ ├── cef_geolocation.h │ ├── cef_geolocation_handler.h │ ├── cef_jsdialog_handler.h │ ├── cef_keyboard_handler.h │ ├── cef_life_span_handler.h │ ├── cef_load_handler.h │ ├── cef_menu_model.h │ ├── cef_origin_whitelist.h │ ├── cef_pack_resources.h │ ├── cef_pack_strings.h │ ├── cef_path_util.h │ ├── cef_print_handler.h │ ├── cef_print_settings.h │ ├── cef_process_message.h │ ├── cef_process_util.h │ ├── cef_render_handler.h │ ├── cef_render_process_handler.h │ ├── cef_request.h │ ├── cef_request_context.h │ ├── cef_request_context_handler.h │ ├── cef_request_handler.h │ ├── cef_resource_bundle_handler.h │ ├── cef_resource_handler.h │ ├── cef_response.h │ ├── cef_runnable.h │ ├── cef_scheme.h │ ├── cef_stream.h │ ├── cef_string_visitor.h │ ├── cef_task.h │ ├── cef_trace.h │ ├── cef_url.h │ ├── cef_urlrequest.h │ ├── cef_v8.h │ ├── cef_values.h │ ├── cef_version.h │ ├── cef_web_plugin.h │ ├── cef_xml_reader.h │ ├── cef_zip_reader.h │ ├── internal │ ├── cef_export.h │ ├── cef_linux.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_linux.h │ └── cef_types_wrappers.h │ └── wrapper │ ├── cef_byte_read_handler.h │ ├── cef_closure_task.h │ ├── cef_helpers.h │ ├── cef_message_router.h │ ├── cef_stream_resource_handler.h │ ├── cef_xml_object.h │ └── cef_zip_archive.h ├── miniservo-tab-label.glade ├── miniservo-tab.glade ├── miniservo.glade ├── resources ├── failure.html ├── iso-8859-8.css ├── presentational-hints.css ├── quirks-mode.css ├── quotes.css ├── servo.css └── user-agent.css └── src ├── libcef_dll ├── CMakeLists.txt ├── base │ ├── cef_atomicops_x86_gcc.cc │ ├── cef_bind_helpers.cc │ ├── cef_callback_helpers.cc │ ├── cef_callback_internal.cc │ ├── cef_lock.cc │ ├── cef_lock_impl.cc │ ├── cef_logging.cc │ ├── cef_ref_counted.cc │ ├── cef_string16.cc │ ├── cef_thread_checker_impl.cc │ ├── cef_thread_collision_warner.cc │ └── cef_weak_ptr.cc ├── cpptoc │ ├── app_cpptoc.cc │ ├── app_cpptoc.h │ ├── base_cpptoc.h │ ├── browser_process_handler_cpptoc.cc │ ├── browser_process_handler_cpptoc.h │ ├── client_cpptoc.cc │ ├── client_cpptoc.h │ ├── completion_callback_cpptoc.cc │ ├── completion_callback_cpptoc.h │ ├── context_menu_handler_cpptoc.cc │ ├── context_menu_handler_cpptoc.h │ ├── cookie_visitor_cpptoc.cc │ ├── cookie_visitor_cpptoc.h │ ├── cpptoc.h │ ├── dialog_handler_cpptoc.cc │ ├── dialog_handler_cpptoc.h │ ├── display_handler_cpptoc.cc │ ├── display_handler_cpptoc.h │ ├── domvisitor_cpptoc.cc │ ├── domvisitor_cpptoc.h │ ├── download_handler_cpptoc.cc │ ├── download_handler_cpptoc.h │ ├── drag_handler_cpptoc.cc │ ├── drag_handler_cpptoc.h │ ├── end_tracing_callback_cpptoc.cc │ ├── end_tracing_callback_cpptoc.h │ ├── focus_handler_cpptoc.cc │ ├── focus_handler_cpptoc.h │ ├── geolocation_handler_cpptoc.cc │ ├── geolocation_handler_cpptoc.h │ ├── get_geolocation_callback_cpptoc.cc │ ├── get_geolocation_callback_cpptoc.h │ ├── jsdialog_handler_cpptoc.cc │ ├── jsdialog_handler_cpptoc.h │ ├── keyboard_handler_cpptoc.cc │ ├── keyboard_handler_cpptoc.h │ ├── life_span_handler_cpptoc.cc │ ├── life_span_handler_cpptoc.h │ ├── load_handler_cpptoc.cc │ ├── load_handler_cpptoc.h │ ├── print_handler_cpptoc.cc │ ├── print_handler_cpptoc.h │ ├── read_handler_cpptoc.cc │ ├── read_handler_cpptoc.h │ ├── render_handler_cpptoc.cc │ ├── render_handler_cpptoc.h │ ├── render_process_handler_cpptoc.cc │ ├── render_process_handler_cpptoc.h │ ├── request_context_handler_cpptoc.cc │ ├── request_context_handler_cpptoc.h │ ├── request_handler_cpptoc.cc │ ├── request_handler_cpptoc.h │ ├── resource_bundle_handler_cpptoc.cc │ ├── resource_bundle_handler_cpptoc.h │ ├── resource_handler_cpptoc.cc │ ├── resource_handler_cpptoc.h │ ├── run_file_dialog_callback_cpptoc.cc │ ├── run_file_dialog_callback_cpptoc.h │ ├── scheme_handler_factory_cpptoc.cc │ ├── scheme_handler_factory_cpptoc.h │ ├── string_visitor_cpptoc.cc │ ├── string_visitor_cpptoc.h │ ├── task_cpptoc.cc │ ├── task_cpptoc.h │ ├── urlrequest_client_cpptoc.cc │ ├── urlrequest_client_cpptoc.h │ ├── v8accessor_cpptoc.cc │ ├── v8accessor_cpptoc.h │ ├── v8handler_cpptoc.cc │ ├── v8handler_cpptoc.h │ ├── web_plugin_info_visitor_cpptoc.cc │ ├── web_plugin_info_visitor_cpptoc.h │ ├── web_plugin_unstable_callback_cpptoc.cc │ ├── web_plugin_unstable_callback_cpptoc.h │ ├── write_handler_cpptoc.cc │ └── write_handler_cpptoc.h ├── ctocpp │ ├── allow_certificate_error_callback_ctocpp.cc │ ├── allow_certificate_error_callback_ctocpp.h │ ├── auth_callback_ctocpp.cc │ ├── auth_callback_ctocpp.h │ ├── base_ctocpp.h │ ├── before_download_callback_ctocpp.cc │ ├── before_download_callback_ctocpp.h │ ├── binary_value_ctocpp.cc │ ├── binary_value_ctocpp.h │ ├── browser_ctocpp.cc │ ├── browser_ctocpp.h │ ├── browser_host_ctocpp.cc │ ├── browser_host_ctocpp.h │ ├── callback_ctocpp.cc │ ├── callback_ctocpp.h │ ├── command_line_ctocpp.cc │ ├── command_line_ctocpp.h │ ├── context_menu_params_ctocpp.cc │ ├── context_menu_params_ctocpp.h │ ├── cookie_manager_ctocpp.cc │ ├── cookie_manager_ctocpp.h │ ├── ctocpp.h │ ├── dictionary_value_ctocpp.cc │ ├── dictionary_value_ctocpp.h │ ├── domdocument_ctocpp.cc │ ├── domdocument_ctocpp.h │ ├── domnode_ctocpp.cc │ ├── domnode_ctocpp.h │ ├── download_item_callback_ctocpp.cc │ ├── download_item_callback_ctocpp.h │ ├── download_item_ctocpp.cc │ ├── download_item_ctocpp.h │ ├── drag_data_ctocpp.cc │ ├── drag_data_ctocpp.h │ ├── file_dialog_callback_ctocpp.cc │ ├── file_dialog_callback_ctocpp.h │ ├── frame_ctocpp.cc │ ├── frame_ctocpp.h │ ├── geolocation_callback_ctocpp.cc │ ├── geolocation_callback_ctocpp.h │ ├── jsdialog_callback_ctocpp.cc │ ├── jsdialog_callback_ctocpp.h │ ├── list_value_ctocpp.cc │ ├── list_value_ctocpp.h │ ├── menu_model_ctocpp.cc │ ├── menu_model_ctocpp.h │ ├── post_data_ctocpp.cc │ ├── post_data_ctocpp.h │ ├── post_data_element_ctocpp.cc │ ├── post_data_element_ctocpp.h │ ├── print_dialog_callback_ctocpp.cc │ ├── print_dialog_callback_ctocpp.h │ ├── print_job_callback_ctocpp.cc │ ├── print_job_callback_ctocpp.h │ ├── print_settings_ctocpp.cc │ ├── print_settings_ctocpp.h │ ├── process_message_ctocpp.cc │ ├── process_message_ctocpp.h │ ├── quota_callback_ctocpp.cc │ ├── quota_callback_ctocpp.h │ ├── request_context_ctocpp.cc │ ├── request_context_ctocpp.h │ ├── request_ctocpp.cc │ ├── request_ctocpp.h │ ├── response_ctocpp.cc │ ├── response_ctocpp.h │ ├── scheme_registrar_ctocpp.cc │ ├── scheme_registrar_ctocpp.h │ ├── stream_reader_ctocpp.cc │ ├── stream_reader_ctocpp.h │ ├── stream_writer_ctocpp.cc │ ├── stream_writer_ctocpp.h │ ├── task_runner_ctocpp.cc │ ├── task_runner_ctocpp.h │ ├── urlrequest_ctocpp.cc │ ├── urlrequest_ctocpp.h │ ├── v8context_ctocpp.cc │ ├── v8context_ctocpp.h │ ├── v8exception_ctocpp.cc │ ├── v8exception_ctocpp.h │ ├── v8stack_frame_ctocpp.cc │ ├── v8stack_frame_ctocpp.h │ ├── v8stack_trace_ctocpp.cc │ ├── v8stack_trace_ctocpp.h │ ├── v8value_ctocpp.cc │ ├── v8value_ctocpp.h │ ├── web_plugin_info_ctocpp.cc │ ├── web_plugin_info_ctocpp.h │ ├── xml_reader_ctocpp.cc │ ├── xml_reader_ctocpp.h │ ├── zip_reader_ctocpp.cc │ └── zip_reader_ctocpp.h ├── transfer_util.cpp ├── transfer_util.h └── wrapper │ ├── cef_browser_info_map.h │ ├── cef_byte_read_handler.cc │ ├── cef_closure_task.cc │ ├── cef_message_router.cc │ ├── cef_stream_resource_handler.cc │ ├── cef_xml_object.cc │ ├── cef_zip_archive.cc │ ├── libcef_dll_wrapper.cc │ └── libcef_dll_wrapper2.cc ├── main.cpp ├── tegtkgl.c └── tegtkgl.h /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | Building MiniServo-GTK 2 | ---------------------- 3 | 4 | 1) Clone Servo and MiniServo so your directory structure looks like: 5 | 6 | + servo (https://github.com/servo/servo) 7 | + miniservo-gtk (https://github.com/glennw/miniservo-gtk) 8 | 9 | 2) Build CEF libembedding 10 | 11 | cd servo && ./mach build-cef 12 | 13 | 3) Build MiniServo-GTK 14 | 15 | cd miniservo-gtk 16 | mkdir build && cd build 17 | cmake .. 18 | make -j16 19 | 20 | 4) Run MiniServo 21 | 22 | ./miniservo 23 | -------------------------------------------------------------------------------- /cef3/include/capi/cef_path_util_capi.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 | // --------------------------------------------------------------------------- 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 | 37 | #ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 38 | #define CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 39 | #pragma once 40 | 41 | #include "include/capi/cef_base_capi.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | 48 | /// 49 | // Retrieve the path associated with the specified |key|. Returns true (1) on 50 | // success. Can be called on any thread in the browser process. 51 | /// 52 | CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 59 | -------------------------------------------------------------------------------- /cef3/include/cef_pack_resources.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glennw/miniservo-gtk/062bb2116fab4b0b087edc6014248626acecbe1a/cef3/include/cef_pack_resources.h -------------------------------------------------------------------------------- /cef3/include/cef_pack_strings.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glennw/miniservo-gtk/062bb2116fab4b0b087edc6014248626acecbe1a/cef3/include/cef_pack_strings.h -------------------------------------------------------------------------------- /cef3/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 | -------------------------------------------------------------------------------- /cef3/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 CefBase { 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 | -------------------------------------------------------------------------------- /cef3/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 | #define CEF_CALLBACK __stdcall 47 | 48 | #elif defined(COMPILER_GCC) 49 | 50 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 51 | #define CEF_CALLBACK 52 | 53 | #endif // COMPILER_GCC 54 | 55 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 56 | -------------------------------------------------------------------------------- /miniservo-tab-label.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | False 8 | gtk-delete 9 | 10 | 11 | True 12 | False 13 | 4 14 | 4 15 | 4 16 | 17 | 18 | True 19 | False 20 | 21 | 22 | False 23 | False 24 | 0 25 | 26 | 27 | 28 | 29 | True 30 | False 31 | label 32 | 33 | 34 | False 35 | True 36 | 1 37 | 38 | 39 | 40 | 41 | True 42 | True 43 | True 44 | image1 45 | none 46 | 47 | 48 | False 49 | True 50 | 2 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /miniservo-tab.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | False 8 | gtk-go-back 9 | 10 | 11 | True 12 | False 13 | gtk-go-forward 14 | 15 | 16 | True 17 | False 18 | 19 | 20 | True 21 | True 22 | True 23 | image1 24 | none 25 | 0.44999998807907104 26 | True 27 | 28 | 29 | 0 30 | 0 31 | 1 32 | 1 33 | 34 | 35 | 36 | 37 | True 38 | True 39 | True 40 | image2 41 | none 42 | right 43 | True 44 | 45 | 46 | 1 47 | 0 48 | 1 49 | 1 50 | 51 | 52 | 53 | 54 | True 55 | True 56 | True 57 | 58 | 59 | 2 60 | 0 61 | 1 62 | 1 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /resources/failure.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | about:failure 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /resources/iso-8859-8.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering 4 | 5 | > When the document's character encoding is ISO-8859-8, 6 | > the following rules are additionally expected to apply, following [user-agent.css] 7 | 8 | */ 9 | 10 | @namespace url(http://www.w3.org/1999/xhtml); 11 | 12 | 13 | address, blockquote, center, div, figure, figcaption, footer, form, header, hr, 14 | legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2, 15 | h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead, 16 | tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, [dir=ltr i], 17 | [dir=rtl i], [dir=auto i], *|* { 18 | unicode-bidi: bidi-override; 19 | } 20 | input:not([type=submit i]):not([type=reset i]):not([type=button i]), 21 | textarea, keygen { 22 | unicode-bidi: normal; 23 | } 24 | -------------------------------------------------------------------------------- /resources/quirks-mode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 4 | 5 | > In quirks mode, the following rules are also expected to apply: 6 | 7 | */ 8 | 9 | @namespace url(http://www.w3.org/1999/xhtml); 10 | 11 | 12 | form { margin-bottom: 1em; } 13 | 14 | 15 | table { 16 | font-weight: initial; 17 | font-style: initial; 18 | font-variant: initial; 19 | font-size: initial; 20 | line-height: initial; 21 | white-space: initial; 22 | text-align: initial; 23 | } 24 | 25 | 26 | /* FIXME: https://html.spec.whatwg.org/multipage/rendering.html#margin-collapsing-quirks */ 27 | 28 | 29 | input:not([type=image]), textarea { box-sizing: border-box; } 30 | 31 | 32 | img[align=left i] { margin-right: 3px; } 33 | img[align=right i] { margin-left: 3px; } 34 | -------------------------------------------------------------------------------- /resources/servo.css: -------------------------------------------------------------------------------- 1 | input, select { display: inline-block; } 2 | input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; } 3 | input[type="button"], 4 | input[type="submit"], 5 | input[type="reset"] { background: lightgrey; border-top: solid 1px #EEEEEE; border-left: solid 1px #CCCCCC; border-right: solid 1px #999999; border-bottom: solid 1px #999999; text-align: center; vertical-align: middle; color: black; width: 100%; } 6 | input[type="hidden"] { display: none !important } 7 | input[type="checkbox"], 8 | input[type="radio"] { font-family: monospace !important; border: none !important; background: transparent; } 9 | 10 | input[type="checkbox"]::before { content: "[ ]"; padding: 0; } 11 | input[type="checkbox"][checked]::before { content: "[✓]"; } 12 | input[type="radio"]::before { content: "( )"; padding: 0; } 13 | input[type="radio"][checked]::before { content: "(●)"; } 14 | 15 | td[align="left"] { text-align: left; } 16 | td[align="center"] { text-align: center; } 17 | td[align="right"] { text-align: right; } 18 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_bind_helpers.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_bind_helpers.h" 6 | 7 | #include "include/base/cef_callback.h" 8 | 9 | namespace base { 10 | 11 | void DoNothing() { 12 | } 13 | 14 | } // namespace base 15 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_callback_helpers.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_callback_helpers.h" 6 | 7 | #include "include/base/cef_callback.h" 8 | 9 | namespace base { 10 | 11 | ScopedClosureRunner::ScopedClosureRunner() { 12 | } 13 | 14 | ScopedClosureRunner::ScopedClosureRunner(const Closure& closure) 15 | : closure_(closure) { 16 | } 17 | 18 | ScopedClosureRunner::~ScopedClosureRunner() { 19 | if (!closure_.is_null()) 20 | closure_.Run(); 21 | } 22 | 23 | void ScopedClosureRunner::Reset() { 24 | Closure old_closure = Release(); 25 | if (!old_closure.is_null()) 26 | old_closure.Run(); 27 | } 28 | 29 | void ScopedClosureRunner::Reset(const Closure& closure) { 30 | Closure old_closure = Release(); 31 | closure_ = closure; 32 | if (!old_closure.is_null()) 33 | old_closure.Run(); 34 | } 35 | 36 | Closure ScopedClosureRunner::Release() { 37 | Closure result = closure_; 38 | closure_.Reset(); 39 | return result; 40 | } 41 | 42 | } // namespace base 43 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_callback_internal.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/internal/cef_callback_internal.h" 6 | 7 | #include "include/base/cef_logging.h" 8 | 9 | namespace base { 10 | namespace internal { 11 | 12 | void CallbackBase::Reset() { 13 | polymorphic_invoke_ = NULL; 14 | // NULL the bind_state_ last, since it may be holding the last ref to whatever 15 | // object owns us, and we may be deleted after that. 16 | bind_state_ = NULL; 17 | } 18 | 19 | bool CallbackBase::Equals(const CallbackBase& other) const { 20 | return bind_state_.get() == other.bind_state_.get() && 21 | polymorphic_invoke_ == other.polymorphic_invoke_; 22 | } 23 | 24 | CallbackBase::CallbackBase(BindStateBase* bind_state) 25 | : bind_state_(bind_state), 26 | polymorphic_invoke_(NULL) { 27 | DCHECK(!bind_state_.get() || bind_state_->HasOneRef()); 28 | } 29 | 30 | CallbackBase::~CallbackBase() { 31 | } 32 | 33 | } // namespace internal 34 | } // namespace base 35 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_lock.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file is used for debugging assertion support. The Lock class 6 | // is functionally a wrapper around the LockImpl class, so the only 7 | // real intelligence in the class is in the debugging logic. 8 | 9 | #if !defined(NDEBUG) 10 | 11 | #include "include/base/cef_lock.h" 12 | #include "include/base/cef_logging.h" 13 | 14 | namespace base { 15 | 16 | Lock::Lock() : lock_() { 17 | } 18 | 19 | Lock::~Lock() { 20 | DCHECK(owning_thread_ref_.is_null()); 21 | } 22 | 23 | void Lock::AssertAcquired() const { 24 | DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef()); 25 | } 26 | 27 | void Lock::CheckHeldAndUnmark() { 28 | DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef()); 29 | owning_thread_ref_ = PlatformThreadRef(); 30 | } 31 | 32 | void Lock::CheckUnheldAndMark() { 33 | // Hitting this DCHECK means that your code is trying to re-enter a lock that 34 | // is already held. The Chromium Lock implementation is not reentrant. 35 | // See "Why can the holder of a Lock not reacquire it?" at 36 | // http://www.chromium.org/developers/lock-and-condition-variable for more 37 | // information. 38 | DCHECK(owning_thread_ref_.is_null()); 39 | owning_thread_ref_ = PlatformThread::CurrentRef(); 40 | } 41 | 42 | } // namespace base 43 | 44 | #endif // NDEBUG 45 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_lock_impl.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/internal/cef_lock_impl.h" 6 | 7 | #if defined(OS_WIN) 8 | 9 | namespace base { 10 | namespace internal { 11 | 12 | LockImpl::LockImpl() { 13 | // The second parameter is the spin count, for short-held locks it avoid the 14 | // contending thread from going to sleep which helps performance greatly. 15 | ::InitializeCriticalSectionAndSpinCount(&native_handle_, 2000); 16 | } 17 | 18 | LockImpl::~LockImpl() { 19 | ::DeleteCriticalSection(&native_handle_); 20 | } 21 | 22 | bool LockImpl::Try() { 23 | if (::TryEnterCriticalSection(&native_handle_) != FALSE) { 24 | return true; 25 | } 26 | return false; 27 | } 28 | 29 | void LockImpl::Lock() { 30 | ::EnterCriticalSection(&native_handle_); 31 | } 32 | 33 | void LockImpl::Unlock() { 34 | ::LeaveCriticalSection(&native_handle_); 35 | } 36 | 37 | } // namespace internal 38 | } // namespace base 39 | 40 | #elif defined(OS_POSIX) 41 | 42 | #include 43 | #include 44 | 45 | #include "include/base/cef_logging.h" 46 | 47 | namespace base { 48 | namespace internal { 49 | 50 | LockImpl::LockImpl() { 51 | #ifndef NDEBUG 52 | // In debug, setup attributes for lock error checking. 53 | pthread_mutexattr_t mta; 54 | int rv = pthread_mutexattr_init(&mta); 55 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 56 | rv = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK); 57 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 58 | rv = pthread_mutex_init(&native_handle_, &mta); 59 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 60 | rv = pthread_mutexattr_destroy(&mta); 61 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 62 | #else 63 | // In release, go with the default lock attributes. 64 | pthread_mutex_init(&native_handle_, NULL); 65 | #endif 66 | } 67 | 68 | LockImpl::~LockImpl() { 69 | int rv = pthread_mutex_destroy(&native_handle_); 70 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 71 | } 72 | 73 | bool LockImpl::Try() { 74 | int rv = pthread_mutex_trylock(&native_handle_); 75 | DCHECK(rv == 0 || rv == EBUSY) << ". " << strerror(rv); 76 | return rv == 0; 77 | } 78 | 79 | void LockImpl::Lock() { 80 | int rv = pthread_mutex_lock(&native_handle_); 81 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 82 | } 83 | 84 | void LockImpl::Unlock() { 85 | int rv = pthread_mutex_unlock(&native_handle_); 86 | DCHECK_EQ(rv, 0) << ". " << strerror(rv); 87 | } 88 | 89 | } // namespace internal 90 | } // namespace base 91 | 92 | #endif // defined(OS_POSIX) 93 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_ref_counted.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_ref_counted.h" 6 | #include "include/base/cef_thread_collision_warner.h" 7 | 8 | namespace base { 9 | 10 | namespace subtle { 11 | 12 | bool RefCountedThreadSafeBase::HasOneRef() const { 13 | return AtomicRefCountIsOne( 14 | &const_cast(this)->ref_count_); 15 | } 16 | 17 | RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) { 18 | #ifndef NDEBUG 19 | in_dtor_ = false; 20 | #endif 21 | } 22 | 23 | RefCountedThreadSafeBase::~RefCountedThreadSafeBase() { 24 | #ifndef NDEBUG 25 | DCHECK(in_dtor_) << "RefCountedThreadSafe object deleted without " 26 | "calling Release()"; 27 | #endif 28 | } 29 | 30 | void RefCountedThreadSafeBase::AddRef() const { 31 | #ifndef NDEBUG 32 | DCHECK(!in_dtor_); 33 | #endif 34 | AtomicRefCountInc(&ref_count_); 35 | } 36 | 37 | bool RefCountedThreadSafeBase::Release() const { 38 | #ifndef NDEBUG 39 | DCHECK(!in_dtor_); 40 | DCHECK(!AtomicRefCountIsZero(&ref_count_)); 41 | #endif 42 | if (!AtomicRefCountDec(&ref_count_)) { 43 | #ifndef NDEBUG 44 | in_dtor_ = true; 45 | #endif 46 | return true; 47 | } 48 | return false; 49 | } 50 | 51 | } // namespace subtle 52 | 53 | } // namespace base 54 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_string16.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_string16.h" 6 | 7 | #if defined(OS_POSIX) 8 | #if defined(WCHAR_T_IS_UTF16) 9 | 10 | #error This file should not be used on 2-byte wchar_t systems 11 | // If this winds up being needed on 2-byte wchar_t systems, either the 12 | // definitions below can be used, or the host system's wide character 13 | // functions like wmemcmp can be wrapped. 14 | 15 | #elif defined(WCHAR_T_IS_UTF32) 16 | 17 | #include 18 | #include 19 | 20 | #include "include/internal/cef_string_types.h" 21 | 22 | namespace base { 23 | 24 | int c16memcmp(const char16* s1, const char16* s2, size_t n) { 25 | // We cannot call memcmp because that changes the semantics. 26 | while (n-- > 0) { 27 | if (*s1 != *s2) { 28 | // We cannot use (*s1 - *s2) because char16 is unsigned. 29 | return ((*s1 < *s2) ? -1 : 1); 30 | } 31 | ++s1; 32 | ++s2; 33 | } 34 | return 0; 35 | } 36 | 37 | size_t c16len(const char16* s) { 38 | const char16 *s_orig = s; 39 | while (*s) { 40 | ++s; 41 | } 42 | return s - s_orig; 43 | } 44 | 45 | const char16* c16memchr(const char16* s, char16 c, size_t n) { 46 | while (n-- > 0) { 47 | if (*s == c) { 48 | return s; 49 | } 50 | ++s; 51 | } 52 | return 0; 53 | } 54 | 55 | char16* c16memmove(char16* s1, const char16* s2, size_t n) { 56 | return static_cast(memmove(s1, s2, n * sizeof(char16))); 57 | } 58 | 59 | char16* c16memcpy(char16* s1, const char16* s2, size_t n) { 60 | return static_cast(memcpy(s1, s2, n * sizeof(char16))); 61 | } 62 | 63 | char16* c16memset(char16* s, char16 c, size_t n) { 64 | char16 *s_orig = s; 65 | while (n-- > 0) { 66 | *s = c; 67 | ++s; 68 | } 69 | return s_orig; 70 | } 71 | 72 | std::ostream& operator<<(std::ostream& out, const string16& str) { 73 | cef_string_utf8_t cef_str = {0}; 74 | cef_string_utf16_to_utf8(str.c_str(), str.size(), &cef_str); 75 | out << cef_str.str; 76 | cef_string_utf8_clear(&cef_str); 77 | return out; 78 | } 79 | 80 | void PrintTo(const string16& str, std::ostream* out) { 81 | *out << str; 82 | } 83 | 84 | } // namespace base 85 | 86 | template class std::basic_string; 87 | 88 | #endif // WCHAR_T_IS_UTF32 89 | #endif // OS_POSIX 90 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_thread_checker_impl.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/internal/cef_thread_checker_impl.h" 6 | 7 | namespace base { 8 | 9 | ThreadCheckerImpl::ThreadCheckerImpl() 10 | : valid_thread_id_() { 11 | EnsureThreadIdAssigned(); 12 | } 13 | 14 | ThreadCheckerImpl::~ThreadCheckerImpl() {} 15 | 16 | bool ThreadCheckerImpl::CalledOnValidThread() const { 17 | EnsureThreadIdAssigned(); 18 | AutoLock auto_lock(lock_); 19 | return valid_thread_id_ == PlatformThread::CurrentRef(); 20 | } 21 | 22 | void ThreadCheckerImpl::DetachFromThread() { 23 | AutoLock auto_lock(lock_); 24 | valid_thread_id_ = PlatformThreadRef(); 25 | } 26 | 27 | void ThreadCheckerImpl::EnsureThreadIdAssigned() const { 28 | AutoLock auto_lock(lock_); 29 | if (valid_thread_id_.is_null()) { 30 | valid_thread_id_ = PlatformThread::CurrentRef(); 31 | } 32 | } 33 | 34 | } // namespace base 35 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_thread_collision_warner.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_thread_collision_warner.h" 6 | 7 | #include "include/base/cef_logging.h" 8 | #include "include/internal/cef_thread_internal.h" 9 | 10 | namespace base { 11 | 12 | void DCheckAsserter::warn() { 13 | NOTREACHED() << "Thread Collision"; 14 | } 15 | 16 | static subtle::Atomic32 CurrentThread() { 17 | const cef_platform_thread_id_t current_thread_id = 18 | cef_get_current_platform_thread_id(); 19 | // We need to get the thread id into an atomic data type. This might be a 20 | // truncating conversion, but any loss-of-information just increases the 21 | // chance of a fault negative, not a false positive. 22 | const subtle::Atomic32 atomic_thread_id = 23 | static_cast(current_thread_id); 24 | 25 | return atomic_thread_id; 26 | } 27 | 28 | void ThreadCollisionWarner::EnterSelf() { 29 | // If the active thread is 0 then I'll write the current thread ID 30 | // if two or more threads arrive here only one will succeed to 31 | // write on valid_thread_id_ the current thread ID. 32 | subtle::Atomic32 current_thread_id = CurrentThread(); 33 | 34 | int previous_value = subtle::NoBarrier_CompareAndSwap(&valid_thread_id_, 35 | 0, 36 | current_thread_id); 37 | if (previous_value != 0 && previous_value != current_thread_id) { 38 | // gotcha! a thread is trying to use the same class and that is 39 | // not current thread. 40 | asserter_->warn(); 41 | } 42 | 43 | subtle::NoBarrier_AtomicIncrement(&counter_, 1); 44 | } 45 | 46 | void ThreadCollisionWarner::Enter() { 47 | subtle::Atomic32 current_thread_id = CurrentThread(); 48 | 49 | if (subtle::NoBarrier_CompareAndSwap(&valid_thread_id_, 50 | 0, 51 | current_thread_id) != 0) { 52 | // gotcha! another thread is trying to use the same class. 53 | asserter_->warn(); 54 | } 55 | 56 | subtle::NoBarrier_AtomicIncrement(&counter_, 1); 57 | } 58 | 59 | void ThreadCollisionWarner::Leave() { 60 | if (subtle::Barrier_AtomicIncrement(&counter_, -1) == 0) { 61 | subtle::NoBarrier_Store(&valid_thread_id_, 0); 62 | } 63 | } 64 | 65 | } // namespace base 66 | -------------------------------------------------------------------------------- /src/libcef_dll/base/cef_weak_ptr.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_weak_ptr.h" 6 | 7 | namespace base { 8 | namespace internal { 9 | 10 | WeakReference::Flag::Flag() : is_valid_(true) { 11 | // Flags only become bound when checked for validity, or invalidated, 12 | // so that we can check that later validity/invalidation operations on 13 | // the same Flag take place on the same thread. 14 | thread_checker_.DetachFromThread(); 15 | } 16 | 17 | void WeakReference::Flag::Invalidate() { 18 | // The flag being invalidated with a single ref implies that there are no 19 | // weak pointers in existence. Allow deletion on other thread in this case. 20 | DCHECK(thread_checker_.CalledOnValidThread() || HasOneRef()) 21 | << "WeakPtrs must be invalidated on the same thread."; 22 | is_valid_ = false; 23 | } 24 | 25 | bool WeakReference::Flag::IsValid() const { 26 | DCHECK(thread_checker_.CalledOnValidThread()) 27 | << "WeakPtrs must be checked on the same thread."; 28 | return is_valid_; 29 | } 30 | 31 | WeakReference::Flag::~Flag() { 32 | } 33 | 34 | WeakReference::WeakReference() { 35 | } 36 | 37 | WeakReference::WeakReference(const Flag* flag) : flag_(flag) { 38 | } 39 | 40 | WeakReference::~WeakReference() { 41 | } 42 | 43 | bool WeakReference::is_valid() const { return flag_.get() && flag_->IsValid(); } 44 | 45 | WeakReferenceOwner::WeakReferenceOwner() { 46 | } 47 | 48 | WeakReferenceOwner::~WeakReferenceOwner() { 49 | Invalidate(); 50 | } 51 | 52 | WeakReference WeakReferenceOwner::GetRef() const { 53 | // If we hold the last reference to the Flag then create a new one. 54 | if (!HasRefs()) 55 | flag_ = new WeakReference::Flag(); 56 | 57 | return WeakReference(flag_.get()); 58 | } 59 | 60 | void WeakReferenceOwner::Invalidate() { 61 | if (flag_.get()) { 62 | flag_->Invalidate(); 63 | flag_ = NULL; 64 | } 65 | } 66 | 67 | WeakPtrBase::WeakPtrBase() { 68 | } 69 | 70 | WeakPtrBase::~WeakPtrBase() { 71 | } 72 | 73 | WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) { 74 | } 75 | 76 | } // namespace internal 77 | } // namespace base 78 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/app_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_app.h" 22 | #include "include/capi/cef_app_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefAppCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefAppCppToC(CefApp* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/browser_process_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_browser_process_handler.h" 22 | #include "include/capi/cef_browser_process_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefBrowserProcessHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefBrowserProcessHandlerCppToC(CefBrowserProcessHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_client.h" 22 | #include "include/capi/cef_client_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefClientCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefClientCppToC(CefClient* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/completion_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/completion_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK completion_callback_on_complete( 19 | struct _cef_completion_callback_t* self) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | DCHECK(self); 23 | if (!self) 24 | return; 25 | 26 | // Execute 27 | CefCompletionCallbackCppToC::Get(self)->OnComplete(); 28 | } 29 | 30 | 31 | // CONSTRUCTOR - Do not edit by hand. 32 | 33 | CefCompletionCallbackCppToC::CefCompletionCallbackCppToC( 34 | CefCompletionCallback* cls) 35 | : CefCppToC(cls) { 37 | struct_.struct_.on_complete = completion_callback_on_complete; 38 | } 39 | 40 | #ifndef NDEBUG 41 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/completion_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_callback.h" 22 | #include "include/capi/cef_callback_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefCompletionCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefCompletionCallbackCppToC(CefCompletionCallback* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/context_menu_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_context_menu_handler.h" 22 | #include "include/capi/cef_context_menu_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefContextMenuHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefContextMenuHandlerCppToC(CefContextMenuHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self, 19 | const struct _cef_cookie_t* cookie, int count, int total, 20 | int* deleteCookie) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return 0; 26 | // Verify param: cookie; type: struct_byref_const 27 | DCHECK(cookie); 28 | if (!cookie) 29 | return 0; 30 | // Verify param: deleteCookie; type: bool_byref 31 | DCHECK(deleteCookie); 32 | if (!deleteCookie) 33 | return 0; 34 | 35 | // Translate param: cookie; type: struct_byref_const 36 | CefCookie cookieObj; 37 | if (cookie) 38 | cookieObj.Set(*cookie, false); 39 | // Translate param: deleteCookie; type: bool_byref 40 | bool deleteCookieBool = (deleteCookie && *deleteCookie)?true:false; 41 | 42 | // Execute 43 | bool _retval = CefCookieVisitorCppToC::Get(self)->Visit( 44 | cookieObj, 45 | count, 46 | total, 47 | deleteCookieBool); 48 | 49 | // Restore param: deleteCookie; type: bool_byref 50 | if (deleteCookie) 51 | *deleteCookie = deleteCookieBool?true:false; 52 | 53 | // Return type: bool 54 | return _retval; 55 | } 56 | 57 | 58 | // CONSTRUCTOR - Do not edit by hand. 59 | 60 | CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls) 61 | : CefCppToC( 62 | cls) { 63 | struct_.struct_.visit = cookie_visitor_visit; 64 | } 65 | 66 | #ifndef NDEBUG 67 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 69 | #endif 70 | 71 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/cookie_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_cookie.h" 22 | #include "include/capi/cef_cookie_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefCookieVisitorCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefCookieVisitorCppToC(CefCookieVisitor* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/dialog_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" 14 | #include "libcef_dll/ctocpp/browser_ctocpp.h" 15 | #include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" 16 | #include "libcef_dll/transfer_util.h" 17 | 18 | 19 | // MEMBER FUNCTIONS - Body may be edited by hand. 20 | 21 | int CEF_CALLBACK dialog_handler_on_file_dialog( 22 | struct _cef_dialog_handler_t* self, cef_browser_t* browser, 23 | cef_file_dialog_mode_t mode, const cef_string_t* title, 24 | const cef_string_t* default_file_name, cef_string_list_t accept_types, 25 | cef_file_dialog_callback_t* callback) { 26 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 27 | 28 | DCHECK(self); 29 | if (!self) 30 | return 0; 31 | // Verify param: browser; type: refptr_diff 32 | DCHECK(browser); 33 | if (!browser) 34 | return 0; 35 | // Verify param: callback; type: refptr_diff 36 | DCHECK(callback); 37 | if (!callback) 38 | return 0; 39 | // Unverified params: title, default_file_name, accept_types 40 | 41 | // Translate param: accept_types; type: string_vec_byref_const 42 | std::vector accept_typesList; 43 | transfer_string_list_contents(accept_types, accept_typesList); 44 | 45 | // Execute 46 | bool _retval = CefDialogHandlerCppToC::Get(self)->OnFileDialog( 47 | CefBrowserCToCpp::Wrap(browser), 48 | mode, 49 | CefString(title), 50 | CefString(default_file_name), 51 | accept_typesList, 52 | CefFileDialogCallbackCToCpp::Wrap(callback)); 53 | 54 | // Return type: bool 55 | return _retval; 56 | } 57 | 58 | 59 | // CONSTRUCTOR - Do not edit by hand. 60 | 61 | CefDialogHandlerCppToC::CefDialogHandlerCppToC(CefDialogHandler* cls) 62 | : CefCppToC( 63 | cls) { 64 | struct_.struct_.on_file_dialog = dialog_handler_on_file_dialog; 65 | } 66 | 67 | #ifndef NDEBUG 68 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 70 | #endif 71 | 72 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/dialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_dialog_handler.h" 22 | #include "include/capi/cef_dialog_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDialogHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDialogHandlerCppToC(CefDialogHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/display_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_display_handler.h" 22 | #include "include/capi/cef_display_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDisplayHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/domvisitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/domvisitor_cpptoc.h" 14 | #include "libcef_dll/ctocpp/domdocument_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self, 20 | struct _cef_domdocument_t* document) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: document; type: refptr_diff 27 | DCHECK(document); 28 | if (!document) 29 | return; 30 | 31 | // Execute 32 | CefDOMVisitorCppToC::Get(self)->Visit( 33 | CefDOMDocumentCToCpp::Wrap(document)); 34 | } 35 | 36 | 37 | // CONSTRUCTOR - Do not edit by hand. 38 | 39 | CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls) 40 | : CefCppToC(cls) { 41 | struct_.struct_.visit = domvisitor_visit; 42 | } 43 | 44 | #ifndef NDEBUG 45 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/domvisitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_dom.h" 22 | #include "include/capi/cef_dom_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDOMVisitorCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefDOMVisitorCppToC(CefDOMVisitor* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/download_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_handler.h" 22 | #include "include/capi/cef_download_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDownloadHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDownloadHandlerCppToC(CefDownloadHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/drag_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/drag_handler_cpptoc.h" 14 | #include "libcef_dll/ctocpp/browser_ctocpp.h" 15 | #include "libcef_dll/ctocpp/drag_data_ctocpp.h" 16 | 17 | 18 | // MEMBER FUNCTIONS - Body may be edited by hand. 19 | 20 | int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self, 21 | cef_browser_t* browser, cef_drag_data_t* dragData, 22 | cef_drag_operations_mask_t mask) { 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | DCHECK(self); 26 | if (!self) 27 | return 0; 28 | // Verify param: browser; type: refptr_diff 29 | DCHECK(browser); 30 | if (!browser) 31 | return 0; 32 | // Verify param: dragData; type: refptr_diff 33 | DCHECK(dragData); 34 | if (!dragData) 35 | return 0; 36 | 37 | // Execute 38 | bool _retval = CefDragHandlerCppToC::Get(self)->OnDragEnter( 39 | CefBrowserCToCpp::Wrap(browser), 40 | CefDragDataCToCpp::Wrap(dragData), 41 | mask); 42 | 43 | // Return type: bool 44 | return _retval; 45 | } 46 | 47 | 48 | // CONSTRUCTOR - Do not edit by hand. 49 | 50 | CefDragHandlerCppToC::CefDragHandlerCppToC(CefDragHandler* cls) 51 | : CefCppToC(cls) { 52 | struct_.struct_.on_drag_enter = drag_handler_on_drag_enter; 53 | } 54 | 55 | #ifndef NDEBUG 56 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/drag_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_drag_handler.h" 22 | #include "include/capi/cef_drag_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDragHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDragHandlerCppToC(CefDragHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK end_tracing_callback_on_end_tracing_complete( 19 | struct _cef_end_tracing_callback_t* self, 20 | const cef_string_t* tracing_file) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: tracing_file; type: string_byref_const 27 | DCHECK(tracing_file); 28 | if (!tracing_file) 29 | return; 30 | 31 | // Execute 32 | CefEndTracingCallbackCppToC::Get(self)->OnEndTracingComplete( 33 | CefString(tracing_file)); 34 | } 35 | 36 | 37 | // CONSTRUCTOR - Do not edit by hand. 38 | 39 | CefEndTracingCallbackCppToC::CefEndTracingCallbackCppToC( 40 | CefEndTracingCallback* cls) 41 | : CefCppToC(cls) { 43 | struct_.struct_.on_end_tracing_complete = 44 | end_tracing_callback_on_end_tracing_complete; 45 | } 46 | 47 | #ifndef NDEBUG 48 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_trace.h" 22 | #include "include/capi/cef_trace_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefEndTracingCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefEndTracingCallbackCppToC(CefEndTracingCallback* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/focus_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_focus_handler.h" 22 | #include "include/capi/cef_focus_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefFocusHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefFocusHandlerCppToC(CefFocusHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/geolocation_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_geolocation_handler.h" 22 | #include "include/capi/cef_geolocation_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefGeolocationHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefGeolocationHandlerCppToC(CefGeolocationHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK get_geolocation_callback_on_location_update( 19 | struct _cef_get_geolocation_callback_t* self, 20 | const struct _cef_geoposition_t* position) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: position; type: struct_byref_const 27 | DCHECK(position); 28 | if (!position) 29 | return; 30 | 31 | // Translate param: position; type: struct_byref_const 32 | CefGeoposition positionObj; 33 | if (position) 34 | positionObj.Set(*position, false); 35 | 36 | // Execute 37 | CefGetGeolocationCallbackCppToC::Get(self)->OnLocationUpdate( 38 | positionObj); 39 | } 40 | 41 | 42 | // CONSTRUCTOR - Do not edit by hand. 43 | 44 | CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC( 45 | CefGetGeolocationCallback* cls) 46 | : CefCppToC(cls) { 48 | struct_.struct_.on_location_update = 49 | get_geolocation_callback_on_location_update; 50 | } 51 | 52 | #ifndef NDEBUG 53 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 55 | 0; 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_geolocation.h" 22 | #include "include/capi/cef_geolocation_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefGetGeolocationCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefGetGeolocationCallbackCppToC(CefGetGeolocationCallback* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_jsdialog_handler.h" 22 | #include "include/capi/cef_jsdialog_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefJSDialogHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/keyboard_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_keyboard_handler.h" 22 | #include "include/capi/cef_keyboard_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefKeyboardHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefKeyboardHandlerCppToC(CefKeyboardHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/life_span_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_life_span_handler.h" 22 | #include "include/capi/cef_life_span_handler_capi.h" 23 | #include "include/cef_client.h" 24 | #include "include/capi/cef_client_capi.h" 25 | #include "libcef_dll/cpptoc/cpptoc.h" 26 | 27 | // Wrap a C++ class with a C structure. 28 | // This class may be instantiated and accessed wrapper-side only. 29 | class CefLifeSpanHandlerCppToC 30 | : public CefCppToC { 32 | public: 33 | explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls); 34 | }; 35 | 36 | #endif // USING_CEF_SHARED 37 | #endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 38 | 39 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/load_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_load_handler.h" 22 | #include "include/capi/cef_load_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefLoadHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefLoadHandlerCppToC(CefLoadHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/print_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_print_handler.h" 22 | #include "include/capi/cef_print_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPrintHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefPrintHandlerCppToC(CefPrintHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/read_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefReadHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefReadHandlerCppToC(CefReadHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/render_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_render_handler.h" 22 | #include "include/capi/cef_render_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRenderHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRenderHandlerCppToC(CefRenderHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/render_process_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_render_process_handler.h" 22 | #include "include/capi/cef_render_process_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRenderProcessHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRenderProcessHandlerCppToC(CefRenderProcessHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/request_context_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/request_context_handler_cpptoc.h" 14 | #include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | cef_cookie_manager_t* CEF_CALLBACK request_context_handler_get_cookie_manager( 20 | struct _cef_request_context_handler_t* self) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return NULL; 26 | 27 | // Execute 28 | CefRefPtr _retval = CefRequestContextHandlerCppToC::Get( 29 | self)->GetCookieManager(); 30 | 31 | // Return type: refptr_diff 32 | return CefCookieManagerCToCpp::Unwrap(_retval); 33 | } 34 | 35 | 36 | // CONSTRUCTOR - Do not edit by hand. 37 | 38 | CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC( 39 | CefRequestContextHandler* cls) 40 | : CefCppToC(cls) { 42 | struct_.struct_.get_cookie_manager = 43 | request_context_handler_get_cookie_manager; 44 | } 45 | 46 | #ifndef NDEBUG 47 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/request_context_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_context_handler.h" 22 | #include "include/capi/cef_request_context_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestContextHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRequestContextHandlerCppToC(CefRequestContextHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/request_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_handler.h" 22 | #include "include/capi/cef_request_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRequestHandlerCppToC(CefRequestHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_resource_bundle_handler.h" 22 | #include "include/capi/cef_resource_bundle_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefResourceBundleHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefResourceBundleHandlerCppToC(CefResourceBundleHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/resource_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_resource_handler.h" 22 | #include "include/capi/cef_resource_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefResourceHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefResourceHandlerCppToC(CefResourceHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" 14 | #include "libcef_dll/ctocpp/browser_host_ctocpp.h" 15 | #include "libcef_dll/transfer_util.h" 16 | 17 | 18 | // MEMBER FUNCTIONS - Body may be edited by hand. 19 | 20 | void CEF_CALLBACK run_file_dialog_callback_cont( 21 | struct _cef_run_file_dialog_callback_t* self, 22 | struct _cef_browser_host_t* browser_host, cef_string_list_t file_paths) { 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | DCHECK(self); 26 | if (!self) 27 | return; 28 | // Verify param: browser_host; type: refptr_diff 29 | DCHECK(browser_host); 30 | if (!browser_host) 31 | return; 32 | // Verify param: file_paths; type: string_vec_byref_const 33 | DCHECK(file_paths); 34 | if (!file_paths) 35 | return; 36 | 37 | // Translate param: file_paths; type: string_vec_byref_const 38 | std::vector file_pathsList; 39 | transfer_string_list_contents(file_paths, file_pathsList); 40 | 41 | // Execute 42 | CefRunFileDialogCallbackCppToC::Get(self)->OnFileDialogDismissed( 43 | CefBrowserHostCToCpp::Wrap(browser_host), 44 | file_pathsList); 45 | } 46 | 47 | 48 | // CONSTRUCTOR - Do not edit by hand. 49 | 50 | CefRunFileDialogCallbackCppToC::CefRunFileDialogCallbackCppToC( 51 | CefRunFileDialogCallback* cls) 52 | : CefCppToC(cls) { 54 | struct_.struct_.cont = run_file_dialog_callback_cont; 55 | } 56 | 57 | #ifndef NDEBUG 58 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_browser.h" 22 | #include "include/capi/cef_browser_capi.h" 23 | #include "include/cef_client.h" 24 | #include "include/capi/cef_client_capi.h" 25 | #include "libcef_dll/cpptoc/cpptoc.h" 26 | 27 | // Wrap a C++ class with a C structure. 28 | // This class may be instantiated and accessed wrapper-side only. 29 | class CefRunFileDialogCallbackCppToC 30 | : public CefCppToC { 32 | public: 33 | explicit CefRunFileDialogCallbackCppToC(CefRunFileDialogCallback* cls); 34 | }; 35 | 36 | #endif // USING_CEF_SHARED 37 | #endif // CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 38 | 39 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/resource_handler_cpptoc.h" 14 | #include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" 15 | #include "libcef_dll/ctocpp/browser_ctocpp.h" 16 | #include "libcef_dll/ctocpp/frame_ctocpp.h" 17 | #include "libcef_dll/ctocpp/request_ctocpp.h" 18 | 19 | 20 | // MEMBER FUNCTIONS - Body may be edited by hand. 21 | 22 | cef_resource_handler_t* CEF_CALLBACK scheme_handler_factory_create( 23 | struct _cef_scheme_handler_factory_t* self, cef_browser_t* browser, 24 | cef_frame_t* frame, const cef_string_t* scheme_name, 25 | cef_request_t* request) { 26 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 27 | 28 | DCHECK(self); 29 | if (!self) 30 | return NULL; 31 | // Verify param: scheme_name; type: string_byref_const 32 | DCHECK(scheme_name); 33 | if (!scheme_name) 34 | return NULL; 35 | // Verify param: request; type: refptr_diff 36 | DCHECK(request); 37 | if (!request) 38 | return NULL; 39 | // Unverified params: browser, frame 40 | 41 | // Execute 42 | CefRefPtr _retval = CefSchemeHandlerFactoryCppToC::Get( 43 | self)->Create( 44 | CefBrowserCToCpp::Wrap(browser), 45 | CefFrameCToCpp::Wrap(frame), 46 | CefString(scheme_name), 47 | CefRequestCToCpp::Wrap(request)); 48 | 49 | // Return type: refptr_same 50 | return CefResourceHandlerCppToC::Wrap(_retval); 51 | } 52 | 53 | 54 | // CONSTRUCTOR - Do not edit by hand. 55 | 56 | CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC( 57 | CefSchemeHandlerFactory* cls) 58 | : CefCppToC(cls) { 60 | struct_.struct_.create = scheme_handler_factory_create; 61 | } 62 | 63 | #ifndef NDEBUG 64 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_scheme.h" 22 | #include "include/capi/cef_scheme_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefSchemeHandlerFactoryCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/string_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/string_visitor_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK string_visitor_visit(struct _cef_string_visitor_t* self, 19 | const cef_string_t* string) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | DCHECK(self); 23 | if (!self) 24 | return; 25 | // Unverified params: string 26 | 27 | // Execute 28 | CefStringVisitorCppToC::Get(self)->Visit( 29 | CefString(string)); 30 | } 31 | 32 | 33 | // CONSTRUCTOR - Do not edit by hand. 34 | 35 | CefStringVisitorCppToC::CefStringVisitorCppToC(CefStringVisitor* cls) 36 | : CefCppToC( 37 | cls) { 38 | struct_.struct_.visit = string_visitor_visit; 39 | } 40 | 41 | #ifndef NDEBUG 42 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/string_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_string_visitor.h" 22 | #include "include/capi/cef_string_visitor_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefStringVisitorCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefStringVisitorCppToC(CefStringVisitor* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/task_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/task_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK task_execute(struct _cef_task_t* self) { 19 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 20 | 21 | DCHECK(self); 22 | if (!self) 23 | return; 24 | 25 | // Execute 26 | CefTaskCppToC::Get(self)->Execute(); 27 | } 28 | 29 | 30 | // CONSTRUCTOR - Do not edit by hand. 31 | 32 | CefTaskCppToC::CefTaskCppToC(CefTask* cls) 33 | : CefCppToC(cls) { 34 | struct_.struct_.execute = task_execute; 35 | } 36 | 37 | #ifndef NDEBUG 38 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/task_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_task.h" 22 | #include "include/capi/cef_task_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefTaskCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefTaskCppToC(CefTask* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/urlrequest_client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_urlrequest.h" 22 | #include "include/capi/cef_urlrequest_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefURLRequestClientCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefURLRequestClientCppToC(CefURLRequestClient* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/v8accessor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8AccessorCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefV8AccessorCppToC(CefV8Accessor* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/v8handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8HandlerCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefV8HandlerCppToC(CefV8Handler* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" 14 | #include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | int CEF_CALLBACK web_plugin_info_visitor_visit( 20 | struct _cef_web_plugin_info_visitor_t* self, cef_web_plugin_info_t* info, 21 | int count, int total) { 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | DCHECK(self); 25 | if (!self) 26 | return 0; 27 | // Verify param: info; type: refptr_diff 28 | DCHECK(info); 29 | if (!info) 30 | return 0; 31 | 32 | // Execute 33 | bool _retval = CefWebPluginInfoVisitorCppToC::Get(self)->Visit( 34 | CefWebPluginInfoCToCpp::Wrap(info), 35 | count, 36 | total); 37 | 38 | // Return type: bool 39 | return _retval; 40 | } 41 | 42 | 43 | // CONSTRUCTOR - Do not edit by hand. 44 | 45 | CefWebPluginInfoVisitorCppToC::CefWebPluginInfoVisitorCppToC( 46 | CefWebPluginInfoVisitor* cls) 47 | : CefCppToC(cls) { 49 | struct_.struct_.visit = web_plugin_info_visitor_visit; 50 | } 51 | 52 | #ifndef NDEBUG 53 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_web_plugin.h" 22 | #include "include/capi/cef_web_plugin_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWebPluginInfoVisitorCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebPluginInfoVisitorCppToC(CefWebPluginInfoVisitor* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK web_plugin_unstable_callback_is_unstable( 19 | struct _cef_web_plugin_unstable_callback_t* self, const cef_string_t* path, 20 | int unstable) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: path; type: string_byref_const 27 | DCHECK(path); 28 | if (!path) 29 | return; 30 | 31 | // Execute 32 | CefWebPluginUnstableCallbackCppToC::Get(self)->IsUnstable( 33 | CefString(path), 34 | unstable?true:false); 35 | } 36 | 37 | 38 | // CONSTRUCTOR - Do not edit by hand. 39 | 40 | CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC( 41 | CefWebPluginUnstableCallback* cls) 42 | : CefCppToC( 44 | cls) { 45 | struct_.struct_.is_unstable = web_plugin_unstable_callback_is_unstable; 46 | } 47 | 48 | #ifndef NDEBUG 49 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_web_plugin.h" 22 | #include "include/capi/cef_web_plugin_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWebPluginUnstableCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebPluginUnstableCallbackCppToC( 32 | CefWebPluginUnstableCallback* cls); 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /src/libcef_dll/cpptoc/write_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWriteHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWriteHandlerCppToC(CefWriteHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefAllowCertificateErrorCallbackCToCpp::Continue(bool allow) { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_, 26 | allow); 27 | } 28 | 29 | 30 | #ifndef NDEBUG 31 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_handler.h" 22 | #include "include/capi/cef_request_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefAllowCertificateErrorCallbackCToCpp 28 | : public CefCToCpp { 31 | public: 32 | explicit CefAllowCertificateErrorCallbackCToCpp( 33 | cef_allow_certificate_error_callback_t* str) 34 | : CefCToCpp(str) {} 37 | 38 | // CefAllowCertificateErrorCallback methods 39 | virtual void Continue(bool allow) OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/auth_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/auth_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefAuthCallbackCToCpp::Continue(const CefString& username, 19 | const CefString& password) { 20 | if (CEF_MEMBER_MISSING(struct_, cont)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: username; type: string_byref_const 26 | DCHECK(!username.empty()); 27 | if (username.empty()) 28 | return; 29 | // Verify param: password; type: string_byref_const 30 | DCHECK(!password.empty()); 31 | if (password.empty()) 32 | return; 33 | 34 | // Execute 35 | struct_->cont(struct_, 36 | username.GetStruct(), 37 | password.GetStruct()); 38 | } 39 | 40 | void CefAuthCallbackCToCpp::Cancel() { 41 | if (CEF_MEMBER_MISSING(struct_, cancel)) 42 | return; 43 | 44 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 45 | 46 | // Execute 47 | struct_->cancel(struct_); 48 | } 49 | 50 | 51 | #ifndef NDEBUG 52 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/auth_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_auth_callback.h" 22 | #include "include/capi/cef_auth_callback_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefAuthCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefAuthCallbackCToCpp(cef_auth_callback_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefAuthCallback methods 36 | virtual void Continue(const CefString& username, 37 | const CefString& password) OVERRIDE; 38 | virtual void Cancel() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/before_download_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefBeforeDownloadCallbackCToCpp::Continue(const CefString& download_path, 19 | bool show_dialog) { 20 | if (CEF_MEMBER_MISSING(struct_, cont)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Unverified params: download_path 26 | 27 | // Execute 28 | struct_->cont(struct_, 29 | download_path.GetStruct(), 30 | show_dialog); 31 | } 32 | 33 | 34 | #ifndef NDEBUG 35 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 37 | 0; 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/before_download_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_handler.h" 22 | #include "include/capi/cef_download_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefBeforeDownloadCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefBeforeDownloadCallbackCToCpp(cef_before_download_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefBeforeDownloadCallback methods 36 | virtual void Continue(const CefString& download_path, 37 | bool show_dialog) OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/binary_value_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_values.h" 22 | #include "include/capi/cef_values_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefBinaryValueCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefBinaryValueCToCpp(cef_binary_value_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefBinaryValue methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual bool IsOwned() OVERRIDE; 38 | virtual CefRefPtr Copy() OVERRIDE; 39 | virtual size_t GetSize() OVERRIDE; 40 | virtual size_t GetData(void* buffer, size_t buffer_size, 41 | size_t data_offset) OVERRIDE; 42 | }; 43 | 44 | #endif // USING_CEF_SHARED 45 | #endif // CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 46 | 47 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/browser_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include 22 | #include "include/cef_browser.h" 23 | #include "include/capi/cef_browser_capi.h" 24 | #include "include/cef_client.h" 25 | #include "include/capi/cef_client_capi.h" 26 | #include "libcef_dll/ctocpp/ctocpp.h" 27 | 28 | // Wrap a C structure with a C++ class. 29 | // This class may be instantiated and accessed wrapper-side only. 30 | class CefBrowserCToCpp 31 | : public CefCToCpp { 32 | public: 33 | explicit CefBrowserCToCpp(cef_browser_t* str) 34 | : CefCToCpp(str) {} 35 | 36 | // CefBrowser methods 37 | virtual CefRefPtr GetHost() OVERRIDE; 38 | virtual bool CanGoBack() OVERRIDE; 39 | virtual void GoBack() OVERRIDE; 40 | virtual bool CanGoForward() OVERRIDE; 41 | virtual void GoForward() OVERRIDE; 42 | virtual bool IsLoading() OVERRIDE; 43 | virtual void Reload() OVERRIDE; 44 | virtual void ReloadIgnoreCache() OVERRIDE; 45 | virtual void StopLoad() OVERRIDE; 46 | virtual int GetIdentifier() OVERRIDE; 47 | virtual bool IsSame(CefRefPtr that) OVERRIDE; 48 | virtual bool IsPopup() OVERRIDE; 49 | virtual bool HasDocument() OVERRIDE; 50 | virtual CefRefPtr GetMainFrame() OVERRIDE; 51 | virtual CefRefPtr GetFocusedFrame() OVERRIDE; 52 | virtual CefRefPtr GetFrame(int64 identifier) OVERRIDE; 53 | virtual CefRefPtr GetFrame(const CefString& name) OVERRIDE; 54 | virtual size_t GetFrameCount() OVERRIDE; 55 | virtual void GetFrameIdentifiers(std::vector& identifiers) OVERRIDE; 56 | virtual void GetFrameNames(std::vector& names) OVERRIDE; 57 | virtual bool SendProcessMessage(CefProcessId target_process, 58 | CefRefPtr message) OVERRIDE; 59 | }; 60 | 61 | #endif // USING_CEF_SHARED 62 | #endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ 63 | 64 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefCallbackCToCpp::Continue() { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_); 26 | } 27 | 28 | void CefCallbackCToCpp::Cancel() { 29 | if (CEF_MEMBER_MISSING(struct_, cancel)) 30 | return; 31 | 32 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 33 | 34 | // Execute 35 | struct_->cancel(struct_); 36 | } 37 | 38 | 39 | #ifndef NDEBUG 40 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_callback.h" 22 | #include "include/capi/cef_callback_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefCallbackCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefCallbackCToCpp(cef_callback_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefCallback methods 34 | virtual void Continue() OVERRIDE; 35 | virtual void Cancel() OVERRIDE; 36 | }; 37 | 38 | #endif // USING_CEF_SHARED 39 | #endif // CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 40 | 41 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/context_menu_params_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include 22 | #include "include/cef_context_menu_handler.h" 23 | #include "include/capi/cef_context_menu_handler_capi.h" 24 | #include "libcef_dll/ctocpp/ctocpp.h" 25 | 26 | // Wrap a C structure with a C++ class. 27 | // This class may be instantiated and accessed wrapper-side only. 28 | class CefContextMenuParamsCToCpp 29 | : public CefCToCpp { 31 | public: 32 | explicit CefContextMenuParamsCToCpp(cef_context_menu_params_t* str) 33 | : CefCToCpp(str) {} 35 | 36 | // CefContextMenuParams methods 37 | virtual int GetXCoord() OVERRIDE; 38 | virtual int GetYCoord() OVERRIDE; 39 | virtual TypeFlags GetTypeFlags() OVERRIDE; 40 | virtual CefString GetLinkUrl() OVERRIDE; 41 | virtual CefString GetUnfilteredLinkUrl() OVERRIDE; 42 | virtual CefString GetSourceUrl() OVERRIDE; 43 | virtual bool HasImageContents() OVERRIDE; 44 | virtual CefString GetPageUrl() OVERRIDE; 45 | virtual CefString GetFrameUrl() OVERRIDE; 46 | virtual CefString GetFrameCharset() OVERRIDE; 47 | virtual MediaType GetMediaType() OVERRIDE; 48 | virtual MediaStateFlags GetMediaStateFlags() OVERRIDE; 49 | virtual CefString GetSelectionText() OVERRIDE; 50 | virtual CefString GetMisspelledWord() OVERRIDE; 51 | virtual int GetMisspellingHash() OVERRIDE; 52 | virtual bool GetDictionarySuggestions( 53 | std::vector& suggestions) OVERRIDE; 54 | virtual bool IsEditable() OVERRIDE; 55 | virtual bool IsSpellCheckEnabled() OVERRIDE; 56 | virtual EditStateFlags GetEditStateFlags() OVERRIDE; 57 | }; 58 | 59 | #endif // USING_CEF_SHARED 60 | #endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ 61 | 62 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/cookie_manager_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include 22 | #include "include/cef_cookie.h" 23 | #include "include/capi/cef_cookie_capi.h" 24 | #include "libcef_dll/ctocpp/ctocpp.h" 25 | 26 | // Wrap a C structure with a C++ class. 27 | // This class may be instantiated and accessed wrapper-side only. 28 | class CefCookieManagerCToCpp 29 | : public CefCToCpp { 31 | public: 32 | explicit CefCookieManagerCToCpp(cef_cookie_manager_t* str) 33 | : CefCToCpp(str) {} 35 | 36 | // CefCookieManager methods 37 | virtual void SetSupportedSchemes( 38 | const std::vector& schemes) OVERRIDE; 39 | virtual bool VisitAllCookies(CefRefPtr visitor) OVERRIDE; 40 | virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, 41 | CefRefPtr visitor) OVERRIDE; 42 | virtual bool SetCookie(const CefString& url, 43 | const CefCookie& cookie) OVERRIDE; 44 | virtual bool DeleteCookies(const CefString& url, 45 | const CefString& cookie_name) OVERRIDE; 46 | virtual bool SetStoragePath(const CefString& path, 47 | bool persist_session_cookies) OVERRIDE; 48 | virtual bool FlushStore(CefRefPtr callback) OVERRIDE; 49 | }; 50 | 51 | #endif // USING_CEF_SHARED 52 | #endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 53 | 54 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/domdocument_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_dom.h" 22 | #include "include/capi/cef_dom_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDOMDocumentCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefDOMDocumentCToCpp(cef_domdocument_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefDOMDocument methods 36 | virtual Type GetType() OVERRIDE; 37 | virtual CefRefPtr GetDocument() OVERRIDE; 38 | virtual CefRefPtr GetBody() OVERRIDE; 39 | virtual CefRefPtr GetHead() OVERRIDE; 40 | virtual CefString GetTitle() OVERRIDE; 41 | virtual CefRefPtr GetElementById(const CefString& id) OVERRIDE; 42 | virtual CefRefPtr GetFocusedNode() OVERRIDE; 43 | virtual bool HasSelection() OVERRIDE; 44 | virtual CefRefPtr GetSelectionStartNode() OVERRIDE; 45 | virtual int GetSelectionStartOffset() OVERRIDE; 46 | virtual CefRefPtr GetSelectionEndNode() OVERRIDE; 47 | virtual int GetSelectionEndOffset() OVERRIDE; 48 | virtual CefString GetSelectionAsMarkup() OVERRIDE; 49 | virtual CefString GetSelectionAsText() OVERRIDE; 50 | virtual CefString GetBaseURL() OVERRIDE; 51 | virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE; 52 | }; 53 | 54 | #endif // USING_CEF_SHARED 55 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ 56 | 57 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/download_item_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefDownloadItemCallbackCToCpp::Cancel() { 19 | if (CEF_MEMBER_MISSING(struct_, cancel)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cancel(struct_); 26 | } 27 | 28 | 29 | #ifndef NDEBUG 30 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/download_item_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_handler.h" 22 | #include "include/capi/cef_download_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDownloadItemCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefDownloadItemCallbackCToCpp(cef_download_item_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefDownloadItemCallback methods 36 | virtual void Cancel() OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/download_item_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_item.h" 22 | #include "include/capi/cef_download_item_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDownloadItemCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefDownloadItemCToCpp(cef_download_item_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefDownloadItem methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual bool IsInProgress() OVERRIDE; 38 | virtual bool IsComplete() OVERRIDE; 39 | virtual bool IsCanceled() OVERRIDE; 40 | virtual int64 GetCurrentSpeed() OVERRIDE; 41 | virtual int GetPercentComplete() OVERRIDE; 42 | virtual int64 GetTotalBytes() OVERRIDE; 43 | virtual int64 GetReceivedBytes() OVERRIDE; 44 | virtual CefTime GetStartTime() OVERRIDE; 45 | virtual CefTime GetEndTime() OVERRIDE; 46 | virtual CefString GetFullPath() OVERRIDE; 47 | virtual uint32 GetId() OVERRIDE; 48 | virtual CefString GetURL() OVERRIDE; 49 | virtual CefString GetSuggestedFileName() OVERRIDE; 50 | virtual CefString GetContentDisposition() OVERRIDE; 51 | virtual CefString GetMimeType() OVERRIDE; 52 | }; 53 | 54 | #endif // USING_CEF_SHARED 55 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 56 | 57 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" 14 | #include "libcef_dll/transfer_util.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefFileDialogCallbackCToCpp::Continue( 20 | const std::vector& file_paths) { 21 | if (CEF_MEMBER_MISSING(struct_, cont)) 22 | return; 23 | 24 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 25 | 26 | // Translate param: file_paths; type: string_vec_byref_const 27 | cef_string_list_t file_pathsList = cef_string_list_alloc(); 28 | DCHECK(file_pathsList); 29 | if (file_pathsList) 30 | transfer_string_list_contents(file_paths, file_pathsList); 31 | 32 | // Execute 33 | struct_->cont(struct_, 34 | file_pathsList); 35 | 36 | // Restore param:file_paths; type: string_vec_byref_const 37 | if (file_pathsList) 38 | cef_string_list_free(file_pathsList); 39 | } 40 | 41 | void CefFileDialogCallbackCToCpp::Cancel() { 42 | if (CEF_MEMBER_MISSING(struct_, cancel)) 43 | return; 44 | 45 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 46 | 47 | // Execute 48 | struct_->cancel(struct_); 49 | } 50 | 51 | 52 | #ifndef NDEBUG 53 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include 22 | #include "include/cef_dialog_handler.h" 23 | #include "include/capi/cef_dialog_handler_capi.h" 24 | #include "libcef_dll/ctocpp/ctocpp.h" 25 | 26 | // Wrap a C structure with a C++ class. 27 | // This class may be instantiated and accessed wrapper-side only. 28 | class CefFileDialogCallbackCToCpp 29 | : public CefCToCpp { 31 | public: 32 | explicit CefFileDialogCallbackCToCpp(cef_file_dialog_callback_t* str) 33 | : CefCToCpp(str) {} 35 | 36 | // CefFileDialogCallback methods 37 | virtual void Continue(const std::vector& file_paths) OVERRIDE; 38 | virtual void Cancel() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefGeolocationCallbackCToCpp::Continue(bool allow) { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_, 26 | allow); 27 | } 28 | 29 | 30 | #ifndef NDEBUG 31 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/geolocation_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_geolocation_handler.h" 22 | #include "include/capi/cef_geolocation_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefGeolocationCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefGeolocationCallbackCToCpp(cef_geolocation_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefGeolocationCallback methods 36 | virtual void Continue(bool allow) OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefJSDialogCallbackCToCpp::Continue(bool success, 19 | const CefString& user_input) { 20 | if (CEF_MEMBER_MISSING(struct_, cont)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Unverified params: user_input 26 | 27 | // Execute 28 | struct_->cont(struct_, 29 | success, 30 | user_input.GetStruct()); 31 | } 32 | 33 | 34 | #ifndef NDEBUG 35 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_jsdialog_handler.h" 22 | #include "include/capi/cef_jsdialog_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefJSDialogCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefJSDialogCallbackCToCpp(cef_jsdialog_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefJSDialogCallback methods 36 | virtual void Continue(bool success, const CefString& user_input) OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/post_data_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPostDataCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefPostDataCToCpp(cef_post_data_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefPostData methods 34 | virtual bool IsReadOnly() OVERRIDE; 35 | virtual size_t GetElementCount() OVERRIDE; 36 | virtual void GetElements(ElementVector& elements) OVERRIDE; 37 | virtual bool RemoveElement(CefRefPtr element) OVERRIDE; 38 | virtual bool AddElement(CefRefPtr element) OVERRIDE; 39 | virtual void RemoveElements() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/post_data_element_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPostDataElementCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefPostDataElementCToCpp(cef_post_data_element_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefPostDataElement methods 36 | virtual bool IsReadOnly() OVERRIDE; 37 | virtual void SetToEmpty() OVERRIDE; 38 | virtual void SetToFile(const CefString& fileName) OVERRIDE; 39 | virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE; 40 | virtual Type GetType() OVERRIDE; 41 | virtual CefString GetFile() OVERRIDE; 42 | virtual size_t GetBytesCount() OVERRIDE; 43 | virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" 14 | #include "libcef_dll/ctocpp/print_settings_ctocpp.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefPrintDialogCallbackCToCpp::Continue( 20 | CefRefPtr settings) { 21 | if (CEF_MEMBER_MISSING(struct_, cont)) 22 | return; 23 | 24 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 25 | 26 | // Verify param: settings; type: refptr_same 27 | DCHECK(settings.get()); 28 | if (!settings.get()) 29 | return; 30 | 31 | // Execute 32 | struct_->cont(struct_, 33 | CefPrintSettingsCToCpp::Unwrap(settings)); 34 | } 35 | 36 | void CefPrintDialogCallbackCToCpp::Cancel() { 37 | if (CEF_MEMBER_MISSING(struct_, cancel)) 38 | return; 39 | 40 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 41 | 42 | // Execute 43 | struct_->cancel(struct_); 44 | } 45 | 46 | 47 | #ifndef NDEBUG 48 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_print_handler.h" 22 | #include "include/capi/cef_print_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPrintDialogCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefPrintDialogCallbackCToCpp(cef_print_dialog_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefPrintDialogCallback methods 36 | virtual void Continue(CefRefPtr settings) OVERRIDE; 37 | virtual void Cancel() OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/print_job_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefPrintJobCallbackCToCpp::Continue() { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_); 26 | } 27 | 28 | 29 | #ifndef NDEBUG 30 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/print_job_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_print_handler.h" 22 | #include "include/capi/cef_print_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPrintJobCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefPrintJobCallbackCToCpp(cef_print_job_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefPrintJobCallback methods 36 | virtual void Continue() OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/process_message_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_process_message.h" 22 | #include "include/capi/cef_process_message_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefProcessMessageCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefProcessMessageCToCpp(cef_process_message_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefProcessMessage methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual bool IsReadOnly() OVERRIDE; 38 | virtual CefRefPtr Copy() OVERRIDE; 39 | virtual CefString GetName() OVERRIDE; 40 | virtual CefRefPtr GetArgumentList() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/quota_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/quota_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefQuotaCallbackCToCpp::Continue(bool allow) { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_, 26 | allow); 27 | } 28 | 29 | void CefQuotaCallbackCToCpp::Cancel() { 30 | if (CEF_MEMBER_MISSING(struct_, cancel)) 31 | return; 32 | 33 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 34 | 35 | // Execute 36 | struct_->cancel(struct_); 37 | } 38 | 39 | 40 | #ifndef NDEBUG 41 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/quota_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_handler.h" 22 | #include "include/capi/cef_request_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefQuotaCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefQuotaCallbackCToCpp(cef_quota_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefQuotaCallback methods 36 | virtual void Continue(bool allow) OVERRIDE; 37 | virtual void Cancel() OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/request_context_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_context.h" 22 | #include "include/capi/cef_request_context_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestContextCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefRequestContextCToCpp(cef_request_context_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefRequestContext methods 36 | virtual bool IsSame(CefRefPtr other) OVERRIDE; 37 | virtual bool IsGlobal() OVERRIDE; 38 | virtual CefRefPtr GetHandler() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/request_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefRequestCToCpp(cef_request_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefRequest methods 34 | virtual bool IsReadOnly() OVERRIDE; 35 | virtual CefString GetURL() OVERRIDE; 36 | virtual void SetURL(const CefString& url) OVERRIDE; 37 | virtual CefString GetMethod() OVERRIDE; 38 | virtual void SetMethod(const CefString& method) OVERRIDE; 39 | virtual CefRefPtr GetPostData() OVERRIDE; 40 | virtual void SetPostData(CefRefPtr postData) OVERRIDE; 41 | virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; 42 | virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; 43 | virtual void Set(const CefString& url, const CefString& method, 44 | CefRefPtr postData, const HeaderMap& headerMap) OVERRIDE; 45 | virtual int GetFlags() OVERRIDE; 46 | virtual void SetFlags(int flags) OVERRIDE; 47 | virtual CefString GetFirstPartyForCookies() OVERRIDE; 48 | virtual void SetFirstPartyForCookies(const CefString& url) OVERRIDE; 49 | virtual ResourceType GetResourceType() OVERRIDE; 50 | virtual TransitionType GetTransitionType() OVERRIDE; 51 | }; 52 | 53 | #endif // USING_CEF_SHARED 54 | #endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 55 | 56 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/response_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_response.h" 22 | #include "include/capi/cef_response_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefResponseCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefResponseCToCpp(cef_response_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefResponse methods 34 | virtual bool IsReadOnly() OVERRIDE; 35 | virtual int GetStatus() OVERRIDE; 36 | virtual void SetStatus(int status) OVERRIDE; 37 | virtual CefString GetStatusText() OVERRIDE; 38 | virtual void SetStatusText(const CefString& statusText) OVERRIDE; 39 | virtual CefString GetMimeType() OVERRIDE; 40 | virtual void SetMimeType(const CefString& mimeType) OVERRIDE; 41 | virtual CefString GetHeader(const CefString& name) OVERRIDE; 42 | virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; 43 | virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name, 19 | bool is_standard, bool is_local, bool is_display_isolated) { 20 | if (CEF_MEMBER_MISSING(struct_, add_custom_scheme)) 21 | return false; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: scheme_name; type: string_byref_const 26 | DCHECK(!scheme_name.empty()); 27 | if (scheme_name.empty()) 28 | return false; 29 | 30 | // Execute 31 | int _retval = struct_->add_custom_scheme(struct_, 32 | scheme_name.GetStruct(), 33 | is_standard, 34 | is_local, 35 | is_display_isolated); 36 | 37 | // Return type: bool 38 | return _retval?true:false; 39 | } 40 | 41 | 42 | #ifndef NDEBUG 43 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/scheme_registrar_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_scheme.h" 22 | #include "include/capi/cef_scheme_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefSchemeRegistrarCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefSchemeRegistrarCToCpp(cef_scheme_registrar_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefSchemeRegistrar methods 36 | virtual bool AddCustomScheme(const CefString& scheme_name, bool is_standard, 37 | bool is_local, bool is_display_isolated) OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/stream_reader_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefStreamReaderCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefStreamReaderCToCpp(cef_stream_reader_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefStreamReader methods 36 | virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; 37 | virtual int Seek(int64 offset, int whence) OVERRIDE; 38 | virtual int64 Tell() OVERRIDE; 39 | virtual int Eof() OVERRIDE; 40 | virtual bool MayBlock() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/stream_writer_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefStreamWriterCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefStreamWriterCToCpp(cef_stream_writer_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefStreamWriter methods 36 | virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; 37 | virtual int Seek(int64 offset, int whence) OVERRIDE; 38 | virtual int64 Tell() OVERRIDE; 39 | virtual int Flush() OVERRIDE; 40 | virtual bool MayBlock() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/task_runner_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_task.h" 22 | #include "include/capi/cef_task_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefTaskRunnerCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefTaskRunnerCToCpp(cef_task_runner_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefTaskRunner methods 34 | virtual bool IsSame(CefRefPtr that) OVERRIDE; 35 | virtual bool BelongsToCurrentThread() OVERRIDE; 36 | virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE; 37 | virtual bool PostTask(CefRefPtr task) OVERRIDE; 38 | virtual bool PostDelayedTask(CefRefPtr task, 39 | int64 delay_ms) OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/urlrequest_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_urlrequest.h" 22 | #include "include/capi/cef_urlrequest_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefURLRequestCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefURLRequestCToCpp(cef_urlrequest_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefURLRequest methods 34 | virtual CefRefPtr GetRequest() OVERRIDE; 35 | virtual CefRefPtr GetClient() OVERRIDE; 36 | virtual Status GetRequestStatus() OVERRIDE; 37 | virtual ErrorCode GetRequestError() OVERRIDE; 38 | virtual CefRefPtr GetResponse() OVERRIDE; 39 | virtual void Cancel() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/v8context_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8ContextCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefV8ContextCToCpp(cef_v8context_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefV8Context methods 34 | virtual CefRefPtr GetTaskRunner() OVERRIDE; 35 | virtual bool IsValid() OVERRIDE; 36 | virtual CefRefPtr GetBrowser() OVERRIDE; 37 | virtual CefRefPtr GetFrame() OVERRIDE; 38 | virtual CefRefPtr GetGlobal() OVERRIDE; 39 | virtual bool Enter() OVERRIDE; 40 | virtual bool Exit() OVERRIDE; 41 | virtual bool IsSame(CefRefPtr that) OVERRIDE; 42 | virtual bool Eval(const CefString& code, CefRefPtr& retval, 43 | CefRefPtr& exception) OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/v8exception_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8ExceptionCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefV8ExceptionCToCpp(cef_v8exception_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefV8Exception methods 36 | virtual CefString GetMessage() OVERRIDE; 37 | virtual CefString GetSourceLine() OVERRIDE; 38 | virtual CefString GetScriptResourceName() OVERRIDE; 39 | virtual int GetLineNumber() OVERRIDE; 40 | virtual int GetStartPosition() OVERRIDE; 41 | virtual int GetEndPosition() OVERRIDE; 42 | virtual int GetStartColumn() OVERRIDE; 43 | virtual int GetEndColumn() OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/v8stack_frame_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8StackFrameCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefV8StackFrameCToCpp(cef_v8stack_frame_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefV8StackFrame methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual CefString GetScriptName() OVERRIDE; 38 | virtual CefString GetScriptNameOrSourceURL() OVERRIDE; 39 | virtual CefString GetFunctionName() OVERRIDE; 40 | virtual int GetLineNumber() OVERRIDE; 41 | virtual int GetColumn() OVERRIDE; 42 | virtual bool IsEval() OVERRIDE; 43 | virtual bool IsConstructor() OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" 14 | #include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" 15 | 16 | 17 | // STATIC METHODS - Body may be edited by hand. 18 | 19 | CefRefPtr CefV8StackTrace::GetCurrent(int frame_limit) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | // Execute 23 | cef_v8stack_trace_t* _retval = cef_v8stack_trace_get_current( 24 | frame_limit); 25 | 26 | // Return type: refptr_same 27 | return CefV8StackTraceCToCpp::Wrap(_retval); 28 | } 29 | 30 | 31 | // VIRTUAL METHODS - Body may be edited by hand. 32 | 33 | bool CefV8StackTraceCToCpp::IsValid() { 34 | if (CEF_MEMBER_MISSING(struct_, is_valid)) 35 | return false; 36 | 37 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 38 | 39 | // Execute 40 | int _retval = struct_->is_valid(struct_); 41 | 42 | // Return type: bool 43 | return _retval?true:false; 44 | } 45 | 46 | int CefV8StackTraceCToCpp::GetFrameCount() { 47 | if (CEF_MEMBER_MISSING(struct_, get_frame_count)) 48 | return 0; 49 | 50 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 51 | 52 | // Execute 53 | int _retval = struct_->get_frame_count(struct_); 54 | 55 | // Return type: simple 56 | return _retval; 57 | } 58 | 59 | CefRefPtr CefV8StackTraceCToCpp::GetFrame(int index) { 60 | if (CEF_MEMBER_MISSING(struct_, get_frame)) 61 | return NULL; 62 | 63 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 64 | 65 | // Execute 66 | cef_v8stack_frame_t* _retval = struct_->get_frame(struct_, 67 | index); 68 | 69 | // Return type: refptr_same 70 | return CefV8StackFrameCToCpp::Wrap(_retval); 71 | } 72 | 73 | 74 | #ifndef NDEBUG 75 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 77 | #endif 78 | 79 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/v8stack_trace_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8StackTraceCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefV8StackTraceCToCpp(cef_v8stack_trace_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefV8StackTrace methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual int GetFrameCount() OVERRIDE; 38 | virtual CefRefPtr GetFrame(int index) OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | CefString CefWebPluginInfoCToCpp::GetName() { 19 | if (CEF_MEMBER_MISSING(struct_, get_name)) 20 | return CefString(); 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | cef_string_userfree_t _retval = struct_->get_name(struct_); 26 | 27 | // Return type: string 28 | CefString _retvalStr; 29 | _retvalStr.AttachToUserFree(_retval); 30 | return _retvalStr; 31 | } 32 | 33 | CefString CefWebPluginInfoCToCpp::GetPath() { 34 | if (CEF_MEMBER_MISSING(struct_, get_path)) 35 | return CefString(); 36 | 37 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 38 | 39 | // Execute 40 | cef_string_userfree_t _retval = struct_->get_path(struct_); 41 | 42 | // Return type: string 43 | CefString _retvalStr; 44 | _retvalStr.AttachToUserFree(_retval); 45 | return _retvalStr; 46 | } 47 | 48 | CefString CefWebPluginInfoCToCpp::GetVersion() { 49 | if (CEF_MEMBER_MISSING(struct_, get_version)) 50 | return CefString(); 51 | 52 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 53 | 54 | // Execute 55 | cef_string_userfree_t _retval = struct_->get_version(struct_); 56 | 57 | // Return type: string 58 | CefString _retvalStr; 59 | _retvalStr.AttachToUserFree(_retval); 60 | return _retvalStr; 61 | } 62 | 63 | CefString CefWebPluginInfoCToCpp::GetDescription() { 64 | if (CEF_MEMBER_MISSING(struct_, get_description)) 65 | return CefString(); 66 | 67 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 68 | 69 | // Execute 70 | cef_string_userfree_t _retval = struct_->get_description(struct_); 71 | 72 | // Return type: string 73 | CefString _retvalStr; 74 | _retvalStr.AttachToUserFree(_retval); 75 | return _retvalStr; 76 | } 77 | 78 | 79 | #ifndef NDEBUG 80 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 82 | #endif 83 | 84 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/web_plugin_info_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_web_plugin.h" 22 | #include "include/capi/cef_web_plugin_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWebPluginInfoCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefWebPluginInfoCToCpp(cef_web_plugin_info_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefWebPluginInfo methods 36 | virtual CefString GetName() OVERRIDE; 37 | virtual CefString GetPath() OVERRIDE; 38 | virtual CefString GetVersion() OVERRIDE; 39 | virtual CefString GetDescription() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /src/libcef_dll/ctocpp/zip_reader_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_zip_reader.h" 22 | #include "include/capi/cef_zip_reader_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefZipReaderCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefZipReaderCToCpp(cef_zip_reader_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefZipReader methods 34 | virtual bool MoveToFirstFile() OVERRIDE; 35 | virtual bool MoveToNextFile() OVERRIDE; 36 | virtual bool MoveToFile(const CefString& fileName, 37 | bool caseSensitive) OVERRIDE; 38 | virtual bool Close() OVERRIDE; 39 | virtual CefString GetFileName() OVERRIDE; 40 | virtual int64 GetFileSize() OVERRIDE; 41 | virtual time_t GetFileLastModified() OVERRIDE; 42 | virtual bool OpenFile(const CefString& password) OVERRIDE; 43 | virtual bool CloseFile() OVERRIDE; 44 | virtual int ReadFile(void* buffer, size_t bufferSize) OVERRIDE; 45 | virtual int64 Tell() OVERRIDE; 46 | virtual bool Eof() OVERRIDE; 47 | }; 48 | 49 | #endif // USING_CEF_SHARED 50 | #endif // CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 51 | 52 | -------------------------------------------------------------------------------- /src/libcef_dll/transfer_util.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #include "transfer_util.h" 6 | 7 | void transfer_string_list_contents(cef_string_list_t fromList, 8 | StringList& toList) 9 | { 10 | int size = cef_string_list_size(fromList); 11 | CefString value; 12 | 13 | for(int i = 0; i < size; i++) { 14 | cef_string_list_value(fromList, i, value.GetWritableStruct()); 15 | toList.push_back(value); 16 | } 17 | } 18 | 19 | void transfer_string_list_contents(const StringList& fromList, 20 | cef_string_list_t toList) 21 | { 22 | size_t size = fromList.size(); 23 | for(size_t i = 0; i < size; ++i) 24 | cef_string_list_append(toList, fromList[i].GetStruct()); 25 | } 26 | 27 | void transfer_string_map_contents(cef_string_map_t fromMap, 28 | StringMap& toMap) 29 | { 30 | int size = cef_string_map_size(fromMap); 31 | CefString key, value; 32 | 33 | for(int i = 0; i < size; ++i) { 34 | cef_string_map_key(fromMap, i, key.GetWritableStruct()); 35 | cef_string_map_value(fromMap, i, value.GetWritableStruct()); 36 | 37 | toMap.insert(std::make_pair(key, value)); 38 | } 39 | } 40 | 41 | void transfer_string_map_contents(const StringMap& fromMap, 42 | cef_string_map_t toMap) 43 | { 44 | StringMap::const_iterator it = fromMap.begin(); 45 | for(; it != fromMap.end(); ++it) 46 | cef_string_map_append(toMap, it->first.GetStruct(), it->second.GetStruct()); 47 | } 48 | 49 | void transfer_string_multimap_contents(cef_string_multimap_t fromMap, 50 | StringMultimap& toMap) 51 | { 52 | int size = cef_string_multimap_size(fromMap); 53 | CefString key, value; 54 | 55 | for(int i = 0; i < size; ++i) { 56 | cef_string_multimap_key(fromMap, i, key.GetWritableStruct()); 57 | cef_string_multimap_value(fromMap, i, value.GetWritableStruct()); 58 | 59 | toMap.insert(std::make_pair(key, value)); 60 | } 61 | } 62 | 63 | void transfer_string_multimap_contents(const StringMultimap& fromMap, 64 | cef_string_multimap_t toMap) 65 | { 66 | StringMultimap::const_iterator it = fromMap.begin(); 67 | for(; it != fromMap.end(); ++it) { 68 | cef_string_multimap_append(toMap, 69 | it->first.GetStruct(), 70 | it->second.GetStruct()); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/libcef_dll/transfer_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #ifndef CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ 6 | #define CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | #include "include/internal/cef_string_list.h" 13 | #include "include/internal/cef_string_map.h" 14 | #include "include/internal/cef_string_multimap.h" 15 | 16 | // Copy contents from one list type to another. 17 | typedef std::vector StringList; 18 | void transfer_string_list_contents(cef_string_list_t fromList, 19 | StringList& toList); 20 | void transfer_string_list_contents(const StringList& fromList, 21 | cef_string_list_t toList); 22 | 23 | // Copy contents from one map type to another. 24 | typedef std::map StringMap; 25 | void transfer_string_map_contents(cef_string_map_t fromMap, 26 | StringMap& toMap); 27 | void transfer_string_map_contents(const StringMap& fromMap, 28 | cef_string_map_t toMap); 29 | 30 | // Copy contents from one map type to another. 31 | typedef std::multimap StringMultimap; 32 | void transfer_string_multimap_contents(cef_string_multimap_t fromMap, 33 | StringMultimap& toMap); 34 | void transfer_string_multimap_contents(const StringMultimap& fromMap, 35 | cef_string_multimap_t toMap); 36 | 37 | #endif // CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ 38 | -------------------------------------------------------------------------------- /src/libcef_dll/wrapper/cef_byte_read_handler.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #include "include/wrapper/cef_byte_read_handler.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size, 12 | CefRefPtr source) 13 | : bytes_(bytes), size_(size), offset_(0), source_(source) { 14 | } 15 | 16 | size_t CefByteReadHandler::Read(void* ptr, size_t size, size_t n) { 17 | base::AutoLock lock_scope(lock_); 18 | size_t s = static_cast(size_ - offset_) / size; 19 | size_t ret = std::min(n, s); 20 | memcpy(ptr, bytes_ + offset_, ret * size); 21 | offset_ += ret * size; 22 | return ret; 23 | } 24 | 25 | int CefByteReadHandler::Seek(int64 offset, int whence) { 26 | int rv = -1L; 27 | base::AutoLock lock_scope(lock_); 28 | switch (whence) { 29 | case SEEK_CUR: 30 | if (offset_ + offset > size_ || offset_ + offset < 0) 31 | break; 32 | offset_ += offset; 33 | rv = 0; 34 | break; 35 | case SEEK_END: { 36 | #if defined(OS_WIN) 37 | int64 offset_abs = _abs64(offset); 38 | #else 39 | int64 offset_abs = std::abs(offset); 40 | #endif 41 | if (offset_abs > size_) 42 | break; 43 | offset_ = size_ - offset_abs; 44 | rv = 0; 45 | break; 46 | } 47 | case SEEK_SET: 48 | if (offset > size_ || offset < 0) 49 | break; 50 | offset_ = offset; 51 | rv = 0; 52 | break; 53 | } 54 | 55 | return rv; 56 | } 57 | 58 | int64 CefByteReadHandler::Tell() { 59 | base::AutoLock lock_scope(lock_); 60 | return offset_; 61 | } 62 | 63 | int CefByteReadHandler::Eof() { 64 | base::AutoLock lock_scope(lock_); 65 | return (offset_ >= size_); 66 | } 67 | -------------------------------------------------------------------------------- /src/libcef_dll/wrapper/cef_closure_task.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #include "include/wrapper/cef_closure_task.h" 6 | #include "include/base/cef_callback.h" 7 | 8 | namespace { 9 | 10 | class CefClosureTask : public CefTask { 11 | public: 12 | explicit CefClosureTask(const base::Closure& closure) 13 | : closure_(closure) { 14 | } 15 | 16 | // CefTask method 17 | virtual void Execute() OVERRIDE { 18 | closure_.Run(); 19 | closure_.Reset(); 20 | } 21 | 22 | private: 23 | base::Closure closure_; 24 | 25 | IMPLEMENT_REFCOUNTING(CefClosureTask); 26 | DISALLOW_COPY_AND_ASSIGN(CefClosureTask); 27 | }; 28 | 29 | } // namespace 30 | 31 | CefRefPtr CefCreateClosureTask(const base::Closure& closure) { 32 | return new CefClosureTask(closure); 33 | } 34 | 35 | bool CefPostTask(CefThreadId threadId, const base::Closure& closure) { 36 | return CefPostTask(threadId, new CefClosureTask(closure)); 37 | } 38 | 39 | bool CefPostDelayedTask(CefThreadId threadId, const base::Closure& closure, 40 | int64 delay_ms) { 41 | return CefPostDelayedTask(threadId, new CefClosureTask(closure), delay_ms); 42 | } 43 | -------------------------------------------------------------------------------- /src/libcef_dll/wrapper/libcef_dll_wrapper2.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | -------------------------------------------------------------------------------- /src/tegtkgl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2013 André Diego Piske 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | * this software and associated documentation files (the "Software"), to deal in 6 | * the Software without restriction, including without limitation the rights to 7 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | * of the Software, and to permit persons to whom the Software is furnished to do 9 | * so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | * 22 | **/ 23 | 24 | #ifndef __TE_GTKGL_H__ 25 | #define __TE_GTKGL_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define TE_TYPE_GTKGL (te_gtkgl_get_type()) 32 | #define TE_GTKGL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TE_TYPE_GTKGL, TeGtkgl)) 33 | #define TE_IS_GTKGL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TE_TYPE_GTKGL)) 34 | #define TE_GTKGL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TE_TYPE_GTKGL, TeGtkglClass)) 35 | #define TE_IS_GTKGL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TE_TYPE_GTKGL)) 36 | #define TE_GTKGL_GET_CLASS(obj) (G_TYPE_INSTANCE((obj), TE_TYPE_GTKGL, TeGtkglClass)) 37 | 38 | typedef struct _TeGtkgl TeGtkgl; 39 | typedef struct _TeGtkglClass TeGtkglClass; 40 | 41 | struct _TeGtkgl { 42 | GtkWidget parent_instance; 43 | }; 44 | 45 | struct _TeGtkglClass { 46 | GtkWidgetClass parent_class; 47 | }; 48 | 49 | GType te_gtkgl_get_type(void); 50 | GtkWidget *te_gtkgl_new(); 51 | 52 | void te_gtkgl_make_current(TeGtkgl*); 53 | void *te_gtkgl_get_x11_display(GtkWidget*wid); 54 | void te_gtkgl_swap(TeGtkgl*); 55 | 56 | G_END_DECLS 57 | 58 | #endif 59 | 60 | --------------------------------------------------------------------------------