├── CEF.diff ├── CMakeLists.txt ├── LICENSE ├── README.MD ├── cefqtclient ├── CMakeLists.txt ├── application.h ├── clientapp.cpp ├── clientapp.h ├── clienthandler.cpp ├── clienthandler.h ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── res.qrc └── res │ ├── backward.png │ ├── forward.png │ └── reload.png ├── cefsubprocess ├── CMakeLists.txt └── main.cpp ├── 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_x86_gcc.h │ │ ├── cef_atomicops_x86_msvc.h │ │ ├── cef_bind_internal.h │ │ ├── cef_bind_internal_win.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_find_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_navigation_entry_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_ssl_info_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_find_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_navigation_entry.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_sandbox_win.h ├── cef_scheme.h ├── cef_ssl_info.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_logging_internal.h │ ├── cef_ptr.h │ ├── cef_string.h │ ├── cef_string_list.h │ ├── cef_string_map.h │ ├── cef_string_multimap.h │ ├── cef_string_types.h │ ├── cef_string_wrappers.h │ ├── cef_thread_internal.h │ ├── cef_time.h │ ├── cef_trace_event_internal.h │ ├── cef_types.h │ ├── cef_types_win.h │ ├── cef_types_wrappers.h │ └── cef_win.h └── 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 └── libcef_dll ├── CMakeLists.txt ├── LICENSE.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 ├── find_handler_cpptoc.cc ├── find_handler_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 ├── navigation_entry_visitor_cpptoc.cc ├── navigation_entry_visitor_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 ├── navigation_entry_ctocpp.cc ├── navigation_entry_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 ├── sslcert_principal_ctocpp.cc ├── sslcert_principal_ctocpp.h ├── sslinfo_ctocpp.cc ├── sslinfo_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.cc ├── 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 /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Florent Renault. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the Software), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, andor sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | CEF MinGW Qt 2 | =================== 3 | 4 | A very simple web client built using in [Chromium Embedded 5 | Framework](https://bitbucket.org/chromiumembedded/cef) & Qt with MinGW. 6 | The Cef events are processed by the Qt Application object. Sub-processes are spawned using a separate executable. 7 | 8 | About 9 | ----- 10 | 11 | The project was sucessfully compiled and tested using the following components : 12 | - Qt 5.3.1 for Win32 (MinGW) 13 | - MinGW (4.8.2 Dwarf) 14 | - CEF 3.2272.2077 Win32 15 | - CMake 3.1.0 16 | 17 | Building 18 | ----- 19 | 20 | * Download https://cefbuilds.com/#branch_2272 (CEF 3.2272.2077) 21 | * Extract and copy **only** the following directories to your local git repository : 22 | 23 | ``` 24 | Debug/ 25 | Release/ 26 | Resources/ 27 | ``` 28 | 29 | Do not replace `include` and `libcef_dll` directories, they have been patched by myself to allow the compilation with MinGW (see "MinGW Compilation" section). 30 | 31 | * Create a build directory 32 | * Run cmake from your build directory pointing to the repository root CMakeLists.txt, ie `cmake -G"MinGW Makefiles" ..` 33 | * Run `mingw32-make.exe install` on the generated Makefile 34 | 35 | Project 36 | ----- 37 | 38 | * cefqtclient 39 | - main browser process and ui 40 | * cefsubprocess 41 | - separate sub-process executable 42 | * libcef_dll 43 | - cef3's c++ wrapper 44 | 45 | MinGW Compilation 46 | ----- 47 | 48 | See `CEF.diff` at the root for more informations about the modifications that have been done. 49 | 50 | Thanks to 51 | ----- 52 | 53 | The guys from the Cef forum for their direct/indirect help. 54 | 55 | The main CMakeLists.txt was widely built based on the Cef SimpleClient example. 56 | 57 | Navigation icons picked from "Iconic" pack (http://somerandomdude.com/work/iconic/), under CC License. -------------------------------------------------------------------------------- /cefqtclient/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #------------------------------- CEF Qt Client -------------------------------- 2 | 3 | find_package(Qt5Core) 4 | find_package(Qt5Gui) 5 | find_package(Qt5Widgets) 6 | 7 | # Sources ----------- 8 | 9 | qt5_wrap_ui(QT_UI mainwindow.ui) 10 | 11 | qt5_wrap_cpp(QT_MOC_CPP mainwindow.h) 12 | 13 | qt5_add_resources(QT_RES res.qrc) 14 | 15 | set(CEFQTCLIENT_SRCS 16 | application.h 17 | clientapp.cpp 18 | clientapp.h 19 | clienthandler.cpp 20 | clienthandler.h 21 | main.cpp 22 | mainwindow.cpp 23 | ${QT_MOC_CPP} 24 | ${QT_UI} 25 | ${QT_RES} 26 | ) 27 | 28 | # Target ----------- 29 | 30 | set(CEF_TARGET "cefqtclient") 31 | 32 | # Logical target used to link the libcef library. 33 | ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}") 34 | 35 | # Executable target. 36 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 37 | 38 | add_executable(${CEF_TARGET} WIN32 ${CEFQTCLIENT_SRCS}) 39 | add_dependencies(${CEF_TARGET} libcef_dll_wrapper) 40 | target_link_libraries(${CEF_TARGET} 41 | Qt5::Core 42 | Qt5::Gui 43 | Qt5::Widgets 44 | libcef_dll_wrapper 45 | libcef_lib 46 | ${CEF_STANDARD_LIBS}) 47 | 48 | install(TARGETS ${CEF_TARGET} DESTINATION "${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}") 49 | 50 | -------------------------------------------------------------------------------- /cefqtclient/application.h: -------------------------------------------------------------------------------- 1 | #ifndef APPLICATION_H 2 | #define APPLICATION_H 3 | 4 | #include 5 | #include 6 | #include "include/cef_app.h" 7 | 8 | class Application: public QApplication 9 | { 10 | public: 11 | Application(int argc, char *argv[]):QApplication(argc,argv){} 12 | 13 | void run_cefloop() 14 | { 15 | QTimer* timer = new QTimer(this); 16 | QObject::connect(timer, &QTimer::timeout, this, &Application::cef_dowork, Qt::QueuedConnection); 17 | timer->start(30); 18 | } 19 | 20 | int run() 21 | { 22 | run_cefloop(); 23 | return exec(); 24 | } 25 | 26 | public slots: 27 | void cef_dowork() 28 | { 29 | CefDoMessageLoopWork(); 30 | } 31 | }; 32 | 33 | #endif // APPLICATION_H 34 | -------------------------------------------------------------------------------- /cefqtclient/clientapp.cpp: -------------------------------------------------------------------------------- 1 | #include "clientapp.h" 2 | 3 | ClientApp::ClientApp() 4 | { 5 | } 6 | 7 | void ClientApp::OnContextInitialized() 8 | { 9 | } 10 | -------------------------------------------------------------------------------- /cefqtclient/clientapp.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIENTAPP_H_ 2 | #define CLIENTAPP_H_ 3 | 4 | #include "include/cef_app.h" 5 | 6 | class ClientApp : public CefApp, 7 | public CefBrowserProcessHandler 8 | { 9 | public: 10 | ClientApp(); 11 | 12 | virtual CefRefPtr GetBrowserProcessHandler() override { return this; } 13 | virtual void OnContextInitialized() override; 14 | 15 | private: 16 | IMPLEMENT_REFCOUNTING(ClientApp) 17 | }; 18 | 19 | #endif // CLIENTAPP_H_ 20 | -------------------------------------------------------------------------------- /cefqtclient/clienthandler.h: -------------------------------------------------------------------------------- 1 | #ifndef CEF_TESTS_CEFSIMPLE_SIMPLE_HANDLER_H_ 2 | #define CEF_TESTS_CEFSIMPLE_SIMPLE_HANDLER_H_ 3 | 4 | #include "include/cef_client.h" 5 | 6 | #include 7 | class CEFWebView; 8 | class MainWindow; 9 | 10 | class ClientHandler : public CefClient, 11 | public CefLifeSpanHandler, 12 | public CefLoadHandler, 13 | public CefDisplayHandler 14 | { 15 | public: 16 | ClientHandler(MainWindow* view); 17 | ~ClientHandler(); 18 | 19 | CefRefPtr GetBrowser() const; 20 | 21 | // Request that all existing browser windows close. 22 | void CloseAllBrowsers(bool force_close); 23 | bool IsClosing() const { return m_isClosing; } 24 | 25 | // CefClient methods: 26 | virtual CefRefPtr GetDisplayHandler() override { return this; } 27 | virtual CefRefPtr GetLifeSpanHandler() override { return this; } 28 | virtual CefRefPtr GetLoadHandler() override { return this; } 29 | 30 | // CefDisplayHandler methods: 31 | virtual void OnTitleChange(CefRefPtr browser, const CefString& title) override; 32 | virtual void OnAddressChange(CefRefPtr browser, CefRefPtr frame, const CefString &url) override; 33 | 34 | // CefLifeSpanHandler methods: 35 | virtual void OnAfterCreated(CefRefPtr browser) override; 36 | virtual bool DoClose(CefRefPtr browser) override; 37 | virtual void OnBeforeClose(CefRefPtr browser) override; 38 | 39 | // CefLoadHandler methods: 40 | virtual void OnLoadError(CefRefPtr browser, 41 | CefRefPtr frame, 42 | ErrorCode errorCode, 43 | const CefString& errorText, 44 | const CefString& failedUrl) override; 45 | 46 | 47 | private: 48 | bool m_isClosing; 49 | 50 | typedef std::list > BrowserList; 51 | BrowserList m_slaveBrowserList; 52 | CefRefPtr m_browser; 53 | MainWindow* m_view; 54 | 55 | IMPLEMENT_REFCOUNTING(ClientHandler) 56 | }; 57 | 58 | #endif // CEF_TESTS_CEFSIMPLE_SIMPLE_HANDLER_H_ 59 | -------------------------------------------------------------------------------- /cefqtclient/main.cpp: -------------------------------------------------------------------------------- 1 | #include "application.h" 2 | #include "mainwindow.h" 3 | 4 | #include 5 | 6 | #include "clientapp.h" 7 | #include "clienthandler.h" 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | // Cef initialization 12 | CefMainArgs main_args((HINSTANCE)GetModuleHandle(0)); 13 | 14 | CefRefPtr app(new ClientApp); 15 | 16 | CefSettings settings; 17 | CefString(&settings.browser_subprocess_path) = CefString("cefsubprocess.exe"); 18 | settings.no_sandbox = true; 19 | 20 | CefInitialize(main_args, settings, app.get(), nullptr); 21 | 22 | // Qt initialization 23 | Application a(argc, argv); 24 | 25 | MainWindow w; 26 | w.show(); 27 | 28 | // Run Qt event loop, handling cef event aswell 29 | a.run(); 30 | 31 | CefShutdown(); 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /cefqtclient/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include "ui_mainwindow.h" 5 | #include "clienthandler.h" 6 | 7 | class CEFWebView; 8 | 9 | class MainWindow : public QMainWindow 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | explicit MainWindow(QWidget *parent = nullptr); 15 | ~MainWindow(); 16 | 17 | void updateLineEditUrl(const QString& text); 18 | 19 | private: 20 | void initBrowser(); 21 | 22 | protected: 23 | void resizeEvent(QResizeEvent *) override; 24 | void showEvent(QShowEvent *) override; 25 | 26 | private slots: 27 | void handleReturnPress(); 28 | 29 | void on_backwardButton_clicked(); 30 | void on_forwardButton_clicked(); 31 | void on_reloadButton_clicked(); 32 | 33 | private: 34 | Ui::MainWindow ui; 35 | 36 | CefRefPtr m_clientHandler; 37 | QWidget* m_webviewWidget; 38 | }; 39 | 40 | #endif // MAINWINDOW_H 41 | -------------------------------------------------------------------------------- /cefqtclient/res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | res/backward.png 4 | res/forward.png 5 | res/reload.png 6 | 7 | 8 | -------------------------------------------------------------------------------- /cefqtclient/res/backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GreatTux/CefMinGWQt/ae8eaafcbace8b72e05f5668ffe00a47e2e4a0b9/cefqtclient/res/backward.png -------------------------------------------------------------------------------- /cefqtclient/res/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GreatTux/CefMinGWQt/ae8eaafcbace8b72e05f5668ffe00a47e2e4a0b9/cefqtclient/res/forward.png -------------------------------------------------------------------------------- /cefqtclient/res/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GreatTux/CefMinGWQt/ae8eaafcbace8b72e05f5668ffe00a47e2e4a0b9/cefqtclient/res/reload.png -------------------------------------------------------------------------------- /cefsubprocess/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #------------------------------- CEF Sub Process ------------------------------- 2 | 3 | # Sources ----------- 4 | 5 | set(CEFSUBPROCESS_SRCS 6 | main.cpp 7 | ../cefqtclient/clientapp.cpp 8 | ../cefqtclient/clientapp.h 9 | ) 10 | 11 | # Target ----------- 12 | 13 | set(CEF_TARGET "cefsubprocess") 14 | 15 | # Logical target used to link the libcef library. 16 | ADD_LOGICAL_TARGET("libcef_lib" "${CEF_LIB_DEBUG}" "${CEF_LIB_RELEASE}") 17 | 18 | # Executable target. 19 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 20 | 21 | add_executable(${CEF_TARGET} WIN32 ${CEFSUBPROCESS_SRCS}) 22 | add_dependencies(${CEF_TARGET} libcef_dll_wrapper) 23 | target_link_libraries(${CEF_TARGET} 24 | libcef_dll_wrapper 25 | libcef_lib 26 | ${CEF_STANDARD_LIBS}) 27 | 28 | install(TARGETS ${CEF_TARGET} DESTINATION "${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}") 29 | -------------------------------------------------------------------------------- /cefsubprocess/main.cpp: -------------------------------------------------------------------------------- 1 | #include "../cefqtclient/clientapp.h" 2 | 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | CefMainArgs main_args((HINSTANCE)GetModuleHandle(0)); 7 | 8 | CefRefPtr app(new ClientApp); 9 | 10 | return CefExecuteProcess(main_args, app.get(), 0); 11 | } 12 | -------------------------------------------------------------------------------- /include/cef_path_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the name Chromium Embedded 14 | // Framework nor the names of its contributors may be used to endorse 15 | // or promote products derived from this software without specific prior 16 | // written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // --------------------------------------------------------------------------- 31 | // 32 | // The contents of this file must follow a specific format in order to 33 | // support the CEF translator tool. See the translator.README.txt file in the 34 | // tools directory for more information. 35 | // 36 | 37 | #ifndef CEF_INCLUDE_CEF_PATH_UTIL_H_ 38 | #define CEF_INCLUDE_CEF_PATH_UTIL_H_ 39 | #pragma once 40 | 41 | #include "include/cef_base.h" 42 | 43 | typedef cef_path_key_t PathKey; 44 | 45 | /// 46 | // Retrieve the path associated with the specified |key|. Returns true on 47 | // success. Can be called on any thread in the browser process. 48 | /// 49 | /*--cef()--*/ 50 | bool CefGetPath(PathKey key, CefString& path); 51 | 52 | #endif // CEF_INCLUDE_CEF_PATH_UTIL_H_ 53 | -------------------------------------------------------------------------------- /include/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 | -------------------------------------------------------------------------------- /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(OS_WIN) 38 | 39 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 40 | #define CEF_CALLBACK __stdcall 41 | 42 | #elif defined(COMPILER_GCC) 43 | 44 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 45 | #define CEF_CALLBACK 46 | 47 | #endif // COMPILER_GCC 48 | 49 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 50 | -------------------------------------------------------------------------------- /libcef_dll/LICENSE.txt: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c) 2 | // 2006-2009 Google Inc. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 cef_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 cef_internal 34 | } // namespace base 35 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 cef_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 cef_internal 77 | } // namespace base 78 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/app_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/browser_process_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/completion_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/completion_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/context_menu_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/cookie_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/cookie_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/dialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/display_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domvisitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domvisitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/download_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/drag_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/drag_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/end_tracing_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/find_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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/find_handler_cpptoc.h" 14 | #include "libcef_dll/ctocpp/browser_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self, 20 | cef_browser_t* browser, int identifier, int count, 21 | const cef_rect_t* selectionRect, int activeMatchOrdinal, 22 | int finalUpdate) { 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | DCHECK(self); 26 | if (!self) 27 | return; 28 | // Verify param: browser; type: refptr_diff 29 | DCHECK(browser); 30 | if (!browser) 31 | return; 32 | // Verify param: selectionRect; type: simple_byref_const 33 | DCHECK(selectionRect); 34 | if (!selectionRect) 35 | return; 36 | 37 | // Translate param: selectionRect; type: simple_byref_const 38 | CefRect selectionRectVal = selectionRect?*selectionRect:CefRect(); 39 | 40 | // Execute 41 | CefFindHandlerCppToC::Get(self)->OnFindResult( 42 | CefBrowserCToCpp::Wrap(browser), 43 | identifier, 44 | count, 45 | selectionRectVal, 46 | activeMatchOrdinal, 47 | finalUpdate?true:false); 48 | } 49 | 50 | 51 | // CONSTRUCTOR - Do not edit by hand. 52 | 53 | CefFindHandlerCppToC::CefFindHandlerCppToC(CefFindHandler* cls) 54 | : CefCppToC(cls) { 55 | struct_.struct_.on_find_result = find_handler_on_find_result; 56 | } 57 | 58 | #ifndef NDEBUG 59 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/find_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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_FIND_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_FIND_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_find_handler.h" 22 | #include "include/capi/cef_find_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 CefFindHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefFindHandlerCppToC(CefFindHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/focus_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/geolocation_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/jsdialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/keyboard_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/life_span_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/load_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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/navigation_entry_visitor_cpptoc.h" 14 | #include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | int CEF_CALLBACK navigation_entry_visitor_visit( 20 | struct _cef_navigation_entry_visitor_t* self, 21 | struct _cef_navigation_entry_t* entry, int current, int index, 22 | int total) { 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | DCHECK(self); 26 | if (!self) 27 | return 0; 28 | // Verify param: entry; type: refptr_diff 29 | DCHECK(entry); 30 | if (!entry) 31 | return 0; 32 | 33 | // Execute 34 | bool _retval = CefNavigationEntryVisitorCppToC::Get(self)->Visit( 35 | CefNavigationEntryCToCpp::Wrap(entry), 36 | current?true:false, 37 | index, 38 | total); 39 | 40 | // Return type: bool 41 | return _retval; 42 | } 43 | 44 | 45 | // CONSTRUCTOR - Do not edit by hand. 46 | 47 | CefNavigationEntryVisitorCppToC::CefNavigationEntryVisitorCppToC( 48 | CefNavigationEntryVisitor* cls) 49 | : CefCppToC(cls) { 51 | struct_.struct_.visit = navigation_entry_visitor_visit; 52 | } 53 | 54 | #ifndef NDEBUG 55 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 57 | 0; 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_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_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 CefNavigationEntryVisitorCppToC 30 | : public CefCppToC { 32 | public: 33 | explicit CefNavigationEntryVisitorCppToC(CefNavigationEntryVisitor* cls); 34 | }; 35 | 36 | #endif // USING_CEF_SHARED 37 | #endif // CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ 38 | 39 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/print_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/read_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/render_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/render_process_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/request_context_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/request_context_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/request_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/resource_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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/transfer_util.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | void CEF_CALLBACK run_file_dialog_callback_on_file_dialog_dismissed( 20 | struct _cef_run_file_dialog_callback_t* self, int selected_accept_filter, 21 | cef_string_list_t file_paths) { 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | DCHECK(self); 25 | if (!self) 26 | return; 27 | // Verify param: selected_accept_filter; type: simple_byval 28 | DCHECK_GE(selected_accept_filter, 0); 29 | if (selected_accept_filter < 0) 30 | return; 31 | // Unverified params: file_paths 32 | 33 | // Translate param: file_paths; type: string_vec_byref_const 34 | std::vector file_pathsList; 35 | transfer_string_list_contents(file_paths, file_pathsList); 36 | 37 | // Execute 38 | CefRunFileDialogCallbackCppToC::Get(self)->OnFileDialogDismissed( 39 | selected_accept_filter, 40 | file_pathsList); 41 | } 42 | 43 | 44 | // CONSTRUCTOR - Do not edit by hand. 45 | 46 | CefRunFileDialogCallbackCppToC::CefRunFileDialogCallbackCppToC( 47 | CefRunFileDialogCallback* cls) 48 | : CefCppToC(cls) { 50 | struct_.struct_.on_file_dialog_dismissed = 51 | run_file_dialog_callback_on_file_dialog_dismissed; 52 | } 53 | 54 | #ifndef NDEBUG 55 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/string_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/string_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/task_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/task_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/urlrequest_client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8accessor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/write_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/auth_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/auth_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/before_download_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/before_download_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/binary_value_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/cookie_manager_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/domdocument_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 int GetSelectionStartOffset() OVERRIDE; 45 | virtual int GetSelectionEndOffset() OVERRIDE; 46 | virtual CefString GetSelectionAsMarkup() OVERRIDE; 47 | virtual CefString GetSelectionAsText() OVERRIDE; 48 | virtual CefString GetBaseURL() OVERRIDE; 49 | virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE; 50 | }; 51 | 52 | #endif // USING_CEF_SHARED 53 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ 54 | 55 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/download_item_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | void CefDownloadItemCallbackCToCpp::Pause() { 29 | if (CEF_MEMBER_MISSING(struct_, pause)) 30 | return; 31 | 32 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 33 | 34 | // Execute 35 | struct_->pause(struct_); 36 | } 37 | 38 | void CefDownloadItemCallbackCToCpp::Resume() { 39 | if (CEF_MEMBER_MISSING(struct_, resume)) 40 | return; 41 | 42 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 43 | 44 | // Execute 45 | struct_->resume(struct_); 46 | } 47 | 48 | 49 | #ifndef NDEBUG 50 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/download_item_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | virtual void Pause() OVERRIDE; 38 | virtual void Resume() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/download_item_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 GetOriginalUrl() OVERRIDE; 50 | virtual CefString GetSuggestedFileName() OVERRIDE; 51 | virtual CefString GetContentDisposition() OVERRIDE; 52 | virtual CefString GetMimeType() OVERRIDE; 53 | }; 54 | 55 | #endif // USING_CEF_SHARED 56 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 57 | 58 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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(int selected_accept_filter, 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 | // Verify param: selected_accept_filter; type: simple_byval 27 | DCHECK_GE(selected_accept_filter, 0); 28 | if (selected_accept_filter < 0) 29 | return; 30 | // Unverified params: file_paths 31 | 32 | // Translate param: file_paths; type: string_vec_byref_const 33 | cef_string_list_t file_pathsList = cef_string_list_alloc(); 34 | DCHECK(file_pathsList); 35 | if (file_pathsList) 36 | transfer_string_list_contents(file_paths, file_pathsList); 37 | 38 | // Execute 39 | struct_->cont(struct_, 40 | selected_accept_filter, 41 | file_pathsList); 42 | 43 | // Restore param:file_paths; type: string_vec_byref_const 44 | if (file_pathsList) 45 | cef_string_list_free(file_pathsList); 46 | } 47 | 48 | void CefFileDialogCallbackCToCpp::Cancel() { 49 | if (CEF_MEMBER_MISSING(struct_, cancel)) 50 | return; 51 | 52 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 53 | 54 | // Execute 55 | struct_->cancel(struct_); 56 | } 57 | 58 | 59 | #ifndef NDEBUG 60 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/file_dialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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(int selected_accept_filter, 38 | const std::vector& file_paths) OVERRIDE; 39 | virtual void Cancel() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/geolocation_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/geolocation_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/jsdialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/navigation_entry_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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_NAVIGATION_ENTRY_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_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_navigation_entry.h" 22 | #include "include/capi/cef_navigation_entry_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 CefNavigationEntryCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefNavigationEntryCToCpp(cef_navigation_entry_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefNavigationEntry methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual CefString GetURL() OVERRIDE; 38 | virtual CefString GetDisplayURL() OVERRIDE; 39 | virtual CefString GetOriginalURL() OVERRIDE; 40 | virtual CefString GetTitle() OVERRIDE; 41 | virtual TransitionType GetTransitionType() OVERRIDE; 42 | virtual bool HasPostData() OVERRIDE; 43 | virtual CefString GetFrameName() OVERRIDE; 44 | virtual CefTime GetCompletionTime() OVERRIDE; 45 | virtual int GetHttpStatusCode() OVERRIDE; 46 | }; 47 | 48 | #endif // USING_CEF_SHARED 49 | #endif // CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_ 50 | 51 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/post_data_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/post_data_element_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/print_dialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/print_job_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/print_job_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/process_message_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/quota_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/quota_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/request_context_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/request_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/response_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/scheme_registrar_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/scheme_registrar_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/sslcert_principal_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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_SSLCERT_PRINCIPAL_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_SSLCERT_PRINCIPAL_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_ssl_info.h" 23 | #include "include/capi/cef_ssl_info_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 CefSSLCertPrincipalCToCpp 29 | : public CefCToCpp { 31 | public: 32 | explicit CefSSLCertPrincipalCToCpp(cef_sslcert_principal_t* str) 33 | : CefCToCpp(str) {} 35 | 36 | // CefSSLCertPrincipal methods 37 | virtual CefString GetDisplayName() OVERRIDE; 38 | virtual CefString GetCommonName() OVERRIDE; 39 | virtual CefString GetLocalityName() OVERRIDE; 40 | virtual CefString GetStateOrProvinceName() OVERRIDE; 41 | virtual CefString GetCountryName() OVERRIDE; 42 | virtual void GetStreetAddresses(std::vector& addresses) OVERRIDE; 43 | virtual void GetOrganizationNames(std::vector& names) OVERRIDE; 44 | virtual void GetOrganizationUnitNames(std::vector& names) OVERRIDE; 45 | virtual void GetDomainComponents(std::vector& components) OVERRIDE; 46 | }; 47 | 48 | #endif // USING_CEF_SHARED 49 | #endif // CEF_LIBCEF_DLL_CTOCPP_SSLCERT_PRINCIPAL_CTOCPP_H_ 50 | 51 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/sslinfo_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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_SSLINFO_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_SSLINFO_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_ssl_info.h" 22 | #include "include/capi/cef_ssl_info_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 CefSSLInfoCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefSSLInfoCToCpp(cef_sslinfo_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefSSLInfo methods 34 | virtual CefRefPtr GetSubject() OVERRIDE; 35 | virtual CefRefPtr GetIssuer() OVERRIDE; 36 | virtual CefRefPtr GetSerialNumber() OVERRIDE; 37 | virtual CefTime GetValidStart() OVERRIDE; 38 | virtual CefTime GetValidExpiry() OVERRIDE; 39 | virtual CefRefPtr GetDEREncoded() OVERRIDE; 40 | virtual CefRefPtr GetPEMEncoded() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_SSLINFO_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/stream_reader_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/stream_writer_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/task_runner_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/urlrequest_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/v8context_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/v8exception_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/v8stack_frame_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/v8stack_trace_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/v8stack_trace_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/web_plugin_info_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/zip_reader_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 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 | -------------------------------------------------------------------------------- /libcef_dll/transfer_util.cc: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------