├── VERSION ├── tools ├── check_style.sh ├── patch.sh ├── check_style.bat ├── make_distrib.sh ├── distrib │ ├── win │ │ ├── d3dx9_43.dll │ │ ├── d3dcompiler_43.dll │ │ └── README.minimal.txt │ ├── linux │ │ ├── build.sh │ │ ├── README.minimal.txt │ │ ├── README.redistrib.txt │ │ └── README.standard.txt │ ├── README.footer.txt │ ├── README.client.txt │ ├── README-TRANSFER.txt │ ├── README.header.txt │ └── mac │ │ ├── README.minimal.txt │ │ ├── transfer.cfg │ │ ├── README.redistrib.txt │ │ └── README.standard.txt ├── patch.bat ├── make_distrib.bat ├── make_version_header.bat ├── translator.sh ├── translator.bat ├── build_projects.sh ├── date_util.py ├── revision.py ├── git_util.py ├── patcher.README.txt ├── gclient_hook.py ├── build_projects.bat └── make_cppdocs.bat ├── cef_create_projects.sh ├── cef_create_projects.bat ├── tests ├── cefclient │ ├── res │ │ ├── logo.png │ │ ├── small.ico │ │ ├── cefclient.ico │ │ ├── logoball.png │ │ ├── plugin.html │ │ ├── domaccess.html │ │ ├── extension.html │ │ ├── xmlhttprequest.html │ │ ├── binding.html │ │ ├── localstorage.html │ │ ├── dialogs.html │ │ └── modalmain.html │ ├── mac │ │ ├── cefclient.icns │ │ ├── English.lproj │ │ │ └── InfoPlist.strings │ │ └── Info.plist │ ├── osrtest_mac.h │ ├── plugin_test.h │ ├── extension_test.h │ ├── uiplugin_test.h │ ├── scheme_test.h │ ├── osrplugin_test.h │ ├── clientplugin.h │ ├── binding_test.h │ ├── performance_test.h │ ├── string_util.h │ ├── resource_util.h │ ├── resource_util_linux.cpp │ ├── uiplugin.h │ ├── osrplugin.h │ ├── download_handler.h │ ├── util.h │ ├── plugin_test.cpp │ ├── client_popup_handler.cpp │ ├── client_popup_handler.h │ └── resource_util_posix.cpp └── unittests │ ├── mac │ ├── unittests.icns │ ├── English.lproj │ │ └── InfoPlist.strings │ └── Info.plist │ ├── run_all_unittests_mac.mm │ └── test_suite.h ├── DEPS ├── patch ├── patches │ ├── zlib.patch │ ├── message_loop_443.patch │ ├── webkit_933.patch │ ├── gyp_331.patch │ ├── build.patch │ └── spi_webcore_364.patch ├── README.txt └── patch.cfg ├── libcef ├── cef_process_ui_thread_gtk.cc ├── browser_tooltip_mac.h ├── browser_webkit_glue_win.cc ├── external_protocol_handler_gtk.cc ├── external_protocol_handler_mac.mm ├── sqlite_diagnostics_stub.cc ├── browser_settings.h ├── webview_host.cc ├── cef_time_util.h ├── browser_devtools_scheme_handler.h ├── browser_devtools_callargs.cc ├── external_protocol_handler.h ├── web_drag_utils_win.h ├── browser_devtools_callargs.h ├── web_drag_utils_gtk.h ├── download_util.h ├── browser_request_context_proxy.h ├── browser_zoom_map.cc ├── browser_socket_stream_bridge.h ├── drag_data_impl.h ├── cef_process_sub_thread.cc ├── cef_process_ui_thread_mac.mm ├── http_header_utils.h ├── browser_webcookiejar_impl.h ├── browser_zoom_map.h ├── cef_process_sub_thread.h ├── external_popup_menu_mac.h ├── web_urlrequest_impl.h ├── dom_event_impl.h ├── response_impl.h ├── task_impl.cc ├── http_header_utils.cc ├── browser_resource_loader_bridge.h └── cef_process_io_thread.h ├── libcef_dll ├── wrapper │ └── libcef_dll_wrapper2.cc ├── libcef_dll2.cc ├── resource.h ├── cef_logging.h ├── ctocpp │ ├── task_ctocpp.cc │ ├── geolocation_callback_ctocpp.cc │ ├── get_geolocation_callback_ctocpp.cc │ ├── domvisitor_ctocpp.cc │ ├── proxy_handler_ctocpp.cc │ ├── domevent_listener_ctocpp.cc │ ├── task_ctocpp.h │ ├── cookie_visitor_ctocpp.cc │ ├── domvisitor_ctocpp.h │ └── find_handler_ctocpp.cc └── cpptoc │ ├── app_cpptoc.h │ ├── task_cpptoc.cc │ ├── task_cpptoc.h │ ├── client_cpptoc.h │ ├── domnode_cpptoc.h │ ├── v8value_cpptoc.h │ ├── request_cpptoc.h │ ├── domevent_cpptoc.h │ ├── v8context_cpptoc.h │ ├── v8handler_cpptoc.h │ ├── post_data_cpptoc.h │ ├── response_cpptoc.h │ ├── drag_data_cpptoc.h │ ├── v8accessor_cpptoc.h │ ├── domvisitor_cpptoc.h │ ├── xml_reader_cpptoc.h │ ├── zip_reader_cpptoc.h │ ├── v8exception_cpptoc.h │ ├── domdocument_cpptoc.h │ ├── read_handler_cpptoc.h │ ├── v8stack_frame_cpptoc.h │ ├── v8stack_trace_cpptoc.h │ ├── command_line_cpptoc.h │ ├── drag_handler_cpptoc.h │ ├── find_handler_cpptoc.h │ ├── load_handler_cpptoc.h │ ├── menu_handler_cpptoc.h │ ├── stream_reader_cpptoc.h │ ├── stream_writer_cpptoc.h │ ├── write_handler_cpptoc.h │ ├── zoom_handler_cpptoc.h │ ├── cookie_manager_cpptoc.h │ ├── cookie_visitor_cpptoc.h │ ├── scheme_handler_cpptoc.h │ ├── browser_cpptoc.h │ ├── focus_handler_cpptoc.h │ ├── print_handler_cpptoc.h │ ├── proxy_handler_cpptoc.h │ ├── content_filter_cpptoc.h │ ├── render_handler_cpptoc.h │ ├── web_plugin_info_cpptoc.h │ ├── web_urlrequest_cpptoc.h │ ├── display_handler_cpptoc.h │ ├── domevent_listener_cpptoc.h │ ├── post_data_element_cpptoc.h │ ├── request_handler_cpptoc.h │ ├── download_handler_cpptoc.h │ ├── jsdialog_handler_cpptoc.h │ ├── keyboard_handler_cpptoc.h │ ├── frame_cpptoc.h │ ├── v8context_handler_cpptoc.h │ ├── scheme_registrar_cpptoc.h │ ├── permission_handler_cpptoc.h │ ├── geolocation_handler_cpptoc.h │ ├── scheme_handler_factory_cpptoc.h │ ├── web_urlrequest_client_cpptoc.h │ ├── geolocation_callback_cpptoc.h │ ├── scheme_handler_callback_cpptoc.h │ ├── get_geolocation_callback_cpptoc.h │ ├── geolocation_callback_cpptoc.cc │ ├── resource_bundle_handler_cpptoc.h │ └── life_span_handler_cpptoc.h ├── CHROMIUM_BUILD_COMPATIBILITY.txt ├── cef.gypi └── AUTHORS.txt /VERSION: -------------------------------------------------------------------------------- 1 | CEF_MAJOR=1 2 | -------------------------------------------------------------------------------- /tools/check_style.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python check_style.py $@ 3 | -------------------------------------------------------------------------------- /cef_create_projects.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python tools/gclient_hook.py 3 | -------------------------------------------------------------------------------- /tools/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python tools/patcher.py --patch-config patch/patch.cfg 3 | -------------------------------------------------------------------------------- /tools/check_style.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ..\..\third_party\python_26\python.exe check_style.py %* 3 | -------------------------------------------------------------------------------- /tools/make_distrib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python make_distrib.py --output-dir ../binary_distrib/ $@ 3 | -------------------------------------------------------------------------------- /cef_create_projects.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ..\third_party\python_26\python.exe tools\gclient_hook.py 3 | -------------------------------------------------------------------------------- /tests/cefclient/res/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tests/cefclient/res/logo.png -------------------------------------------------------------------------------- /tests/cefclient/res/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tests/cefclient/res/small.ico -------------------------------------------------------------------------------- /tools/distrib/win/d3dx9_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tools/distrib/win/d3dx9_43.dll -------------------------------------------------------------------------------- /tests/cefclient/mac/cefclient.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tests/cefclient/mac/cefclient.icns -------------------------------------------------------------------------------- /tests/cefclient/res/cefclient.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tests/cefclient/res/cefclient.ico -------------------------------------------------------------------------------- /tests/cefclient/res/logoball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tests/cefclient/res/logoball.png -------------------------------------------------------------------------------- /tests/unittests/mac/unittests.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tests/unittests/mac/unittests.icns -------------------------------------------------------------------------------- /tools/patch.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ..\third_party\python_26\python.exe tools\patcher.py --patch-config patch/patch.cfg -------------------------------------------------------------------------------- /tools/distrib/win/d3dcompiler_43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/cef/HEAD/tools/distrib/win/d3dcompiler_43.dll -------------------------------------------------------------------------------- /tools/make_distrib.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ..\..\third_party\python_26\python.exe make_distrib.py --output-dir ..\binary_distrib\ %* 3 | -------------------------------------------------------------------------------- /tools/make_version_header.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ..\third_party\python_26\python.exe tools\make_version_header.py --header include\cef_version.h --version ../chrome/VERSION 3 | -------------------------------------------------------------------------------- /tests/cefclient/mac/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "© Chromium Embedded Framework Authors, 2010"; 4 | -------------------------------------------------------------------------------- /tests/unittests/mac/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "© Chromium Embedded Framework Authors, 2010"; 4 | -------------------------------------------------------------------------------- /tools/distrib/linux/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ -z "$1" ]; then 3 | echo "ERROR: Please specify a build target: Debug or Release" 4 | else 5 | make -j8 cefclient BUILDTYPE=$1 6 | fi 7 | 8 | 9 | -------------------------------------------------------------------------------- /DEPS: -------------------------------------------------------------------------------- 1 | hooks = [ 2 | { 3 | # A change to a .gyp, .gypi, or to GYP itself should run the generator. 4 | "pattern": ".", 5 | "action": ["python", "src/cef/tools/gclient_hook.py"], 6 | }, 7 | ] 8 | -------------------------------------------------------------------------------- /tools/distrib/README.footer.txt: -------------------------------------------------------------------------------- 1 | LICENSING 2 | --------- 3 | 4 | The CEF project is BSD licensed. Please read the LICENSE.txt file included with 5 | this binary distribution for licensing terms and conditions. Other software 6 | included in this distribution is provided under other licenses. 7 | -------------------------------------------------------------------------------- /tools/distrib/README.client.txt: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | -------- 3 | 4 | Release Contains a release build of the cefclient sample application. 5 | 6 | 7 | USAGE 8 | ----- 9 | 10 | Please visit the CEF Website for additional usage information. 11 | 12 | http://code.google.com/p/chromiumembedded 13 | -------------------------------------------------------------------------------- /tools/distrib/README-TRANSFER.txt: -------------------------------------------------------------------------------- 1 | Files in this directory have been copied from other locations in the Chromium 2 | source tree. They have been modified only to the extent necessary to work in 3 | the CEF Binary Distribution directory structure. Below is a listing of the 4 | original file locations. 5 | 6 | -------------------------------------------------------------------------------- /tools/translator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | python translator.py --cpp-header-dir ../include --capi-header-dir ../include/capi --cpptoc-global-impl ../libcef_dll/libcef_dll.cc --ctocpp-global-impl ../libcef_dll/wrapper/libcef_dll_wrapper.cc --cpptoc-dir ../libcef_dll/cpptoc --ctocpp-dir ../libcef_dll/ctocpp --gypi-file ../cef_paths.gypi 3 | -------------------------------------------------------------------------------- /tools/translator.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | ..\..\third_party\python_26\python.exe translator.py --cpp-header-dir ..\include --capi-header-dir ..\include\capi --cpptoc-global-impl ..\libcef_dll\libcef_dll.cc --ctocpp-global-impl ..\libcef_dll\wrapper\libcef_dll_wrapper.cc --cpptoc-dir ..\libcef_dll\cpptoc --ctocpp-dir ..\libcef_dll\ctocpp --gypi-file ..\cef_paths.gypi 3 | pause -------------------------------------------------------------------------------- /tests/cefclient/res/plugin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Client Plugin loaded by Mime Type:
4 | 5 |

Client Plugin loaded by File Extension:
6 | 7 | 8 |
 
9 | 10 | 11 | -------------------------------------------------------------------------------- /patch/patches/zlib.patch: -------------------------------------------------------------------------------- 1 | Index: contrib/minizip/unzip.c 2 | =================================================================== 3 | --- contrib/minizip/unzip.c (revision 176706) 4 | +++ contrib/minizip/unzip.c (working copy) 5 | @@ -69,7 +69,7 @@ 6 | #include 7 | 8 | #ifndef NOUNCRYPT 9 | - #define NOUNCRYPT 10 | +// #define NOUNCRYPT 11 | #endif 12 | 13 | #include "third_party/zlib/zlib.h" 14 | -------------------------------------------------------------------------------- /tools/distrib/README.header.txt: -------------------------------------------------------------------------------- 1 | Chromium Embedded Framework (CEF) $DISTRIB_TYPE$ Binary Distribution for $PLATFORM$ 2 | ------------------------------------------------------------------------------- 3 | 4 | Date: $DATE$ 5 | 6 | CEF Version: $CEF_VER$ 7 | CEF URL: $CEF_URL$@$CEF_REV$ 8 | 9 | Chromium Verison: $CHROMIUM_VER$ 10 | Chromium URL: $CHROMIUM_URL$@$CHROMIUM_REV$ 11 | 12 | $DISTRIB_DESC$ 13 | -------------------------------------------------------------------------------- /libcef/cef_process_ui_thread_gtk.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 | #include "libcef/cef_process_ui_thread.h" 6 | #include "libcef/browser_impl.h" 7 | 8 | void CefProcessUIThread::PlatformInit() { 9 | } 10 | 11 | void CefProcessUIThread::PlatformCleanUp() { 12 | } 13 | 14 | -------------------------------------------------------------------------------- /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 | #include "include/cef_nplugin.h" 6 | #include "include/capi/cef_nplugin_capi.h" 7 | 8 | bool CefRegisterPlugin(const CefPluginInfo& plugin_info) { 9 | return cef_register_plugin(&plugin_info)?true:false; 10 | } 11 | -------------------------------------------------------------------------------- /libcef/browser_tooltip_mac.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 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 | #ifndef CEF_LIBCEF_BROWSER_TOOLTIP_MAC_H_ 6 | #define CEF_LIBCEF_BROWSER_TOOLTIP_MAC_H_ 7 | #pragma once 8 | 9 | @protocol BrowserTooltip 10 | - (void)setToolTipAtMousePoint:(NSString *)string; 11 | @end 12 | 13 | #endif // CEF_LIBCEF_BROWSER_TOOLTIP_MAC_H_ 14 | -------------------------------------------------------------------------------- /tools/build_projects.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ]; then 4 | echo "ERROR: Please specify a build target: Debug or Release" 5 | else 6 | if [ -z "$2" ]; then 7 | PROJECT_NAME='cefclient' 8 | else 9 | PROJECT_NAME=$2 10 | fi 11 | if [ `uname` = "Linux" ]; then 12 | pushd ../../ 13 | make -j16 $PROJECT_NAME BUILDTYPE=$1 14 | popd 15 | else 16 | xcodebuild -project ../cef.xcodeproj -configuration $1 -target "$PROJECT_NAME" 17 | fi 18 | fi 19 | -------------------------------------------------------------------------------- /tests/cefclient/osrtest_mac.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license 3 | // that can be found in the LICENSE file. 4 | 5 | #ifndef CEF_TESTS_CEFCLIENT_OSRTEST_MAC_H_ 6 | #define CEF_TESTS_CEFCLIENT_OSRTEST_MAC_H_ 7 | 8 | namespace osrtest { 9 | 10 | void RunTest(bool transparent); 11 | 12 | } // namespace osrtest 13 | 14 | #endif // CEF_TESTS_CEFCLIENT_OSRTEST_MAC_H_ 15 | 16 | -------------------------------------------------------------------------------- /tools/date_util.py: -------------------------------------------------------------------------------- 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 | import datetime 6 | 7 | def get_year(): 8 | """ Returns the current year. """ 9 | return str(datetime.datetime.now().year) 10 | 11 | def get_date(): 12 | """ Returns the current date. """ 13 | return datetime.datetime.now().strftime('%B %d, %Y') 14 | -------------------------------------------------------------------------------- /tests/cefclient/res/domaccess.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Select some portion of the below page content and click the "Describe Selection" button. The selected region will then be described below.

4 |

This is p1

5 |

This is p2

6 |

This is p3

7 |

This is p4

8 |
9 | 10 |

The description will appear here.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /libcef/browser_webkit_glue_win.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2008 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #include "libcef/browser_webkit_glue.h" 7 | #include "webkit/glue/webkit_glue.h" 8 | 9 | namespace webkit_glue { 10 | 11 | bool EnsureFontLoaded(HFONT font) { 12 | return true; 13 | } 14 | 15 | } // namespace webkit_glue 16 | -------------------------------------------------------------------------------- /tests/cefclient/res/extension.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | ClientV8ExtensionHandler says:
 4 | 
13 | 
14 | 15 | 16 | -------------------------------------------------------------------------------- /patch/patches/message_loop_443.patch: -------------------------------------------------------------------------------- 1 | Index: message_loop.cc 2 | =================================================================== 3 | --- message_loop.cc (revision 194165) 4 | +++ message_loop.cc (working copy) 5 | @@ -191,7 +191,7 @@ 6 | MessageLoop::~MessageLoop() { 7 | DCHECK_EQ(this, current()); 8 | 9 | - DCHECK(!run_loop_); 10 | + //DCHECK(!run_loop_); 11 | 12 | // Clean up any unprocessed tasks, but take care: deleting a task could 13 | // result in the addition of more tasks (e.g., via DeleteSoon). We set a 14 | -------------------------------------------------------------------------------- /tests/cefclient/plugin_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_PLUGIN_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_PLUGIN_TEST_H_ 7 | #pragma once 8 | 9 | namespace plugin_test { 10 | 11 | // Register the internal client plugin. 12 | void InitTest(); 13 | 14 | } // namespace plugin_test 15 | 16 | #endif // CEF_TESTS_CEFCLIENT_PLUGIN_TEST_H_ 17 | -------------------------------------------------------------------------------- /tests/cefclient/extension_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_EXTENSION_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_EXTENSION_TEST_H_ 7 | #pragma once 8 | 9 | namespace extension_test { 10 | 11 | // Register the V8 extension handler. 12 | void InitTest(); 13 | 14 | } // namespace extension_test 15 | 16 | #endif // CEF_TESTS_CEFCLIENT_EXTENSION_TEST_H_ 17 | -------------------------------------------------------------------------------- /libcef/external_protocol_handler_gtk.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 | #include "libcef/external_protocol_handler.h" 6 | 7 | namespace ExternalProtocolHandler { 8 | 9 | bool HasExternalHandler(const std::string& scheme) { 10 | return false; 11 | } 12 | 13 | bool HandleExternalProtocol(const GURL& gurl) { 14 | return false; 15 | } 16 | 17 | } // namespace ExternalProtocolHandler 18 | -------------------------------------------------------------------------------- /libcef/external_protocol_handler_mac.mm: -------------------------------------------------------------------------------- 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 | #include "libcef/external_protocol_handler.h" 6 | 7 | namespace ExternalProtocolHandler { 8 | 9 | bool HasExternalHandler(const std::string& scheme) { 10 | return false; 11 | } 12 | 13 | bool HandleExternalProtocol(const GURL& gurl) { 14 | return false; 15 | } 16 | 17 | } // namespace ExternalProtocolHandler 18 | -------------------------------------------------------------------------------- /tests/cefclient/uiplugin_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_UIPLUGIN_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_UIPLUGIN_TEST_H_ 7 | #pragma once 8 | 9 | namespace uiplugin_test { 10 | 11 | // Register the internal client plugin and V8 extension. 12 | void InitTest(); 13 | 14 | } // namespace uiplugin_test 15 | 16 | #endif // CEF_TESTS_CEFCLIENT_UIPLUGIN_TEST_H_ 17 | -------------------------------------------------------------------------------- /tools/revision.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 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 | import svn_util as svn 6 | import git_util as git 7 | import sys 8 | 9 | # cannot be loaded as a module 10 | if __name__ != "__main__": 11 | sys.stderr.write('This file cannot be loaded as a module!') 12 | sys.exit() 13 | 14 | try: 15 | sys.stdout.write(svn.get_revision()) 16 | except: 17 | sys.stdout.write(git.get_svn_revision()) 18 | 19 | 20 | -------------------------------------------------------------------------------- /tools/distrib/mac/README.minimal.txt: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | -------- 3 | 4 | Release Contains libcef.dylib and other components required to run the 5 | release version of CEF-based applications. 6 | 7 | Resources Contains images and resources required by applications using CEF. 8 | The contents of this folder should be transferred to the 9 | Contents/Resources folder in the app bundle. 10 | 11 | 12 | USAGE 13 | ----- 14 | 15 | Please visit the CEF Website for additional usage information. 16 | 17 | http://code.google.com/p/chromiumembedded 18 | -------------------------------------------------------------------------------- /tools/distrib/linux/README.minimal.txt: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | -------- 3 | 4 | Release Contains libcef.so and other components required to run the release 5 | version of CEF-based applications. By default these files should be 6 | placed in the same directory as the executable. 7 | 8 | Resources Contains resources required by libcef.so. By default these files 9 | should be placed in the same directory as libcef.so. 10 | 11 | 12 | USAGE 13 | ----- 14 | 15 | Please visit the CEF Website for additional usage information. 16 | 17 | http://code.google.com/p/chromiumembedded 18 | -------------------------------------------------------------------------------- /libcef/sqlite_diagnostics_stub.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that can 3 | // be found in the LICENSE file. 4 | 5 | #include "content/public/common/url_constants.h" 6 | 7 | namespace chrome { 8 | 9 | // Used by ClearOnExitPolicy 10 | const char kHttpScheme[] = "http"; 11 | const char kHttpsScheme[] = "https"; 12 | 13 | } // namespace chrome 14 | 15 | namespace content { 16 | 17 | // Used by ClearOnExitPolicy 18 | const char kStandardSchemeSeparator[] = "://"; 19 | 20 | } // namespace content 21 | -------------------------------------------------------------------------------- /libcef/browser_settings.h: -------------------------------------------------------------------------------- 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 can 3 | // be found in the LICENSE file. 4 | 5 | #ifndef CEF_LIBCEF_BROWSER_SETTINGS_H_ 6 | #define CEF_LIBCEF_BROWSER_SETTINGS_H_ 7 | #pragma once 8 | 9 | #include "include/internal/cef_types_wrappers.h" 10 | 11 | namespace webkit_glue { 12 | struct WebPreferences; 13 | } 14 | 15 | void BrowserToWebSettings(const CefBrowserSettings& cef, 16 | webkit_glue::WebPreferences& web); 17 | 18 | #endif // CEF_LIBCEF_BROWSER_SETTINGS_H_ 19 | -------------------------------------------------------------------------------- /libcef/webview_host.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 | #include "libcef/webview_host.h" 6 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 7 | 8 | WebViewHost::WebViewHost(BrowserWebViewDelegate* delegate) 9 | : delegate_(delegate) { 10 | } 11 | 12 | #if !defined(OS_MACOSX) 13 | WebViewHost::~WebViewHost() { 14 | } 15 | #endif 16 | 17 | bool WebViewHost::IsTransparent() { 18 | return static_cast(webwidget_)->isTransparent(); 19 | } 20 | -------------------------------------------------------------------------------- /libcef/cef_time_util.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_CEF_TIME_UTIL_H_ 6 | #define CEF_LIBCEF_CEF_TIME_UTIL_H_ 7 | #pragma once 8 | 9 | #include "include/internal/cef_time.h" 10 | #include "base/time.h" 11 | 12 | // Converts cef_time_t to/from a base::Time object. 13 | void cef_time_to_basetime(const cef_time_t& cef_time, base::Time& time); 14 | void cef_time_from_basetime(const base::Time& time, cef_time_t& cef_time); 15 | 16 | #endif // CEF_LIBCEF_CEF_TIME_UTIL_H_ 17 | -------------------------------------------------------------------------------- /libcef/browser_devtools_scheme_handler.h: -------------------------------------------------------------------------------- 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 can 3 | // be found in the LICENSE file. 4 | 5 | #ifndef CEF_LIBCEF_BROWSER_DEVTOOLS_SCHEME_HANDLER_H_ 6 | #define CEF_LIBCEF_BROWSER_DEVTOOLS_SCHEME_HANDLER_H_ 7 | #pragma once 8 | 9 | extern const char kChromeDevToolsScheme[]; 10 | extern const char kChromeDevToolsHost[]; 11 | extern const char kChromeDevToolsURL[]; 12 | 13 | // Register the DevTools scheme handler. 14 | void RegisterDevToolsSchemeHandler(); 15 | 16 | #endif // CEF_LIBCEF_BROWSER_DEVTOOLS_SCHEME_HANDLER_H_ 17 | -------------------------------------------------------------------------------- /tests/cefclient/scheme_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_SCHEME_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_SCHEME_TEST_H_ 7 | #pragma once 8 | 9 | #include "include/cef_browser.h" 10 | #include "include/cef_scheme.h" 11 | 12 | namespace scheme_test { 13 | 14 | void AddSchemes(CefRefPtr registrar); 15 | 16 | // Register the scheme handler. 17 | void InitTest(); 18 | 19 | } // namespace scheme_test 20 | 21 | #endif // CEF_TESTS_CEFCLIENT_SCHEME_TEST_H_ 22 | -------------------------------------------------------------------------------- /libcef_dll/libcef_dll2.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 | 6 | #include "include/cef_nplugin.h" 7 | #include "include/capi/cef_nplugin_capi.h" 8 | #include "include/cef_version.h" 9 | #include "libcef_dll/cef_logging.h" 10 | 11 | CEF_EXPORT int cef_build_revision() { 12 | return CEF_REVISION; 13 | } 14 | 15 | CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info) { 16 | DCHECK(plugin_info); 17 | if (!plugin_info) 18 | return 0; 19 | 20 | return CefRegisterPlugin(*plugin_info); 21 | } 22 | -------------------------------------------------------------------------------- /tests/cefclient/res/xmlhttprequest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 |
14 | URL: 15 |
16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/cefclient/osrplugin_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_OSRPLUGIN_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_OSRPLUGIN_TEST_H_ 7 | #pragma once 8 | 9 | #include "include/cef_browser.h" 10 | 11 | namespace osrplugin_test { 12 | 13 | // Register the internal client plugin and V8 extension. 14 | void InitTest(); 15 | 16 | // Run the test. 17 | void RunTest(CefRefPtr browser, bool transparent); 18 | 19 | } // namespace osrplugin_test 20 | 21 | #endif // CEF_TESTS_CEFCLIENT_OSRPLUGIN_TEST_H_ 22 | -------------------------------------------------------------------------------- /libcef_dll/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by libcef_dll.rc 4 | // 5 | 6 | // Avoid files associated with MacOS 7 | #define _X86_ 8 | 9 | #define IDD_PROMPT 132 10 | #define IDC_PROMPTEDIT 1000 11 | #define IDC_DIALOGTEXT 1001 12 | 13 | // Next default values for new objects 14 | // 15 | #ifdef APSTUDIO_INVOKED 16 | #ifndef APSTUDIO_READONLY_SYMBOLS 17 | #define _APS_NO_MFC 1 18 | #define _APS_NEXT_RESOURCE_VALUE 130 19 | #define _APS_NEXT_COMMAND_VALUE 32000 20 | #define _APS_NEXT_CONTROL_VALUE 1000 21 | #define _APS_NEXT_SYMED_VALUE 110 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /tests/cefclient/res/binding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | ClientV8FunctionHandler says:
 4 | 
20 | 
21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/cefclient/clientplugin.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_CLIENTPLUGIN_H_ 6 | #define CEF_TESTS_CEFCLIENT_CLIENTPLUGIN_H_ 7 | #pragma once 8 | 9 | #include "include/internal/cef_types.h" 10 | 11 | #if defined(OS_WIN) 12 | 13 | #include "include/cef_nplugin.h" 14 | 15 | NPError API_CALL NP_ClientGetEntryPoints(NPPluginFuncs* pFuncs); 16 | NPError API_CALL NP_ClientInitialize(NPNetscapeFuncs* pFuncs); 17 | NPError API_CALL NP_ClientShutdown(void); 18 | 19 | #endif // OS_WIN 20 | 21 | #endif // CEF_TESTS_CEFCLIENT_CLIENTPLUGIN_H_ 22 | -------------------------------------------------------------------------------- /tools/distrib/win/README.minimal.txt: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | -------- 3 | 4 | Release Contains libcef.dll, libcef.lib and other components required to 5 | build and run the release version of CEF-based applications. By 6 | default these files should be placed in the same directory as the 7 | executable. 8 | 9 | Resources Contains resources required by libcef.dll. By default these files 10 | should be placed in the same directory as libcef.dll. By default 11 | these files should be placed in the same directory as libcef.dll. 12 | 13 | 14 | USAGE 15 | ----- 16 | 17 | Please visit the CEF Website for additional usage information. 18 | 19 | http://code.google.com/p/chromiumembedded 20 | -------------------------------------------------------------------------------- /patch/patches/webkit_933.patch: -------------------------------------------------------------------------------- 1 | Index: WebNode.cpp 2 | =================================================================== 3 | --- WebNode.cpp (revision 146842) 4 | +++ WebNode.cpp (working copy) 5 | @@ -181,7 +181,7 @@ 6 | void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture) 7 | { 8 | // Please do not add more eventTypes to this list without an API review. 9 | - RELEASE_ASSERT(eventType == "mousedown"); 10 | + //RELEASE_ASSERT(eventType == "mousedown"); 11 | 12 | EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper(eventType, useCapture, m_private.get()); 13 | // The listenerWrapper is only referenced by the actual Node. Once it goes 14 | -------------------------------------------------------------------------------- /tests/cefclient/binding_test.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_TESTS_CEFCLIENT_BINDING_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_BINDING_TEST_H_ 7 | #pragma once 8 | 9 | #include "include/cef_browser.h" 10 | #include "include/cef_frame.h" 11 | #include "include/cef_v8.h" 12 | 13 | namespace binding_test { 14 | 15 | // Add the V8 bindings. 16 | void InitTest(CefRefPtr browser, 17 | CefRefPtr frame, 18 | CefRefPtr object); 19 | 20 | } // namespace binding_test 21 | 22 | #endif // CEF_TESTS_CEFCLIENT_BINDING_TEST_H_ 23 | -------------------------------------------------------------------------------- /tests/cefclient/performance_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_PERFORMANCE_TEST_H_ 6 | #define CEF_TESTS_CEFCLIENT_PERFORMANCE_TEST_H_ 7 | #pragma once 8 | 9 | #include "include/cef_browser.h" 10 | #include "include/cef_frame.h" 11 | #include "include/cef_v8.h" 12 | 13 | namespace performance_test { 14 | 15 | extern const char kTestUrl[]; 16 | 17 | void InitTest(CefRefPtr browser, 18 | CefRefPtr frame, 19 | CefRefPtr object); 20 | 21 | } // namespace performance_test 22 | 23 | #endif // CEF_TESTS_CEFCLIENT_PERFORMANCE_TEST_H_ 24 | -------------------------------------------------------------------------------- /libcef/browser_devtools_callargs.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 "libcef/browser_devtools_callargs.h" 6 | 7 | #include "base/logging.h" 8 | 9 | // static 10 | int BrowserDevToolsCallArgs::calls_count_ = 0; 11 | 12 | BrowserDevToolsCallArgs::BrowserDevToolsCallArgs( 13 | const WebKit::WebString& data) 14 | : data_(data) { 15 | ++calls_count_; 16 | } 17 | 18 | BrowserDevToolsCallArgs::BrowserDevToolsCallArgs( 19 | const BrowserDevToolsCallArgs& args) 20 | : data_(args.data_) { 21 | ++calls_count_; 22 | } 23 | 24 | BrowserDevToolsCallArgs::~BrowserDevToolsCallArgs() { 25 | --calls_count_; 26 | DCHECK_GE(calls_count_, 0); 27 | } 28 | -------------------------------------------------------------------------------- /libcef/external_protocol_handler.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_EXTERNAL_PROTOCOL_HANDLER_H_ 6 | #define CEF_LIBCEF_EXTERNAL_PROTOCOL_HANDLER_H_ 7 | #pragma once 8 | 9 | #include 10 | 11 | class GURL; 12 | 13 | namespace ExternalProtocolHandler { 14 | 15 | // Returns true if the OS provides external support for the specified |scheme|. 16 | bool HasExternalHandler(const std::string& scheme); 17 | 18 | // Pass handling of the specified |gurl| to the OS. 19 | bool HandleExternalProtocol(const GURL& gurl); 20 | 21 | } // namespace ExternalProtocolHandler 22 | 23 | #endif // CEF_LIBCEF_EXTERNAL_PROTOCOL_HANDLER_H_ 24 | -------------------------------------------------------------------------------- /tests/cefclient/string_util.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_TESTS_CEFCLIENT_STRING_UTIL_H_ 6 | #define CEF_TESTS_CEFCLIENT_STRING_UTIL_H_ 7 | #pragma once 8 | 9 | #include 10 | #include "include/cef_base.h" 11 | 12 | class CefRequest; 13 | 14 | // Dump the contents of the request into a string. 15 | void DumpRequestContents(CefRefPtr request, std::string& str); 16 | 17 | // Replace all instances of |from| with |to| in |str|. 18 | std::string StringReplace(const std::string& str, const std::string& from, 19 | const std::string& to); 20 | 21 | #endif // CEF_TESTS_CEFCLIENT_STRING_UTIL_H_ 22 | -------------------------------------------------------------------------------- /libcef/web_drag_utils_win.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_WEB_DRAG_UTILS_WIN_H_ 6 | #define CEF_LIBCEF_WEB_DRAG_UTILS_WIN_H_ 7 | #pragma once 8 | 9 | #include 10 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" 11 | 12 | namespace web_drag_utils_win { 13 | 14 | WebKit::WebDragOperation WinDragOpToWebDragOp(DWORD effect); 15 | WebKit::WebDragOperationsMask WinDragOpMaskToWebDragOpMask(DWORD effects); 16 | 17 | DWORD WebDragOpToWinDragOp(WebKit::WebDragOperation op); 18 | DWORD WebDragOpMaskToWinDragOpMask(WebKit::WebDragOperationsMask ops); 19 | 20 | } // namespace web_drag_utils_win 21 | 22 | #endif // CEF_LIBCEF_WEB_DRAG_UTILS_WIN_H_ 23 | -------------------------------------------------------------------------------- /tests/cefclient/resource_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_TESTS_CEFCLIENT_RESOURCE_UTIL_H_ 6 | #define CEF_TESTS_CEFCLIENT_RESOURCE_UTIL_H_ 7 | #pragma once 8 | 9 | #include 10 | #include "include/cef_stream.h" 11 | 12 | #if defined(OS_POSIX) 13 | // Returns the directory containing resource files. 14 | bool GetResourceDir(std::string& dir); 15 | #endif 16 | 17 | // Retrieve a resource as a string. 18 | bool LoadBinaryResource(const char* resource_name, std::string& resource_data); 19 | 20 | // Retrieve a resource as a steam reader. 21 | CefRefPtr GetBinaryResourceReader(const char* resource_name); 22 | 23 | #endif // CEF_TESTS_CEFCLIENT_RESOURCE_UTIL_H_ 24 | -------------------------------------------------------------------------------- /libcef_dll/cef_logging.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_CEF_LOGGING_H_ 6 | #define CEF_LIBCEF_DLL_CEF_LOGGING_H_ 7 | #pragma once 8 | 9 | #ifdef BUILDING_CEF_SHARED 10 | #include "base/logging.h" 11 | #else 12 | #include // NOLINT(build/include_order) 13 | #define DCHECK(condition) assert(condition) 14 | #define DCHECK_EQ(val1, val2) DCHECK(val1 == val2) 15 | #define DCHECK_NE(val1, val2) DCHECK(val1 != val2) 16 | #define DCHECK_LE(val1, val2) DCHECK(val1 <= val2) 17 | #define DCHECK_LT(val1, val2) DCHECK(val1 < val2) 18 | #define DCHECK_GE(val1, val2) DCHECK(val1 >= val2) 19 | #define DCHECK_GT(val1, val2) DCHECK(val1 > val2) 20 | #endif 21 | 22 | #endif // CEF_LIBCEF_DLL_CEF_LOGGING_H_ 23 | -------------------------------------------------------------------------------- /tests/cefclient/res/localstorage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | Click the "Add Line" button to add a line or the "Clear" button to clear.
15 | This data will persist across sessions if a cache path was specified.
16 | 17 | 18 |
19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /libcef/browser_devtools_callargs.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_BROWSER_DEVTOOLS_CALLARGS_H_ 6 | #define CEF_LIBCEF_BROWSER_DEVTOOLS_CALLARGS_H_ 7 | #pragma once 8 | 9 | #include "base/basictypes.h" 10 | 11 | #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 12 | 13 | class BrowserDevToolsCallArgs { 14 | public: 15 | explicit BrowserDevToolsCallArgs(const WebKit::WebString& data); 16 | 17 | BrowserDevToolsCallArgs(const BrowserDevToolsCallArgs& args); 18 | 19 | ~BrowserDevToolsCallArgs(); 20 | 21 | static int calls_count() { return calls_count_; } 22 | 23 | WebKit::WebString data_; 24 | 25 | private: 26 | static int calls_count_; 27 | }; 28 | 29 | #endif // CEF_LIBCEF_BROWSER_DEVTOOLS_CALLARGS_H_ 30 | -------------------------------------------------------------------------------- /tests/cefclient/resource_util_linux.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2011 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #include "cefclient/resource_util.h" 7 | #include 8 | #include 9 | 10 | bool GetResourceDir(std::string& dir) { 11 | char buff[1024]; 12 | 13 | // Retrieve the executable path. 14 | ssize_t len = readlink("/proc/self/exe", buff, sizeof(buff)-1); 15 | if (len == -1) 16 | return false; 17 | 18 | buff[len] = 0; 19 | 20 | // Remove the executable name from the path. 21 | char* pos = strrchr(buff, '/'); 22 | if (!pos) 23 | return false; 24 | 25 | // Add "files" to the path. 26 | strcpy(pos+1, "files"); // NOLINT(runtime/printf) 27 | dir = std::string(buff); 28 | return true; 29 | } 30 | -------------------------------------------------------------------------------- /CHROMIUM_BUILD_COMPATIBILITY.txt: -------------------------------------------------------------------------------- 1 | # The Chromium Embedded Framework (CEF) project is built on top of the Chromium 2 | # project source tree. Chromium should be updated to the URL and revision listed 3 | # below before building CEF. Chromium compatibility information for older CEF 4 | # revisions is available by viewing this file's change history. 5 | # 6 | # To configure a specific Chromium URL: 7 | # gclient config chromium_url 8 | # 9 | # To update to a specific Chromium revision: 10 | # gclient sync --revision src@chromium_revision --jobs 8 --force 11 | # 12 | # This file is integrated with the CEF Automation Tool. See the 13 | # tools/automate/automate.README.txt file for more information. 14 | # 15 | # For general gclient usage information visit: 16 | # http://dev.chromium.org/developers/how-tos/get-the-code 17 | 18 | { 19 | 'chromium_url': 'http://src.chromium.org/svn/trunk/src', 20 | 'chromium_revision': '194165', 21 | } 22 | -------------------------------------------------------------------------------- /libcef/web_drag_utils_gtk.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2012 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_WEB_DRAG_UTILS_GTK_H_ 7 | #define CEF_LIBCEF_WEB_DRAG_UTILS_GTK_H_ 8 | #pragma once 9 | 10 | #include 11 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" 12 | 13 | namespace web_drag_utils_gtk { 14 | 15 | // Convenience methods for converting between web drag operations and the GDK 16 | // equivalent. 17 | GdkDragAction WebDragOpToGdkDragAction(WebKit::WebDragOperationsMask op); 18 | WebKit::WebDragOperationsMask GdkDragActionToWebDragOp(GdkDragAction action); 19 | 20 | } // namespace web_drag_utils_gtk 21 | 22 | #endif // CEF_LIBCEF_WEB_DRAG_UTILS_GTK_H_ 23 | 24 | -------------------------------------------------------------------------------- /tools/git_util.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 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 | from subprocess import Popen, PIPE 6 | 7 | def get_svn_revision(path=".", branch="master"): 8 | svn_rev = "None" 9 | cmd = ("git log --grep=^git-svn-id: -n 1 %s" % branch).split() 10 | try: 11 | process = Popen(cmd, cwd=path, stdout = PIPE, stderr = PIPE) 12 | for line in process.stdout: 13 | if line.find("git-svn-id") > 0: 14 | svn_rev = line.split("@")[1].split()[0] 15 | break 16 | except IOError, (errno, strerror): 17 | sys.stderr.write('Failed to read git log: ' + strerror + "\n") 18 | raise 19 | return svn_rev 20 | 21 | def get_changed_files(path="."): 22 | """ Retrieves the list of changed files. """ 23 | # not implemented 24 | return [] 25 | -------------------------------------------------------------------------------- /tests/cefclient/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | cefclient.icns 11 | CFBundleIdentifier 12 | org.cef.cefclient 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/unittests/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | unittests.icns 11 | CFBundleIdentifier 12 | org.cef.unittests 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /libcef/download_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2011 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_DOWNLOAD_UTIL_H_ 7 | #define CEF_LIBCEF_DOWNLOAD_UTIL_H_ 8 | #pragma once 9 | 10 | #include 11 | 12 | class GURL; 13 | 14 | namespace base { 15 | class FilePath; 16 | } 17 | 18 | namespace download_util { 19 | 20 | // Create a file name based on the response from the server. 21 | void GenerateFileName(const GURL& url, 22 | const std::string& content_disposition, 23 | const std::string& referrer_charset, 24 | const std::string& mime_type, 25 | const std::string& suggested_name, 26 | base::FilePath* generated_name); 27 | 28 | } // namespace download_util 29 | 30 | #endif // CEF_LIBCEF_DOWNLOAD_UTIL_H_ 31 | -------------------------------------------------------------------------------- /libcef/browser_request_context_proxy.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that can 3 | // be found in the LICENSE file. 4 | 5 | #ifndef CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_PROXY_H_ 6 | #define CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_PROXY_H_ 7 | #pragma once 8 | 9 | #include 10 | #include "include/cef_base.h" 11 | #include "net/url_request/url_request_context.h" 12 | 13 | class BrowserRequestContext; 14 | class CefBrowserImpl; 15 | 16 | // A URLRequestContext implementation that proxies cookie requests to the 17 | // client. 18 | class BrowserRequestContextProxy : public net::URLRequestContext { 19 | public: 20 | BrowserRequestContextProxy(BrowserRequestContext* context, 21 | CefBrowserImpl* browser); 22 | 23 | private: 24 | BrowserRequestContext* context_; 25 | CefRefPtr browser_; 26 | }; 27 | 28 | #endif // CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_PROXY_H_ 29 | -------------------------------------------------------------------------------- /libcef/browser_zoom_map.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 can 3 | // be found in the LICENSE file. 4 | 5 | #include "libcef/browser_zoom_map.h" 6 | #include "libcef/cef_thread.h" 7 | 8 | ZoomMap* ZoomMap::GetInstance() { 9 | return Singleton::get(); 10 | } 11 | 12 | void ZoomMap::set(const GURL& url, double zoomLevel) { 13 | REQUIRE_UIT(); 14 | 15 | if (zoomLevel == 0.) { 16 | // Remove the entry for this host. 17 | Map::iterator iter = map_.find(url.host()); 18 | if (iter != map_.end()) 19 | map_.erase(iter); 20 | } else { 21 | // Update the entry for this host. 22 | map_[url.host()] = zoomLevel; 23 | } 24 | } 25 | 26 | bool ZoomMap::get(const GURL& url, double& zoomLevel) { 27 | REQUIRE_UIT(); 28 | 29 | Map::const_iterator iter = map_.find(url.host()); 30 | if (iter == map_.end()) 31 | return false; 32 | 33 | zoomLevel = iter->second; 34 | return true; 35 | } 36 | -------------------------------------------------------------------------------- /tests/cefclient/uiplugin.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | // Portions of this implementation are borrowed from webkit\default_plugin\ 7 | // plugin_impl.h 8 | 9 | #ifndef CEF_TESTS_CEFCLIENT_UIPLUGIN_H_ 10 | #define CEF_TESTS_CEFCLIENT_UIPLUGIN_H_ 11 | #pragma once 12 | 13 | #include "include/cef_nplugin.h" 14 | 15 | #if defined(OS_WIN) 16 | 17 | extern NPNetscapeFuncs* g_uibrowser; 18 | 19 | NPError API_CALL NP_UIGetEntryPoints(NPPluginFuncs* pFuncs); 20 | NPError API_CALL NP_UIInitialize(NPNetscapeFuncs* pFuncs); 21 | NPError API_CALL NP_UIShutdown(void); 22 | 23 | // Function called to modify the rotation value. 24 | void ModifyRotation(float value); 25 | // Function called to reset the rotation value. 26 | void ResetRotation(); 27 | 28 | #endif // OS_WIN 29 | 30 | #endif // CEF_TESTS_CEFCLIENT_UIPLUGIN_H_ 31 | -------------------------------------------------------------------------------- /tests/cefclient/osrplugin.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | // Portions of this implementation are borrowed from webkit\default_plugin\ 7 | // plugin_impl.h 8 | 9 | #ifndef CEF_TESTS_CEFCLIENT_OSRPLUGIN_H_ 10 | #define CEF_TESTS_CEFCLIENT_OSRPLUGIN_H_ 11 | #pragma once 12 | 13 | #include "include/cef_base.h" 14 | 15 | #if defined(OS_WIN) 16 | 17 | #include "include/cef_nplugin.h" 18 | 19 | class CefBrowser; 20 | 21 | extern NPNetscapeFuncs* g_osrbrowser; 22 | 23 | NPError API_CALL NP_OSRGetEntryPoints(NPPluginFuncs* pFuncs); 24 | NPError API_CALL NP_OSRInitialize(NPNetscapeFuncs* pFuncs); 25 | NPError API_CALL NP_OSRShutdown(void); 26 | 27 | CefRefPtr GetOffScreenBrowser(); 28 | 29 | void SetOffScreenTransparent(bool transparent); 30 | 31 | #endif // OS_WIN 32 | 33 | #endif // CEF_TESTS_CEFCLIENT_OSRPLUGIN_H_ 34 | -------------------------------------------------------------------------------- /cef.gypi: -------------------------------------------------------------------------------- 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 | { 6 | 'variables': { 7 | 'conditions': [ 8 | # Directory for CEF source files. 9 | [ 'OS=="win"', { 10 | 'cef_directory' : ' CreateDownloadHandler( 25 | CefRefPtr listener, const CefString& fileName); 26 | 27 | #endif // CEF_TESTS_CEFCLIENT_DOWNLOAD_HANDLER_H_ 28 | -------------------------------------------------------------------------------- /AUTHORS.txt: -------------------------------------------------------------------------------- 1 | # This file is an addendum to the Chromium AUTHORS file. 2 | # Names should be added to this file like so: 3 | # Name or Organization 4 | 5 | Marshall Greenblatt 6 | Jamie Kirkpatrick 7 | Johan Lindström 8 | Igor Pavlov 9 | Yanko Yankov 10 | Emerick Rogul 11 | Valve Corporation 12 | Anthony Taranto 13 | Joe Andrieu 14 | Keith Poole 15 | Aviv Rind 16 | Michael Kaminski 17 | ADInstruments Ltd. 18 | Gus Verdun 19 | Joinerysoft Ltd. 20 | Johan Björk 21 | Dmitry Azaraev 22 | David Xue 23 | Russell (Rusty) Richards 24 | Brian Power 25 | Corey Lucier 26 | Mihai Tica 27 | Czarek Tomczak 28 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/task_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/task_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefTaskCToCpp::Execute(CefThreadId threadId) { 19 | if (CEF_MEMBER_MISSING(struct_, execute)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->execute(struct_, 26 | threadId); 27 | } 28 | 29 | 30 | #ifndef NDEBUG 31 | template<> long CefCToCpp::DebugObjCt = 0; 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /tests/cefclient/util.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_TESTS_CEFCLIENT_UTIL_H_ 6 | #define CEF_TESTS_CEFCLIENT_UTIL_H_ 7 | #pragma once 8 | 9 | #include "include/cef_task.h" 10 | 11 | #if defined(OS_WIN) 12 | 13 | #include // NOLINT(build/include_order) 14 | 15 | #ifndef NDEBUG 16 | #define ASSERT(condition) if (!(condition)) { DebugBreak(); } 17 | #else 18 | #define ASSERT(condition) ((void)0) 19 | #endif 20 | 21 | #else // !OS_WIN 22 | 23 | #include // NOLINT(build/include_order) 24 | 25 | #ifndef NDEBUG 26 | #define ASSERT(condition) if (!(condition)) { assert(false); } 27 | #else 28 | #define ASSERT(condition) ((void)0) 29 | #endif 30 | 31 | #endif // !OS_WIN 32 | 33 | #define REQUIRE_UI_THREAD() ASSERT(CefCurrentlyOn(TID_UI)); 34 | #define REQUIRE_IO_THREAD() ASSERT(CefCurrentlyOn(TID_IO)); 35 | #define REQUIRE_FILE_THREAD() ASSERT(CefCurrentlyOn(TID_FILE)); 36 | 37 | #endif // CEF_TESTS_CEFCLIENT_UTIL_H_ 38 | -------------------------------------------------------------------------------- /patch/patches/gyp_331.patch: -------------------------------------------------------------------------------- 1 | Index: gyp/generator/ninja.py 2 | =================================================================== 3 | --- gyp/generator/ninja.py (revision 1602) 4 | +++ gyp/generator/ninja.py (working copy) 5 | @@ -662,7 +662,16 @@ 6 | for path in copy['files']: 7 | # Normalize the path so trailing slashes don't confuse us. 8 | path = os.path.normpath(path) 9 | - basename = os.path.split(path)[1] 10 | + (parent_path, basename) = os.path.split(path) 11 | + 12 | + # Xcode uses .lproj directories for localized resources. Add a special 13 | + # case to maintain the localization directory component if present. 14 | + if parent_path != '': 15 | + parent_basename = os.path.basename(parent_path) 16 | + (parent_root, parent_ext) = os.path.splitext(parent_basename) 17 | + if parent_ext == '.lproj': 18 | + basename = os.path.join(parent_basename, basename) 19 | + 20 | src = self.GypPathToNinja(path, env) 21 | dst = self.GypPathToNinja(os.path.join(copy['destination'], basename), 22 | env) 23 | -------------------------------------------------------------------------------- /tests/cefclient/plugin_test.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/cef_nplugin.h" 6 | #include "cefclient/clientplugin.h" 7 | 8 | namespace plugin_test { 9 | 10 | void InitTest() { 11 | // Structure providing information about the client plugin. 12 | CefPluginInfo plugin_info; 13 | CefString(&plugin_info.display_name).FromASCII("Client Plugin"); 14 | CefString(&plugin_info.unique_name).FromASCII("client_plugin"); 15 | CefString(&plugin_info.description).FromASCII("My Example Client Plugin"); 16 | CefString(&plugin_info.mime_types).FromASCII("application/x-client-plugin"); 17 | CefString(&plugin_info.file_extensions).FromASCII("xcp"); 18 | 19 | plugin_info.np_getentrypoints = NP_ClientGetEntryPoints; 20 | plugin_info.np_initialize = NP_ClientInitialize; 21 | plugin_info.np_shutdown = NP_ClientShutdown; 22 | 23 | // Register the internal client plugin 24 | CefRegisterPlugin(plugin_info); 25 | } 26 | 27 | } // namespace plugin_test 28 | -------------------------------------------------------------------------------- /tools/patcher.README.txt: -------------------------------------------------------------------------------- 1 | Chromium Embedded Framework (CEF) Patch Application Tool -- patcher.py 2 | ------------------------------------------------------------------------------- 3 | 4 | Document Last Updated: July 23, 2009 5 | 6 | 7 | OVERVIEW 8 | -------- 9 | 10 | The CEF patch application tool is used by the patch project to apply patches 11 | to the Chromium and WebKit code bases. Currently only unified diff format is 12 | supported. See the README.txt file in the patch directory for information on 13 | how the patch project uses this tool. 14 | 15 | The 'patcher.bat' file can be used to run the patch application tool with 16 | command-line arguments that match the default CEF directory structure and 17 | output options. Run 'patcher.py -h' for a complete list of available command- 18 | line arguments. 19 | 20 | 21 | CREDITS 22 | ------- 23 | 24 | Thanks go to techtonik for developing the python-patch script. The 25 | patch_util.py file is a slightly modified version of the original script which 26 | can be found here: http://code.google.com/p/python-patch/ 27 | 28 | 29 | WORK REMAINING 30 | -------------- 31 | 32 | o Add support for the GIT patch format. 33 | -------------------------------------------------------------------------------- /tests/cefclient/client_popup_handler.cpp: -------------------------------------------------------------------------------- 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 | #include "cefclient/client_popup_handler.h" 6 | #include "include/cef_frame.h" 7 | #include "cefclient/util.h" 8 | 9 | ClientPopupHandler::ClientPopupHandler(CefRefPtr parentBrowser) 10 | : m_ParentBrowser(parentBrowser) { 11 | ASSERT(m_ParentBrowser.get()); 12 | } 13 | 14 | ClientPopupHandler::~ClientPopupHandler() { 15 | } 16 | 17 | bool ClientPopupHandler::OnBeforeBrowse(CefRefPtr browser, 18 | CefRefPtr frame, 19 | CefRefPtr request, 20 | NavType navType, 21 | bool isRedirect) { 22 | REQUIRE_UI_THREAD(); 23 | 24 | // Load the request in the parent browser window. 25 | m_ParentBrowser->GetMainFrame()->LoadRequest(request); 26 | browser->CloseBrowser(); 27 | m_ParentBrowser = NULL; 28 | 29 | return true; 30 | } 31 | -------------------------------------------------------------------------------- /tools/distrib/mac/transfer.cfg: -------------------------------------------------------------------------------- 1 | # Additional handling of transfer files. 2 | # target: Target location relative to the target release directory. This 3 | # value is required. 4 | # source: Source location relative to the CEF root directory. This value 5 | # is optional. If specified the target will be copied to this location 6 | # and a TRANSFER-README.txt file will be created. 7 | # post-process: Post-processing operation to perform. This value is 8 | # optional and may be any one of the following: 9 | # 'normalize_headers': Replace fully-qualified project header paths with 10 | # the optionally specified 'new_header_path' value. 11 | 12 | [ 13 | { 14 | 'source' : '../build/mac/change_mach_o_flags_from_xcode.sh', 15 | 'target' : 'tools/change_mach_o_flags_from_xcode.sh', 16 | }, 17 | { 18 | 'source' : '../build/mac/change_mach_o_flags.py', 19 | 'target' : 'tools/change_mach_o_flags.py', 20 | }, 21 | { 22 | 'source' : '../build/mac/strip_from_xcode', 23 | 'target' : 'tools/strip_from_xcode', 24 | }, 25 | { 26 | 'source' : '../build/mac/strip_save_dsym', 27 | 'target' : 'tools/strip_save_dsym', 28 | }, 29 | ] 30 | -------------------------------------------------------------------------------- /libcef/browser_socket_stream_bridge.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_BROWSER_SOCKET_STREAM_BRIDGE_H_ 6 | #define CEF_LIBCEF_BROWSER_SOCKET_STREAM_BRIDGE_H_ 7 | #pragma once 8 | 9 | #include "base/basictypes.h" 10 | 11 | namespace net { 12 | class URLRequestContext; 13 | } // namespace net 14 | 15 | namespace WebKit { 16 | class WebSocketStreamHandle; 17 | } // namespace WebKit 18 | 19 | namespace webkit_glue { 20 | class WebSocketStreamHandleDelegate; 21 | class WebSocketStreamHandleBridge; 22 | } // namespace webkit_glue 23 | 24 | class BrowserSocketStreamBridge { 25 | public: 26 | static void InitializeOnIOThread(net::URLRequestContext* request_context); 27 | static void Cleanup(); 28 | static webkit_glue::WebSocketStreamHandleBridge* Create( 29 | WebKit::WebSocketStreamHandle* handle, 30 | webkit_glue::WebSocketStreamHandleDelegate* delegate); 31 | 32 | private: 33 | DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserSocketStreamBridge); 34 | }; 35 | 36 | #endif // CEF_LIBCEF_BROWSER_SOCKET_STREAM_BRIDGE_H_ 37 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/geolocation_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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<> long CefCToCpp::DebugObjCt = 0; 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /libcef/drag_data_impl.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_DRAG_DATA_IMPL_H_ 6 | #define CEF_LIBCEF_DRAG_DATA_IMPL_H_ 7 | #pragma once 8 | 9 | #include 10 | 11 | #include "include/cef_drag_data.h" 12 | #include "webkit/glue/webdropdata.h" 13 | 14 | // Implementation of CefDragData. 15 | class CefDragDataImpl : public CefDragData { 16 | public: 17 | explicit CefDragDataImpl(const WebDropData& data); 18 | 19 | virtual bool IsLink(); 20 | virtual bool IsFragment(); 21 | virtual bool IsFile(); 22 | virtual CefString GetLinkURL(); 23 | virtual CefString GetLinkTitle(); 24 | virtual CefString GetLinkMetadata(); 25 | virtual CefString GetFragmentText(); 26 | virtual CefString GetFragmentHtml(); 27 | virtual CefString GetFragmentBaseURL(); 28 | virtual CefString GetFileName(); 29 | virtual bool GetFileNames(std::vector& names); 30 | 31 | protected: 32 | WebDropData data_; 33 | 34 | IMPLEMENT_REFCOUNTING(CefDragDataImpl); 35 | }; 36 | 37 | #endif // CEF_LIBCEF_DRAG_DATA_IMPL_H_ 38 | -------------------------------------------------------------------------------- /libcef/cef_process_sub_thread.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #include "libcef/cef_process_sub_thread.h" 7 | 8 | #include "build/build_config.h" 9 | #include "base/compiler_specific.h" 10 | 11 | CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier) 12 | : CefThread(identifier) {} 13 | 14 | CefProcessSubThread::CefProcessSubThread(CefThread::ID identifier, 15 | base::MessageLoop* message_loop) 16 | : CefThread(identifier, message_loop) {} 17 | 18 | CefProcessSubThread::~CefProcessSubThread() { 19 | // We cannot rely on our base class to stop the thread since we want our 20 | // CleanUp function to run. 21 | Stop(); 22 | } 23 | 24 | void CefProcessSubThread::CleanUp() { 25 | // Flush any remaining messages. This ensures that any accumulated 26 | // Task objects get destroyed before we exit, which avoids noise in 27 | // purify leak-test results. 28 | base::MessageLoop::current()->RunUntilIdle(); 29 | 30 | CefThread::Cleanup(); 31 | } 32 | -------------------------------------------------------------------------------- /libcef/cef_process_ui_thread_mac.mm: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #import 7 | 8 | #import "include/cef_application_mac.h" 9 | #include "libcef/cef_process_ui_thread.h" 10 | #include "libcef/browser_webkit_glue.h" 11 | #include "libcef/cef_context.h" 12 | #include "base/command_line.h" 13 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 14 | #include "ui/base/ui_base_switches.h" 15 | 16 | void CefProcessUIThread::PlatformInit() { 17 | // The NSApplication instance must implement the CefAppProtocol protocol. 18 | DCHECK([[NSApplication sharedApplication] 19 | conformsToProtocol:@protocol(CefAppProtocol)]); 20 | 21 | // On Mac, the select popup menus are rendered by the browser. 22 | WebKit::WebView::setUseExternalPopupMenus(true); 23 | 24 | // Core Animation mode for plugins is not supported. 25 | CommandLine::ForCurrentProcess()->AppendSwitch( 26 | switches::kDisableCoreAnimationPlugins); 27 | } 28 | 29 | void CefProcessUIThread::PlatformCleanUp() { 30 | } 31 | -------------------------------------------------------------------------------- /patch/patches/build.patch: -------------------------------------------------------------------------------- 1 | Index: common.gypi 2 | =================================================================== 3 | --- common.gypi (revision 102269) 4 | +++ common.gypi (working copy) 5 | @@ -9,6 +9,9 @@ 6 | # Variables expected to be overriden on the GYP command line (-D) or by 7 | # ~/.gyp/include.gypi. 8 | 'variables': { 9 | + # Directory for CEF source files. This will be set by cef.gypi. 10 | + 'cef_directory%' : '', 11 | + 12 | # Putting a variables dict inside another variables dict looks kind of 13 | # weird. This is done so that 'host_arch', 'chromeos', etc are defined as 14 | # variables within the outer variables dict here. This is necessary 15 | Index: mac/strip_save_dsym 16 | =================================================================== 17 | --- mac/strip_save_dsym (revision 102269) 18 | +++ mac/strip_save_dsym (working copy) 19 | @@ -48,7 +48,7 @@ 20 | "bundle"] 21 | macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")" 22 | 23 | - file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho], 24 | + file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "-L", "--", macho], 25 | stdout=subprocess.PIPE) 26 | 27 | archs = [] 28 | -------------------------------------------------------------------------------- /libcef/http_header_utils.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_HTTP_HEADER_UTILS_H_ 6 | #define CEF_LIBCEF_HTTP_HEADER_UTILS_H_ 7 | #pragma once 8 | 9 | #include 10 | 11 | #include "include/cef_request.h" 12 | #include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPHeaderVisitor.h" 13 | #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 14 | 15 | namespace HttpHeaderUtils { 16 | 17 | typedef CefRequest::HeaderMap HeaderMap; 18 | 19 | class HeaderVisitor : public WebKit::WebHTTPHeaderVisitor { 20 | public: 21 | explicit HeaderVisitor(HeaderMap* map) : map_(map) {} 22 | 23 | virtual void visitHeader(const WebKit::WebString& name, 24 | const WebKit::WebString& value) { 25 | map_->insert(std::make_pair(string16(name), string16(value))); 26 | } 27 | 28 | private: 29 | HeaderMap* map_; 30 | }; 31 | 32 | std::string GenerateHeaders(const HeaderMap& map); 33 | void ParseHeaders(const std::string& header_str, HeaderMap& map); 34 | 35 | }; // namespace HttpHeaderUtils 36 | 37 | #endif // CEF_LIBCEF_HTTP_HEADER_UTILS_H_ 38 | -------------------------------------------------------------------------------- /patch/README.txt: -------------------------------------------------------------------------------- 1 | There may be instances where CEF requires changes to the Chromium/WebKit code 2 | base that are not desired by the Chromium/WebKit projects as a whole. To address 3 | this situation the CEF project adds a patch capability as part of the CEF GYP 4 | project generation step. The patch capability works as follows: 5 | 6 | 1. The CEF developer creates one or more patch files containing all required 7 | changes to the Chromium/WebKit code base and places those patch files in the 8 | "patches" subdirectory. 9 | 2. The CEF developer adds an entry for each patch file in the "patch.cfg" file. 10 | 3. CEF applies the patches to the Chromium/WebKit source tree using the 11 | patcher.py tool in the tools directory. If necessary the patcher.py tool 12 | also rewrites the "patch_state.h" file which defines the CEF_PATCHES_APPLIED 13 | preprocessor value. 14 | 15 | To disable automatic application of patches to the Chromium/WebKit code base 16 | create an empty "NOPATCH" file in the "patch" directory. Sections of the CEF 17 | code base that otherwise require patches will be disabled using the 18 | CEF_PATCHES_APPLIED preprocessor value defined in the "patch_state.h" file. Be 19 | warned that not applying all required patches may break important CEF 20 | functionality. 21 | -------------------------------------------------------------------------------- /tools/gclient_hook.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 The Chromium Embedded Framework Authors. 2 | # Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | from gclient_util import * 7 | import os, sys 8 | 9 | # The CEF root directory is the parent directory of _this_ script. 10 | cef_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) 11 | 12 | print "\nChecking CEF and Chromium revisions..." 13 | gyper = [ 'python', 'tools/check_revision.py' ] 14 | RunAction(cef_dir, gyper) 15 | 16 | print "\nGenerating CEF version header file..." 17 | gyper = [ 'python', 'tools/make_version_header.py', 18 | '--header', 'include/cef_version.h', 19 | '--version', '../chrome/VERSION' ] 20 | RunAction(cef_dir, gyper) 21 | 22 | print "\nPatching build configuration and source files for CEF..." 23 | patcher = [ 'python', 'tools/patcher.py', 24 | '--patch-config', 'patch/patch.cfg' ]; 25 | RunAction(cef_dir, patcher) 26 | 27 | print "\nGenerating CEF project files..." 28 | os.environ['CEF_DIRECTORY'] = os.path.basename(cef_dir); 29 | gyper = [ 'python', 'tools/gyp_cef', 'cef.gyp', '-I', 'cef.gypi' ] 30 | RunAction(cef_dir, gyper) 31 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/get_geolocation_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/get_geolocation_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefGetGeolocationCallbackCToCpp::OnLocationUpdate( 19 | const CefGeoposition& position) { 20 | if (CEF_MEMBER_MISSING(struct_, on_location_update)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Execute 26 | struct_->on_location_update(struct_, 27 | &position); 28 | } 29 | 30 | 31 | #ifndef NDEBUG 32 | template<> long CefCToCpp::DebugObjCt = 34 | 0; 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /tools/distrib/mac/README.redistrib.txt: -------------------------------------------------------------------------------- 1 | REDISTRIBUTION 2 | -------------- 3 | 4 | This binary distribution contains the below components. Components listed under 5 | the "required" section must be redistributed with all applications using CEF. 6 | Components listed under the "optional" section may be excluded if the related 7 | features will not be used. 8 | 9 | Required components: 10 | 11 | * CEF core library 12 | libcef.dylib 13 | 14 | * Cursor resources 15 | Resources/*.png 16 | Resources/*.tiff 17 | 18 | Optional components: 19 | 20 | * Localized resources 21 | Resources/*.lproj/ 22 | Note: Contains localized strings for WebKit UI controls. A .pak file is loaded 23 | from this folder based on the CefSettings.locale value. Only configured 24 | locales need to be distributed. If no locale is configured the default locale 25 | of "en" will be used. Locale file loading can be disabled completely using 26 | CefSettings.pack_loading_disabled. 27 | 28 | * Other resources 29 | Resources/chrome.pak 30 | Resources/devtools_resources.pak 31 | Note: Contains WebKit image and inspector resources. Pack file loading can be 32 | disabled completely using CefSettings.pack_loading_disabled. The resources 33 | directory path can be customized using CefSettings.resources_dir_path. 34 | -------------------------------------------------------------------------------- /libcef/browser_webcookiejar_impl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 the Chromium Embedded Framework authors. 2 | // Portions copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_ 7 | #define CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_ 8 | #pragma once 9 | 10 | #include "third_party/WebKit/Source/Platform/chromium/public/WebCookieJar.h" 11 | 12 | namespace net { 13 | class CookieStore; 14 | } 15 | 16 | class CefBrowserImpl; 17 | 18 | // Handles cookie requests from the renderer. 19 | class BrowserWebCookieJarImpl : public WebKit::WebCookieJar { 20 | public: 21 | BrowserWebCookieJarImpl(); 22 | explicit BrowserWebCookieJarImpl(CefBrowserImpl* browser); 23 | 24 | // WebKit::WebCookieJar methods. 25 | virtual void setCookie( 26 | const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies, 27 | const WebKit::WebString& cookie); 28 | virtual WebKit::WebString cookies( 29 | const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); 30 | 31 | private: 32 | // May be NULL for the global implementation. 33 | CefBrowserImpl* browser_; 34 | }; 35 | 36 | #endif // CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_ 37 | -------------------------------------------------------------------------------- /tests/unittests/run_all_unittests_mac.mm: -------------------------------------------------------------------------------- 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 | #include "include/cef_app.h" 6 | #import "include/cef_application_mac.h" 7 | 8 | // Memory AutoRelease pool. 9 | static NSAutoreleasePool* g_autopool = nil; 10 | 11 | // Provide the CefAppProtocol implementation required by CEF. 12 | @interface TestApplication : NSApplication { 13 | @private 14 | BOOL handlingSendEvent_; 15 | } 16 | @end 17 | 18 | @implementation TestApplication 19 | - (BOOL)isHandlingSendEvent { 20 | return handlingSendEvent_; 21 | } 22 | 23 | - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 24 | handlingSendEvent_ = handlingSendEvent; 25 | } 26 | 27 | - (void)sendEvent:(NSEvent*)event { 28 | CefScopedSendingEvent sendingEventScoper; 29 | [super sendEvent:event]; 30 | } 31 | @end 32 | 33 | void PlatformInit() { 34 | // Initialize the AutoRelease pool. 35 | g_autopool = [[NSAutoreleasePool alloc] init]; 36 | 37 | // Initialize the TestApplication instance. 38 | [TestApplication sharedApplication]; 39 | } 40 | 41 | void PlatformCleanup() { 42 | // Release the AutoRelease pool. 43 | [g_autopool release]; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /patch/patches/spi_webcore_364.patch: -------------------------------------------------------------------------------- 1 | Index: page/FrameView.cpp 2 | =================================================================== 3 | --- page/FrameView.cpp (revision 148366) 4 | +++ page/FrameView.cpp (working copy) 5 | @@ -198,10 +198,12 @@ 6 | if (!page) 7 | return; 8 | 9 | +#if 0 10 | if (m_frame == page->mainFrame()) { 11 | ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); 12 | ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); 13 | } 14 | +#endif 15 | } 16 | 17 | PassRefPtr FrameView::create(Frame* frame) 18 | Index: platform/mac/NSScrollerImpDetails.mm 19 | =================================================================== 20 | --- platform/mac/NSScrollerImpDetails.mm (revision 148366) 21 | +++ platform/mac/NSScrollerImpDetails.mm (working copy) 22 | @@ -33,6 +33,7 @@ 23 | 24 | bool isScrollbarOverlayAPIAvailable() 25 | { 26 | +#if 0 27 | static bool apiAvailable; 28 | static bool shouldInitialize = true; 29 | if (shouldInitialize) { 30 | @@ -43,6 +44,9 @@ 31 | && [scrollerImpPairClass instancesRespondToSelector:@selector(scrollerStyle)]; 32 | } 33 | return apiAvailable; 34 | +#else 35 | + return false; 36 | +#endif 37 | } 38 | 39 | NSScrollerStyle recommendedScrollerStyle() { 40 | -------------------------------------------------------------------------------- /tests/unittests/test_suite.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_TESTS_UNITTESTS_TEST_SUITE_H_ 6 | #define CEF_TESTS_UNITTESTS_TEST_SUITE_H_ 7 | #pragma once 8 | 9 | #include 10 | #include "include/internal/cef_types_wrappers.h" 11 | #include "base/test/test_suite.h" 12 | 13 | class CommandLine; 14 | 15 | class CefTestSuite : public TestSuite { 16 | public: 17 | CefTestSuite(int argc, char** argv); 18 | 19 | // Initialize the current process CommandLine singleton. On Windows, ignores 20 | // its arguments (we instead parse GetCommandLineW() directly) because we 21 | // don't trust the CRT's parsing of the command line, but it still must be 22 | // called to set up the command line. 23 | static void InitCommandLine(int argc, const char* const* argv); 24 | 25 | static void GetSettings(CefSettings& settings); 26 | static bool GetCachePath(std::string& path); 27 | 28 | protected: 29 | #if defined(OS_MACOSX) 30 | virtual void Initialize(); 31 | #endif 32 | 33 | // The singleton CommandLine representing the current process's command line. 34 | static CommandLine* commandline_; 35 | }; 36 | 37 | #endif // CEF_TESTS_UNITTESTS_TEST_SUITE_H_ 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/app_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefAppCppToC() {} 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef/browser_zoom_map.h: -------------------------------------------------------------------------------- 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 can 3 | // be found in the LICENSE file. 4 | 5 | #ifndef CEF_LIBCEF_BROWSER_ZOOM_MAP_H_ 6 | #define CEF_LIBCEF_BROWSER_ZOOM_MAP_H_ 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | #include "include/internal/cef_string.h" 13 | #include "base/memory/singleton.h" 14 | #include "googleurl/src/gurl.h" 15 | 16 | // Maps the host/domain of a URL to a zoom value. 17 | // NOTE: This class is not thread-safe. It is assumed that the methods will be 18 | // called from the UI thread. 19 | class ZoomMap { 20 | public: 21 | // Returns the static ZoomMap instance. 22 | static ZoomMap* GetInstance(); 23 | 24 | // Store |zoomLevel| with key |url|. 25 | void set(const GURL& url, double zoomLevel); 26 | 27 | // Returns true if there is a |zoomLevel| keyed with |url|, false otherwise. 28 | // |zoomLevel| is the "out" variable. 29 | bool get(const GURL& url, double& zoomLevel); 30 | 31 | private: 32 | typedef std::map Map; 33 | Map map_; 34 | 35 | friend struct DefaultSingletonTraits; 36 | 37 | ZoomMap() {} 38 | virtual ~ZoomMap() {} 39 | 40 | DISALLOW_COPY_AND_ASSIGN(ZoomMap); 41 | }; 42 | 43 | #endif // CEF_LIBCEF_BROWSER_ZOOM_MAP_H_ 44 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/task_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | cef_thread_id_t threadId) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | DCHECK(self); 23 | if (!self) 24 | return; 25 | 26 | // Execute 27 | CefTaskCppToC::Get(self)->Execute( 28 | threadId); 29 | } 30 | 31 | 32 | // CONSTRUCTOR - Do not edit by hand. 33 | 34 | CefTaskCppToC::CefTaskCppToC(CefTask* cls) 35 | : CefCppToC(cls) { 36 | struct_.struct_.execute = task_execute; 37 | } 38 | 39 | #ifndef NDEBUG 40 | template<> long CefCppToC::DebugObjCt = 0; 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/task_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefTaskCppToC() {} 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /tests/cefclient/res/dialogs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog Test 4 | 32 | 33 | 34 |
35 | Click a button to show the associated dialog type. 36 |
37 |
38 |
39 |
input type="file": 40 |

41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/domvisitor_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/domdocument_cpptoc.h" 14 | #include "libcef_dll/ctocpp/domvisitor_ctocpp.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefDOMVisitorCToCpp::Visit(CefRefPtr document) { 20 | if (CEF_MEMBER_MISSING(struct_, visit)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: document; type: refptr_diff 26 | DCHECK(document.get()); 27 | if (!document.get()) 28 | return; 29 | 30 | // Execute 31 | struct_->visit(struct_, 32 | CefDOMDocumentCppToC::Wrap(document)); 33 | } 34 | 35 | 36 | #ifndef NDEBUG 37 | template<> long CefCToCpp::DebugObjCt = 0; 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /tools/distrib/linux/README.redistrib.txt: -------------------------------------------------------------------------------- 1 | REDISTRIBUTION 2 | -------------- 3 | 4 | This binary distribution contains the below components. Components listed under 5 | the "required" section must be redistributed with all applications using CEF. 6 | Components listed under the "optional" section may be excluded if the related 7 | features will not be used. 8 | 9 | Required components: 10 | 11 | * CEF core library 12 | libcef.so 13 | 14 | Optional components: 15 | 16 | * Localized resources 17 | locales/ 18 | Note: Contains localized strings for WebKit UI controls. A .pak file is loaded 19 | from this folder based on the value of environment variables which are read 20 | with the following precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. 21 | Only configured locales need to be distributed. If no locale is configured the 22 | default locale of "en-US" will be used. Locale file loading can be disabled 23 | completely using CefSettings.pack_loading_disabled. The locales folder path 24 | can be customized using CefSettings.locales_dir_path. 25 | 26 | * Other resources 27 | chrome.pak 28 | devtools_resources.pak 29 | Note: Contains WebKit image and inspector resources. Pack file loading can be 30 | disabled completely using CefSettings.pack_loading_disabled. The resources 31 | directory path can be customized using CefSettings.resources_dir_path. 32 | -------------------------------------------------------------------------------- /libcef/cef_process_sub_thread.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_CEF_PROCESS_SUB_THREAD_H_ 7 | #define CEF_LIBCEF_CEF_PROCESS_SUB_THREAD_H_ 8 | #pragma once 9 | 10 | #include "libcef/cef_thread.h" 11 | 12 | #include "base/basictypes.h" 13 | 14 | // ---------------------------------------------------------------------------- 15 | // CefProcessSubThread 16 | // 17 | // This simple thread object is used for the specialized threads that the 18 | // CefProcess spins up. 19 | // 20 | // Applications must initialize the COM library before they can call 21 | // COM library functions other than CoGetMalloc and memory allocation 22 | // functions, so this class initializes COM for those users. 23 | class CefProcessSubThread : public CefThread { 24 | public: 25 | explicit CefProcessSubThread(CefThread::ID identifier); 26 | CefProcessSubThread(CefThread::ID identifier, 27 | base::MessageLoop* message_loop); 28 | virtual ~CefProcessSubThread(); 29 | 30 | protected: 31 | virtual void CleanUp(); 32 | 33 | private: 34 | DISALLOW_COPY_AND_ASSIGN(CefProcessSubThread); 35 | }; 36 | 37 | #endif // CEF_LIBCEF_CEF_PROCESS_SUB_THREAD_H_ 38 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/proxy_handler_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/proxy_handler_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefProxyHandlerCToCpp::GetProxyForUrl(const CefString& url, 19 | CefProxyInfo& proxy_info) { 20 | if (CEF_MEMBER_MISSING(struct_, get_proxy_for_url)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: url; type: string_byref_const 26 | DCHECK(!url.empty()); 27 | if (url.empty()) 28 | return; 29 | 30 | // Execute 31 | struct_->get_proxy_for_url(struct_, 32 | url.GetStruct(), 33 | &proxy_info); 34 | } 35 | 36 | 37 | #ifndef NDEBUG 38 | template<> long CefCToCpp::DebugObjCt = 0; 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefClientCppToC() {} 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domnode_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_DOMNODE_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefDOMNodeCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefDOMNodeCppToC(CefDOMNode* cls); 31 | virtual ~CefDOMNodeCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8value_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_V8VALUE_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefV8ValueCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefV8ValueCppToC(CefV8Value* cls); 31 | virtual ~CefV8ValueCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /tools/distrib/mac/README.standard.txt: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | -------- 3 | 4 | cefclient Contains the cefclient sample application configured to build 5 | using the files in this distribution. 6 | 7 | Debug Contains libcef.dylib and other components required to run the debug 8 | version of CEF-based applications. 9 | 10 | include Contains all required CEF header files. 11 | 12 | libcef_dll Contains the source code for the libcef_dll_wrapper static library 13 | that all applications using the CEF C++ API must link against. 14 | 15 | Release Contains libcef.dylib and other components required to run the 16 | release version of CEF-based applications. 17 | 18 | Resources Contains images and resources required by applications using CEF. 19 | The contents of this folder should be transferred to the 20 | Contents/Resources folder in the app bundle. 21 | 22 | tools Scripts that perform post-processing on Mac release targets. 23 | 24 | 25 | USAGE 26 | ----- 27 | 28 | Xcode 3 and 4: Open the cefclient.xcodeproj project and build. 29 | 30 | When using Xcode 4.2 or newer you will need to change the "Compiler for 31 | C/C++/Objective-C" setting to "LLVM GCC 4.2" under "Build Settings" for 32 | each target. 33 | 34 | Please visit the CEF Website for additional usage information. 35 | 36 | http://code.google.com/p/chromiumembedded 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/request_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_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 DLL-side only. 27 | class CefRequestCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefRequestCppToC(CefRequest* cls); 31 | virtual ~CefRequestCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/domevent_listener_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/domevent_cpptoc.h" 14 | #include "libcef_dll/ctocpp/domevent_listener_ctocpp.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefDOMEventListenerCToCpp::HandleEvent(CefRefPtr event) { 20 | if (CEF_MEMBER_MISSING(struct_, handle_event)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: event; type: refptr_diff 26 | DCHECK(event.get()); 27 | if (!event.get()) 28 | return; 29 | 30 | // Execute 31 | struct_->handle_event(struct_, 32 | CefDOMEventCppToC::Wrap(event)); 33 | } 34 | 35 | 36 | #ifndef NDEBUG 37 | template<> long CefCToCpp::DebugObjCt = 0; 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /tools/build_projects.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set RC= 3 | setlocal 4 | 5 | if "%1" == "" ( 6 | echo ERROR: Please specify a build target: Debug or Release 7 | set ERRORLEVEL=1 8 | goto end 9 | ) 10 | 11 | if "%2" == "" ( 12 | set PROJECT_NAME=cefclient 13 | ) else ( 14 | set PROJECT_NAME=%2 15 | ) 16 | 17 | echo Configuring Visual Studio environment... 18 | if "%GYP_MSVS_VERSION%" == "2008" ( 19 | call "%VS90COMNTOOLS%vsvars32.bat" 20 | set PROJECT_EXT=.vcproj 21 | ) else ( 22 | call "%VS100COMNTOOLS%vsvars32.bat" 23 | set PROJECT_EXT=.vcxproj 24 | set CEF_MSBUILD_PATH=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe 25 | ) 26 | 27 | if exist "%CEF_MSBUILD_PATH%" ( 28 | "%CEF_MSBUILD_PATH%" /v:m /p:Configuration=%1;Platform=Win32 /t:"%PROJECT_NAME%" ..\cef.sln 29 | ) else if exist "%DevEnvDir%\devenv.com" ( 30 | echo Building %1 target for %PROJECT_NAME% project... 31 | "%DevEnvDir%\devenv.com" /build %1 ..\cef.sln /project %PROJECT_NAME%%PROJECT_EXT% 32 | ) else if exist "%VCINSTALLDIR%\vcpackages\vcbuild.exe" ( 33 | echo Building %1 target for all projects... 34 | "%VCINSTALLDIR%\vcpackages\vcbuild.exe" ..\cef.sln "%1|Win32" 35 | ) else ( 36 | echo ERROR: Cannot find Visual Studio builder 37 | set ERRORLEVEL=1 38 | ) 39 | 40 | :end 41 | endlocal & set RC=%ERRORLEVEL% 42 | goto omega 43 | 44 | :returncode 45 | exit /B %RC% 46 | 47 | :omega 48 | call :returncode %RC% 49 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domevent_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_DOMEVENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefDOMEventCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefDOMEventCppToC(CefDOMEvent* cls); 31 | virtual ~CefDOMEventCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /patch/patch.cfg: -------------------------------------------------------------------------------- 1 | # Each map in the list associates a patch file name with a target path and 2 | # optional condition. All paths in the patch file must be relative to the 3 | # target path. Each map should include a comment linking to the code review 4 | # or bug report that the patch relates to. If a condition is provided the 5 | # patch will only be applied if an environment variable with the specified 6 | # name exists. 7 | 8 | patches = [ 9 | { 10 | # http://codereview.chromium.org/8086022/ 11 | 'name': 'build', 12 | 'path': '../build/', 13 | }, 14 | { 15 | # http://code.google.com/p/chromiumembedded/issues/detail?id=496 16 | 'name': 'zlib', 17 | 'path': '../third_party/zlib/', 18 | }, 19 | { 20 | # http://code.google.com/p/gyp/issues/detail?id=443 21 | 'name': 'message_loop_443', 22 | 'path': '../base/', 23 | }, 24 | { 25 | # http://code.google.com/p/chromiumembedded/issues/detail?id=933 26 | 'name': 'webkit_933', 27 | 'path': '../third_party/WebKit/Source/WebKit/chromium/src/', 28 | }, 29 | { 30 | # http://code.google.com/p/gyp/issues/detail?id=331 31 | 'name': 'gyp_331', 32 | 'path': '../tools/gyp/pylib/', 33 | }, 34 | { 35 | # http://code.google.com/p/chromiumembedded/issues/detail?id=364 36 | 'name': 'spi_webcore_364', 37 | 'path': '../third_party/WebKit/Source/WebCore/', 38 | 'condition': 'CEF_SPI_BUILD', 39 | }, 40 | ] 41 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8context_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_V8CONTEXT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefV8ContextCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefV8ContextCppToC(CefV8Context* cls); 31 | virtual ~CefV8ContextCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefV8HandlerCppToC() {} 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/post_data_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_POST_DATA_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_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 DLL-side only. 27 | class CefPostDataCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefPostDataCppToC(CefPostData* cls); 31 | virtual ~CefPostDataCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/response_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_RESPONSE_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_response.h" 22 | #include "include/capi/cef_response_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 DLL-side only. 27 | class CefResponseCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefResponseCppToC(CefResponse* cls); 31 | virtual ~CefResponseCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/drag_data_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_DATA_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DRAG_DATA_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_drag_data.h" 22 | #include "include/capi/cef_drag_data_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 DLL-side only. 27 | class CefDragDataCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefDragDataCppToC(CefDragData* cls); 31 | virtual ~CefDragDataCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_DATA_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8accessor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefV8AccessorCppToC() {} 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domvisitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefDOMVisitorCppToC() {} 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/xml_reader_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_XML_READER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_xml_reader.h" 22 | #include "include/capi/cef_xml_reader_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 DLL-side only. 27 | class CefXmlReaderCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefXmlReaderCppToC(CefXmlReader* cls); 31 | virtual ~CefXmlReaderCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/zip_reader_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_ZIP_READER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_zip_reader.h" 22 | #include "include/capi/cef_zip_reader_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 DLL-side only. 27 | class CefZipReaderCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefZipReaderCppToC(CefZipReader* cls); 31 | virtual ~CefZipReaderCppToC() {} 32 | }; 33 | 34 | #endif // BUILDING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /tests/cefclient/res/modalmain.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test Modal Dialog 5 | 6 | 7 | 8 |

Tests

9 |
10 | 11 | 12 |

Time (timers are suppresed while the modal dialog is open)

13 |
14 | 15 |

Result Log

16 |
17 | 18 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8exception_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_V8EXCEPTION_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefV8ExceptionCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefV8ExceptionCppToC(CefV8Exception* cls); 32 | virtual ~CefV8ExceptionCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domdocument_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_DOMDOCUMENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefDOMDocumentCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDOMDocumentCppToC(CefDOMDocument* cls); 32 | virtual ~CefDOMDocumentCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/read_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefReadHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8stack_frame_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_V8STACK_FRAME_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8STACK_FRAME_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefV8StackFrameCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefV8StackFrameCppToC(CefV8StackFrame* cls); 32 | virtual ~CefV8StackFrameCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8STACK_FRAME_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8stack_trace_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_V8STACK_TRACE_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8STACK_TRACE_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefV8StackTraceCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefV8StackTraceCppToC(CefV8StackTrace* cls); 32 | virtual ~CefV8StackTraceCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8STACK_TRACE_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/command_line_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_COMMAND_LINE_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_command_line.h" 22 | #include "include/capi/cef_command_line_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 DLL-side only. 27 | class CefCommandLineCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefCommandLineCppToC(CefCommandLine* cls); 32 | virtual ~CefCommandLineCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/drag_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefDragHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/find_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefFindHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/load_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefLoadHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/menu_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_MENU_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_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_menu_handler.h" 22 | #include "include/capi/cef_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 CefMenuHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefMenuHandlerCppToC(CefMenuHandler* cls); 32 | virtual ~CefMenuHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_MENU_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/stream_reader_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_STREAM_READER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefStreamReaderCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefStreamReaderCppToC(CefStreamReader* cls); 32 | virtual ~CefStreamReaderCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/stream_writer_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_STREAM_WRITER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefStreamWriterCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefStreamWriterCppToC(CefStreamWriter* cls); 32 | virtual ~CefStreamWriterCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/write_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefWriteHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/zoom_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_ZOOM_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_ZOOM_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_zoom_handler.h" 22 | #include "include/capi/cef_zoom_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 CefZoomHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefZoomHandlerCppToC(CefZoomHandler* cls); 32 | virtual ~CefZoomHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_ZOOM_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /tools/distrib/linux/README.standard.txt: -------------------------------------------------------------------------------- 1 | CONTENTS 2 | -------- 3 | 4 | cefclient Contains the cefclient sample application configured to build 5 | using the files in this distribution. 6 | 7 | Debug Contains libcef.so and other components required to run the debug 8 | version of CEF-based applications. By default these files should be 9 | placed in the same directory as the executable and will be copied 10 | there as part of the build process. 11 | 12 | include Contains all required CEF header files. 13 | 14 | libcef_dll Contains the source code for the libcef_dll_wrapper static library 15 | that all applications using the CEF C++ API must link against. 16 | 17 | Release Contains libcef.so and other components required to run the release 18 | version of CEF-based applications. By default these files should be 19 | placed in the same directory as the executable and will be copied 20 | there as part of the build process. 21 | 22 | Resources Contains resources required by libcef.so. By default these files 23 | should be placed in the same directory as libcef.so and will be 24 | copied there as part of the build process. 25 | 26 | 27 | USAGE 28 | ----- 29 | 30 | Run 'build.sh Debug' to build the cefclient target in Debug mode. 31 | 32 | Please visit the CEF Website for additional usage information. 33 | 34 | http://code.google.com/p/chromiumembedded 35 | -------------------------------------------------------------------------------- /libcef/external_popup_menu_mac.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_EXTERNAL_POPUP_MENU_MAC_H_ 7 | #define CEF_LIBCEF_EXTERNAL_POPUP_MENU_MAC_H_ 8 | #pragma once 9 | 10 | #include "base/basictypes.h" 11 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenu.h" 12 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" 13 | 14 | class BrowserWebViewDelegate; 15 | namespace WebKit { 16 | class WebExternalPopupMenuClient; 17 | } 18 | 19 | class ExternalPopupMenu : public WebKit::WebExternalPopupMenu { 20 | public: 21 | ExternalPopupMenu(BrowserWebViewDelegate* delegate, 22 | const WebKit::WebPopupMenuInfo& popup_menu_info, 23 | WebKit::WebExternalPopupMenuClient* popup_menu_client); 24 | virtual ~ExternalPopupMenu() {} 25 | 26 | // WebKit::WebExternalPopupMenu implementation: 27 | virtual void show(const WebKit::WebRect& bounds); 28 | virtual void close(); 29 | 30 | private: 31 | BrowserWebViewDelegate* delegate_; 32 | WebKit::WebPopupMenuInfo popup_menu_info_; 33 | WebKit::WebExternalPopupMenuClient* popup_menu_client_; 34 | 35 | DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu); 36 | }; 37 | 38 | #endif // CEF_LIBCEF_EXTERNAL_POPUP_MENU_MAC_H_ 39 | -------------------------------------------------------------------------------- /libcef/web_urlrequest_impl.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_WEB_URLREQUEST_IMPL_H_ 6 | #define CEF_LIBCEF_WEB_URLREQUEST_IMPL_H_ 7 | #pragma once 8 | 9 | #include "include/cef_web_urlrequest.h" 10 | #include "base/memory/ref_counted.h" 11 | 12 | class CefWebURLRequestImpl : public CefWebURLRequest { 13 | public: 14 | class Context; 15 | 16 | explicit CefWebURLRequestImpl( 17 | CefRefPtr handler); 18 | virtual ~CefWebURLRequestImpl(); 19 | 20 | // Can be called on any thread. 21 | virtual RequestState GetState() OVERRIDE; 22 | virtual void Cancel() OVERRIDE; 23 | 24 | // Can only be called on the UI thread. 25 | void DoSend(CefRefPtr request); 26 | void DoCancel(); 27 | void DoStateChange(RequestState newState); 28 | 29 | CefRefPtr GetHandler() { return handler_; } 30 | 31 | static bool ImplementsThreadSafeReferenceCounting() { return true; } 32 | 33 | protected: 34 | CefRefPtr handler_; 35 | 36 | // The below parameters are only modified on the UI thread. 37 | RequestState state_; 38 | scoped_refptr context_; 39 | 40 | IMPLEMENT_REFCOUNTING(CefWebURLRequestImpl); 41 | IMPLEMENT_LOCKING(CefWebURLRequestImpl); 42 | }; 43 | 44 | #endif // CEF_LIBCEF_WEB_URLREQUEST_IMPL_H_ 45 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/cookie_manager_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_MANAGER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefCookieManagerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefCookieManagerCppToC(CefCookieManager* cls); 32 | virtual ~CefCookieManagerCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/cookie_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefCookieVisitorCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/scheme_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_SCHEME_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_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 CefSchemeHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefSchemeHandlerCppToC(CefSchemeHandler* cls); 32 | virtual ~CefSchemeHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/browser_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 29 | class CefBrowserCppToC 30 | : public CefCppToC { 31 | public: 32 | explicit CefBrowserCppToC(CefBrowser* cls); 33 | virtual ~CefBrowserCppToC() {} 34 | }; 35 | 36 | #endif // BUILDING_CEF_SHARED 37 | #endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ 38 | 39 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/focus_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefFocusHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/print_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefPrintHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/proxy_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_PROXY_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_PROXY_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_proxy_handler.h" 22 | #include "include/capi/cef_proxy_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 CefProxyHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefProxyHandlerCppToC(CefProxyHandler* cls); 32 | virtual ~CefProxyHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/content_filter_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CONTENT_FILTER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_CONTENT_FILTER_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_content_filter.h" 22 | #include "include/capi/cef_content_filter_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 CefContentFilterCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefContentFilterCppToC(CefContentFilter* cls); 32 | virtual ~CefContentFilterCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_CONTENT_FILTER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/render_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefRenderHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_plugin_info_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefWebPluginInfoCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebPluginInfoCppToC(CefWebPluginInfo* cls); 32 | virtual ~CefWebPluginInfoCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_urlrequest_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_URLREQUEST_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_URLREQUEST_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_web_urlrequest.h" 22 | #include "include/capi/cef_web_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 DLL-side only. 27 | class CefWebURLRequestCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebURLRequestCppToC(CefWebURLRequest* cls); 32 | virtual ~CefWebURLRequestCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_URLREQUEST_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef/dom_event_impl.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_DOM_EVENT_IMPL_H_ 6 | #define CEF_LIBCEF_DOM_EVENT_IMPL_H_ 7 | #pragma once 8 | 9 | #include "include/cef_dom.h" 10 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h" 11 | 12 | class CefDOMDocumentImpl; 13 | 14 | class CefDOMEventImpl : public CefDOMEvent { 15 | public: 16 | CefDOMEventImpl(CefRefPtr document, 17 | const WebKit::WebDOMEvent& event); 18 | virtual ~CefDOMEventImpl(); 19 | 20 | virtual CefString GetType() OVERRIDE; 21 | virtual Category GetCategory() OVERRIDE; 22 | virtual Phase GetPhase() OVERRIDE; 23 | virtual bool CanBubble() OVERRIDE; 24 | virtual bool CanCancel() OVERRIDE; 25 | virtual CefRefPtr GetDocument() OVERRIDE; 26 | virtual CefRefPtr GetTarget() OVERRIDE; 27 | virtual CefRefPtr GetCurrentTarget() OVERRIDE; 28 | 29 | // Will be called from CefDOMEventListenerWrapper::handleEvent(). 30 | void Detach(); 31 | 32 | // Verify that the object exists and is being accessed on the UI thread. 33 | bool VerifyContext(); 34 | 35 | protected: 36 | CefRefPtr document_; 37 | WebKit::WebDOMEvent event_; 38 | 39 | IMPLEMENT_REFCOUNTING(CefDOMEventImpl); 40 | }; 41 | 42 | #endif // CEF_LIBCEF_DOM_EVENT_IMPL_H_ 43 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/display_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefDisplayHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/domevent_listener_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_DOMEVENT_LISTENER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_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 CefDOMEventListenerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDOMEventListenerCppToC(CefDOMEventListener* cls); 32 | virtual ~CefDOMEventListenerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMEVENT_LISTENER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/post_data_element_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_POST_DATA_ELEMENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_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 DLL-side only. 27 | class CefPostDataElementCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefPostDataElementCppToC(CefPostDataElement* cls); 32 | virtual ~CefPostDataElementCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/request_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefRequestHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef/response_impl.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_LIBCEF_RESPONSE_IMPL_H_ 6 | #define CEF_LIBCEF_RESPONSE_IMPL_H_ 7 | #pragma once 8 | 9 | #include "include/cef_response.h" 10 | 11 | namespace net { 12 | class HttpResponseHeaders; 13 | } 14 | namespace WebKit { 15 | class WebURLResponse; 16 | }; 17 | 18 | // Implementation of CefResponse. 19 | class CefResponseImpl : public CefResponse { 20 | public: 21 | CefResponseImpl(); 22 | explicit CefResponseImpl(const WebKit::WebURLResponse& response); 23 | ~CefResponseImpl() {} 24 | 25 | // CefResponse API 26 | virtual int GetStatus(); 27 | virtual void SetStatus(int status); 28 | virtual CefString GetStatusText(); 29 | virtual void SetStatusText(const CefString& statusText); 30 | virtual CefString GetMimeType(); 31 | virtual void SetMimeType(const CefString& mimeType); 32 | virtual CefString GetHeader(const CefString& name); 33 | virtual void GetHeaderMap(HeaderMap& headerMap); 34 | virtual void SetHeaderMap(const HeaderMap& headerMap); 35 | 36 | net::HttpResponseHeaders* GetResponseHeaders(); 37 | 38 | protected: 39 | int status_code_; 40 | CefString status_text_; 41 | CefString mime_type_; 42 | HeaderMap header_map_; 43 | 44 | IMPLEMENT_REFCOUNTING(CefResponseImpl); 45 | IMPLEMENT_LOCKING(CefResponseImpl); 46 | }; 47 | 48 | #endif // CEF_LIBCEF_RESPONSE_IMPL_H_ 49 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/task_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefTaskCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefTaskCToCpp(cef_task_t* str) 31 | : CefCToCpp(str) {} 32 | virtual ~CefTaskCToCpp() {} 33 | 34 | // CefTask methods 35 | virtual void Execute(CefThreadId threadId) OVERRIDE; 36 | }; 37 | 38 | #endif // BUILDING_CEF_SHARED 39 | #endif // CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ 40 | 41 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/download_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefDownloadHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/jsdialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefJSDialogHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/keyboard_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefKeyboardHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef/task_impl.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 can 3 | // be found in the LICENSE file. 4 | 5 | #include "include/cef_task.h" 6 | #include "libcef/cef_thread.h" 7 | #include "base/bind.h" 8 | 9 | namespace { 10 | 11 | int GetThreadId(CefThreadId threadId) { 12 | switch (threadId) { 13 | case TID_UI: return CefThread::UI; 14 | case TID_IO: return CefThread::IO; 15 | case TID_FILE: return CefThread::FILE; 16 | }; 17 | NOTREACHED(); 18 | return -1; 19 | } 20 | 21 | } // namespace 22 | 23 | bool CefCurrentlyOn(CefThreadId threadId) { 24 | int id = GetThreadId(threadId); 25 | if (id < 0) 26 | return false; 27 | 28 | return CefThread::CurrentlyOn(static_cast(id)); 29 | } 30 | 31 | bool CefPostTask(CefThreadId threadId, CefRefPtr task) { 32 | int id = GetThreadId(threadId); 33 | if (id < 0) 34 | return false; 35 | 36 | return CefThread::PostTask(static_cast(id), FROM_HERE, 37 | base::Bind(&CefTask::Execute, task, threadId)); 38 | } 39 | 40 | bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr task, 41 | int64 delay_ms) { 42 | int id = GetThreadId(threadId); 43 | if (id < 0) 44 | return false; 45 | 46 | return CefThread::PostDelayedTask(static_cast(id), FROM_HERE, 47 | base::Bind(&CefTask::Execute, task, threadId), 48 | base::TimeDelta::FromMilliseconds(delay_ms)); 49 | } 50 | -------------------------------------------------------------------------------- /tests/cefclient/client_popup_handler.h: -------------------------------------------------------------------------------- 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 | #ifndef CEF_TESTS_CEFCLIENT_CLIENT_POPUP_HANDLER_H_ 6 | #define CEF_TESTS_CEFCLIENT_CLIENT_POPUP_HANDLER_H_ 7 | #pragma once 8 | 9 | #include "include/cef_browser.h" 10 | #include "include/cef_client.h" 11 | #include "include/cef_request_handler.h" 12 | 13 | // Handler for popup windows that loads the request in an existing browser 14 | // window. 15 | class ClientPopupHandler : public CefClient, 16 | public CefRequestHandler { 17 | public: 18 | explicit ClientPopupHandler(CefRefPtr parentBrowser); 19 | virtual ~ClientPopupHandler(); 20 | 21 | // CefClient methods 22 | virtual CefRefPtr GetRequestHandler() OVERRIDE { 23 | return this; 24 | } 25 | 26 | // CefRequestHandler methods 27 | virtual bool OnBeforeBrowse(CefRefPtr browser, 28 | CefRefPtr frame, 29 | CefRefPtr request, 30 | NavType navType, 31 | bool isRedirect) OVERRIDE; 32 | protected: 33 | CefRefPtr m_ParentBrowser; 34 | 35 | // Include the default reference counting implementation. 36 | IMPLEMENT_REFCOUNTING(ClientPopupHandler); 37 | }; 38 | 39 | #endif // CEF_TESTS_CEFCLIENT_CLIENT_POPUP_HANDLER_H_ 40 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/frame_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_FRAME_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_CEF_SHARED 20 | 21 | #include "include/cef_frame.h" 22 | #include "include/capi/cef_frame_capi.h" 23 | #include "include/cef_browser.h" 24 | #include "include/capi/cef_browser_capi.h" 25 | #include "include/cef_v8.h" 26 | #include "include/capi/cef_v8_capi.h" 27 | #include "libcef_dll/cpptoc/cpptoc.h" 28 | 29 | // Wrap a C++ class with a C structure. 30 | // This class may be instantiated and accessed DLL-side only. 31 | class CefFrameCppToC 32 | : public CefCppToC { 33 | public: 34 | explicit CefFrameCppToC(CefFrame* cls); 35 | virtual ~CefFrameCppToC() {} 36 | }; 37 | 38 | #endif // BUILDING_CEF_SHARED 39 | #endif // CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ 40 | 41 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/v8context_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_V8CONTEXT_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_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_v8context_handler.h" 22 | #include "include/capi/cef_v8context_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 CefV8ContextHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefV8ContextHandlerCppToC(CefV8ContextHandler* cls); 32 | virtual ~CefV8ContextHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/scheme_registrar_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_REGISTRAR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefSchemeRegistrarCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefSchemeRegistrarCppToC(CefSchemeRegistrar* cls); 32 | virtual ~CefSchemeRegistrarCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/permission_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_PERMISSION_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_PERMISSION_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_permission_handler.h" 22 | #include "include/capi/cef_permission_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 CefPermissionHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefPermissionHandlerCppToC(CefPermissionHandler* cls); 32 | virtual ~CefPermissionHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_PERMISSION_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/geolocation_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefGeolocationHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefSchemeHandlerFactoryCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_URLREQUEST_CLIENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_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_web_urlrequest.h" 22 | #include "include/capi/cef_web_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 CefWebURLRequestClientCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebURLRequestClientCppToC(CefWebURLRequestClient* cls); 32 | virtual ~CefWebURLRequestClientCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_URLREQUEST_CLIENT_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /tests/cefclient/resource_util_posix.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 "cefclient/resource_util.h" 6 | #include 7 | 8 | namespace { 9 | 10 | bool FileExists(const char* path) { 11 | FILE* f = fopen(path, "rb"); 12 | if (f) { 13 | fclose(f); 14 | return true; 15 | } 16 | return false; 17 | } 18 | 19 | bool ReadFileToString(const char* path, std::string& data) { 20 | // Implementation adapted from base/file_util.cc 21 | FILE* file = fopen(path, "rb"); 22 | if (!file) 23 | return false; 24 | 25 | char buf[1 << 16]; 26 | size_t len; 27 | while ((len = fread(buf, 1, sizeof(buf), file)) > 0) 28 | data.append(buf, len); 29 | fclose(file); 30 | 31 | return true; 32 | } 33 | 34 | } // namespace 35 | 36 | bool LoadBinaryResource(const char* resource_name, std::string& resource_data) { 37 | std::string path; 38 | if (!GetResourceDir(path)) 39 | return false; 40 | 41 | path.append("/"); 42 | path.append(resource_name); 43 | 44 | return ReadFileToString(path.c_str(), resource_data); 45 | } 46 | 47 | CefRefPtr GetBinaryResourceReader(const char* resource_name) { 48 | std::string path; 49 | if (!GetResourceDir(path)) 50 | return NULL; 51 | 52 | path.append("/"); 53 | path.append(resource_name); 54 | 55 | if (!FileExists(path.c_str())) 56 | return NULL; 57 | 58 | return CefStreamReader::CreateForFile(path); 59 | } 60 | -------------------------------------------------------------------------------- /libcef/http_header_utils.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 | #include "libcef/http_header_utils.h" 6 | #include "net/http/http_response_headers.h" 7 | #include "net/http/http_util.h" 8 | 9 | using net::HttpResponseHeaders; 10 | 11 | namespace HttpHeaderUtils { 12 | 13 | std::string GenerateHeaders(const HeaderMap& map) { 14 | std::string headers; 15 | 16 | for (HeaderMap::const_iterator header = map.begin(); 17 | header != map.end(); 18 | ++header) { 19 | const CefString& key = header->first; 20 | const CefString& value = header->second; 21 | 22 | if (!key.empty()) { 23 | // Delimit with "\r\n". 24 | if (!headers.empty()) 25 | headers += "\r\n"; 26 | 27 | headers += std::string(key) + ": " + std::string(value); 28 | } 29 | } 30 | 31 | return headers; 32 | } 33 | 34 | void ParseHeaders(const std::string& header_str, HeaderMap& map) { 35 | // Parse the request header values 36 | std::string headerStr = "HTTP/1.1 200 OK\n"; 37 | headerStr += header_str; 38 | scoped_refptr headers = 39 | new HttpResponseHeaders(net::HttpUtil::AssembleRawHeaders( 40 | headerStr.c_str(), headerStr.length())); 41 | void* iter = NULL; 42 | std::string name, value; 43 | while (headers->EnumerateHeaderLines(&iter, &name, &value)) 44 | map.insert(std::make_pair(name, value)); 45 | } 46 | 47 | } // namespace HttpHeaderUtils 48 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/geolocation_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefGeolocationCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefGeolocationCallbackCppToC(CefGeolocationCallback* cls); 32 | virtual ~CefGeolocationCallbackCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_CALLBACK_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/scheme_handler_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefSchemeHandlerCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefSchemeHandlerCallbackCppToC(CefSchemeHandlerCallback* cls); 32 | virtual ~CefSchemeHandlerCallbackCppToC() {} 33 | }; 34 | 35 | #endif // BUILDING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_CALLBACK_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef/browser_resource_loader_bridge.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2008 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_BROWSER_RESOURCE_LOADER_BRIDGE_H_ 7 | #define CEF_LIBCEF_BROWSER_RESOURCE_LOADER_BRIDGE_H_ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "include/cef_base.h" 13 | #include "base/message_loop_proxy.h" 14 | #include "net/url_request/url_request.h" 15 | #include "webkit/glue/resource_loader_bridge.h" 16 | 17 | class CefBrowserImpl; 18 | class GURL; 19 | 20 | class BrowserResourceLoaderBridge { 21 | public: 22 | // Return the CefBrowser associated with the specified request. The browser 23 | // will be NULL in cases where the request was initiated using the 24 | // CefWebURLRequest API. 25 | static CefRefPtr GetBrowserForRequest( 26 | net::URLRequest* request); 27 | 28 | // Creates a ResourceLoaderBridge instance. 29 | static webkit_glue::ResourceLoaderBridge* Create( 30 | const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info); 31 | 32 | static scoped_refptr GetCacheThread(); 33 | 34 | // Used for intercepting URL redirects. Only one interceptor will be created 35 | // and its lifespan is controlled by the BrowserRequestContext. 36 | static net::URLRequest::Interceptor* CreateRequestInterceptor(); 37 | }; 38 | 39 | #endif // CEF_LIBCEF_BROWSER_RESOURCE_LOADER_BRIDGE_H_ 40 | 41 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/cookie_visitor_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/cookie_visitor_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | bool CefCookieVisitorCToCpp::Visit(const CefCookie& cookie, int count, 19 | int total, bool& deleteCookie) { 20 | if (CEF_MEMBER_MISSING(struct_, visit)) 21 | return false; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Translate param: deleteCookie; type: bool_byref 26 | int deleteCookieInt = deleteCookie; 27 | 28 | // Execute 29 | int _retval = struct_->visit(struct_, 30 | &cookie, 31 | count, 32 | total, 33 | &deleteCookieInt); 34 | 35 | // Restore param:deleteCookie; type: bool_byref 36 | deleteCookie = deleteCookieInt?true:false; 37 | 38 | // Return type: bool 39 | return _retval?true:false; 40 | } 41 | 42 | 43 | #ifndef NDEBUG 44 | template<> long CefCToCpp::DebugObjCt = 0; 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefGetGeolocationCallbackCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/geolocation_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/geolocation_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK geolocation_callback_cont( 19 | struct _cef_geolocation_callback_t* self, int allow) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | DCHECK(self); 23 | if (!self) 24 | return; 25 | 26 | // Execute 27 | CefGeolocationCallbackCppToC::Get(self)->Continue( 28 | allow?true:false); 29 | } 30 | 31 | 32 | // CONSTRUCTOR - Do not edit by hand. 33 | 34 | CefGeolocationCallbackCppToC::CefGeolocationCallbackCppToC( 35 | CefGeolocationCallback* cls) 36 | : CefCppToC(cls) { 38 | struct_.struct_.cont = geolocation_callback_cont; 39 | } 40 | 41 | #ifndef NDEBUG 42 | template<> long CefCppToC::DebugObjCt = 0; 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefResourceBundleHandlerCppToC() {} 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /libcef_dll/cpptoc/life_span_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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 | virtual ~CefLifeSpanHandlerCppToC() {} 35 | }; 36 | 37 | #endif // USING_CEF_SHARED 38 | #endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 39 | 40 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/domvisitor_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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_DOMVISITOR_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef BUILDING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed DLL-side only") 19 | #else // BUILDING_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 DLL-side only. 27 | class CefDOMVisitorCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefDOMVisitorCToCpp(cef_domvisitor_t* str) 31 | : CefCToCpp(str) {} 32 | virtual ~CefDOMVisitorCToCpp() {} 33 | 34 | // CefDOMVisitor methods 35 | virtual void Visit(CefRefPtr document) OVERRIDE; 36 | }; 37 | 38 | #endif // BUILDING_CEF_SHARED 39 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ 40 | 41 | -------------------------------------------------------------------------------- /tools/make_cppdocs.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | if "%1"=="" ( 5 | set CPPDOC_EXE="C:\Program Files (x86)\richfeit\CppDoc\CppDoc.exe" 6 | set CPPDOC_REV="XXX" 7 | ) else ( 8 | set CPPDOC_EXE="C:\Program Files (x86)\richfeit\CppDoc\cppdoc_cmd.exe" 9 | set CPPDOC_REV="%1" 10 | ) 11 | 12 | if not exist %CPPDOC_EXE% ( 13 | echo ERROR: Please install CppDoc from http://www.cppdoc.com/ 14 | ) else ( 15 | %CPPDOC_EXE% -overwrite -title="CEF C++ API Docs - Revision %CPPDOC_REV%" -footer="
Chromium Embedded Framework (CEF) Copyright © 2011 Marshall A. Greenblatt
" -namespace-as-project -comment-format="///;//;///" -classdir=projects -module="cppdoc-standard" -extensions=h -languages="c=cpp,cc=cpp,cpp=cpp,cs=csharp,cxx=cpp,h=cpp,hpp=cpp,hxx=cpp,java=java" -D"OS_WIN" -D"USING_CEF_SHARED" -D"__cplusplus" -D"CEF_STRING_TYPE_UTF16" -enable-author=false -enable-deprecations=true -enable-since=true -enable-version=false -file-links-for-globals=false -generate-deprecations-list=false -generate-hierarchy=true -header-background-dark="#ccccff" -header-background-light="#eeeeff" -include-private=false -include-protected=true -index-file-base=index -overview-html=overview.html -reduce-summary-font=true -selected-text-background=navy -selected-text-foreground=white -separate-index-pages=false -show-cppdoc-version=false -show-timestamp=false -summary-html=project.html -suppress-details=false -suppress-frames-links=false -table-background=white -wrap-long-lines=false ..\include #cef_runnable.h #cef_tuple.h #capi "..\docs\index.html" 16 | ) 17 | 18 | endlocal -------------------------------------------------------------------------------- /libcef/cef_process_io_thread.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Embedded Framework Authors. 2 | // Portions copyright (c) 2010 The Chromium Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE file. 5 | 6 | #ifndef CEF_LIBCEF_CEF_PROCESS_IO_THREAD_H_ 7 | #define CEF_LIBCEF_CEF_PROCESS_IO_THREAD_H_ 8 | #pragma once 9 | 10 | #include "libcef/browser_request_context.h" 11 | #include "libcef/cef_thread.h" 12 | 13 | #include "base/basictypes.h" 14 | 15 | namespace net { 16 | class NetworkDelegate; 17 | } 18 | 19 | // ---------------------------------------------------------------------------- 20 | // CefProcessIOThread 21 | // 22 | // This simple thread object is used for the specialized threads that the 23 | // CefProcess spins up. 24 | // 25 | // Applications must initialize the COM library before they can call 26 | // COM library functions other than CoGetMalloc and memory allocation 27 | // functions, so this class initializes COM for those users. 28 | class CefProcessIOThread : public CefThread { 29 | public: 30 | CefProcessIOThread(); 31 | explicit CefProcessIOThread(base::MessageLoop* message_loop); 32 | virtual ~CefProcessIOThread(); 33 | 34 | BrowserRequestContext* request_context() { return request_context_.get(); } 35 | 36 | protected: 37 | virtual void Init(); 38 | virtual void CleanUp(); 39 | 40 | scoped_ptr request_context_; 41 | scoped_ptr network_delegate_; 42 | 43 | DISALLOW_COPY_AND_ASSIGN(CefProcessIOThread); 44 | }; 45 | 46 | #endif // CEF_LIBCEF_CEF_PROCESS_IO_THREAD_H_ 47 | -------------------------------------------------------------------------------- /libcef_dll/ctocpp/find_handler_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 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/browser_cpptoc.h" 14 | #include "libcef_dll/ctocpp/find_handler_ctocpp.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefFindHandlerCToCpp::OnFindResult(CefRefPtr browser, 20 | int identifier, int count, const CefRect& selectionRect, 21 | int activeMatchOrdinal, bool finalUpdate) { 22 | if (CEF_MEMBER_MISSING(struct_, on_find_result)) 23 | return; 24 | 25 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 26 | 27 | // Verify param: browser; type: refptr_diff 28 | DCHECK(browser.get()); 29 | if (!browser.get()) 30 | return; 31 | 32 | // Execute 33 | struct_->on_find_result(struct_, 34 | CefBrowserCppToC::Wrap(browser), 35 | identifier, 36 | count, 37 | &selectionRect, 38 | activeMatchOrdinal, 39 | finalUpdate); 40 | } 41 | 42 | 43 | #ifndef NDEBUG 44 | template<> long CefCToCpp::DebugObjCt = 0; 46 | #endif 47 | 48 | --------------------------------------------------------------------------------