mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a00bca5aa5 | ||
|
0e8afa73ed | ||
|
45ce54393e | ||
|
8961cdbbb2 | ||
|
2b00258407 | ||
|
9738bf9a4a | ||
|
1cbaee4868 | ||
|
b821dc3532 | ||
|
50067f29ad | ||
|
37ed8b9b53 | ||
|
342bd43f4c | ||
|
695453b3df | ||
|
6f35d008bf | ||
|
b2e06a3503 | ||
|
4eb2da6aac | ||
|
ac129eb78e | ||
|
0d91c82102 | ||
|
444ce60075 | ||
|
56e2edd14d | ||
|
c862dcc51f | ||
|
7111d35d3c | ||
|
c1bc391357 |
432
BUILD.gn
432
BUILD.gn
@@ -96,7 +96,6 @@
|
||||
import("//base/allocator/allocator.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/locales.gni")
|
||||
import("//build/config/ozone.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
@@ -257,9 +256,6 @@ assert(enable_print_preview)
|
||||
# Enable support for Widevine CDM.
|
||||
assert(enable_widevine)
|
||||
|
||||
# Enable Views UI framework.
|
||||
assert(toolkit_views)
|
||||
|
||||
if (is_clang) {
|
||||
# Don't use the chrome style plugin.
|
||||
assert(!clang_use_chrome_plugins)
|
||||
@@ -310,7 +306,7 @@ group("cef") {
|
||||
":libcef_static_unittests",
|
||||
]
|
||||
|
||||
if (!is_linux || ozone_platform_x11) {
|
||||
if (!is_linux || use_x11) {
|
||||
deps += [ ":cefclient" ]
|
||||
}
|
||||
}
|
||||
@@ -414,6 +410,8 @@ static_library("libcef_static") {
|
||||
"libcef/browser/alloy/alloy_browser_main.h",
|
||||
"libcef/browser/alloy/alloy_content_browser_client.cc",
|
||||
"libcef/browser/alloy/alloy_content_browser_client.h",
|
||||
"libcef/browser/alloy/alloy_dialog_util.cc",
|
||||
"libcef/browser/alloy/alloy_dialog_util.h",
|
||||
"libcef/browser/alloy/alloy_download_util.cc",
|
||||
"libcef/browser/alloy/alloy_download_util.h",
|
||||
"libcef/browser/alloy/browser_platform_delegate_alloy.cc",
|
||||
@@ -470,22 +468,6 @@ static_library("libcef_static") {
|
||||
"libcef/browser/chrome_crash_reporter_client_stub.cc",
|
||||
"libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.cc",
|
||||
"libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.h",
|
||||
"libcef/browser/chrome/views/browser_platform_delegate_chrome_child_window.cc",
|
||||
"libcef/browser/chrome/views/browser_platform_delegate_chrome_child_window.h",
|
||||
"libcef/browser/chrome/views/browser_platform_delegate_chrome_views.cc",
|
||||
"libcef/browser/chrome/views/browser_platform_delegate_chrome_views.h",
|
||||
"libcef/browser/chrome/views/chrome_browser_frame.cc",
|
||||
"libcef/browser/chrome/views/chrome_browser_frame.h",
|
||||
"libcef/browser/chrome/views/chrome_browser_view.cc",
|
||||
"libcef/browser/chrome/views/chrome_browser_view.h",
|
||||
"libcef/browser/chrome/views/chrome_child_window.cc",
|
||||
"libcef/browser/chrome/views/chrome_child_window.h",
|
||||
"libcef/browser/chrome/views/chrome_views_util.cc",
|
||||
"libcef/browser/chrome/views/chrome_views_util.h",
|
||||
"libcef/browser/chrome/views/toolbar_view_impl.cc",
|
||||
"libcef/browser/chrome/views/toolbar_view_impl.h",
|
||||
"libcef/browser/chrome/views/toolbar_view_view.cc",
|
||||
"libcef/browser/chrome/views/toolbar_view_view.h",
|
||||
"libcef/browser/context.cc",
|
||||
"libcef/browser/context.h",
|
||||
"libcef/browser/context_menu_params_impl.cc",
|
||||
@@ -506,8 +488,6 @@ static_library("libcef_static") {
|
||||
"libcef/browser/download_manager_delegate.h",
|
||||
"libcef/browser/extension_impl.cc",
|
||||
"libcef/browser/extension_impl.h",
|
||||
"libcef/browser/extensions/api/file_system/cef_file_system_delegate.cc",
|
||||
"libcef/browser/extensions/api/file_system/cef_file_system_delegate.h",
|
||||
"libcef/browser/extensions/api/storage/sync_value_store_cache.cc",
|
||||
"libcef/browser/extensions/api/storage/sync_value_store_cache.h",
|
||||
"libcef/browser/extensions/api/tabs/tabs_api.cc",
|
||||
@@ -544,14 +524,15 @@ static_library("libcef_static") {
|
||||
"libcef/browser/extensions/extension_web_contents_observer.h",
|
||||
"libcef/browser/extensions/mime_handler_view_guest_delegate.cc",
|
||||
"libcef/browser/extensions/mime_handler_view_guest_delegate.h",
|
||||
"libcef/browser/extensions/pdf_web_contents_helper_client.cc",
|
||||
"libcef/browser/extensions/pdf_web_contents_helper_client.h",
|
||||
"libcef/browser/extensions/value_store/cef_value_store.cc",
|
||||
"libcef/browser/extensions/value_store/cef_value_store.h",
|
||||
"libcef/browser/extensions/value_store/cef_value_store_factory.cc",
|
||||
"libcef/browser/extensions/value_store/cef_value_store_factory.h",
|
||||
"libcef/browser/file_dialog_runner.h",
|
||||
"libcef/browser/file_dialog_manager.cc",
|
||||
"libcef/browser/file_dialog_manager.h",
|
||||
"libcef/browser/file_dialog_runner.cc",
|
||||
"libcef/browser/file_dialog_runner.h",
|
||||
"libcef/browser/frame_host_impl.cc",
|
||||
"libcef/browser/frame_host_impl.h",
|
||||
"libcef/browser/frame_service_base.h",
|
||||
@@ -585,8 +566,6 @@ static_library("libcef_static") {
|
||||
"libcef/browser/native/browser_platform_delegate_native.h",
|
||||
"libcef/browser/native/cursor_util.h",
|
||||
"libcef/browser/native/cursor_util.cc",
|
||||
"libcef/browser/native/window_delegate_view.cc",
|
||||
"libcef/browser/native/window_delegate_view.h",
|
||||
"libcef/browser/navigation_entry_impl.cc",
|
||||
"libcef/browser/navigation_entry_impl.h",
|
||||
"libcef/browser/net/chrome_scheme_handler.cc",
|
||||
@@ -677,65 +656,10 @@ static_library("libcef_static") {
|
||||
"libcef/browser/trace_subscriber.cc",
|
||||
"libcef/browser/trace_subscriber.h",
|
||||
"libcef/browser/thread_util.h",
|
||||
"libcef/browser/views/basic_label_button_impl.cc",
|
||||
"libcef/browser/views/basic_label_button_impl.h",
|
||||
"libcef/browser/views/basic_label_button_view.cc",
|
||||
"libcef/browser/views/basic_label_button_view.h",
|
||||
"libcef/browser/views/basic_panel_impl.cc",
|
||||
"libcef/browser/views/basic_panel_impl.h",
|
||||
"libcef/browser/views/basic_panel_view.cc",
|
||||
"libcef/browser/views/basic_panel_view.h",
|
||||
"libcef/browser/views/box_layout_impl.cc",
|
||||
"libcef/browser/views/box_layout_impl.h",
|
||||
"libcef/browser/views/browser_platform_delegate_views.cc",
|
||||
"libcef/browser/views/browser_platform_delegate_views.h",
|
||||
"libcef/browser/views/browser_view_impl.cc",
|
||||
"libcef/browser/views/browser_view_impl.h",
|
||||
"libcef/browser/views/browser_view_view.cc",
|
||||
"libcef/browser/views/browser_view_view.h",
|
||||
"libcef/browser/views/button_impl.h",
|
||||
"libcef/browser/views/button_view.h",
|
||||
"libcef/browser/views/display_impl.cc",
|
||||
"libcef/browser/views/display_impl.h",
|
||||
"libcef/browser/views/fill_layout_impl.cc",
|
||||
"libcef/browser/views/fill_layout_impl.h",
|
||||
"libcef/browser/views/label_button_impl.h",
|
||||
"libcef/browser/views/label_button_view.h",
|
||||
"libcef/browser/views/layout_impl.h",
|
||||
"libcef/browser/views/layout_adapter.cc",
|
||||
"libcef/browser/views/layout_adapter.h",
|
||||
"libcef/browser/views/layout_util.cc",
|
||||
"libcef/browser/views/layout_util.h",
|
||||
"libcef/browser/views/menu_button_impl.cc",
|
||||
"libcef/browser/views/menu_button_impl.h",
|
||||
"libcef/browser/views/menu_button_view.cc",
|
||||
"libcef/browser/views/menu_button_view.h",
|
||||
"libcef/browser/views/menu_runner_views.cc",
|
||||
"libcef/browser/views/menu_runner_views.h",
|
||||
"libcef/browser/views/overlay_view_host.cc",
|
||||
"libcef/browser/views/overlay_view_host.h",
|
||||
"libcef/browser/views/panel_impl.h",
|
||||
"libcef/browser/views/panel_view.h",
|
||||
"libcef/browser/views/scroll_view_impl.cc",
|
||||
"libcef/browser/views/scroll_view_impl.h",
|
||||
"libcef/browser/views/scroll_view_view.cc",
|
||||
"libcef/browser/views/scroll_view_view.h",
|
||||
"libcef/browser/views/textfield_impl.cc",
|
||||
"libcef/browser/views/textfield_impl.h",
|
||||
"libcef/browser/views/textfield_view.cc",
|
||||
"libcef/browser/views/textfield_view.h",
|
||||
"libcef/browser/views/view_adapter.cc",
|
||||
"libcef/browser/views/view_adapter.h",
|
||||
"libcef/browser/views/view_impl.h",
|
||||
"libcef/browser/views/view_util.cc",
|
||||
"libcef/browser/views/view_util.h",
|
||||
"libcef/browser/views/view_view.h",
|
||||
"libcef/browser/views/window_impl.cc",
|
||||
"libcef/browser/views/window_impl.h",
|
||||
"libcef/browser/views/window_view.cc",
|
||||
"libcef/browser/views/window_view.h",
|
||||
"libcef/browser/web_contents_dialog_helper.cc",
|
||||
"libcef/browser/web_contents_dialog_helper.h",
|
||||
"libcef/browser/web_plugin_impl.cc",
|
||||
"libcef/browser/web_plugin_impl.h",
|
||||
"libcef/browser/x509_certificate_impl.cc",
|
||||
"libcef/browser/x509_certificate_impl.h",
|
||||
"libcef/browser/x509_cert_principal_impl.cc",
|
||||
@@ -873,14 +797,6 @@ static_library("libcef_static") {
|
||||
# For Chrome runtime support.
|
||||
"//chrome/app/chrome_main_delegate.cc",
|
||||
"//chrome/app/chrome_main_delegate.h",
|
||||
|
||||
# Part of //ui/views:test_support which is testingonly.
|
||||
"//ui/views/test/desktop_test_views_delegate.h",
|
||||
"//ui/views/test/test_views_delegate.h",
|
||||
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/base/test/ui_controls.h",
|
||||
]
|
||||
|
||||
configs += [
|
||||
@@ -920,7 +836,8 @@ static_library("libcef_static") {
|
||||
"//base:base_static",
|
||||
"//base/third_party/dynamic_annotations",
|
||||
"//cc",
|
||||
"//chrome:dependencies",
|
||||
"//chrome:browser_dependencies",
|
||||
"//chrome:child_dependencies",
|
||||
"//chrome:packed_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -932,6 +849,7 @@ static_library("libcef_static") {
|
||||
"//components/content_settings/core/browser",
|
||||
"//components/content_settings/core/common",
|
||||
"//components/crx_file",
|
||||
"//components/data_use_measurement/core",
|
||||
"//components/google/core/common",
|
||||
"//components/keyed_service/content:content",
|
||||
"//components/keyed_service/core:core",
|
||||
@@ -987,7 +905,6 @@ static_library("libcef_static") {
|
||||
"//third_party/blink/public:blink",
|
||||
"//third_party/brotli:dec",
|
||||
"//third_party/cld_3/src/src:cld_3",
|
||||
"//third_party/crashpad/crashpad/handler",
|
||||
"//third_party/hunspell",
|
||||
"//third_party/leveldatabase",
|
||||
"//third_party/libxml:libxml",
|
||||
@@ -997,7 +914,6 @@ static_library("libcef_static") {
|
||||
"//third_party/zlib:minizip",
|
||||
"//ui/base",
|
||||
"//ui/base/ime",
|
||||
"//ui/events",
|
||||
"//ui/events:events_base",
|
||||
"//ui/gfx",
|
||||
"//ui/gfx/geometry",
|
||||
@@ -1005,9 +921,6 @@ static_library("libcef_static") {
|
||||
"//ui/gfx/ipc/geometry",
|
||||
"//ui/gfx/ipc/skia",
|
||||
"//ui/gl",
|
||||
"//ui/strings",
|
||||
"//ui/views",
|
||||
"//ui/views/controls/webview",
|
||||
"//url",
|
||||
"//v8",
|
||||
]
|
||||
@@ -1018,6 +931,8 @@ static_library("libcef_static") {
|
||||
"libcef/browser/native/browser_platform_delegate_native_win.cc",
|
||||
"libcef/browser/native/browser_platform_delegate_native_win.h",
|
||||
"libcef/browser/native/cursor_util_win.cc",
|
||||
"libcef/browser/native/file_dialog_runner_win.cc",
|
||||
"libcef/browser/native/file_dialog_runner_win.h",
|
||||
"libcef/browser/native/javascript_dialog_runner_win.cc",
|
||||
"libcef/browser/native/javascript_dialog_runner_win.h",
|
||||
"libcef/browser/native/menu_2.cc",
|
||||
@@ -1029,6 +944,10 @@ static_library("libcef_static") {
|
||||
"libcef/browser/native/native_menu_win.h",
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
|
||||
|
||||
# Part of //chrome/utility.
|
||||
"//chrome/utility/printing_handler.cc",
|
||||
"//chrome/utility/printing_handler.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
@@ -1062,11 +981,9 @@ static_library("libcef_static") {
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_linux.h",
|
||||
"libcef/browser/printing/print_dialog_linux.cc",
|
||||
"libcef/browser/printing/print_dialog_linux.h",
|
||||
"libcef/common/util_linux.h",
|
||||
"libcef/common/util_linux.cc",
|
||||
]
|
||||
|
||||
if (ozone_platform_x11) {
|
||||
if (use_x11) {
|
||||
sources += [
|
||||
"libcef/browser/native/window_x11.cc",
|
||||
"libcef/browser/native/window_x11.h",
|
||||
@@ -1078,7 +995,7 @@ static_library("libcef_static") {
|
||||
"//third_party/fontconfig",
|
||||
]
|
||||
|
||||
if (is_linux && !ozone_platform_x11) {
|
||||
if (is_linux && !use_x11) {
|
||||
deps += [
|
||||
"//third_party/angle:libEGL",
|
||||
]
|
||||
@@ -1089,126 +1006,245 @@ static_library("libcef_static") {
|
||||
sources += includes_mac + [
|
||||
"libcef/browser/native/browser_platform_delegate_native_mac.h",
|
||||
"libcef/browser/native/browser_platform_delegate_native_mac.mm",
|
||||
"libcef/browser/native/file_dialog_runner_mac.h",
|
||||
"libcef/browser/native/file_dialog_runner_mac.mm",
|
||||
"libcef/browser/native/javascript_dialog_runner_mac.h",
|
||||
"libcef/browser/native/javascript_dialog_runner_mac.mm",
|
||||
"libcef/browser/native/menu_runner_mac.h",
|
||||
"libcef/browser/native/menu_runner_mac.mm",
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_mac.h",
|
||||
"libcef/browser/osr/browser_platform_delegate_osr_mac.mm",
|
||||
"libcef/browser/views/view_util_mac.mm",
|
||||
"libcef/common/util_mac.h",
|
||||
"libcef/common/util_mac.mm",
|
||||
|
||||
# For Chrome runtime support.
|
||||
"//chrome/app/chrome_main_mac.h",
|
||||
"//chrome/app/chrome_main_mac.mm",
|
||||
|
||||
# Part of //ui/views:test_support which is testingonly.
|
||||
"//ui/views/test/desktop_test_views_delegate_mac.mm",
|
||||
"//ui/views/test/test_views_delegate_mac.mm",
|
||||
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/base/test/ui_controls_mac.mm",
|
||||
# Part of //ui//events:test_support which is testingonly.
|
||||
"//ui/events/test/cocoa_test_event_utils.mm",
|
||||
]
|
||||
}
|
||||
|
||||
if (ozone_platform_x11) {
|
||||
if (is_win || is_mac) {
|
||||
deps += [ "//third_party/crashpad/crashpad/handler" ]
|
||||
}
|
||||
|
||||
if (use_x11) {
|
||||
deps += [ "//ui/events/devices/x11" ]
|
||||
}
|
||||
|
||||
if (is_posix && !is_mac) {
|
||||
sources += [
|
||||
"libcef/common/cef_crash_report_utils.cc",
|
||||
"libcef/common/cef_crash_report_utils.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//components/crash/core/app",
|
||||
"//components/crash/content/browser",
|
||||
]
|
||||
}
|
||||
|
||||
if (v8_use_external_startup_data && use_v8_context_snapshot) {
|
||||
deps += [ "//tools/v8_context_snapshot" ]
|
||||
}
|
||||
|
||||
if (use_aura) {
|
||||
if (toolkit_views) {
|
||||
sources += [
|
||||
"libcef/browser/native/browser_platform_delegate_native_aura.cc",
|
||||
"libcef/browser/native/browser_platform_delegate_native_aura.h",
|
||||
"libcef/browser/views/view_util_aura.cc",
|
||||
"libcef/browser/chrome/views/browser_platform_delegate_chrome_views.cc",
|
||||
"libcef/browser/chrome/views/browser_platform_delegate_chrome_views.h",
|
||||
"libcef/browser/chrome/views/chrome_browser_frame.cc",
|
||||
"libcef/browser/chrome/views/chrome_browser_frame.h",
|
||||
"libcef/browser/chrome/views/chrome_browser_view.cc",
|
||||
"libcef/browser/chrome/views/chrome_browser_view.h",
|
||||
"libcef/browser/chrome/views/chrome_views_util.cc",
|
||||
"libcef/browser/chrome/views/chrome_views_util.h",
|
||||
"libcef/browser/chrome/views/toolbar_view_impl.cc",
|
||||
"libcef/browser/chrome/views/toolbar_view_impl.h",
|
||||
"libcef/browser/chrome/views/toolbar_view_view.cc",
|
||||
"libcef/browser/chrome/views/toolbar_view_view.h",
|
||||
"libcef/browser/native/window_delegate_view.cc",
|
||||
"libcef/browser/native/window_delegate_view.h",
|
||||
"libcef/browser/views/basic_label_button_impl.cc",
|
||||
"libcef/browser/views/basic_label_button_impl.h",
|
||||
"libcef/browser/views/basic_label_button_view.cc",
|
||||
"libcef/browser/views/basic_label_button_view.h",
|
||||
"libcef/browser/views/basic_panel_impl.cc",
|
||||
"libcef/browser/views/basic_panel_impl.h",
|
||||
"libcef/browser/views/basic_panel_view.cc",
|
||||
"libcef/browser/views/basic_panel_view.h",
|
||||
"libcef/browser/views/box_layout_impl.cc",
|
||||
"libcef/browser/views/box_layout_impl.h",
|
||||
"libcef/browser/views/browser_platform_delegate_views.cc",
|
||||
"libcef/browser/views/browser_platform_delegate_views.h",
|
||||
"libcef/browser/views/browser_view_impl.cc",
|
||||
"libcef/browser/views/browser_view_impl.h",
|
||||
"libcef/browser/views/browser_view_view.cc",
|
||||
"libcef/browser/views/browser_view_view.h",
|
||||
"libcef/browser/views/button_impl.h",
|
||||
"libcef/browser/views/button_view.h",
|
||||
"libcef/browser/views/display_impl.cc",
|
||||
"libcef/browser/views/display_impl.h",
|
||||
"libcef/browser/views/fill_layout_impl.cc",
|
||||
"libcef/browser/views/fill_layout_impl.h",
|
||||
"libcef/browser/views/label_button_impl.h",
|
||||
"libcef/browser/views/label_button_view.h",
|
||||
"libcef/browser/views/layout_impl.h",
|
||||
"libcef/browser/views/layout_adapter.cc",
|
||||
"libcef/browser/views/layout_adapter.h",
|
||||
"libcef/browser/views/layout_util.cc",
|
||||
"libcef/browser/views/layout_util.h",
|
||||
"libcef/browser/views/menu_button_impl.cc",
|
||||
"libcef/browser/views/menu_button_impl.h",
|
||||
"libcef/browser/views/menu_button_view.cc",
|
||||
"libcef/browser/views/menu_button_view.h",
|
||||
"libcef/browser/views/menu_runner_views.cc",
|
||||
"libcef/browser/views/menu_runner_views.h",
|
||||
"libcef/browser/views/overlay_view_host.cc",
|
||||
"libcef/browser/views/overlay_view_host.h",
|
||||
"libcef/browser/views/panel_impl.h",
|
||||
"libcef/browser/views/panel_view.h",
|
||||
"libcef/browser/views/scroll_view_impl.cc",
|
||||
"libcef/browser/views/scroll_view_impl.h",
|
||||
"libcef/browser/views/scroll_view_view.cc",
|
||||
"libcef/browser/views/scroll_view_view.h",
|
||||
"libcef/browser/views/textfield_impl.cc",
|
||||
"libcef/browser/views/textfield_impl.h",
|
||||
"libcef/browser/views/textfield_view.cc",
|
||||
"libcef/browser/views/textfield_view.h",
|
||||
"libcef/browser/views/view_adapter.cc",
|
||||
"libcef/browser/views/view_adapter.h",
|
||||
"libcef/browser/views/view_impl.h",
|
||||
"libcef/browser/views/view_util.cc",
|
||||
"libcef/browser/views/view_util.h",
|
||||
"libcef/browser/views/view_view.h",
|
||||
"libcef/browser/views/window_impl.cc",
|
||||
"libcef/browser/views/window_impl.h",
|
||||
"libcef/browser/views/window_view.cc",
|
||||
"libcef/browser/views/window_view.h",
|
||||
|
||||
# Part of //ui/views:test_support which is testingonly.
|
||||
"//ui/views/test/desktop_test_views_delegate_aura.cc",
|
||||
"//ui/views/test/test_views_delegate_aura.cc",
|
||||
"//ui/views/test/desktop_test_views_delegate.h",
|
||||
"//ui/views/test/test_views_delegate.h",
|
||||
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/base/test/ui_controls_aura.cc",
|
||||
"//ui/aura/test/ui_controls_factory_aura.h",
|
||||
"//ui/base/test/ui_controls.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//ui/aura",
|
||||
"//ui/wm",
|
||||
"//ui/wm/public",
|
||||
"//ui/events",
|
||||
"//ui/strings",
|
||||
"//ui/views",
|
||||
"//ui/views/controls/webview",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
if (use_aura) {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
# Part of //base/test:test_config which is testingonly.
|
||||
"//base/test/test_switches.cc",
|
||||
"//base/test/test_switches.h",
|
||||
"//base/test/test_timeouts.cc",
|
||||
"//base/test/test_timeouts.h",
|
||||
# Part of //ui/aura:test_support which is testingonly.
|
||||
"//ui/aura/test/ui_controls_factory_aurawin.cc",
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/base/test/ui_controls_internal_win.cc",
|
||||
"//ui/base/test/ui_controls_internal_win.h",
|
||||
]
|
||||
}
|
||||
"libcef/browser/native/browser_platform_delegate_native_aura.cc",
|
||||
"libcef/browser/native/browser_platform_delegate_native_aura.h",
|
||||
"libcef/browser/views/view_util_aura.cc",
|
||||
|
||||
if (is_linux) {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
# Part of //ui/aura:test_support which is testingonly.
|
||||
"//ui/aura/test/aura_test_utils.cc",
|
||||
"//ui/aura/test/aura_test_utils.h",
|
||||
# Part of //ui/events:test_support which is testingonly.
|
||||
"//ui/events/test/x11_event_waiter.cc",
|
||||
"//ui/events/test/x11_event_waiter.h",
|
||||
# Part of //ui/ozone::ui_test_support which is testingonly.
|
||||
"//ui/ozone/common/test/stub_ozone_ui_controls_test_helper.cc",
|
||||
"//ui/ozone/common/test/stub_ozone_ui_controls_test_helper.h",
|
||||
"//ui/ozone/public/ozone_ui_controls_test_helper.cc",
|
||||
"//ui/ozone/public/ozone_ui_controls_test_helper.h",
|
||||
"$root_gen_dir/ui/ozone/test_constructor_list.cc",
|
||||
# Part of //ui/views:test_support which is testingonly.
|
||||
"//ui/views/test/test_desktop_screen_ozone.cc",
|
||||
"//ui/views/test/test_desktop_screen_ozone.h",
|
||||
"//ui/views/test/ui_controls_factory_desktop_aura_ozone.cc",
|
||||
"//ui/views/test/ui_controls_factory_desktop_aura_ozone.h",
|
||||
"//ui/views/test/desktop_test_views_delegate_aura.cc",
|
||||
"//ui/views/test/test_views_delegate_aura.cc",
|
||||
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/base/test/ui_controls_aura.cc",
|
||||
"//ui/aura/test/ui_controls_factory_aura.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//ui/ozone:generate_test_support_constructor_list",
|
||||
"//ui/aura",
|
||||
"//ui/wm",
|
||||
"//ui/wm/public",
|
||||
]
|
||||
|
||||
if (ozone_platform_x11) {
|
||||
if (is_win) {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base/x:test_support which is testingonly.
|
||||
"//ui/base/x/test/x11_ui_controls_test_helper.cc",
|
||||
"//ui/base/x/test/x11_ui_controls_test_helper.h",
|
||||
# Part of //base/test:test_config which is testingonly.
|
||||
"//base/test/test_switches.cc",
|
||||
"//base/test/test_switches.h",
|
||||
"//base/test/test_timeouts.cc",
|
||||
"//base/test/test_timeouts.h",
|
||||
# Part of //ui/aura:test_support which is testingonly.
|
||||
"//ui/aura/test/x11_event_sender.h",
|
||||
# Part of //ui/ozone/platform/x11:test_support which is testingonly.
|
||||
"//ui/ozone/platform/x11/x11_ozone_ui_controls_test_helper.cc",
|
||||
"//ui/ozone/platform/x11/x11_ozone_ui_controls_test_helper.h",
|
||||
]
|
||||
} else {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
"//ui/aura/test/ui_controls_factory_aurawin.cc",
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/aura/test/ui_controls_factory_ozone.cc",
|
||||
# Part of //ui//events:test_support which is testingonly.
|
||||
"//ui/events/test/events_test_utils.cc"
|
||||
"//ui/base/test/ui_controls_internal_win.cc",
|
||||
"//ui/base/test/ui_controls_internal_win.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
# Part of //ui/aura:test_support which is testingonly.
|
||||
"//ui/aura/test/aura_test_utils.cc",
|
||||
"//ui/aura/test/aura_test_utils.h",
|
||||
# Part of //ui/events:test_support which is testingonly.
|
||||
"//ui/events/test/x11_event_waiter.cc",
|
||||
"//ui/events/test/x11_event_waiter.h",
|
||||
# Part of //ui/ozone::ui_test_support which is testingonly.
|
||||
"//ui/ozone/common/test/stub_ozone_ui_controls_test_helper.cc",
|
||||
"//ui/ozone/common/test/stub_ozone_ui_controls_test_helper.h",
|
||||
"//ui/ozone/public/ozone_ui_controls_test_helper.cc",
|
||||
"//ui/ozone/public/ozone_ui_controls_test_helper.h",
|
||||
"$root_gen_dir/ui/ozone/test_constructor_list.cc",
|
||||
# Part of //ui/views:test_support which is testingonly.
|
||||
"//ui/views/test/test_desktop_screen_ozone.cc",
|
||||
"//ui/views/test/test_desktop_screen_ozone.h",
|
||||
"//ui/views/test/ui_controls_factory_desktop_aura_ozone.cc",
|
||||
"//ui/views/test/ui_controls_factory_desktop_aura_ozone.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//ui/ozone:generate_test_support_constructor_list",
|
||||
]
|
||||
|
||||
if (use_x11) {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base/x:test_support which is testingonly.
|
||||
"//ui/base/x/test/x11_ui_controls_test_helper.cc",
|
||||
"//ui/base/x/test/x11_ui_controls_test_helper.h",
|
||||
# Part of //ui/aura:test_support which is testingonly.
|
||||
"//ui/aura/test/x11_event_sender.h",
|
||||
# Part of //ui/ozone/platform/x11:test_support which is testingonly.
|
||||
"//ui/ozone/platform/x11/x11_ozone_ui_controls_test_helper.cc",
|
||||
"//ui/ozone/platform/x11/x11_ozone_ui_controls_test_helper.h",
|
||||
]
|
||||
} else {
|
||||
sources += [
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/aura/test/ui_controls_factory_ozone.cc",
|
||||
# Part of //ui//events:test_support which is testingonly.
|
||||
"//ui/events/test/events_test_utils.cc"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
sources += [
|
||||
"libcef/browser/views/view_util_mac.mm",
|
||||
|
||||
# Part of //ui/views:test_support which is testingonly.
|
||||
"//ui/views/test/desktop_test_views_delegate_mac.mm",
|
||||
"//ui/views/test/test_views_delegate_mac.mm",
|
||||
|
||||
# Support for UI input events.
|
||||
# Part of //ui/base:test_support which is testingonly.
|
||||
"//ui/base/test/ui_controls_mac.mm",
|
||||
# Part of //ui//events:test_support which is testingonly.
|
||||
"//ui/events/test/cocoa_test_event_utils.mm",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
sources += [
|
||||
# Provides stub implementations for the views static methods.
|
||||
"libcef_dll/views_stub.cc",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1260,8 +1296,6 @@ static_library("libcef_dll_wrapper") {
|
||||
|
||||
configs += [ ":libcef_dll_wrapper_config" ]
|
||||
public_configs = [ ":libcef_dll_wrapper_config" ]
|
||||
|
||||
deps = [ ":cef_make_headers" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -1300,7 +1334,7 @@ grit("cef_strings") {
|
||||
outputs = [
|
||||
"grit/cef_strings.h",
|
||||
]
|
||||
all_locales = platform_pak_locales + [ "fake-bidi" ]
|
||||
all_locales = locales + [ "fake-bidi" ]
|
||||
foreach(locale, all_locales) {
|
||||
outputs += [ "cef_strings_${locale}.pak" ]
|
||||
}
|
||||
@@ -1323,6 +1357,7 @@ grit("cef_resources") {
|
||||
template("make_pack_header") {
|
||||
assert(defined(invoker.header))
|
||||
assert(defined(invoker.inputs))
|
||||
assert(defined(invoker.deps))
|
||||
|
||||
action("make_pack_header_${target_name}") {
|
||||
script = "tools/make_pack_header.py"
|
||||
@@ -1333,9 +1368,7 @@ template("make_pack_header") {
|
||||
args = rebase_path(outputs, root_build_dir) +
|
||||
rebase_path(inputs, root_build_dir)
|
||||
|
||||
if (defined(invoker.deps)) {
|
||||
deps = invoker.deps
|
||||
}
|
||||
deps = invoker.deps
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1349,7 +1382,6 @@ make_pack_header("resources") {
|
||||
"$root_gen_dir/chrome/grit/common_resources.h",
|
||||
"$root_gen_dir/chrome/grit/component_extension_resources.h",
|
||||
"$root_gen_dir/chrome/grit/dev_ui_browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/pdf_resources.h",
|
||||
"$root_gen_dir/chrome/grit/renderer_resources.h",
|
||||
"$root_gen_dir/components/grit/components_resources.h",
|
||||
"$root_gen_dir/components/grit/dev_ui_components_resources.h",
|
||||
@@ -1366,7 +1398,7 @@ make_pack_header("resources") {
|
||||
"$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/ui_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/webui_generated_resources.h",
|
||||
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/webui_resources.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
@@ -1375,7 +1407,6 @@ make_pack_header("resources") {
|
||||
"//chrome/browser:dev_ui_browser_resources",
|
||||
"//chrome/browser:resources",
|
||||
"//chrome/browser/resources:component_extension_resources",
|
||||
"//chrome/browser/resources/pdf:resources",
|
||||
"//chrome/common:resources",
|
||||
"//chrome/renderer:resources",
|
||||
"//components/resources:components_resources",
|
||||
@@ -1393,8 +1424,13 @@ make_pack_header("resources") {
|
||||
"//third_party/blink/public:resources",
|
||||
"//ui/resources:ui_resources_grd",
|
||||
"//ui/resources:webui_generated_resources_grd",
|
||||
"//ui/views/resources:resources_grd",
|
||||
"//ui/resources:webui_resources_grd",
|
||||
]
|
||||
|
||||
if (toolkit_views) {
|
||||
inputs += [ "$root_gen_dir/ui/views/resources/grit/views_resources.h" ]
|
||||
deps += [ "//ui/views/resources:resources_grd" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Generate cef_pack_strings.h.
|
||||
@@ -1411,7 +1447,6 @@ make_pack_header("strings") {
|
||||
"$root_gen_dir/components/strings/grit/components_strings.h",
|
||||
"$root_gen_dir/extensions/strings/grit/extensions_strings.h",
|
||||
"$root_gen_dir/services/strings/grit/services_strings.h",
|
||||
"$root_gen_dir/third_party/blink/public/strings/grit/blink_accessibility_strings.h",
|
||||
"$root_gen_dir/third_party/blink/public/strings/grit/blink_strings.h",
|
||||
"$root_gen_dir/ui/strings/grit/ui_strings.h",
|
||||
]
|
||||
@@ -1429,20 +1464,11 @@ make_pack_header("strings") {
|
||||
"//extensions/strings",
|
||||
"//services/strings",
|
||||
"//third_party/blink/public/strings",
|
||||
"//third_party/blink/public/strings:accessibility_strings",
|
||||
"//ui/strings:app_locale_settings",
|
||||
"//ui/strings:ui_strings",
|
||||
]
|
||||
}
|
||||
|
||||
# Generate cef_command_ids.h.
|
||||
make_pack_header("command_ids") {
|
||||
header = "$root_out_dir/includes/include/cef_command_ids.h"
|
||||
inputs = [
|
||||
"//chrome/app/chrome_command_ids.h",
|
||||
]
|
||||
}
|
||||
|
||||
# Generate cef_api_hash.h.
|
||||
action("make_api_hash_header") {
|
||||
script = "tools/make_api_hash_header.py"
|
||||
@@ -1460,23 +1486,12 @@ action("make_api_hash_header") {
|
||||
args = rebase_path(outputs + include_dir, root_build_dir)
|
||||
}
|
||||
|
||||
# Generate cef_config.h.
|
||||
action("make_config_header") {
|
||||
script = "tools/make_config_header.py"
|
||||
|
||||
outputs = [ "$root_out_dir/includes/include/cef_config.h" ]
|
||||
|
||||
args = rebase_path(outputs + [ "$root_out_dir/args.gn" ], root_build_dir)
|
||||
}
|
||||
|
||||
# Generate pack files and associated CEF header files.
|
||||
group("cef_make_headers") {
|
||||
deps = [
|
||||
":make_pack_header_resources",
|
||||
":make_pack_header_strings",
|
||||
":make_pack_header_command_ids",
|
||||
":make_api_hash_header",
|
||||
":make_config_header",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1544,6 +1559,8 @@ if (is_mac) {
|
||||
# Add the SwiftShader .dylibs in the MODULE_DIR of the Framework app bundle.
|
||||
bundle_data("cef_framework_swiftshader_binaries") {
|
||||
sources = [
|
||||
"$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib",
|
||||
"$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib",
|
||||
"$root_out_dir/vk_intermediates/libvk_swiftshader.dylib",
|
||||
"$root_out_dir/vk_intermediates/vk_swiftshader_icd.json",
|
||||
]
|
||||
@@ -1551,6 +1568,7 @@ if (is_mac) {
|
||||
"{{bundle_contents_dir}}/Libraries/{{source_file_part}}",
|
||||
]
|
||||
public_deps = [
|
||||
"//ui/gl:swiftshader_egl_library_copy",
|
||||
"//ui/gl:swiftshader_vk_library_copy",
|
||||
]
|
||||
}
|
||||
@@ -2231,7 +2249,7 @@ if (is_mac) {
|
||||
sources += includes_linux +
|
||||
gypi_paths2.cefsimple_sources_linux
|
||||
|
||||
if (ozone_platform_x11) {
|
||||
if (use_x11) {
|
||||
libs = [
|
||||
"X11",
|
||||
]
|
||||
@@ -2291,7 +2309,7 @@ if (is_mac) {
|
||||
sources += gypi_paths2.shared_sources_linux +
|
||||
gypi_paths2.ceftests_sources_linux
|
||||
|
||||
if (ozone_platform_x11) {
|
||||
if (use_x11) {
|
||||
libs = [
|
||||
"X11",
|
||||
]
|
||||
|
@@ -7,6 +7,6 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/102.0.5005.115',
|
||||
'depot_tools_checkout': '583ca66091'
|
||||
'chromium_checkout': 'refs/tags/97.0.4692.99',
|
||||
'depot_tools_checkout': 'f7b8f8f3cd'
|
||||
}
|
||||
|
12
README.md
12
README.md
@@ -45,11 +45,15 @@ The base CEF framework includes support for the C and C++ programming languages.
|
||||
|
||||
* .Net (CEF3) - https://github.com/cefsharp/CefSharp
|
||||
* .Net (CEF1) - https://bitbucket.org/fddima/cefglue
|
||||
* .Net/Mono (CEF3) - https://gitlab.com/xiliumhq/chromiumembedded/cefglue
|
||||
* Delphi - https://github.com/hgourvest/dcef3
|
||||
* Delphi - https://github.com/salvadordf/CEF4Delphi
|
||||
* .Net/Mono (CEF3) - https://bitbucket.org/xilium/xilium.cefglue
|
||||
* .Net (CEF3) - https://bitbucket.org/chromiumfx/chromiumfx
|
||||
* Delphi (CEF1) - http://code.google.com/p/delphichromiumembedded/
|
||||
* Delphi (CEF3) - https://github.com/hgourvest/dcef3
|
||||
* Delphi (CEF3) - https://github.com/salvadordf/CEF4Delphi
|
||||
* Go - https://github.com/richardwilkes/cef
|
||||
* Go - https://github.com/CzarekTomczak/cef2go
|
||||
* Java - https://bitbucket.org/chromiumembedded/java-cef
|
||||
* Java - http://code.google.com/p/javacef/
|
||||
* Python - http://code.google.com/p/cefpython/
|
||||
|
||||
If you're the maintainer of a project not listed above and would like your project listed here please either post to the [CEF Forum](http://www.magpcss.org/ceforum/) or contact Marshall directly.
|
||||
@@ -78,6 +82,6 @@ If you would like to contribute source code changes to CEF please follow the bel
|
||||
\- Submit a [pull request](https://bitbucket.org/chromiumembedded/cef/wiki/ContributingWithGit) or create a patch with your changes and attach it to the CEF issue. Changes should:
|
||||
|
||||
* Be submitted against the current [CEF master branch](https://bitbucket.org/chromiumembedded/cef/src/?at=master) unless explicitly fixing a bug in a CEF release branch.
|
||||
* Follow the style of existing CEF source files. In general CEF uses the [Chromium C++ style guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md).
|
||||
* Follow the style of existing CEF source files. In general CEF uses the [Chromium coding style](http://www.chromium.org/developers/coding-style).
|
||||
* Include new or modified unit tests as appropriate to the functionality.
|
||||
* Not include unnecessary or unrelated changes.
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
python3 tools/gclient_hook.py
|
||||
python tools/gclient_hook.py
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# by hand. See the translator.README.txt file in the tools directory for
|
||||
# more information.
|
||||
#
|
||||
# $hash=5f2e9bf79ec768c0eb978ff5e1dd0178701dcc21$
|
||||
# $hash=872dedb7e5a2f36745446c3d0c9ad8bd5850adb7$
|
||||
#
|
||||
|
||||
{
|
||||
@@ -22,7 +22,6 @@
|
||||
'include/cef_browser_process_handler.h',
|
||||
'include/cef_callback.h',
|
||||
'include/cef_client.h',
|
||||
'include/cef_command_handler.h',
|
||||
'include/cef_command_line.h',
|
||||
'include/cef_context_menu_handler.h',
|
||||
'include/cef_cookie.h',
|
||||
@@ -85,6 +84,7 @@
|
||||
'include/cef_v8.h',
|
||||
'include/cef_values.h',
|
||||
'include/cef_waitable_event.h',
|
||||
'include/cef_web_plugin.h',
|
||||
'include/cef_x509_certificate.h',
|
||||
'include/cef_xml_reader.h',
|
||||
'include/cef_zip_reader.h',
|
||||
@@ -121,7 +121,6 @@
|
||||
'include/capi/cef_browser_process_handler_capi.h',
|
||||
'include/capi/cef_callback_capi.h',
|
||||
'include/capi/cef_client_capi.h',
|
||||
'include/capi/cef_command_handler_capi.h',
|
||||
'include/capi/cef_command_line_capi.h',
|
||||
'include/capi/cef_context_menu_handler_capi.h',
|
||||
'include/capi/cef_cookie_capi.h',
|
||||
@@ -184,6 +183,7 @@
|
||||
'include/capi/cef_v8_capi.h',
|
||||
'include/capi/cef_values_capi.h',
|
||||
'include/capi/cef_waitable_event_capi.h',
|
||||
'include/capi/cef_web_plugin_capi.h',
|
||||
'include/capi/cef_x509_certificate_capi.h',
|
||||
'include/capi/cef_xml_reader_capi.h',
|
||||
'include/capi/cef_zip_reader_capi.h',
|
||||
@@ -244,8 +244,6 @@
|
||||
'libcef_dll/cpptoc/callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/client_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/client_ctocpp.h',
|
||||
'libcef_dll/ctocpp/command_handler_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/command_handler_ctocpp.h',
|
||||
'libcef_dll/cpptoc/command_line_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/command_line_cpptoc.h',
|
||||
'libcef_dll/ctocpp/completion_callback_ctocpp.cc',
|
||||
@@ -502,6 +500,12 @@
|
||||
'libcef_dll/ctocpp/views/view_delegate_ctocpp.h',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/waitable_event_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_info_cpptoc.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/window_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/views/window_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/window_delegate_ctocpp.cc',
|
||||
@@ -550,8 +554,6 @@
|
||||
'libcef_dll/ctocpp/callback_ctocpp.h',
|
||||
'libcef_dll/cpptoc/client_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/client_cpptoc.h',
|
||||
'libcef_dll/cpptoc/command_handler_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/command_handler_cpptoc.h',
|
||||
'libcef_dll/ctocpp/command_line_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/command_line_ctocpp.h',
|
||||
'libcef_dll/cpptoc/completion_callback_cpptoc.cc',
|
||||
@@ -808,6 +810,12 @@
|
||||
'libcef_dll/cpptoc/views/view_delegate_cpptoc.h',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/waitable_event_ctocpp.h',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/web_plugin_info_ctocpp.h',
|
||||
'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h',
|
||||
'libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc',
|
||||
'libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h',
|
||||
'libcef_dll/ctocpp/views/window_ctocpp.cc',
|
||||
'libcef_dll/ctocpp/views/window_ctocpp.h',
|
||||
'libcef_dll/cpptoc/views/window_delegate_cpptoc.cc',
|
||||
|
@@ -38,6 +38,7 @@
|
||||
'include/base/internal/cef_thread_checker_impl.h',
|
||||
'include/cef_api_hash.h',
|
||||
'include/cef_base.h',
|
||||
'include/cef_config.h',
|
||||
'include/cef_version.h',
|
||||
'include/internal/cef_export.h',
|
||||
'include/internal/cef_ptr.h',
|
||||
@@ -112,7 +113,6 @@
|
||||
'libcef_dll/resource.h',
|
||||
'libcef_dll/shutdown_checker.cc',
|
||||
'libcef_dll/shutdown_checker.h',
|
||||
'libcef_dll/template_util.h',
|
||||
'libcef_dll/transfer_util.cc',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper_types.h',
|
||||
@@ -139,7 +139,6 @@
|
||||
'libcef_dll/ctocpp/ctocpp_scoped.h',
|
||||
'libcef_dll/shutdown_checker.cc',
|
||||
'libcef_dll/shutdown_checker.h',
|
||||
'libcef_dll/template_util.h',
|
||||
'libcef_dll/transfer_util.cc',
|
||||
'libcef_dll/transfer_util.h',
|
||||
'libcef_dll/wrapper_types.h',
|
||||
|
@@ -227,6 +227,7 @@ if(OS_LINUX)
|
||||
snapshot_blob.bin
|
||||
v8_context_snapshot.bin
|
||||
vk_swiftshader_icd.json
|
||||
swiftshader
|
||||
)
|
||||
|
||||
# List of CEF resource files.
|
||||
@@ -475,6 +476,7 @@ if(OS_WINDOWS)
|
||||
vk_swiftshader.dll
|
||||
vk_swiftshader_icd.json
|
||||
vulkan-1.dll
|
||||
swiftshader
|
||||
)
|
||||
|
||||
if(NOT PROJECT_ARCH STREQUAL "arm64")
|
||||
|
@@ -45,6 +45,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_thread_checker.h"
|
||||
|
||||
namespace base {
|
||||
@@ -55,10 +56,6 @@ namespace base {
|
||||
class AtomicFlag {
|
||||
public:
|
||||
AtomicFlag();
|
||||
|
||||
AtomicFlag(const AtomicFlag&) = delete;
|
||||
AtomicFlag& operator=(const AtomicFlag&) = delete;
|
||||
|
||||
~AtomicFlag();
|
||||
|
||||
// Set the flag. Must always be called from the same thread.
|
||||
@@ -79,6 +76,8 @@ class AtomicFlag {
|
||||
private:
|
||||
std::atomic<uint_fast8_t> flag_{0};
|
||||
base::ThreadChecker set_thread_checker_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomicFlag);
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
@@ -32,7 +32,12 @@
|
||||
#define CEF_INCLUDE_BASE_CEF_COMPILER_SPECIFIC_H_
|
||||
#pragma once
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
#if defined(BASE_COMPILER_SPECIFIC_H_)
|
||||
// Do nothing if the Chromium header has already been included.
|
||||
// This can happen in cases where Chromium code is used directly by the
|
||||
// client application. When using Chromium code directly always include
|
||||
// the Chromium header first to avoid type conflicts.
|
||||
#elif defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/compiler_specific.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
@@ -71,6 +76,23 @@
|
||||
#define __has_attribute(x) 0
|
||||
#endif // !defined(__has_attribute)
|
||||
|
||||
// Annotate a variable indicating it's ok if the variable is not used.
|
||||
// (Typically used to silence a compiler warning when the assignment
|
||||
// is important for some other reason.)
|
||||
// Use like:
|
||||
// int x = ...;
|
||||
// ALLOW_UNUSED_LOCAL(x);
|
||||
#define ALLOW_UNUSED_LOCAL(x) (void)x
|
||||
|
||||
// Annotate a typedef or function indicating it's ok if it's not used.
|
||||
// Use like:
|
||||
// typedef Foo Bar ALLOW_UNUSED_TYPE;
|
||||
#if defined(COMPILER_GCC) || defined(__clang__)
|
||||
#define ALLOW_UNUSED_TYPE __attribute__((unused))
|
||||
#else
|
||||
#define ALLOW_UNUSED_TYPE
|
||||
#endif
|
||||
|
||||
// Annotate a function indicating it should not be inlined.
|
||||
// Use like:
|
||||
// NOINLINE void DoStuff() { ... }
|
||||
@@ -131,6 +153,17 @@
|
||||
#define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
|
||||
#endif
|
||||
|
||||
// Annotate a function indicating the caller must examine the return value.
|
||||
// Use like:
|
||||
// int foo() WARN_UNUSED_RESULT;
|
||||
// To explicitly ignore a result, see |ignore_result()| in base/macros.h.
|
||||
#undef WARN_UNUSED_RESULT
|
||||
#if defined(COMPILER_GCC) || defined(__clang__)
|
||||
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
#define WARN_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
// In case the compiler supports it NO_UNIQUE_ADDRESS evaluates to the C++20
|
||||
// attribute [[no_unique_address]]. This allows annotating data members so that
|
||||
// they need not have an address distinct from all other non-static data members
|
||||
@@ -387,25 +420,4 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
|
||||
// Annotate a function indicating the caller must examine the return value.
|
||||
// Use like:
|
||||
// int foo() WARN_UNUSED_RESULT;
|
||||
// To explicitly ignore a result, use std::ignore from <tuple>.
|
||||
// Alternately use `[[nodiscard]]` with code that supports C++17.
|
||||
#undef WARN_UNUSED_RESULT
|
||||
#if defined(COMPILER_GCC) || defined(__clang__)
|
||||
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
#define WARN_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
// Annotate a variable indicating it's ok if the variable is not used.
|
||||
// (Typically used to silence a compiler warning when the assignment
|
||||
// is important for some other reason.)
|
||||
// Use like:
|
||||
// int x = ...;
|
||||
// ALLOW_UNUSED_LOCAL(x);
|
||||
// Alternately use `[[maybe_unused]]` with code that supports C++17.
|
||||
#define ALLOW_UNUSED_LOCAL(x) (void)x
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_COMPILER_SPECIFIC_H_
|
||||
|
@@ -35,9 +35,17 @@
|
||||
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/cxx17_backports.h"
|
||||
// TODO(cef): Change to "base/cxx17_backports.h" in M93.
|
||||
#include "base/stl_util.h"
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following was removed from Chromium in https://crrev.com/78734f77be.
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
|
||||
#include <array>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace base {
|
||||
|
||||
@@ -53,6 +61,71 @@ constexpr size_t size(const T (&array)[N]) noexcept {
|
||||
return N;
|
||||
}
|
||||
|
||||
// C++14 implementation of C++17's std::empty():
|
||||
// http://en.cppreference.com/w/cpp/iterator/empty
|
||||
template <typename Container>
|
||||
constexpr auto empty(const Container& c) -> decltype(c.empty()) {
|
||||
return c.empty();
|
||||
}
|
||||
|
||||
template <typename T, size_t N>
|
||||
constexpr bool empty(const T (&array)[N]) noexcept {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr bool empty(std::initializer_list<T> il) noexcept {
|
||||
return il.size() == 0;
|
||||
}
|
||||
|
||||
// C++14 implementation of C++17's std::data():
|
||||
// http://en.cppreference.com/w/cpp/iterator/data
|
||||
template <typename Container>
|
||||
constexpr auto data(Container& c) -> decltype(c.data()) {
|
||||
return c.data();
|
||||
}
|
||||
|
||||
// std::basic_string::data() had no mutable overload prior to C++17 [1].
|
||||
// Hence this overload is provided.
|
||||
// Note: str[0] is safe even for empty strings, as they are guaranteed to be
|
||||
// null-terminated [2].
|
||||
//
|
||||
// [1] http://en.cppreference.com/w/cpp/string/basic_string/data
|
||||
// [2] http://en.cppreference.com/w/cpp/string/basic_string/operator_at
|
||||
template <typename CharT, typename Traits, typename Allocator>
|
||||
CharT* data(std::basic_string<CharT, Traits, Allocator>& str) {
|
||||
return std::addressof(str[0]);
|
||||
}
|
||||
|
||||
template <typename Container>
|
||||
constexpr auto data(const Container& c) -> decltype(c.data()) {
|
||||
return c.data();
|
||||
}
|
||||
|
||||
template <typename T, size_t N>
|
||||
constexpr T* data(T (&array)[N]) noexcept {
|
||||
return array;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr const T* data(std::initializer_list<T> il) noexcept {
|
||||
return il.begin();
|
||||
}
|
||||
|
||||
// std::array::data() was not constexpr prior to C++17 [1].
|
||||
// Hence these overloads are provided.
|
||||
//
|
||||
// [1] https://en.cppreference.com/w/cpp/container/array/data
|
||||
template <typename T, size_t N>
|
||||
constexpr T* data(std::array<T, N>& array) noexcept {
|
||||
return !array.empty() ? &array[0] : nullptr;
|
||||
}
|
||||
|
||||
template <typename T, size_t N>
|
||||
constexpr const T* data(const std::array<T, N>& array) noexcept {
|
||||
return !array.empty() ? &array[0] : nullptr;
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
|
@@ -41,6 +41,7 @@
|
||||
// updated to match.
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_platform_thread.h"
|
||||
#include "include/base/internal/cef_lock_impl.h"
|
||||
|
||||
@@ -54,10 +55,6 @@ class Lock {
|
||||
public:
|
||||
#if !DCHECK_IS_ON() // Optimized wrapper implementation
|
||||
Lock() : lock_() {}
|
||||
|
||||
Lock(const Lock&) = delete;
|
||||
Lock& operator=(const Lock&) = delete;
|
||||
|
||||
~Lock() {}
|
||||
void Acquire() { lock_.Lock(); }
|
||||
void Release() { lock_.Unlock(); }
|
||||
@@ -114,6 +111,8 @@ class Lock {
|
||||
|
||||
// Platform specific underlying lock implementation.
|
||||
LockImpl lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Lock);
|
||||
};
|
||||
|
||||
// A helper class that acquires the given Lock while the AutoLock is in scope.
|
||||
@@ -127,9 +126,6 @@ class AutoLock {
|
||||
lock_.AssertAcquired();
|
||||
}
|
||||
|
||||
AutoLock(const AutoLock&) = delete;
|
||||
AutoLock& operator=(const AutoLock&) = delete;
|
||||
|
||||
~AutoLock() {
|
||||
lock_.AssertAcquired();
|
||||
lock_.Release();
|
||||
@@ -137,6 +133,7 @@ class AutoLock {
|
||||
|
||||
private:
|
||||
Lock& lock_;
|
||||
DISALLOW_COPY_AND_ASSIGN(AutoLock);
|
||||
};
|
||||
|
||||
// AutoUnlock is a helper that will Release() the |lock| argument in the
|
||||
@@ -149,13 +146,11 @@ class AutoUnlock {
|
||||
lock_.Release();
|
||||
}
|
||||
|
||||
AutoUnlock(const AutoUnlock&) = delete;
|
||||
AutoUnlock& operator=(const AutoUnlock&) = delete;
|
||||
|
||||
~AutoUnlock() { lock_.Acquire(); }
|
||||
|
||||
private:
|
||||
Lock& lock_;
|
||||
DISALLOW_COPY_AND_ASSIGN(AutoUnlock);
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
@@ -163,9 +158,9 @@ class AutoUnlock {
|
||||
// Implement classes in the cef_internal namespace and then expose them to the
|
||||
// base namespace. This avoids conflicts with the base.lib implementation when
|
||||
// linking sandbox support on Windows.
|
||||
using cef_internal::Lock;
|
||||
using cef_internal::AutoLock;
|
||||
using cef_internal::AutoUnlock;
|
||||
using cef_internal::Lock;
|
||||
|
||||
} // namespace base
|
||||
|
||||
|
@@ -164,6 +164,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/internal/cef_logging_internal.h"
|
||||
|
||||
namespace cef {
|
||||
@@ -201,21 +202,21 @@ const LogSeverity LOG_DFATAL = LOG_FATAL;
|
||||
// A few definitions of macros that don't generate much code. These are used
|
||||
// by LOG() and LOG_IF, etc. Since these are used all over our code, it's
|
||||
// better to have compact code for these operations.
|
||||
#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \
|
||||
#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_INFO, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_WARNING, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_ERROR, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_FATAL, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_DFATAL, \
|
||||
##__VA_ARGS__)
|
||||
##__VA_ARGS__)
|
||||
|
||||
#define COMPACT_GOOGLE_LOG_INFO COMPACT_GOOGLE_LOG_EX_INFO(LogMessage)
|
||||
#define COMPACT_GOOGLE_LOG_WARNING COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage)
|
||||
@@ -582,9 +583,6 @@ class LogMessage {
|
||||
LogSeverity severity,
|
||||
std::string* result);
|
||||
|
||||
LogMessage(const LogMessage&) = delete;
|
||||
LogMessage& operator=(const LogMessage&) = delete;
|
||||
|
||||
~LogMessage();
|
||||
|
||||
std::ostream& stream() { return stream_; }
|
||||
@@ -616,6 +614,8 @@ class LogMessage {
|
||||
|
||||
SaveLastError last_error_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(LogMessage);
|
||||
};
|
||||
|
||||
// A non-macro interface to the log facility; (useful
|
||||
@@ -655,9 +655,6 @@ class Win32ErrorLogMessage {
|
||||
LogSeverity severity,
|
||||
SystemErrorCode err);
|
||||
|
||||
Win32ErrorLogMessage(const Win32ErrorLogMessage&) = delete;
|
||||
Win32ErrorLogMessage& operator=(const Win32ErrorLogMessage&) = delete;
|
||||
|
||||
// Appends the error message before destructing the encapsulated class.
|
||||
~Win32ErrorLogMessage();
|
||||
|
||||
@@ -666,6 +663,8 @@ class Win32ErrorLogMessage {
|
||||
private:
|
||||
SystemErrorCode err_;
|
||||
LogMessage log_message_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage);
|
||||
};
|
||||
#elif defined(OS_POSIX)
|
||||
// Appends a formatted system message of the errno type
|
||||
@@ -676,9 +675,6 @@ class ErrnoLogMessage {
|
||||
LogSeverity severity,
|
||||
SystemErrorCode err);
|
||||
|
||||
ErrnoLogMessage(const ErrnoLogMessage&) = delete;
|
||||
ErrnoLogMessage& operator=(const ErrnoLogMessage&) = delete;
|
||||
|
||||
// Appends the error message before destructing the encapsulated class.
|
||||
~ErrnoLogMessage();
|
||||
|
||||
@@ -687,6 +683,8 @@ class ErrnoLogMessage {
|
||||
private:
|
||||
SystemErrorCode err_;
|
||||
LogMessage log_message_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ErrnoLogMessage);
|
||||
};
|
||||
#endif // OS_WIN
|
||||
|
||||
|
@@ -32,7 +32,11 @@
|
||||
#define CEF_INCLUDE_BASE_CEF_MACROS_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(USING_CHROMIUM_INCLUDES)
|
||||
#if defined(USING_CHROMIUM_INCLUDES)
|
||||
// When building CEF include the Chromium header directly.
|
||||
#include "base/macros.h"
|
||||
|
||||
#else // !USING_CHROMIUM_INCLUDES
|
||||
// The following is substantially similar to the Chromium implementation.
|
||||
// If the Chromium implementation diverges the below implementation should be
|
||||
// updated to match.
|
||||
@@ -58,6 +62,17 @@
|
||||
TypeName() = delete; \
|
||||
DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
|
||||
// Used to explicitly mark the return value of a function as unused. If you are
|
||||
// really sure you don't want to do anything with the return value of a function
|
||||
// that has been marked WARN_UNUSED_RESULT, wrap it with this. Example:
|
||||
//
|
||||
// std::unique_ptr<MyType> my_var = ...;
|
||||
// if (TakeOwnership(my_var.get()) == SUCCESS)
|
||||
// ignore_result(my_var.release());
|
||||
//
|
||||
template <typename T>
|
||||
inline void ignore_result(const T&) {}
|
||||
|
||||
#endif // !USING_CHROMIUM_INCLUDES
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_MACROS_H_
|
||||
|
@@ -49,6 +49,7 @@
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_scoped_refptr.h"
|
||||
#include "include/base/cef_template_util.h"
|
||||
#include "include/base/cef_thread_checker.h"
|
||||
@@ -75,9 +76,6 @@ class RefCountedBase {
|
||||
#endif
|
||||
}
|
||||
|
||||
RefCountedBase(const RefCountedBase&) = delete;
|
||||
RefCountedBase& operator=(const RefCountedBase&) = delete;
|
||||
|
||||
~RefCountedBase() {
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
|
||||
@@ -170,6 +168,8 @@ class RefCountedBase {
|
||||
mutable bool in_dtor_ = false;
|
||||
mutable ThreadChecker thread_checker_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedBase);
|
||||
};
|
||||
|
||||
class RefCountedThreadSafeBase {
|
||||
@@ -186,9 +186,6 @@ class RefCountedThreadSafeBase {
|
||||
#endif
|
||||
}
|
||||
|
||||
RefCountedThreadSafeBase(const RefCountedThreadSafeBase&) = delete;
|
||||
RefCountedThreadSafeBase& operator=(const RefCountedThreadSafeBase&) = delete;
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
~RefCountedThreadSafeBase();
|
||||
#else
|
||||
@@ -262,6 +259,8 @@ class RefCountedThreadSafeBase {
|
||||
mutable bool needs_adopt_ref_ = false;
|
||||
mutable bool in_dtor_ = false;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase);
|
||||
};
|
||||
|
||||
// ScopedAllowCrossThreadRefCountAccess disables the check documented on
|
||||
@@ -358,9 +357,6 @@ class RefCounted : public cef_subtle::RefCountedBase {
|
||||
|
||||
RefCounted() : cef_subtle::RefCountedBase(T::kRefCountPreference) {}
|
||||
|
||||
RefCounted(const RefCounted&) = delete;
|
||||
RefCounted& operator=(const RefCounted&) = delete;
|
||||
|
||||
void AddRef() const { cef_subtle::RefCountedBase::AddRef(); }
|
||||
|
||||
void Release() const {
|
||||
@@ -383,6 +379,8 @@ class RefCounted : public cef_subtle::RefCountedBase {
|
||||
static void DeleteInternal(const U* x) {
|
||||
delete x;
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCounted);
|
||||
};
|
||||
|
||||
// Forward declaration.
|
||||
@@ -426,9 +424,6 @@ class RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase {
|
||||
explicit RefCountedThreadSafe()
|
||||
: cef_subtle::RefCountedThreadSafeBase(T::kRefCountPreference) {}
|
||||
|
||||
RefCountedThreadSafe(const RefCountedThreadSafe&) = delete;
|
||||
RefCountedThreadSafe& operator=(const RefCountedThreadSafe&) = delete;
|
||||
|
||||
void AddRef() const { AddRefImpl(T::kRefCountPreference); }
|
||||
|
||||
void Release() const {
|
||||
@@ -455,6 +450,8 @@ class RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase {
|
||||
void AddRefImpl(cef_subtle::StartRefCountFromOneTag) const {
|
||||
cef_subtle::RefCountedThreadSafeBase::AddRefWithCheck();
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe);
|
||||
};
|
||||
|
||||
//
|
||||
|
@@ -48,6 +48,7 @@
|
||||
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
|
||||
template <class T>
|
||||
class scoped_refptr;
|
||||
|
@@ -113,7 +113,7 @@ template <typename T>
|
||||
struct SupportsToString<T, decltype(void(std::declval<T>().ToString()))>
|
||||
: std::true_type {};
|
||||
|
||||
// Used to detect whether the given type is an iterator. This is normally used
|
||||
// Used to detech whether the given type is an iterator. This is normally used
|
||||
// with std::enable_if to provide disambiguation for functions that take
|
||||
// templatzed iterators as input.
|
||||
template <typename T, typename = void>
|
||||
@@ -276,13 +276,8 @@ struct negation : bool_constant<!static_cast<bool>(B::value)> {};
|
||||
// References:
|
||||
// [1] https://en.cppreference.com/w/cpp/types/result_of
|
||||
// [2] https://wg21.link/meta.trans.other#lib:invoke_result
|
||||
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
||||
template <typename Functor, typename... Args>
|
||||
using invoke_result = std::invoke_result<Functor, Args...>;
|
||||
#else
|
||||
template <typename Functor, typename... Args>
|
||||
using invoke_result = std::result_of<Functor && (Args && ...)>;
|
||||
#endif
|
||||
|
||||
// Implementation of C++17's std::invoke_result_t.
|
||||
//
|
||||
|
@@ -109,6 +109,7 @@
|
||||
|
||||
#include "include/base/cef_atomic_flag.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/base/cef_thread_checker.h"
|
||||
|
||||
@@ -356,14 +357,9 @@ class WeakPtrFactoryBase {
|
||||
template <class T>
|
||||
class WeakPtrFactory : public internal::WeakPtrFactoryBase {
|
||||
public:
|
||||
WeakPtrFactory() = delete;
|
||||
|
||||
explicit WeakPtrFactory(T* ptr)
|
||||
: WeakPtrFactoryBase(reinterpret_cast<uintptr_t>(ptr)) {}
|
||||
|
||||
WeakPtrFactory(const WeakPtrFactory&) = delete;
|
||||
WeakPtrFactory& operator=(const WeakPtrFactory&) = delete;
|
||||
|
||||
~WeakPtrFactory() = default;
|
||||
|
||||
WeakPtr<T> GetWeakPtr() const {
|
||||
@@ -382,6 +378,9 @@ class WeakPtrFactory : public internal::WeakPtrFactoryBase {
|
||||
DCHECK(ptr_);
|
||||
return weak_reference_owner_.HasRefs();
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(WeakPtrFactory);
|
||||
};
|
||||
|
||||
// A class may extend from SupportsWeakPtr to let others take weak pointers to
|
||||
@@ -394,9 +393,6 @@ class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
|
||||
public:
|
||||
SupportsWeakPtr() = default;
|
||||
|
||||
SupportsWeakPtr(const SupportsWeakPtr&) = delete;
|
||||
SupportsWeakPtr& operator=(const SupportsWeakPtr&) = delete;
|
||||
|
||||
WeakPtr<T> AsWeakPtr() {
|
||||
return WeakPtr<T>(weak_reference_owner_.GetRef(), static_cast<T*>(this));
|
||||
}
|
||||
@@ -406,6 +402,7 @@ class SupportsWeakPtr : public internal::SupportsWeakPtrBase {
|
||||
|
||||
private:
|
||||
internal::WeakReferenceOwner weak_reference_owner_;
|
||||
DISALLOW_COPY_AND_ASSIGN(SupportsWeakPtr);
|
||||
};
|
||||
|
||||
// Helper function that uses type deduction to safely return a WeakPtr<Derived>
|
||||
|
@@ -1189,11 +1189,7 @@ struct AssertBindArgsValidity<std::index_sequence<Ns...>,
|
||||
TypeList<Args...>,
|
||||
TypeList<Unwrapped...>,
|
||||
TypeList<Params...>>
|
||||
: AssertConstructible<static_cast<int>(Ns),
|
||||
Args,
|
||||
std::decay_t<Args>,
|
||||
Unwrapped,
|
||||
Params>... {
|
||||
: AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... {
|
||||
static constexpr bool ok = true;
|
||||
};
|
||||
|
||||
|
@@ -40,6 +40,8 @@
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "include/base/cef_macros.h"
|
||||
|
||||
namespace base {
|
||||
namespace cef_internal {
|
||||
|
||||
@@ -55,10 +57,6 @@ class LockImpl {
|
||||
#endif
|
||||
|
||||
LockImpl();
|
||||
|
||||
LockImpl(const LockImpl&) = delete;
|
||||
LockImpl& operator=(const LockImpl&) = delete;
|
||||
|
||||
~LockImpl();
|
||||
|
||||
// If the lock is not held, take it and return true. If the lock is already
|
||||
@@ -79,6 +77,8 @@ class LockImpl {
|
||||
|
||||
private:
|
||||
NativeHandle native_handle_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(LockImpl);
|
||||
};
|
||||
|
||||
} // namespace cef_internal
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=665709ecf3ebad59e85285d319eae72197b9766f$
|
||||
// $hash=adfba3dd6479b96a95639c13ee1e07bed7b335d0$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_
|
||||
@@ -145,7 +145,7 @@ CEF_EXPORT int cef_initialize(const struct _cef_main_args_t* args,
|
||||
// This function should be called on the main application thread to shut down
|
||||
// the CEF browser process before the application exits.
|
||||
///
|
||||
CEF_EXPORT void cef_shutdown(void);
|
||||
CEF_EXPORT void cef_shutdown();
|
||||
|
||||
///
|
||||
// Perform a single iteration of CEF message loop processing. This function is
|
||||
@@ -162,7 +162,7 @@ CEF_EXPORT void cef_shutdown(void);
|
||||
// CefSettings.multi_threaded_message_loop value of false (0). This function
|
||||
// will not block.
|
||||
///
|
||||
CEF_EXPORT void cef_do_message_loop_work(void);
|
||||
CEF_EXPORT void cef_do_message_loop_work();
|
||||
|
||||
///
|
||||
// Run the CEF message loop. Use this function instead of an application-
|
||||
@@ -172,14 +172,14 @@ CEF_EXPORT void cef_do_message_loop_work(void);
|
||||
// CefSettings.multi_threaded_message_loop value of false (0). This function
|
||||
// will block until a quit message is received by the system.
|
||||
///
|
||||
CEF_EXPORT void cef_run_message_loop(void);
|
||||
CEF_EXPORT void cef_run_message_loop();
|
||||
|
||||
///
|
||||
// Quit the CEF message loop that was started by calling cef_run_message_loop().
|
||||
// This function should only be called on the main application thread and only
|
||||
// if cef_run_message_loop() was used.
|
||||
///
|
||||
CEF_EXPORT void cef_quit_message_loop(void);
|
||||
CEF_EXPORT void cef_quit_message_loop();
|
||||
|
||||
///
|
||||
// Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a
|
||||
@@ -192,7 +192,7 @@ CEF_EXPORT void cef_set_osmodal_loop(int osModalLoop);
|
||||
// Older versions of Windows should be left DPI-unaware because they do not
|
||||
// support DirectWrite and GDI fonts are kerned very badly.
|
||||
///
|
||||
CEF_EXPORT void cef_enable_highdpi_support(void);
|
||||
CEF_EXPORT void cef_enable_highdpi_support();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=62f58ab826b8a3d436655bf0855848632f2a73b5$
|
||||
// $hash=fd8d34089842ee8f8490ef1828c3091d12052e28$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_
|
||||
@@ -68,7 +68,7 @@ typedef struct _cef_audio_handler_t {
|
||||
|
||||
///
|
||||
// Called on a browser audio capture thread when the browser starts streaming
|
||||
// audio. OnAudioStreamStopped will always be called after
|
||||
// audio. OnAudioSteamStopped will always be called after
|
||||
// OnAudioStreamStarted; both functions may be called multiple times for the
|
||||
// same browser. |params| contains the audio parameters like sample rate and
|
||||
// channel layout. |channels| is the number of channels.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=b1c1e44e6d3842064ef6e5b9823173f7ec1fcccc$
|
||||
// $hash=8af93d03e0b2a6b50d7612b145599600285b76d4$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
||||
@@ -205,12 +205,15 @@ typedef struct _cef_run_file_dialog_callback_t {
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Called asynchronously after the file dialog is dismissed. |file_paths| will
|
||||
// be a single value or a list of values depending on the dialog mode. If the
|
||||
// selection was cancelled |file_paths| will be NULL.
|
||||
// Called asynchronously after the file dialog is dismissed.
|
||||
// |selected_accept_filter| is the 0-based index of the value selected from
|
||||
// the accept filters array passed to cef_browser_host_t::RunFileDialog.
|
||||
// |file_paths| will be a single value or a list of values depending on the
|
||||
// dialog mode. If the selection was cancelled |file_paths| will be NULL.
|
||||
///
|
||||
void(CEF_CALLBACK* on_file_dialog_dismissed)(
|
||||
struct _cef_run_file_dialog_callback_t* self,
|
||||
int selected_accept_filter,
|
||||
cef_string_list_t file_paths);
|
||||
} cef_run_file_dialog_callback_t;
|
||||
|
||||
@@ -388,10 +391,11 @@ typedef struct _cef_browser_host_t {
|
||||
// selectable file types and may any combination of (a) valid lower-cased MIME
|
||||
// types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g.
|
||||
// ".txt" or ".png"), or (c) combined description and file extension delimited
|
||||
// using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). |callback| will be
|
||||
// executed after the dialog is dismissed or immediately if another dialog is
|
||||
// already pending. The dialog will be initiated asynchronously on the UI
|
||||
// thread.
|
||||
// using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
|
||||
// |selected_accept_filter| is the 0-based index of the filter that will be
|
||||
// selected by default. |callback| will be executed after the dialog is
|
||||
// dismissed or immediately if another dialog is already pending. The dialog
|
||||
// will be initiated asynchronously on the UI thread.
|
||||
///
|
||||
void(CEF_CALLBACK* run_file_dialog)(
|
||||
struct _cef_browser_host_t* self,
|
||||
@@ -399,6 +403,7 @@ typedef struct _cef_browser_host_t {
|
||||
const cef_string_t* title,
|
||||
const cef_string_t* default_file_path,
|
||||
cef_string_list_t accept_filters,
|
||||
int selected_accept_filter,
|
||||
struct _cef_run_file_dialog_callback_t* callback);
|
||||
|
||||
///
|
||||
@@ -445,15 +450,18 @@ typedef struct _cef_browser_host_t {
|
||||
struct _cef_pdf_print_callback_t* callback);
|
||||
|
||||
///
|
||||
// Search for |searchText|. |forward| indicates whether to search forward or
|
||||
// backward within the page. |matchCase| indicates whether the search should
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up. The search will be restarted if |searchText| or |matchCase|
|
||||
// change. The search will be stopped if |searchText| is NULL. The
|
||||
// cef_find_handler_t instance, if any, returned via
|
||||
// cef_client_t::GetFindHandler will be called to report find results.
|
||||
// Search for |searchText|. |identifier| must be a unique ID and these IDs
|
||||
// must strictly increase so that newer requests always have greater IDs than
|
||||
// older requests. If |identifier| is zero or less than the previous ID value
|
||||
// then it will be automatically assigned a new valid ID. |forward| indicates
|
||||
// whether to search forward or backward within the page. |matchCase|
|
||||
// indicates whether the search should be case-sensitive. |findNext| indicates
|
||||
// whether this is the first request or a follow-up. The cef_find_handler_t
|
||||
// instance, if any, returned via cef_client_t::GetFindHandler will be called
|
||||
// to report find results.
|
||||
///
|
||||
void(CEF_CALLBACK* find)(struct _cef_browser_host_t* self,
|
||||
int identifier,
|
||||
const cef_string_t* searchText,
|
||||
int forward,
|
||||
int matchCase,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=ad0a78715daff99c1ec987800b7e5d62196e7100$
|
||||
// $hash=8c97f9b58c642c144cc37824ad820192640307cb$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
|
||||
@@ -70,9 +70,9 @@ typedef struct _cef_browser_process_handler_t {
|
||||
///
|
||||
// Called before a child process is launched. Will be called on the browser
|
||||
// process UI thread when launching a render process and on the browser
|
||||
// process IO thread when launching a GPU process. Provides an opportunity to
|
||||
// modify the child process command line. Do not keep a reference to
|
||||
// |command_line| outside of this function.
|
||||
// process IO thread when launching a GPU or plugin process. Provides an
|
||||
// opportunity to modify the child process command line. Do not keep a
|
||||
// reference to |command_line| outside of this function.
|
||||
///
|
||||
void(CEF_CALLBACK* on_before_child_process_launch)(
|
||||
struct _cef_browser_process_handler_t* self,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=7df3c13b75072c2ad5061cd3a344811222798903$
|
||||
// $hash=8b099ca3b9cfbd41840cdf64586a0b884abaffae$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
#include "include/capi/cef_audio_handler_capi.h"
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_command_handler_capi.h"
|
||||
#include "include/capi/cef_context_menu_handler_capi.h"
|
||||
#include "include/capi/cef_dialog_handler_capi.h"
|
||||
#include "include/capi/cef_display_handler_capi.h"
|
||||
@@ -79,13 +78,6 @@ typedef struct _cef_client_t {
|
||||
struct _cef_audio_handler_t*(CEF_CALLBACK* get_audio_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for commands. If no handler is provided the default
|
||||
// implementation will be used.
|
||||
///
|
||||
struct _cef_command_handler_t*(CEF_CALLBACK* get_command_handler)(
|
||||
struct _cef_client_t* self);
|
||||
|
||||
///
|
||||
// Return the handler for context menus. If no handler is provided the default
|
||||
// implementation will be used.
|
||||
|
@@ -1,80 +0,0 @@
|
||||
// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=54332b79c057df9c8f3be56cc77f1daf877b3ac1$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to commands. The functions
|
||||
// of this structure will be called on the UI thread.
|
||||
///
|
||||
typedef struct _cef_command_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Called to execute a Chrome command triggered via menu selection or keyboard
|
||||
// shortcut. Values for |command_id| can be found in the cef_command_ids.h
|
||||
// file. |disposition| provides information about the intended command target.
|
||||
// Return true (1) if the command was handled or false (0) for the default
|
||||
// implementation. For context menu commands this will be called after
|
||||
// cef_context_menu_handler_t::OnContextMenuCommand. Only used with the Chrome
|
||||
// runtime.
|
||||
///
|
||||
int(CEF_CALLBACK* on_chrome_command)(
|
||||
struct _cef_command_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
int command_id,
|
||||
cef_window_open_disposition_t disposition);
|
||||
} cef_command_handler_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=3049c9960a95d32d61cc57ae998c0eba12820673$
|
||||
// $hash=93f3d769c0d48ed6e1d91ad8a8e2f95d4ee54287$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
|
||||
@@ -200,13 +200,13 @@ typedef struct _cef_command_line_t {
|
||||
///
|
||||
// Create a new cef_command_line_t instance.
|
||||
///
|
||||
CEF_EXPORT cef_command_line_t* cef_command_line_create(void);
|
||||
CEF_EXPORT cef_command_line_t* cef_command_line_create();
|
||||
|
||||
///
|
||||
// Returns the singleton global cef_command_line_t object. The returned object
|
||||
// will be read-only.
|
||||
///
|
||||
CEF_EXPORT cef_command_line_t* cef_command_line_get_global(void);
|
||||
CEF_EXPORT cef_command_line_t* cef_command_line_get_global();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=d007b3dc26f3f049bf67623da8fae59dc75a193b$
|
||||
// $hash=fd33ce439e4379d231b6be16bdc1786f314d98e4$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_
|
||||
@@ -290,7 +290,8 @@ typedef struct _cef_context_menu_params_t {
|
||||
|
||||
///
|
||||
// Returns true (1) if the context menu contains items specified by the
|
||||
// renderer process.
|
||||
// renderer process (for example, plugin placeholder or pepper plugin menu
|
||||
// items).
|
||||
///
|
||||
int(CEF_CALLBACK* is_custom_menu)(struct _cef_context_menu_params_t* self);
|
||||
} cef_context_menu_params_t;
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=5d111a67218403f78737f2c4dc92d2fd96dc125d$
|
||||
// $hash=0460e68eb7d1b1188706c42d14beafbf9a6f7126$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_
|
||||
@@ -136,7 +136,7 @@ extern "C" {
|
||||
// CefSetCrashKeyValue function. These key/value pairs will be sent to the crash
|
||||
// server along with the crash dump file.
|
||||
///
|
||||
CEF_EXPORT int cef_crash_reporting_enabled(void);
|
||||
CEF_EXPORT int cef_crash_reporting_enabled();
|
||||
|
||||
///
|
||||
// Sets or clears a specific key-value pair from the crash metadata.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=dc579beb1f25f9bbdb72afb4b5b381e129f84e31$
|
||||
// $hash=0f56154217707d141912dc8a298279df8df04311$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_
|
||||
@@ -57,11 +57,14 @@ typedef struct _cef_file_dialog_callback_t {
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Continue the file selection. |file_paths| should be a single value or a
|
||||
// list of values depending on the dialog mode. An NULL |file_paths| value is
|
||||
// treated the same as calling cancel().
|
||||
// Continue the file selection. |selected_accept_filter| should be the 0-based
|
||||
// index of the value selected from the accept filters array passed to
|
||||
// cef_dialog_handler_t::OnFileDialog. |file_paths| should be a single value
|
||||
// or a list of values depending on the dialog mode. An NULL |file_paths|
|
||||
// value is treated the same as calling cancel().
|
||||
///
|
||||
void(CEF_CALLBACK* cont)(struct _cef_file_dialog_callback_t* self,
|
||||
int selected_accept_filter,
|
||||
cef_string_list_t file_paths);
|
||||
|
||||
///
|
||||
@@ -90,9 +93,10 @@ typedef struct _cef_dialog_handler_t {
|
||||
// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b)
|
||||
// individual file extensions (e.g. ".txt" or ".png"), or (c) combined
|
||||
// description and file extension delimited using "|" and ";" (e.g. "Image
|
||||
// Types|.png;.gif;.jpg"). To display a custom dialog return true (1) and
|
||||
// execute |callback| either inline or at a later time. To display the default
|
||||
// dialog return false (0).
|
||||
// Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based index of
|
||||
// the filter that should be selected by default. To display a custom dialog
|
||||
// return true (1) and execute |callback| either inline or at a later time. To
|
||||
// display the default dialog return false (0).
|
||||
///
|
||||
int(CEF_CALLBACK* on_file_dialog)(
|
||||
struct _cef_dialog_handler_t* self,
|
||||
@@ -101,6 +105,7 @@ typedef struct _cef_dialog_handler_t {
|
||||
const cef_string_t* title,
|
||||
const cef_string_t* default_file_path,
|
||||
cef_string_list_t accept_filters,
|
||||
int selected_accept_filter,
|
||||
struct _cef_file_dialog_callback_t* callback);
|
||||
} cef_dialog_handler_t;
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=33862915eb4156a70794a346a090154c468763e2$
|
||||
// $hash=ec13ec3e2819e4ac49792c3a1c57bc60b45fb95b$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_
|
||||
@@ -103,18 +103,6 @@ typedef struct _cef_download_handler_t {
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Called before a download begins in response to a user-initiated action
|
||||
// (e.g. alt + link click or link click that returns a `Content-Disposition:
|
||||
// attachment` response from the server). |url| is the target download URL and
|
||||
// |request_function| is the target function (GET, POST, etc). Return true (1)
|
||||
// to proceed with the download or false (0) to cancel the download.
|
||||
///
|
||||
int(CEF_CALLBACK* can_download)(struct _cef_download_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* url,
|
||||
const cef_string_t* request_method);
|
||||
|
||||
///
|
||||
// Called before a download begins. |suggested_name| is the suggested name for
|
||||
// the download file. By default the download will be canceled. Execute
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=c99e9efb74fea2a2a99b25a694c59256f59238ab$
|
||||
// $hash=b6e3236a062cd25ec26c3daeb1940d1e1bf0d96a$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_
|
||||
@@ -199,11 +199,6 @@ typedef struct _cef_drag_data_t {
|
||||
const cef_string_t* path,
|
||||
const cef_string_t* display_name);
|
||||
|
||||
///
|
||||
// Clear list of filenames.
|
||||
///
|
||||
void(CEF_CALLBACK* clear_filenames)(struct _cef_drag_data_t* self);
|
||||
|
||||
///
|
||||
// Get the image representation of drag data. May return NULL if no image
|
||||
// representation is available.
|
||||
@@ -224,7 +219,7 @@ typedef struct _cef_drag_data_t {
|
||||
///
|
||||
// Create a new cef_drag_data_t object.
|
||||
///
|
||||
CEF_EXPORT cef_drag_data_t* cef_drag_data_create(void);
|
||||
CEF_EXPORT cef_drag_data_t* cef_drag_data_create();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=f2e80b8637b07f19adea666e554269de4627e399$
|
||||
// $hash=b1fe7f7db5ab92c6ae64dc1288b6fd47c80f9423$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_
|
||||
@@ -59,12 +59,11 @@ typedef struct _cef_find_handler_t {
|
||||
|
||||
///
|
||||
// Called to report find results returned by cef_browser_host_t::find().
|
||||
// |identifer| is a unique incremental identifier for the currently active
|
||||
// search, |count| is the number of matches currently identified,
|
||||
// |selectionRect| is the location of where the match was found (in window
|
||||
// coordinates), |activeMatchOrdinal| is the current position in the search
|
||||
// results, and |finalUpdate| is true (1) if this is the last find
|
||||
// notification.
|
||||
// |identifer| is the identifier passed to find(), |count| is the number of
|
||||
// matches currently identified, |selectionRect| is the location of where the
|
||||
// match was found (in window coordinates), |activeMatchOrdinal| is the
|
||||
// current position in the search results, and |finalUpdate| is true (1) if
|
||||
// this is the last find notification.
|
||||
///
|
||||
void(CEF_CALLBACK* on_find_result)(struct _cef_find_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=c063e5f0e0c9fef71bdb56e7cc3ea775de17a3ea$
|
||||
// $hash=b6168013910802cf6d7603892741385958026dcd$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
|
||||
@@ -49,7 +49,7 @@ extern "C" {
|
||||
///
|
||||
// Returns true (1) if the application text direction is right-to-left.
|
||||
///
|
||||
CEF_EXPORT int cef_is_rtl(void);
|
||||
CEF_EXPORT int cef_is_rtl();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=bbc87eb4ecaf92c900193afef7059caedbe8ab3a$
|
||||
// $hash=b5a36ef39ff250c9d3cb1e9a8c7ee38d7e0f8b3f$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_
|
||||
@@ -196,7 +196,7 @@ typedef struct _cef_image_t {
|
||||
// Create a new cef_image_t. It will initially be NULL. Use the Add*() functions
|
||||
// to add representations at different scale factors.
|
||||
///
|
||||
CEF_EXPORT cef_image_t* cef_image_create(void);
|
||||
CEF_EXPORT cef_image_t* cef_image_create();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=26fdd1f18f30d9e2a48aeeb5c69607d9d22d69ca$
|
||||
// $hash=0939a44345bea8df7ca5f1dbd6afbe41972121f2$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_
|
||||
@@ -102,7 +102,7 @@ CEF_EXPORT int cef_remove_cross_origin_whitelist_entry(
|
||||
// Remove all entries from the cross-origin access whitelist. Returns false (0)
|
||||
// if the whitelist cannot be accessed.
|
||||
///
|
||||
CEF_EXPORT int cef_clear_cross_origin_whitelist(void);
|
||||
CEF_EXPORT int cef_clear_cross_origin_whitelist();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=1a9b9718367ec8d575fbb39b73b1085b17eb0a2b$
|
||||
// $hash=fdbd26f9dd20dbd7813fc17a8c34650b2da19581$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_
|
||||
@@ -193,7 +193,7 @@ typedef struct _cef_print_settings_t {
|
||||
///
|
||||
// Create a new cef_print_settings_t object.
|
||||
///
|
||||
CEF_EXPORT cef_print_settings_t* cef_print_settings_create(void);
|
||||
CEF_EXPORT cef_print_settings_t* cef_print_settings_create();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=246d07b9790ff6bd574c59b1c237c603deaf88bf$
|
||||
// $hash=47b361878452f2a94e559782913d80beb0dba25a$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_
|
||||
@@ -219,7 +219,7 @@ typedef struct _cef_request_t {
|
||||
///
|
||||
// Create a new cef_request_t object.
|
||||
///
|
||||
CEF_EXPORT cef_request_t* cef_request_create(void);
|
||||
CEF_EXPORT cef_request_t* cef_request_create();
|
||||
|
||||
///
|
||||
// Structure used to represent post data for a web request. The functions of
|
||||
@@ -278,7 +278,7 @@ typedef struct _cef_post_data_t {
|
||||
///
|
||||
// Create a new cef_post_data_t object.
|
||||
///
|
||||
CEF_EXPORT cef_post_data_t* cef_post_data_create(void);
|
||||
CEF_EXPORT cef_post_data_t* cef_post_data_create();
|
||||
|
||||
///
|
||||
// Structure used to represent a single element in the request post data. The
|
||||
@@ -344,7 +344,7 @@ typedef struct _cef_post_data_element_t {
|
||||
///
|
||||
// Create a new cef_post_data_element_t object.
|
||||
///
|
||||
CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create(void);
|
||||
CEF_EXPORT cef_post_data_element_t* cef_post_data_element_create();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=dcff1eaa0563cfb48e0232bf78786bb0126c4255$
|
||||
// $hash=89e64a2db658ad560e85ea5d3e564a6505d4e914$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
|
||||
@@ -357,7 +357,7 @@ typedef struct _cef_request_context_t {
|
||||
///
|
||||
// Returns the global context object.
|
||||
///
|
||||
CEF_EXPORT cef_request_context_t* cef_request_context_get_global_context(void);
|
||||
CEF_EXPORT cef_request_context_t* cef_request_context_get_global_context();
|
||||
|
||||
///
|
||||
// Creates a new context object with the specified |settings| and optional
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=b2657a441a701c5ddaca68dc604fd94153a3220f$
|
||||
// $hash=b44d320d5cceb5022543e8154170b8d276628c76$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "include/capi/cef_frame_capi.h"
|
||||
#include "include/capi/cef_request_capi.h"
|
||||
#include "include/capi/cef_resource_request_handler_capi.h"
|
||||
#include "include/capi/cef_web_plugin_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=4e19e04de13949f20e63e44542bc0a0eeed46b43$
|
||||
// $hash=4a05a0a7cd4a279ccf8455a3cb2f77de581b597a$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
|
||||
@@ -228,6 +228,14 @@ typedef struct _cef_request_handler_t {
|
||||
struct _cef_x509certificate_t* const* certificates,
|
||||
struct _cef_select_client_certificate_callback_t* callback);
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when a plugin has crashed.
|
||||
// |plugin_path| is the path of the plugin that crashed.
|
||||
///
|
||||
void(CEF_CALLBACK* on_plugin_crashed)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* plugin_path);
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when the render view associated
|
||||
// with |browser| is ready to receive/handle IPC messages in the render
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=6d8a7e3c0ed66cad10e8a0c59fed51431ec82ce5$
|
||||
// $hash=a9e35ca17785f77666db7650208cacfd9a85c3e0$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_
|
||||
@@ -95,7 +95,7 @@ typedef struct _cef_resource_bundle_t {
|
||||
///
|
||||
// Returns the global resource bundle instance.
|
||||
///
|
||||
CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global(void);
|
||||
CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=ab8832420572dae95a601fb3170fcd3693473619$
|
||||
// $hash=6ebf7adcdaee57772810c1528b27140ae95966d0$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_
|
||||
@@ -168,7 +168,7 @@ typedef struct _cef_response_t {
|
||||
///
|
||||
// Create a new cef_response_t object.
|
||||
///
|
||||
CEF_EXPORT cef_response_t* cef_response_create(void);
|
||||
CEF_EXPORT cef_response_t* cef_response_create();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=83cbe91e85d7ab2413f733b75457ce6689d3d0ae$
|
||||
// $hash=df8c46dd19ef6a3964c49d79e770de6e4245e208$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
|
||||
@@ -131,7 +131,7 @@ CEF_EXPORT int cef_register_scheme_handler_factory(
|
||||
// ef_request_context_t::cef_request_context_get_global_context()->clear_scheme_
|
||||
// handler_factories().
|
||||
///
|
||||
CEF_EXPORT int cef_clear_scheme_handler_factories(void);
|
||||
CEF_EXPORT int cef_clear_scheme_handler_factories();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=2502258e69820d070a9f094d5e587a38e96cc930$
|
||||
// $hash=e943dd2af818e5a5f19f6cbd1648896684c666c6$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_
|
||||
@@ -122,7 +122,7 @@ typedef struct _cef_task_runner_t {
|
||||
// task runners. An NULL reference will be returned if this function is called
|
||||
// on an invalid thread.
|
||||
///
|
||||
CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread(void);
|
||||
CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread();
|
||||
|
||||
///
|
||||
// Returns the task runner for the specified CEF thread.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=0a206b1c12637c8b04b2815cb3b50f212768ba01$
|
||||
// $hash=a7b4410e0a35eb0aba747014665419fb6b6fcb67$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_
|
||||
@@ -109,7 +109,7 @@ CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
|
||||
// high-res time. Can be used by clients to synchronize with the time
|
||||
// information in trace events.
|
||||
///
|
||||
CEF_EXPORT int64 cef_now_from_system_trace_time(void);
|
||||
CEF_EXPORT int64 cef_now_from_system_trace_time();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=b7dd2429f492a8f2dd978f9500c63dd0e01035d4$
|
||||
// $hash=2bdcad7f8e3c03285a5e5ddb9a02a5a2182f254c$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_
|
||||
@@ -143,17 +143,17 @@ typedef struct _cef_v8context_t {
|
||||
///
|
||||
// Returns the current (top) context object in the V8 context stack.
|
||||
///
|
||||
CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context(void);
|
||||
CEF_EXPORT cef_v8context_t* cef_v8context_get_current_context();
|
||||
|
||||
///
|
||||
// Returns the entered (bottom) context object in the V8 context stack.
|
||||
///
|
||||
CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context(void);
|
||||
CEF_EXPORT cef_v8context_t* cef_v8context_get_entered_context();
|
||||
|
||||
///
|
||||
// Returns true (1) if V8 is currently inside a context.
|
||||
///
|
||||
CEF_EXPORT int cef_v8context_in_context(void);
|
||||
CEF_EXPORT int cef_v8context_in_context();
|
||||
|
||||
///
|
||||
// Structure that should be implemented to handle V8 function calls. The
|
||||
@@ -733,12 +733,12 @@ typedef struct _cef_v8value_t {
|
||||
///
|
||||
// Create a new cef_v8value_t object of type undefined.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined(void);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_undefined();
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type null.
|
||||
///
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_null(void);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_null();
|
||||
|
||||
///
|
||||
// Create a new cef_v8value_t object of type bool.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=ee899158c4f61cc3f85176174d6fd9cbe2a3db4c$
|
||||
// $hash=c557496bdc1403b25b22ca9354a942478131c7ce$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
|
||||
@@ -219,7 +219,7 @@ typedef struct _cef_value_t {
|
||||
///
|
||||
// Creates a new object.
|
||||
///
|
||||
CEF_EXPORT cef_value_t* cef_value_create(void);
|
||||
CEF_EXPORT cef_value_t* cef_value_create();
|
||||
|
||||
///
|
||||
// Structure representing a binary value. Can be used on any process and thread.
|
||||
@@ -523,7 +523,7 @@ typedef struct _cef_dictionary_value_t {
|
||||
///
|
||||
// Creates a new object that is not owned by any other object.
|
||||
///
|
||||
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create(void);
|
||||
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create();
|
||||
|
||||
///
|
||||
// Structure representing a list value. Can be used on any process and thread.
|
||||
@@ -744,7 +744,7 @@ typedef struct _cef_list_value_t {
|
||||
///
|
||||
// Creates a new object that is not owned by any other object.
|
||||
///
|
||||
CEF_EXPORT cef_list_value_t* cef_list_value_create(void);
|
||||
CEF_EXPORT cef_list_value_t* cef_list_value_create();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
171
include/capi/cef_web_plugin_capi.h
Normal file
171
include/capi/cef_web_plugin_capi.h
Normal file
@@ -0,0 +1,171 @@
|
||||
// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool and should not edited
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=51060280dee57104eaef7b774e4b4895970c0057$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/capi/cef_base_capi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _cef_browser_t;
|
||||
|
||||
///
|
||||
// Information about a specific web plugin.
|
||||
///
|
||||
typedef struct _cef_web_plugin_info_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Returns the plugin name.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_name)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
|
||||
///
|
||||
// Returns the plugin file path (DLL/bundle/library).
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_path)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
|
||||
///
|
||||
// Returns the version of the plugin (may be OS-specific).
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_version)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
|
||||
///
|
||||
// Returns a description of the plugin from the version information.
|
||||
///
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t(CEF_CALLBACK* get_description)(
|
||||
struct _cef_web_plugin_info_t* self);
|
||||
} cef_web_plugin_info_t;
|
||||
|
||||
///
|
||||
// Structure to implement for visiting web plugin information. The functions of
|
||||
// this structure will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_web_plugin_info_visitor_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Method that will be called once for each plugin. |count| is the 0-based
|
||||
// index for the current plugin. |total| is the total number of plugins.
|
||||
// Return false (0) to stop visiting plugins. This function may never be
|
||||
// called if no plugins are found.
|
||||
///
|
||||
int(CEF_CALLBACK* visit)(struct _cef_web_plugin_info_visitor_t* self,
|
||||
struct _cef_web_plugin_info_t* info,
|
||||
int count,
|
||||
int total);
|
||||
} cef_web_plugin_info_visitor_t;
|
||||
|
||||
///
|
||||
// Structure to implement for receiving unstable plugin information. The
|
||||
// functions of this structure will be called on the browser process IO thread.
|
||||
///
|
||||
typedef struct _cef_web_plugin_unstable_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Method that will be called for the requested plugin. |unstable| will be
|
||||
// true (1) if the plugin has reached the crash count threshold of 3 times in
|
||||
// 120 seconds.
|
||||
///
|
||||
void(CEF_CALLBACK* is_unstable)(
|
||||
struct _cef_web_plugin_unstable_callback_t* self,
|
||||
const cef_string_t* path,
|
||||
int unstable);
|
||||
} cef_web_plugin_unstable_callback_t;
|
||||
|
||||
///
|
||||
// Visit web plugin information. Can be called on any thread in the browser
|
||||
// process.
|
||||
///
|
||||
CEF_EXPORT void cef_visit_web_plugin_info(
|
||||
cef_web_plugin_info_visitor_t* visitor);
|
||||
|
||||
///
|
||||
// Cause the plugin list to refresh the next time it is accessed regardless of
|
||||
// whether it has already been loaded. Can be called on any thread in the
|
||||
// browser process.
|
||||
///
|
||||
CEF_EXPORT void cef_refresh_web_plugins();
|
||||
|
||||
///
|
||||
// Unregister an internal plugin. This may be undone the next time
|
||||
// cef_refresh_web_plugins() is called. Can be called on any thread in the
|
||||
// browser process.
|
||||
///
|
||||
CEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Register a plugin crash. Can be called on any thread in the browser process
|
||||
// but will be executed on the IO thread.
|
||||
///
|
||||
CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path);
|
||||
|
||||
///
|
||||
// Query if a plugin is unstable. Can be called on any thread in the browser
|
||||
// process.
|
||||
///
|
||||
CEF_EXPORT void cef_is_web_plugin_unstable(
|
||||
const cef_string_t* path,
|
||||
cef_web_plugin_unstable_callback_t* callback);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=33a684b03178472bdf93e70043304cce8bc32d05$
|
||||
// $hash=d70d5b74890e3ca91f01333ebdb4f3298caeb619$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_
|
||||
@@ -530,7 +530,7 @@ typedef struct _cef_translator_test_t {
|
||||
///
|
||||
// Create the test object.
|
||||
///
|
||||
CEF_EXPORT cef_translator_test_t* cef_translator_test_create(void);
|
||||
CEF_EXPORT cef_translator_test_t* cef_translator_test_create();
|
||||
|
||||
///
|
||||
// Library-side test object for RefPtr.
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=5e383d792ce9dc1809d3d3fdeabb9c60fb9ff1ba$
|
||||
// $hash=2fd0db428ce5902d59a7802c901e1c13b2367b5a$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
|
||||
@@ -108,7 +108,7 @@ typedef struct _cef_display_t {
|
||||
///
|
||||
// Returns the primary Display.
|
||||
///
|
||||
CEF_EXPORT cef_display_t* cef_display_get_primary(void);
|
||||
CEF_EXPORT cef_display_t* cef_display_get_primary();
|
||||
|
||||
///
|
||||
// Returns the Display nearest |point|. Set |input_pixel_coords| to true (1) if
|
||||
@@ -131,7 +131,7 @@ CEF_EXPORT cef_display_t* cef_display_get_matching_bounds(
|
||||
// Returns the total number of Displays. Mirrored displays are excluded; this
|
||||
// function is intended to return the number of distinct, usable displays.
|
||||
///
|
||||
CEF_EXPORT size_t cef_display_get_count(void);
|
||||
CEF_EXPORT size_t cef_display_get_count();
|
||||
|
||||
///
|
||||
// Returns all Displays. Mirrored displays are excluded; this function is
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=7f88c6428929c0511ff90b6137efcc4cebcfeae4$
|
||||
// $hash=cd5d7c4e83237ceb39c5639489ca6004d2d69f0c$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
|
||||
@@ -73,14 +73,6 @@ typedef struct _cef_window_delegate_t {
|
||||
void(CEF_CALLBACK* on_window_destroyed)(struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window);
|
||||
|
||||
///
|
||||
// Called when |window| is activated or deactivated.
|
||||
///
|
||||
void(CEF_CALLBACK* on_window_activation_changed)(
|
||||
struct _cef_window_delegate_t* self,
|
||||
struct _cef_window_t* window,
|
||||
int active);
|
||||
|
||||
///
|
||||
// Return the parent for |window| or NULL if the |window| does not have a
|
||||
// parent. Windows with parents will not get a taskbar button. Set |is_menu|
|
||||
|
@@ -42,13 +42,13 @@
|
||||
// way that may cause binary incompatibility with other builds. The universal
|
||||
// hash value will change if any platform is affected whereas the platform hash
|
||||
// values will change only if that particular platform is affected.
|
||||
#define CEF_API_HASH_UNIVERSAL "b6255e15aa977a7214cf28e4e1a2372b454838d4"
|
||||
#define CEF_API_HASH_UNIVERSAL "6f6a9c0f3b420cd3120cf4f5924cbc91f5095abd"
|
||||
#if defined(OS_WIN)
|
||||
#define CEF_API_HASH_PLATFORM "b262c3a2cbd2632de1bfed887da8b8114c9ecbf5"
|
||||
#define CEF_API_HASH_PLATFORM "5835e67ed251fec96837b475df44248a286e422f"
|
||||
#elif defined(OS_MAC)
|
||||
#define CEF_API_HASH_PLATFORM "fd6d3d83442fe31ad26d5648755e0cf2e14a7fc7"
|
||||
#define CEF_API_HASH_PLATFORM "b8187d9f99b028d767dfd6a40490190c25a3d901"
|
||||
#elif defined(OS_LINUX)
|
||||
#define CEF_API_HASH_PLATFORM "d686964de5e01eed900d78d5f8a7da9f8fc3a777"
|
||||
#define CEF_API_HASH_PLATFORM "d7199dfd396052e1517e55f18ea75d3d61336538"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -63,7 +63,7 @@ class CefAudioHandler : public virtual CefBaseRefCounted {
|
||||
|
||||
///
|
||||
// Called on a browser audio capture thread when the browser starts
|
||||
// streaming audio. OnAudioStreamStopped will always be called after
|
||||
// streaming audio. OnAudioSteamStopped will always be called after
|
||||
// OnAudioStreamStarted; both methods may be called multiple times
|
||||
// for the same browser. |params| contains the audio parameters like
|
||||
// sample rate and channel layout. |channels| is the number of channels.
|
||||
|
@@ -90,10 +90,7 @@ class CefBaseScoped {
|
||||
///
|
||||
class CefRefCount {
|
||||
public:
|
||||
CefRefCount() = default;
|
||||
|
||||
CefRefCount(const CefRefCount&) = delete;
|
||||
CefRefCount& operator=(const CefRefCount&) = delete;
|
||||
CefRefCount() {}
|
||||
|
||||
///
|
||||
// Increment the reference count.
|
||||
@@ -117,6 +114,7 @@ class CefRefCount {
|
||||
|
||||
private:
|
||||
mutable base::AtomicRefCount ref_count_{0};
|
||||
DISALLOW_COPY_AND_ASSIGN(CefRefCount);
|
||||
};
|
||||
|
||||
///
|
||||
|
@@ -206,11 +206,14 @@ class CefRunFileDialogCallback : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Called asynchronously after the file dialog is dismissed.
|
||||
// |selected_accept_filter| is the 0-based index of the value selected from
|
||||
// the accept filters array passed to CefBrowserHost::RunFileDialog.
|
||||
// |file_paths| will be a single value or a list of values depending on the
|
||||
// dialog mode. If the selection was cancelled |file_paths| will be empty.
|
||||
///
|
||||
/*--cef(optional_param=file_paths)--*/
|
||||
/*--cef(index_param=selected_accept_filter,optional_param=file_paths)--*/
|
||||
virtual void OnFileDialogDismissed(
|
||||
int selected_accept_filter,
|
||||
const std::vector<CefString>& file_paths) = 0;
|
||||
};
|
||||
|
||||
@@ -418,17 +421,19 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
|
||||
// selectable file types and may any combination of (a) valid lower-cased MIME
|
||||
// types (e.g. "text/*" or "image/*"), (b) individual file extensions (e.g.
|
||||
// ".txt" or ".png"), or (c) combined description and file extension delimited
|
||||
// using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg"). |callback| will be
|
||||
// executed after the dialog is dismissed or immediately if another dialog is
|
||||
// already pending. The dialog will be initiated asynchronously on the UI
|
||||
// thread.
|
||||
// using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
|
||||
// |selected_accept_filter| is the 0-based index of the filter that will be
|
||||
// selected by default. |callback| will be executed after the dialog is
|
||||
// dismissed or immediately if another dialog is already pending. The dialog
|
||||
// will be initiated asynchronously on the UI thread.
|
||||
///
|
||||
/*--cef(optional_param=title,optional_param=default_file_path,
|
||||
optional_param=accept_filters)--*/
|
||||
optional_param=accept_filters,index_param=selected_accept_filter)--*/
|
||||
virtual void RunFileDialog(FileDialogMode mode,
|
||||
const CefString& title,
|
||||
const CefString& default_file_path,
|
||||
const std::vector<CefString>& accept_filters,
|
||||
int selected_accept_filter,
|
||||
CefRefPtr<CefRunFileDialogCallback> callback) = 0;
|
||||
|
||||
///
|
||||
@@ -474,16 +479,19 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
|
||||
CefRefPtr<CefPdfPrintCallback> callback) = 0;
|
||||
|
||||
///
|
||||
// Search for |searchText|. |forward| indicates whether to search forward or
|
||||
// backward within the page. |matchCase| indicates whether the search should
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up. The search will be restarted if |searchText| or |matchCase|
|
||||
// change. The search will be stopped if |searchText| is empty. The
|
||||
// CefFindHandler instance, if any, returned via CefClient::GetFindHandler
|
||||
// will be called to report find results.
|
||||
// Search for |searchText|. |identifier| must be a unique ID and these IDs
|
||||
// must strictly increase so that newer requests always have greater IDs than
|
||||
// older requests. If |identifier| is zero or less than the previous ID value
|
||||
// then it will be automatically assigned a new valid ID. |forward| indicates
|
||||
// whether to search forward or backward within the page. |matchCase|
|
||||
// indicates whether the search should be case-sensitive. |findNext| indicates
|
||||
// whether this is the first request or a follow-up. The CefFindHandler
|
||||
// instance, if any, returned via CefClient::GetFindHandler will be called to
|
||||
// report find results.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void Find(const CefString& searchText,
|
||||
virtual void Find(int identifier,
|
||||
const CefString& searchText,
|
||||
bool forward,
|
||||
bool matchCase,
|
||||
bool findNext) = 0;
|
||||
|
@@ -60,9 +60,9 @@ class CefBrowserProcessHandler : public virtual CefBaseRefCounted {
|
||||
///
|
||||
// Called before a child process is launched. Will be called on the browser
|
||||
// process UI thread when launching a render process and on the browser
|
||||
// process IO thread when launching a GPU process. Provides an opportunity to
|
||||
// modify the child process command line. Do not keep a reference to
|
||||
// |command_line| outside of this method.
|
||||
// process IO thread when launching a GPU or plugin process. Provides an
|
||||
// opportunity to modify the child process command line. Do not keep a
|
||||
// reference to |command_line| outside of this method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnBeforeChildProcessLaunch(
|
||||
|
@@ -40,7 +40,6 @@
|
||||
|
||||
#include "include/cef_audio_handler.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_command_handler.h"
|
||||
#include "include/cef_context_menu_handler.h"
|
||||
#include "include/cef_dialog_handler.h"
|
||||
#include "include/cef_display_handler.h"
|
||||
@@ -70,13 +69,6 @@ class CefClient : public virtual CefBaseRefCounted {
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefAudioHandler> GetAudioHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for commands. If no handler is provided the default
|
||||
// implementation will be used.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefCommandHandler> GetCommandHandler() { return nullptr; }
|
||||
|
||||
///
|
||||
// Return the handler for context menus. If no handler is provided the default
|
||||
// implementation will be used.
|
||||
|
@@ -1,68 +0,0 @@
|
||||
// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_COMMAND_HANDLER_H_
|
||||
#define CEF_INCLUDE_CEF_COMMAND_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to commands. The methods of
|
||||
// this class will be called on the UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefCommandHandler : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Called to execute a Chrome command triggered via menu selection or keyboard
|
||||
// shortcut. Values for |command_id| can be found in the cef_command_ids.h
|
||||
// file. |disposition| provides information about the intended command target.
|
||||
// Return true if the command was handled or false for the default
|
||||
// implementation. For context menu commands this will be called after
|
||||
// CefContextMenuHandler::OnContextMenuCommand. Only used with the Chrome
|
||||
// runtime.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnChromeCommand(CefRefPtr<CefBrowser> browser,
|
||||
int command_id,
|
||||
cef_window_open_disposition_t disposition) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_COMMAND_HANDLER_H_
|
@@ -277,7 +277,7 @@ class CefContextMenuParams : public virtual CefBaseRefCounted {
|
||||
|
||||
///
|
||||
// Returns true if the context menu contains items specified by the renderer
|
||||
// process.
|
||||
// process (for example, plugin placeholder or pepper plugin menu items).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool IsCustomMenu() = 0;
|
||||
|
@@ -48,12 +48,16 @@
|
||||
class CefFileDialogCallback : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Continue the file selection. |file_paths| should be a single value or a
|
||||
// Continue the file selection. |selected_accept_filter| should be the 0-based
|
||||
// index of the value selected from the accept filters array passed to
|
||||
// CefDialogHandler::OnFileDialog. |file_paths| should be a single value or a
|
||||
// list of values depending on the dialog mode. An empty |file_paths| value is
|
||||
// treated the same as calling Cancel().
|
||||
///
|
||||
/*--cef(capi_name=cont,optional_param=file_paths)--*/
|
||||
virtual void Continue(const std::vector<CefString>& file_paths) = 0;
|
||||
/*--cef(capi_name=cont,index_param=selected_accept_filter,
|
||||
optional_param=file_paths)--*/
|
||||
virtual void Continue(int selected_accept_filter,
|
||||
const std::vector<CefString>& file_paths) = 0;
|
||||
|
||||
///
|
||||
// Cancel the file selection.
|
||||
@@ -81,17 +85,19 @@ class CefDialogHandler : public virtual CefBaseRefCounted {
|
||||
// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"),
|
||||
// (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined
|
||||
// description and file extension delimited using "|" and ";" (e.g.
|
||||
// "Image Types|.png;.gif;.jpg"). To display a custom dialog return true and
|
||||
// execute |callback| either inline or at a later time. To display the default
|
||||
// dialog return false.
|
||||
// "Image Types|.png;.gif;.jpg"). |selected_accept_filter| is the 0-based
|
||||
// index of the filter that should be selected by default. To display a custom
|
||||
// dialog return true and execute |callback| either inline or at a later time.
|
||||
// To display the default dialog return false.
|
||||
///
|
||||
/*--cef(optional_param=title,optional_param=default_file_path,
|
||||
optional_param=accept_filters)--*/
|
||||
optional_param=accept_filters,index_param=selected_accept_filter)--*/
|
||||
virtual bool OnFileDialog(CefRefPtr<CefBrowser> browser,
|
||||
FileDialogMode mode,
|
||||
const CefString& title,
|
||||
const CefString& default_file_path,
|
||||
const std::vector<CefString>& accept_filters,
|
||||
int selected_accept_filter,
|
||||
CefRefPtr<CefFileDialogCallback> callback) {
|
||||
return false;
|
||||
}
|
||||
|
@@ -90,20 +90,6 @@ class CefDownloadItemCallback : public virtual CefBaseRefCounted {
|
||||
/*--cef(source=client)--*/
|
||||
class CefDownloadHandler : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Called before a download begins in response to a user-initiated action
|
||||
// (e.g. alt + link click or link click that returns a `Content-Disposition:
|
||||
// attachment` response from the server). |url| is the target download URL and
|
||||
// |request_method| is the target method (GET, POST, etc). Return true to
|
||||
// proceed with the download or false to cancel the download.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool CanDownload(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
const CefString& request_method) {
|
||||
return true;
|
||||
}
|
||||
|
||||
///
|
||||
// Called before a download begins. |suggested_name| is the suggested name for
|
||||
// the download file. By default the download will be canceled. Execute
|
||||
|
@@ -196,12 +196,6 @@ class CefDragData : public virtual CefBaseRefCounted {
|
||||
virtual void AddFile(const CefString& path,
|
||||
const CefString& display_name) = 0;
|
||||
|
||||
///
|
||||
// Clear list of filenames.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ClearFilenames() = 0;
|
||||
|
||||
///
|
||||
// Get the image representation of drag data. May return NULL if no image
|
||||
// representation is available.
|
||||
|
@@ -50,11 +50,11 @@ class CefFindHandler : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Called to report find results returned by CefBrowserHost::Find().
|
||||
// |identifer| is a unique incremental identifier for the currently active
|
||||
// search, |count| is the number of matches currently identified,
|
||||
// |selectionRect| is the location of where the match was found (in window
|
||||
// coordinates), |activeMatchOrdinal| is the current position in the search
|
||||
// results, and |finalUpdate| is true if this is the last find notification.
|
||||
// |identifer| is the identifier passed to Find(), |count| is the number of
|
||||
// matches currently identified, |selectionRect| is the location of where the
|
||||
// match was found (in window coordinates), |activeMatchOrdinal| is the
|
||||
// current position in the search results, and |finalUpdate| is true if this
|
||||
// is the last find notification.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnFindResult(CefRefPtr<CefBrowser> browser,
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include "include/cef_frame.h"
|
||||
#include "include/cef_request.h"
|
||||
#include "include/cef_resource_request_handler.h"
|
||||
#include "include/cef_web_plugin.h"
|
||||
|
||||
///
|
||||
// Implement this interface to provide handler implementations. The handler
|
||||
@@ -52,6 +53,8 @@
|
||||
/*--cef(source=client,no_debugct_check)--*/
|
||||
class CefRequestContextHandler : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
typedef cef_plugin_policy_t PluginPolicy;
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread immediately after the request
|
||||
// context has been initialized.
|
||||
|
@@ -228,6 +228,14 @@ class CefRequestHandler : public virtual CefBaseRefCounted {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when a plugin has crashed.
|
||||
// |plugin_path| is the path of the plugin that crashed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPluginCrashed(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& plugin_path) {}
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when the render view associated
|
||||
// with |browser| is ready to receive/handle IPC messages in the render
|
||||
|
@@ -40,11 +40,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// The sandbox is used to restrict sub-processes (renderer, GPU, etc) from
|
||||
// directly accessing system resources. This helps to protect the user from
|
||||
// untrusted and potentially malicious Web content. See
|
||||
// http://www.chromium.org/developers/design-documents/sandbox for complete
|
||||
// details.
|
||||
// The sandbox is used to restrict sub-processes (renderer, plugin, GPU, etc)
|
||||
// from directly accessing system resources. This helps to protect the user
|
||||
// from untrusted and potentially malicious Web content.
|
||||
// See http://www.chromium.org/developers/design-documents/sandbox for
|
||||
// complete details.
|
||||
//
|
||||
// To enable the sandbox on macOS the following requirements must be met:
|
||||
// 1. Link the helper process executable with the cef_sandbox static library.
|
||||
|
@@ -39,26 +39,26 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// The sandbox is used to restrict sub-processes (renderer, GPU, etc) from
|
||||
// directly accessing system resources. This helps to protect the user from
|
||||
// untrusted and potentially malicious Web content. See
|
||||
// http://www.chromium.org/developers/design-documents/sandbox for complete
|
||||
// details.
|
||||
// The sandbox is used to restrict sub-processes (renderer, plugin, GPU, etc)
|
||||
// from directly accessing system resources. This helps to protect the user
|
||||
// from untrusted and potentially malicious Web content.
|
||||
// See http://www.chromium.org/developers/design-documents/sandbox for
|
||||
// complete details.
|
||||
//
|
||||
// To enable the sandbox on Windows the following requirements must be met:
|
||||
// 1. Use the same executable for the browser process and all sub-processes.
|
||||
// 2. Link the executable with the cef_sandbox static library.
|
||||
// 3. Call the cef_sandbox_info_create() function from within the executable
|
||||
// (not from a separate DLL) and pass the resulting pointer into both the
|
||||
// CefExecuteProcess() and CefInitialize() functions via the
|
||||
// CefExecutProcess() and CefInitialize() functions via the
|
||||
// |windows_sandbox_info| parameter.
|
||||
|
||||
///
|
||||
// Create the sandbox information object for this process. It is safe to create
|
||||
// multiple of this object and to destroy the object immediately after passing
|
||||
// into the CefExecuteProcess() and/or CefInitialize() functions.
|
||||
// into the CefExecutProcess() and/or CefInitialize() functions.
|
||||
///
|
||||
void* cef_sandbox_info_create(void);
|
||||
void* cef_sandbox_info_create();
|
||||
|
||||
///
|
||||
// Destroy the specified sandbox information object.
|
||||
|
148
include/cef_web_plugin.h
Normal file
148
include/cef_web_plugin.h
Normal file
@@ -0,0 +1,148 @@
|
||||
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||
// Framework nor the names of its contributors may be used to endorse
|
||||
// or promote products derived from this software without specific prior
|
||||
// written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// The contents of this file must follow a specific format in order to
|
||||
// support the CEF translator tool. See the translator.README.txt file in the
|
||||
// tools directory for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
||||
#define CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
|
||||
class CefBrowser;
|
||||
|
||||
///
|
||||
// Information about a specific web plugin.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefWebPluginInfo : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Returns the plugin name.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetName() = 0;
|
||||
|
||||
///
|
||||
// Returns the plugin file path (DLL/bundle/library).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetPath() = 0;
|
||||
|
||||
///
|
||||
// Returns the version of the plugin (may be OS-specific).
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetVersion() = 0;
|
||||
|
||||
///
|
||||
// Returns a description of the plugin from the version information.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetDescription() = 0;
|
||||
};
|
||||
|
||||
///
|
||||
// Interface to implement for visiting web plugin information. The methods of
|
||||
// this class will be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefWebPluginInfoVisitor : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Method that will be called once for each plugin. |count| is the 0-based
|
||||
// index for the current plugin. |total| is the total number of plugins.
|
||||
// Return false to stop visiting plugins. This method may never be called if
|
||||
// no plugins are found.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool Visit(CefRefPtr<CefWebPluginInfo> info,
|
||||
int count,
|
||||
int total) = 0;
|
||||
};
|
||||
|
||||
///
|
||||
// Visit web plugin information. Can be called on any thread in the browser
|
||||
// process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor);
|
||||
|
||||
///
|
||||
// Cause the plugin list to refresh the next time it is accessed regardless
|
||||
// of whether it has already been loaded. Can be called on any thread in the
|
||||
// browser process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefRefreshWebPlugins();
|
||||
|
||||
///
|
||||
// Unregister an internal plugin. This may be undone the next time
|
||||
// CefRefreshWebPlugins() is called. Can be called on any thread in the browser
|
||||
// process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefUnregisterInternalWebPlugin(const CefString& path);
|
||||
|
||||
///
|
||||
// Register a plugin crash. Can be called on any thread in the browser process
|
||||
// but will be executed on the IO thread.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefRegisterWebPluginCrash(const CefString& path);
|
||||
|
||||
///
|
||||
// Interface to implement for receiving unstable plugin information. The methods
|
||||
// of this class will be called on the browser process IO thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefWebPluginUnstableCallback : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
// Method that will be called for the requested plugin. |unstable| will be
|
||||
// true if the plugin has reached the crash count threshold of 3 times in 120
|
||||
// seconds.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void IsUnstable(const CefString& path, bool unstable) = 0;
|
||||
};
|
||||
|
||||
///
|
||||
// Query if a plugin is unstable. Can be called on any thread in the browser
|
||||
// process.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefIsWebPluginUnstable(const CefString& path,
|
||||
CefRefPtr<CefWebPluginUnstableCallback> callback);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_WEB_PLUGIN_H_
|
@@ -99,9 +99,6 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
|
||||
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
|
||||
|
||||
CefWindowInfo& operator=(const CefWindowInfo&) = default;
|
||||
CefWindowInfo& operator=(CefWindowInfo&&) = default;
|
||||
|
||||
///
|
||||
// Create the browser as a child window.
|
||||
///
|
||||
|
@@ -44,7 +44,7 @@ extern "C" {
|
||||
///
|
||||
// Gets the current log level.
|
||||
///
|
||||
CEF_EXPORT int cef_get_min_log_level(void);
|
||||
CEF_EXPORT int cef_get_min_log_level();
|
||||
|
||||
///
|
||||
// Gets the current vlog level for the given file (usually taken from
|
||||
|
@@ -100,9 +100,6 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
|
||||
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
|
||||
|
||||
CefWindowInfo& operator=(const CefWindowInfo&) = default;
|
||||
CefWindowInfo& operator=(CefWindowInfo&&) = default;
|
||||
|
||||
///
|
||||
// Create the browser as a child view.
|
||||
///
|
||||
|
@@ -46,7 +46,7 @@ typedef void* cef_string_list_t;
|
||||
///
|
||||
// Allocate a new string map.
|
||||
///
|
||||
CEF_EXPORT cef_string_list_t cef_string_list_alloc(void);
|
||||
CEF_EXPORT cef_string_list_t cef_string_list_alloc();
|
||||
|
||||
///
|
||||
// Return the number of elements in the string list.
|
||||
|
@@ -46,7 +46,7 @@ typedef void* cef_string_map_t;
|
||||
///
|
||||
// Allocate a new string map.
|
||||
///
|
||||
CEF_EXPORT cef_string_map_t cef_string_map_alloc(void);
|
||||
CEF_EXPORT cef_string_map_t cef_string_map_alloc();
|
||||
|
||||
///
|
||||
// Return the number of elements in the string map.
|
||||
|
@@ -47,7 +47,7 @@ typedef void* cef_string_multimap_t;
|
||||
///
|
||||
// Allocate a new string multimap.
|
||||
///
|
||||
CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc(void);
|
||||
CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc();
|
||||
|
||||
///
|
||||
// Return the number of elements in the string multimap.
|
||||
|
@@ -175,9 +175,9 @@ typedef cef_string_utf16_t* cef_string_userfree_utf16_t;
|
||||
// calling the associated free function.
|
||||
///
|
||||
|
||||
CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc(void);
|
||||
CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc(void);
|
||||
CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc(void);
|
||||
CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc();
|
||||
CEF_EXPORT cef_string_userfree_utf8_t cef_string_userfree_utf8_alloc();
|
||||
CEF_EXPORT cef_string_userfree_utf16_t cef_string_userfree_utf16_alloc();
|
||||
|
||||
///
|
||||
// These functions free the string structure allocated by the associated
|
||||
|
@@ -584,16 +584,10 @@ class CefStringBase {
|
||||
return NULL;
|
||||
|
||||
userfree_struct_type str = traits::userfree_alloc();
|
||||
if (owner_) {
|
||||
// Transfer ownership of the data to |str|.
|
||||
memcpy(str, string_, sizeof(struct_type));
|
||||
// Free this class' structure but not the data.
|
||||
memset(string_, 0, sizeof(struct_type));
|
||||
} else {
|
||||
// Copy the data to |str|.
|
||||
traits::set(string_->str, string_->length, str, /*copy=*/true);
|
||||
}
|
||||
memcpy(str, string_, sizeof(struct_type));
|
||||
|
||||
// Free this class' structure but not the data.
|
||||
memset(string_, 0, sizeof(struct_type));
|
||||
ClearAndFree();
|
||||
|
||||
return str;
|
||||
|
@@ -55,7 +55,7 @@ typedef pid_t cef_platform_thread_id_t;
|
||||
///
|
||||
// Returns the current platform thread ID.
|
||||
///
|
||||
CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id(void);
|
||||
CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id();
|
||||
|
||||
#if defined(OS_WIN)
|
||||
typedef DWORD cef_platform_thread_handle_t;
|
||||
@@ -69,7 +69,7 @@ typedef pthread_t cef_platform_thread_handle_t;
|
||||
// Returns the current platform thread handle.
|
||||
///
|
||||
CEF_EXPORT cef_platform_thread_handle_t
|
||||
cef_get_current_platform_thread_handle(void);
|
||||
cef_get_current_platform_thread_handle();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -202,7 +202,7 @@ typedef struct _cef_settings_t {
|
||||
|
||||
///
|
||||
// Set to true (1) to have the browser process message loop run in a separate
|
||||
// thread. If false (0) then the CefDoMessageLoopWork() function must be
|
||||
// thread. If false (0) than the CefDoMessageLoopWork() function must be
|
||||
// called from your application message loop. This option is only supported on
|
||||
// Windows and Linux.
|
||||
///
|
||||
@@ -374,11 +374,10 @@ typedef struct _cef_settings_t {
|
||||
|
||||
///
|
||||
// Set to a value between 1024 and 65535 to enable remote debugging on the
|
||||
// specified port. Also configurable using the "remote-debugging-port"
|
||||
// command-line switch. Remote debugging can be accessed by loading the
|
||||
// chrome://inspect page in Google Chrome. Port numbers 9222 and 9229 are
|
||||
// discoverable by default. Other port numbers may need to be configured via
|
||||
// "Discover network targets" on the Devices tab.
|
||||
// specified port. For example, if 8080 is specified the remote debugging URL
|
||||
// will be http://localhost:8080. CEF can be remotely debugged from any CEF or
|
||||
// Chrome browser window. Also configurable using the "remote-debugging-port"
|
||||
// command-line switch.
|
||||
///
|
||||
int remote_debugging_port;
|
||||
|
||||
@@ -426,6 +425,14 @@ typedef struct _cef_settings_t {
|
||||
///
|
||||
cef_string_t cookieable_schemes_list;
|
||||
int cookieable_schemes_exclude_defaults;
|
||||
|
||||
///
|
||||
// GUID string used for identifying the application. This is passed to the
|
||||
// system AV function for scanning downloaded files. By default, the GUID
|
||||
// will be an empty string and the file will be treated as an untrusted
|
||||
// file when the GUID is empty.
|
||||
///
|
||||
cef_string_t application_client_id_for_file_scanning;
|
||||
} cef_settings_t;
|
||||
|
||||
///
|
||||
@@ -512,7 +519,7 @@ typedef struct _cef_browser_settings_t {
|
||||
///
|
||||
int windowless_frame_rate;
|
||||
|
||||
// BEGIN values that map to WebPreferences settings.
|
||||
// The below values map to WebPreferences settings.
|
||||
|
||||
///
|
||||
// Font settings.
|
||||
@@ -569,6 +576,12 @@ typedef struct _cef_browser_settings_t {
|
||||
///
|
||||
cef_state_t javascript_dom_paste;
|
||||
|
||||
///
|
||||
// Controls whether any plugins will be loaded. Also configurable using the
|
||||
// "disable-plugins" command-line switch.
|
||||
///
|
||||
cef_state_t plugins;
|
||||
|
||||
///
|
||||
// Controls whether image URLs will be loaded from the network. A cached image
|
||||
// will still be rendered if requested. Also configurable using the
|
||||
@@ -614,8 +627,6 @@ typedef struct _cef_browser_settings_t {
|
||||
///
|
||||
cef_state_t webgl;
|
||||
|
||||
// END values that map to WebPreferences settings.
|
||||
|
||||
///
|
||||
// Background color used for the browser before a document is loaded and when
|
||||
// no document color is specified. The alpha component must be either fully
|
||||
@@ -635,13 +646,6 @@ typedef struct _cef_browser_settings_t {
|
||||
// empty then "en-US,en" will be used.
|
||||
///
|
||||
cef_string_t accept_language_list;
|
||||
|
||||
///
|
||||
// Controls whether the Chrome status bubble will be used. Only supported with
|
||||
// the Chrome runtime. For details about the status bubble see
|
||||
// https://www.chromium.org/user-experience/status-bubble/
|
||||
///
|
||||
cef_state_t chrome_status_bubble;
|
||||
} cef_browser_settings_t;
|
||||
|
||||
///
|
||||
@@ -947,66 +951,15 @@ typedef enum {
|
||||
///
|
||||
typedef enum {
|
||||
WOD_UNKNOWN,
|
||||
|
||||
///
|
||||
// Current tab. This is the default in most cases.
|
||||
///
|
||||
WOD_CURRENT_TAB,
|
||||
|
||||
///
|
||||
// Indicates that only one tab with the url should exist in the same window.
|
||||
///
|
||||
WOD_SINGLETON_TAB,
|
||||
|
||||
///
|
||||
// Shift key + Middle mouse button or meta/ctrl key while clicking.
|
||||
///
|
||||
WOD_NEW_FOREGROUND_TAB,
|
||||
|
||||
///
|
||||
// Middle mouse button or meta/ctrl key while clicking.
|
||||
///
|
||||
WOD_NEW_BACKGROUND_TAB,
|
||||
|
||||
///
|
||||
// New popup window.
|
||||
///
|
||||
WOD_NEW_POPUP,
|
||||
|
||||
///
|
||||
// Shift key while clicking.
|
||||
///
|
||||
WOD_NEW_WINDOW,
|
||||
|
||||
///
|
||||
// Alt key while clicking.
|
||||
///
|
||||
WOD_SAVE_TO_DISK,
|
||||
|
||||
///
|
||||
// New off-the-record (incognito) window.
|
||||
///
|
||||
WOD_OFF_THE_RECORD,
|
||||
|
||||
///
|
||||
// Special case error condition from the renderer.
|
||||
///
|
||||
WOD_IGNORE_ACTION,
|
||||
|
||||
///
|
||||
// Activates an existing tab containing the url, rather than navigating.
|
||||
// This is similar to SINGLETON_TAB, but searches across all windows from
|
||||
// the current profile and anonymity (instead of just the current one);
|
||||
// closes the current tab on switching if the current tab was the NTP with
|
||||
// no session history; and behaves like CURRENT_TAB instead of
|
||||
// NEW_FOREGROUND_TAB when no existing tab is found.
|
||||
///
|
||||
WOD_SWITCH_TO_TAB,
|
||||
|
||||
///
|
||||
// Creates a new document picture-in-picture window showing a child WebView.
|
||||
///
|
||||
WOD_NEW_PICTURE_IN_PICTURE,
|
||||
WOD_IGNORE_ACTION
|
||||
} cef_window_open_disposition_t;
|
||||
|
||||
///
|
||||
@@ -1075,8 +1028,7 @@ typedef enum {
|
||||
} cef_postdataelement_type_t;
|
||||
|
||||
///
|
||||
// Resource type for a request. These constants match their equivalents in
|
||||
// Chromium's ResourceType and should not be renumbered.
|
||||
// Resource type for a request.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
@@ -1199,12 +1151,6 @@ typedef enum {
|
||||
///
|
||||
TT_EXPLICIT = 1,
|
||||
|
||||
///
|
||||
// User got to this page through a suggestion in the UI (for example, via the
|
||||
// destinations page). Chrome runtime only.
|
||||
///
|
||||
TT_AUTO_BOOKMARK = 2,
|
||||
|
||||
///
|
||||
// Source is a subframe navigation. This is any content that is automatically
|
||||
// loaded in a non-toplevel frame. For example, if a page consists of several
|
||||
@@ -1223,25 +1169,6 @@ typedef enum {
|
||||
///
|
||||
TT_MANUAL_SUBFRAME = 4,
|
||||
|
||||
///
|
||||
// User got to this page by typing in the URL bar and selecting an entry
|
||||
// that did not look like a URL. For example, a match might have the URL
|
||||
// of a Google search result page, but appear like "Search Google for ...".
|
||||
// These are not quite the same as EXPLICIT navigations because the user
|
||||
// didn't type or see the destination URL. Chrome runtime only.
|
||||
// See also TT_KEYWORD.
|
||||
///
|
||||
TT_GENERATED = 5,
|
||||
|
||||
///
|
||||
// This is a toplevel navigation. This is any content that is automatically
|
||||
// loaded in a toplevel frame. For example, opening a tab to show the ASH
|
||||
// screen saver, opening the devtools window, opening the NTP after the safe
|
||||
// browsing warning, opening web-based dialog boxes are examples of
|
||||
// AUTO_TOPLEVEL navigations. Chrome runtime only.
|
||||
///
|
||||
TT_AUTO_TOPLEVEL = 6,
|
||||
|
||||
///
|
||||
// Source is a form submission by the user. NOTE: In some situations
|
||||
// submitting a form does not result in this transition type. This can happen
|
||||
@@ -1256,25 +1183,6 @@ typedef enum {
|
||||
///
|
||||
TT_RELOAD = 8,
|
||||
|
||||
///
|
||||
// The url was generated from a replaceable keyword other than the default
|
||||
// search provider. If the user types a keyword (which also applies to
|
||||
// tab-to-search) in the omnibox this qualifier is applied to the transition
|
||||
// type of the generated url. TemplateURLModel then may generate an
|
||||
// additional visit with a transition type of TT_KEYWORD_GENERATED against the
|
||||
// url 'http://' + keyword. For example, if you do a tab-to-search against
|
||||
// wikipedia the generated url has a transition qualifer of TT_KEYWORD, and
|
||||
// TemplateURLModel generates a visit for 'wikipedia.org' with a transition
|
||||
// type of TT_KEYWORD_GENERATED. Chrome runtime only.
|
||||
///
|
||||
TT_KEYWORD = 9,
|
||||
|
||||
///
|
||||
// Corresponds to a visit generated for a keyword. See description of
|
||||
// TT_KEYWORD for more details. Chrome runtime only.
|
||||
///
|
||||
TT_KEYWORD_GENERATED = 10,
|
||||
|
||||
///
|
||||
// General mask defining the bits used for the source values.
|
||||
///
|
||||
@@ -1300,18 +1208,6 @@ typedef enum {
|
||||
///
|
||||
TT_DIRECT_LOAD_FLAG = 0x02000000,
|
||||
|
||||
///
|
||||
// User is navigating to the home page. Chrome runtime only.
|
||||
///
|
||||
TT_HOME_PAGE_FLAG = 0x04000000,
|
||||
|
||||
///
|
||||
// The transition originated from an external application; the exact
|
||||
// definition of this is embedder dependent. Chrome runtime and
|
||||
// extension system only.
|
||||
///
|
||||
TT_FROM_API_FLAG = 0x08000000,
|
||||
|
||||
///
|
||||
// The beginning of a navigation chain.
|
||||
///
|
||||
@@ -1720,7 +1616,8 @@ typedef enum {
|
||||
MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
|
||||
MENU_ID_ADD_TO_DICTIONARY = 206,
|
||||
|
||||
// Custom menu items originating from the renderer process.
|
||||
// Custom menu items originating from the renderer process. For example,
|
||||
// plugin placeholder menu items.
|
||||
MENU_ID_CUSTOM_FIRST = 220,
|
||||
MENU_ID_CUSTOM_LAST = 250,
|
||||
|
||||
@@ -1922,8 +1819,7 @@ typedef enum {
|
||||
} cef_context_menu_type_flags_t;
|
||||
|
||||
///
|
||||
// Supported context menu media types. These constants match their equivalents
|
||||
// in Chromium's ContextMenuDataMediaType and should not be renumbered.
|
||||
// Supported context menu media types.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
@@ -1943,10 +1839,6 @@ typedef enum {
|
||||
///
|
||||
CM_MEDIATYPE_AUDIO,
|
||||
///
|
||||
// An canvas node is selected.
|
||||
///
|
||||
CM_MEDIATYPE_CANVAS,
|
||||
///
|
||||
// A file node is selected.
|
||||
///
|
||||
CM_MEDIATYPE_FILE,
|
||||
@@ -1957,31 +1849,24 @@ typedef enum {
|
||||
} cef_context_menu_media_type_t;
|
||||
|
||||
///
|
||||
// Supported context menu media state bit flags. These constants match their
|
||||
// equivalents in Chromium's ContextMenuData::MediaFlags and should not be
|
||||
// renumbered.
|
||||
// Supported context menu media state bit flags.
|
||||
///
|
||||
typedef enum {
|
||||
CM_MEDIAFLAG_NONE = 0,
|
||||
CM_MEDIAFLAG_IN_ERROR = 1 << 0,
|
||||
CM_MEDIAFLAG_ERROR = 1 << 0,
|
||||
CM_MEDIAFLAG_PAUSED = 1 << 1,
|
||||
CM_MEDIAFLAG_MUTED = 1 << 2,
|
||||
CM_MEDIAFLAG_LOOP = 1 << 3,
|
||||
CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
|
||||
CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
|
||||
CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 1 << 6,
|
||||
CM_MEDIAFLAG_CONTROLS = 1 << 7,
|
||||
CM_MEDIAFLAG_HAS_VIDEO = 1 << 6,
|
||||
CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7,
|
||||
CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
|
||||
CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
|
||||
CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1 << 10,
|
||||
CM_MEDIAFLAG_PICTURE_IN_PICTURE = 1 << 11,
|
||||
CM_MEDIAFLAG_CAN_LOOP = 1 << 12,
|
||||
} cef_context_menu_media_state_flags_t;
|
||||
|
||||
///
|
||||
// Supported context menu edit state bit flags. These constants match their
|
||||
// equivalents in Chromium's ContextMenuDataEditFlags and should not be
|
||||
// renumbered.
|
||||
// Supported context menu edit state bit flags.
|
||||
///
|
||||
typedef enum {
|
||||
CM_EDITFLAG_NONE = 0,
|
||||
@@ -1993,7 +1878,6 @@ typedef enum {
|
||||
CM_EDITFLAG_CAN_DELETE = 1 << 5,
|
||||
CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
|
||||
CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
|
||||
CM_EDITFLAG_CAN_EDIT_RICHLY = 1 << 8,
|
||||
} cef_context_menu_edit_state_flags_t;
|
||||
|
||||
///
|
||||
@@ -2237,6 +2121,26 @@ typedef enum {
|
||||
// already exists.
|
||||
///
|
||||
FILE_DIALOG_SAVE,
|
||||
|
||||
///
|
||||
// General mask defining the bits used for the type values.
|
||||
///
|
||||
FILE_DIALOG_TYPE_MASK = 0xFF,
|
||||
|
||||
// Qualifiers.
|
||||
// Any of the type values above can be augmented by one or more qualifiers.
|
||||
// These qualifiers further define the dialog behavior.
|
||||
|
||||
///
|
||||
// Prompt to overwrite if the user selects an existing file with the Save
|
||||
// dialog.
|
||||
///
|
||||
FILE_DIALOG_OVERWRITEPROMPT_FLAG = 0x01000000,
|
||||
|
||||
///
|
||||
// Do not display read-only files.
|
||||
///
|
||||
FILE_DIALOG_HIDEREADONLY_FLAG = 0x02000000,
|
||||
} cef_file_dialog_mode_t;
|
||||
|
||||
///
|
||||
@@ -2554,6 +2458,32 @@ typedef enum {
|
||||
SCALE_FACTOR_300P,
|
||||
} cef_scale_factor_t;
|
||||
|
||||
///
|
||||
// Plugin policies supported by CefRequestContextHandler::OnBeforePluginLoad.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Allow the content.
|
||||
///
|
||||
PLUGIN_POLICY_ALLOW,
|
||||
|
||||
///
|
||||
// Allow important content and block unimportant content based on heuristics.
|
||||
// The user can manually load blocked content.
|
||||
///
|
||||
PLUGIN_POLICY_DETECT_IMPORTANT,
|
||||
|
||||
///
|
||||
// Block the content. The user can manually load blocked content.
|
||||
///
|
||||
PLUGIN_POLICY_BLOCK,
|
||||
|
||||
///
|
||||
// Disable the content. The user cannot load disabled content.
|
||||
///
|
||||
PLUGIN_POLICY_DISABLE,
|
||||
} cef_plugin_policy_t;
|
||||
|
||||
///
|
||||
// Policy for how the Referrer HTTP header value will be sent during navigation.
|
||||
// If the `--no-referrers` command-line flag is specified then the policy value
|
||||
@@ -3102,14 +3032,8 @@ typedef enum {
|
||||
// pass-through mode).
|
||||
CEF_CHANNEL_LAYOUT_BITSTREAM = 32,
|
||||
|
||||
// Front L, Front R, Front C, LFE, Side L, Side R,
|
||||
// Front Height L, Front Height R, Rear Height L, Rear Height R
|
||||
// Will be represented as six channels (5.1) due to eight channel limit
|
||||
// kMaxConcurrentChannels
|
||||
CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33,
|
||||
|
||||
// Max value, must always equal the largest entry ever logged.
|
||||
CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX
|
||||
CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_BITSTREAM
|
||||
} cef_channel_layout_t;
|
||||
|
||||
///
|
||||
|
@@ -69,7 +69,7 @@ extern "C" {
|
||||
// thread-safe and must only be accessed on the browser process UI thread.
|
||||
///
|
||||
#if defined(CEF_X11)
|
||||
CEF_EXPORT XDisplay* cef_get_xdisplay(void);
|
||||
CEF_EXPORT XDisplay* cef_get_xdisplay();
|
||||
#endif
|
||||
|
||||
///
|
||||
|
@@ -546,6 +546,7 @@ struct CefSettingsTraits {
|
||||
cef_string_clear(&s->locales_dir_path);
|
||||
cef_string_clear(&s->accept_language_list);
|
||||
cef_string_clear(&s->cookieable_schemes_list);
|
||||
cef_string_clear(&s->application_client_id_for_file_scanning);
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src,
|
||||
@@ -604,6 +605,10 @@ struct CefSettingsTraits {
|
||||
&target->cookieable_schemes_list, copy);
|
||||
target->cookieable_schemes_exclude_defaults =
|
||||
src->cookieable_schemes_exclude_defaults;
|
||||
|
||||
cef_string_set(src->application_client_id_for_file_scanning.str,
|
||||
src->application_client_id_for_file_scanning.length,
|
||||
&target->application_client_id_for_file_scanning, copy);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -699,6 +704,7 @@ struct CefBrowserSettingsTraits {
|
||||
target->javascript_close_windows = src->javascript_close_windows;
|
||||
target->javascript_access_clipboard = src->javascript_access_clipboard;
|
||||
target->javascript_dom_paste = src->javascript_dom_paste;
|
||||
target->plugins = src->plugins;
|
||||
target->image_loading = src->image_loading;
|
||||
target->image_shrink_standalone_to_fit =
|
||||
src->image_shrink_standalone_to_fit;
|
||||
@@ -713,8 +719,6 @@ struct CefBrowserSettingsTraits {
|
||||
cef_string_set(src->accept_language_list.str,
|
||||
src->accept_language_list.length,
|
||||
&target->accept_language_list, copy);
|
||||
|
||||
target->chrome_status_bubble = src->chrome_status_bubble;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -102,9 +102,6 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
|
||||
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
|
||||
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
|
||||
|
||||
CefWindowInfo& operator=(const CefWindowInfo&) = default;
|
||||
CefWindowInfo& operator=(CefWindowInfo&&) = default;
|
||||
|
||||
///
|
||||
// Create the browser as a child window.
|
||||
///
|
||||
|
@@ -63,13 +63,6 @@ class CefWindowDelegate : public CefPanelDelegate {
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowDestroyed(CefRefPtr<CefWindow> window) {}
|
||||
|
||||
///
|
||||
// Called when |window| is activated or deactivated.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnWindowActivationChanged(CefRefPtr<CefWindow> window,
|
||||
bool active) {}
|
||||
|
||||
///
|
||||
// Return the parent for |window| or NULL if the |window| does not have a
|
||||
// parent. Windows with parents will not get a taskbar button. Set |is_menu|
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_lock.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_stream.h"
|
||||
|
||||
@@ -56,9 +57,6 @@ class CefByteReadHandler : public CefReadHandler {
|
||||
size_t size,
|
||||
CefRefPtr<CefBaseRefCounted> source);
|
||||
|
||||
CefByteReadHandler(const CefByteReadHandler&) = delete;
|
||||
CefByteReadHandler& operator=(const CefByteReadHandler&) = delete;
|
||||
|
||||
// CefReadHandler methods.
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) override;
|
||||
virtual int Seek(int64 offset, int whence) override;
|
||||
@@ -75,6 +73,7 @@ class CefByteReadHandler : public CefReadHandler {
|
||||
base::Lock lock_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefByteReadHandler);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefByteReadHandler);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_WRAPPER_CEF_BYTE_READ_HANDLER_H_
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_callback_forward.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_task.h"
|
||||
|
||||
///
|
||||
|
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "include/base/cef_bind.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_task.h"
|
||||
|
||||
#define CEF_REQUIRE_UI_THREAD() DCHECK(CefCurrentlyOn(TID_UI));
|
||||
@@ -139,10 +140,6 @@ class CefScopedArgArray {
|
||||
}
|
||||
array_[argc] = NULL;
|
||||
}
|
||||
|
||||
CefScopedArgArray(const CefScopedArgArray&) = delete;
|
||||
CefScopedArgArray& operator=(const CefScopedArgArray&) = delete;
|
||||
|
||||
~CefScopedArgArray() { delete[] array_; }
|
||||
|
||||
char** array() const { return array_; }
|
||||
@@ -153,6 +150,8 @@ class CefScopedArgArray {
|
||||
// Keep values in a vector separate from |array_| because various users may
|
||||
// modify |array_| and we still want to clean up memory properly.
|
||||
std::vector<std::string> values_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefScopedArgArray);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_WRAPPER_CEF_HELPERS_H_
|
||||
|
@@ -36,6 +36,8 @@
|
||||
#ifdef __cplusplus
|
||||
#include <string>
|
||||
|
||||
#include "include/base/cef_macros.h"
|
||||
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -49,7 +51,7 @@ int cef_load_library(const char* path);
|
||||
// Unload the CEF library that was previously loaded. Returns true (1)
|
||||
// on success and false (0) on failure.
|
||||
///
|
||||
int cef_unload_library(void);
|
||||
int cef_unload_library();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -97,10 +99,6 @@ int cef_unload_library(void);
|
||||
class CefScopedLibraryLoader {
|
||||
public:
|
||||
CefScopedLibraryLoader();
|
||||
|
||||
CefScopedLibraryLoader(const CefScopedLibraryLoader&) = delete;
|
||||
CefScopedLibraryLoader& operator=(const CefScopedLibraryLoader&) = delete;
|
||||
|
||||
~CefScopedLibraryLoader();
|
||||
|
||||
///
|
||||
@@ -121,6 +119,7 @@ class CefScopedLibraryLoader {
|
||||
bool Load(bool helper);
|
||||
|
||||
bool loaded_;
|
||||
DISALLOW_COPY_AND_ASSIGN(CefScopedLibraryLoader);
|
||||
};
|
||||
|
||||
#endif // defined(OS_MAC)
|
||||
|
@@ -78,7 +78,7 @@
|
||||
// with an error code of -1.
|
||||
//
|
||||
// Queries can be either persistent or non-persistent. If the query is
|
||||
// persistent then the callbacks will remain registered until one of the
|
||||
// persistent than the callbacks will remain registered until one of the
|
||||
// following conditions are met:
|
||||
//
|
||||
// A. The query is canceled in JavaScript using the |window.cefQueryCancel|
|
||||
@@ -245,7 +245,7 @@ class CefMessageRouterBrowserSide
|
||||
///
|
||||
class Handler {
|
||||
public:
|
||||
using Callback = CefMessageRouterBrowserSide::Callback;
|
||||
typedef CefMessageRouterBrowserSide::Callback Callback;
|
||||
|
||||
///
|
||||
// Executed when a new query is received. |query_id| uniquely identifies the
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "include/base/cef_callback.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/base/cef_weak_ptr.h"
|
||||
#include "include/cef_request_handler.h"
|
||||
@@ -100,9 +101,6 @@ class CefResourceManager
|
||||
///
|
||||
class Request : public base::RefCountedThreadSafe<Request> {
|
||||
public:
|
||||
Request(const Request&) = delete;
|
||||
Request& operator=(const Request&) = delete;
|
||||
|
||||
///
|
||||
// Returns the URL associated with this request. The returned value will be
|
||||
// fully qualified but will not contain query or fragment components. It
|
||||
@@ -178,9 +176,11 @@ class CefResourceManager
|
||||
|
||||
// Params that stay with this request object. Safe to access on any thread.
|
||||
RequestParams params_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Request);
|
||||
};
|
||||
|
||||
using RequestList = std::list<scoped_refptr<Request>>;
|
||||
typedef std::list<scoped_refptr<Request>> RequestList;
|
||||
|
||||
///
|
||||
// Interface implemented by resource providers. A provider may be created on
|
||||
@@ -210,9 +210,6 @@ class CefResourceManager
|
||||
|
||||
CefResourceManager();
|
||||
|
||||
CefResourceManager(const CefResourceManager&) = delete;
|
||||
CefResourceManager& operator=(const CefResourceManager&) = delete;
|
||||
|
||||
///
|
||||
// Add a provider that maps requests for |url| to |content|. |url| should be
|
||||
// fully qualified but not include a query or fragment component. If
|
||||
@@ -319,7 +316,7 @@ class CefResourceManager
|
||||
|
||||
// Provider and associated information.
|
||||
struct ProviderEntry;
|
||||
using ProviderEntryList = std::list<ProviderEntry*>;
|
||||
typedef std::list<ProviderEntry*> ProviderEntryList;
|
||||
|
||||
// Values associated with the pending request only. Ownership will be passed
|
||||
// between requests and the resource manager as request handling proceeds.
|
||||
@@ -360,7 +357,7 @@ class CefResourceManager
|
||||
ProviderEntryList providers_;
|
||||
|
||||
// Map of response ID to pending CefResourceHandler object.
|
||||
using PendingHandlersMap = std::map<uint64, CefRefPtr<CefResourceHandler>>;
|
||||
typedef std::map<uint64, CefRefPtr<CefResourceHandler>> PendingHandlersMap;
|
||||
PendingHandlersMap pending_handlers_;
|
||||
|
||||
UrlFilter url_filter_;
|
||||
@@ -368,6 +365,8 @@ class CefResourceManager
|
||||
|
||||
// Must be the last member. Created and accessed on the IO thread.
|
||||
std::unique_ptr<base::WeakPtrFactory<CefResourceManager>> weak_ptr_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefResourceManager);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_WRAPPER_CEF_RESOURCE_MANAGER_H_
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_base.h"
|
||||
|
||||
///
|
||||
@@ -59,9 +60,6 @@ class CefScopedTempDir {
|
||||
///
|
||||
CefScopedTempDir();
|
||||
|
||||
CefScopedTempDir(const CefScopedTempDir&) = delete;
|
||||
CefScopedTempDir& operator=(const CefScopedTempDir&) = delete;
|
||||
|
||||
///
|
||||
// Recursively delete path.
|
||||
///
|
||||
@@ -113,6 +111,8 @@ class CefScopedTempDir {
|
||||
|
||||
private:
|
||||
CefString path_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefScopedTempDir);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_SCOPED_TEMP_DIR_H_
|
||||
|
@@ -37,6 +37,7 @@
|
||||
#define CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/cef_resource_handler.h"
|
||||
#include "include/cef_response.h"
|
||||
#include "include/cef_stream.h"
|
||||
@@ -60,9 +61,6 @@ class CefStreamResourceHandler : public CefResourceHandler {
|
||||
CefResponse::HeaderMap header_map,
|
||||
CefRefPtr<CefStreamReader> stream);
|
||||
|
||||
CefStreamResourceHandler(const CefStreamResourceHandler&) = delete;
|
||||
CefStreamResourceHandler& operator=(const CefStreamResourceHandler&) = delete;
|
||||
|
||||
// CefResourceHandler methods.
|
||||
bool Open(CefRefPtr<CefRequest> request,
|
||||
bool& handle_request,
|
||||
@@ -84,6 +82,7 @@ class CefStreamResourceHandler : public CefResourceHandler {
|
||||
const CefRefPtr<CefStreamReader> stream_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefStreamResourceHandler);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefStreamResourceHandler);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_WRAPPER_CEF_STREAM_RESOURCE_HANDLER_H_
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "include/base/cef_lock.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_xml_reader.h"
|
||||
@@ -72,8 +73,8 @@ class CefStreamReader;
|
||||
///
|
||||
class CefXmlObject : public base::RefCountedThreadSafe<CefXmlObject> {
|
||||
public:
|
||||
using ObjectVector = std::vector<CefRefPtr<CefXmlObject>>;
|
||||
using AttributeMap = std::map<CefString, CefString>;
|
||||
typedef std::vector<CefRefPtr<CefXmlObject>> ObjectVector;
|
||||
typedef std::map<CefString, CefString> AttributeMap;
|
||||
|
||||
///
|
||||
// Create a new object with the specified name. An object name must always be
|
||||
@@ -81,9 +82,6 @@ class CefXmlObject : public base::RefCountedThreadSafe<CefXmlObject> {
|
||||
///
|
||||
explicit CefXmlObject(const CefString& name);
|
||||
|
||||
CefXmlObject(const CefXmlObject&) = delete;
|
||||
CefXmlObject& operator=(const CefXmlObject&) = delete;
|
||||
|
||||
///
|
||||
// Load the contents of the specified XML stream into this object. The
|
||||
// existing children and attributes, if any, will first be cleared.
|
||||
@@ -192,6 +190,8 @@ class CefXmlObject : public base::RefCountedThreadSafe<CefXmlObject> {
|
||||
ObjectVector children_;
|
||||
|
||||
base::Lock lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefXmlObject);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_WRAPPER_CEF_XML_OBJECT_H_
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <map>
|
||||
|
||||
#include "include/base/cef_lock.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_ref_counted.h"
|
||||
#include "include/cef_base.h"
|
||||
|
||||
@@ -79,16 +80,13 @@ class CefZipArchive : public base::RefCountedThreadSafe<CefZipArchive> {
|
||||
virtual CefRefPtr<CefStreamReader> GetStreamReader() const = 0;
|
||||
};
|
||||
|
||||
using FileMap = std::map<CefString, CefRefPtr<File>>;
|
||||
typedef std::map<CefString, CefRefPtr<File>> FileMap;
|
||||
|
||||
///
|
||||
// Create a new object.
|
||||
///
|
||||
CefZipArchive();
|
||||
|
||||
CefZipArchive(const CefZipArchive&) = delete;
|
||||
CefZipArchive& operator=(const CefZipArchive&) = delete;
|
||||
|
||||
///
|
||||
// Load the contents of the specified zip archive stream into this object.
|
||||
// If the zip archive requires a password then provide it via |password|.
|
||||
@@ -138,6 +136,8 @@ class CefZipArchive : public base::RefCountedThreadSafe<CefZipArchive> {
|
||||
FileMap contents_;
|
||||
|
||||
mutable base::Lock lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefZipArchive);
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_WRAPPER_CEF_ZIP_ARCHIVE_H_
|
||||
|
@@ -55,9 +55,6 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkWriter::Listener {
|
||||
public:
|
||||
CefVisitedLinkListener() { DCHECK(listener_map_.empty()); }
|
||||
|
||||
CefVisitedLinkListener(const CefVisitedLinkListener&) = delete;
|
||||
CefVisitedLinkListener& operator=(const CefVisitedLinkListener&) = delete;
|
||||
|
||||
void CreateListenerForContext(content::BrowserContext* context) {
|
||||
CEF_REQUIRE_UIT();
|
||||
auto listener =
|
||||
@@ -97,10 +94,12 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkWriter::Listener {
|
||||
|
||||
private:
|
||||
// Map of AlloyBrowserContext to the associated VisitedLinkEventListener.
|
||||
using ListenerMap =
|
||||
std::map<const content::BrowserContext*,
|
||||
std::unique_ptr<visitedlink::VisitedLinkEventListener>>;
|
||||
typedef std::map<const content::BrowserContext*,
|
||||
std::unique_ptr<visitedlink::VisitedLinkEventListener>>
|
||||
ListenerMap;
|
||||
ListenerMap listener_map_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefVisitedLinkListener);
|
||||
};
|
||||
|
||||
AlloyBrowserContext::AlloyBrowserContext(
|
||||
|
@@ -39,9 +39,6 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
|
||||
public:
|
||||
explicit AlloyBrowserContext(const CefRequestContextSettings& settings);
|
||||
|
||||
AlloyBrowserContext(const AlloyBrowserContext&) = delete;
|
||||
AlloyBrowserContext& operator=(const AlloyBrowserContext&) = delete;
|
||||
|
||||
// CefBrowserContext overrides.
|
||||
content::BrowserContext* AsBrowserContext() override { return this; }
|
||||
Profile* AsProfile() override { return this; }
|
||||
@@ -145,6 +142,8 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
|
||||
std::unique_ptr<content::ResourceContext> resource_context_;
|
||||
|
||||
scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AlloyBrowserContext);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_CONTEXT_H_
|
||||
|
@@ -9,7 +9,6 @@
|
||||
#include <utility>
|
||||
|
||||
#include "libcef/browser/alloy/alloy_browser_context.h"
|
||||
#include "libcef/browser/alloy/browser_platform_delegate_alloy.h"
|
||||
#include "libcef/browser/audio_capturer.h"
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/browser_info.h"
|
||||
@@ -18,6 +17,7 @@
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/devtools/devtools_manager.h"
|
||||
#include "libcef/browser/media_capture_devices_dispatcher.h"
|
||||
#include "libcef/browser/native/cursor_util.h"
|
||||
#include "libcef/browser/osr/osr_util.h"
|
||||
#include "libcef/browser/request_context_impl.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
@@ -32,9 +32,9 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/callback_helpers.h"
|
||||
#include "base/command_line.h"
|
||||
#include "chrome/browser/file_select_helper.h"
|
||||
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
|
||||
#include "content/browser/gpu/compositor_util.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/public/browser/desktop_media_id.h"
|
||||
#include "content/public/browser/file_select_listener.h"
|
||||
#include "content/public/browser/host_zoom_map.h"
|
||||
@@ -46,11 +46,12 @@
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "content/public/browser/render_widget_host_observer.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/extension.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "third_party/blink/public/mojom/widget/platform_widget.mojom-test-utils.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
|
||||
using content::KeyboardEventProcessingResult;
|
||||
@@ -84,6 +85,47 @@ void ShowDevToolsWithHelper(ShowDevToolsHelper* helper) {
|
||||
delete helper;
|
||||
}
|
||||
|
||||
class CefWidgetHostInterceptor
|
||||
: public blink::mojom::WidgetHostInterceptorForTesting,
|
||||
public content::RenderWidgetHostObserver {
|
||||
public:
|
||||
CefWidgetHostInterceptor(AlloyBrowserHostImpl* browser,
|
||||
content::RenderViewHost* render_view_host)
|
||||
: browser_(browser),
|
||||
render_widget_host_(
|
||||
content::RenderWidgetHostImpl::From(render_view_host->GetWidget())),
|
||||
impl_(render_widget_host_->widget_host_receiver_for_testing()
|
||||
.SwapImplForTesting(this)) {
|
||||
render_widget_host_->AddObserver(this);
|
||||
}
|
||||
|
||||
blink::mojom::WidgetHost* GetForwardingInterface() override { return impl_; }
|
||||
|
||||
// WidgetHostInterceptorForTesting method:
|
||||
void SetCursor(const ui::Cursor& cursor) override {
|
||||
if (cursor_util::OnCursorChange(browser_, cursor)) {
|
||||
// Don't change the cursor.
|
||||
return;
|
||||
}
|
||||
|
||||
GetForwardingInterface()->SetCursor(cursor);
|
||||
}
|
||||
|
||||
// RenderWidgetHostObserver method:
|
||||
void RenderWidgetHostDestroyed(
|
||||
content::RenderWidgetHost* widget_host) override {
|
||||
widget_host->RemoveObserver(this);
|
||||
delete this;
|
||||
}
|
||||
|
||||
private:
|
||||
AlloyBrowserHostImpl* const browser_;
|
||||
content::RenderWidgetHostImpl* const render_widget_host_;
|
||||
blink::mojom::WidgetHost* const impl_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefWidgetHostInterceptor);
|
||||
};
|
||||
|
||||
static constexpr base::TimeDelta kRecentlyAudibleTimeout = base::Seconds(2);
|
||||
|
||||
} // namespace
|
||||
@@ -199,15 +241,7 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::CreateInternal(
|
||||
// Notify that the browser has been created. These must be delivered in the
|
||||
// expected order.
|
||||
|
||||
if (opener && opener->platform_delegate_) {
|
||||
// 1. Notify the opener browser's platform delegate. With Views this will
|
||||
// result in a call to CefBrowserViewDelegate::OnPopupBrowserViewCreated().
|
||||
// Do this first for consistency with the Chrome runtime.
|
||||
opener->platform_delegate_->PopupBrowserCreated(browser.get(),
|
||||
is_devtools_popup);
|
||||
}
|
||||
|
||||
// 2. Notify the browser's LifeSpanHandler. This must always be the first
|
||||
// 1. Notify the browser's LifeSpanHandler. This must always be the first
|
||||
// notification for the browser. Block navigation to avoid issues with focus
|
||||
// changes being sent to an unbound interface.
|
||||
{
|
||||
@@ -215,10 +249,17 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::CreateInternal(
|
||||
browser->OnAfterCreated();
|
||||
}
|
||||
|
||||
// 3. Notify the platform delegate. With Views this will result in a call to
|
||||
// 2. Notify the platform delegate. With Views this will result in a call to
|
||||
// CefBrowserViewDelegate::OnBrowserCreated().
|
||||
browser->platform_delegate_->NotifyBrowserCreated();
|
||||
|
||||
if (opener && opener->platform_delegate_) {
|
||||
// 3. Notify the opener browser's platform delegate. With Views this will
|
||||
// result in a call to CefBrowserViewDelegate::OnPopupBrowserViewCreated().
|
||||
opener->platform_delegate_->PopupBrowserCreated(browser.get(),
|
||||
is_devtools_popup);
|
||||
}
|
||||
|
||||
return browser;
|
||||
}
|
||||
|
||||
@@ -312,6 +353,20 @@ bool AlloyBrowserHostImpl::TryCloseBrowser() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::SetFocus(bool focus) {
|
||||
// Always execute asynchronously to work around issue #3040.
|
||||
CEF_POST_TASK(CEF_UIT, base::BindOnce(&AlloyBrowserHostImpl::SetFocusInternal,
|
||||
this, focus));
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::SetFocusInternal(bool focus) {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (focus)
|
||||
OnSetFocus(FOCUS_SOURCE_SYSTEM);
|
||||
else if (platform_delegate_)
|
||||
platform_delegate_->SetFocus(false);
|
||||
}
|
||||
|
||||
CefWindowHandle AlloyBrowserHostImpl::GetWindowHandle() {
|
||||
if (is_views_hosted_ && CEF_CURRENTLY_ON_UIT()) {
|
||||
// Always return the most up-to-date window handle for a views-hosted
|
||||
@@ -349,6 +404,27 @@ void AlloyBrowserHostImpl::SetZoomLevel(double zoomLevel) {
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::RunFileDialog(
|
||||
FileDialogMode mode,
|
||||
const CefString& title,
|
||||
const CefString& default_file_path,
|
||||
const std::vector<CefString>& accept_filters,
|
||||
int selected_accept_filter,
|
||||
CefRefPtr<CefRunFileDialogCallback> callback) {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(&AlloyBrowserHostImpl::RunFileDialog, this,
|
||||
mode, title, default_file_path, accept_filters,
|
||||
selected_accept_filter, callback));
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureFileDialogManager();
|
||||
file_dialog_manager_->RunFileDialog(mode, title, default_file_path,
|
||||
accept_filters, selected_accept_filter,
|
||||
callback);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::Print() {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(CEF_UIT, base::BindOnce(&AlloyBrowserHostImpl::Print, this));
|
||||
@@ -373,19 +449,21 @@ void AlloyBrowserHostImpl::PrintToPDF(const CefString& path,
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::Find(const CefString& searchText,
|
||||
void AlloyBrowserHostImpl::Find(int identifier,
|
||||
const CefString& searchText,
|
||||
bool forward,
|
||||
bool matchCase,
|
||||
bool findNext) {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(&AlloyBrowserHostImpl::Find, this, searchText,
|
||||
forward, matchCase, findNext));
|
||||
base::BindOnce(&AlloyBrowserHostImpl::Find, this, identifier,
|
||||
searchText, forward, matchCase, findNext));
|
||||
return;
|
||||
}
|
||||
|
||||
if (platform_delegate_) {
|
||||
platform_delegate_->Find(searchText, forward, matchCase, findNext);
|
||||
platform_delegate_->Find(identifier, searchText, forward, matchCase,
|
||||
findNext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,6 +664,20 @@ void AlloyBrowserHostImpl::SendCaptureLostEvent() {
|
||||
platform_delegate_->SendCaptureLostEvent();
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::NotifyMoveOrResizeStarted() {
|
||||
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MAC))
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::BindOnce(&AlloyBrowserHostImpl::NotifyMoveOrResizeStarted, this));
|
||||
return;
|
||||
}
|
||||
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->NotifyMoveOrResizeStarted();
|
||||
#endif
|
||||
}
|
||||
|
||||
int AlloyBrowserHostImpl::GetWindowlessFrameRate() {
|
||||
// Verify that this method is being called on the UI thread.
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
@@ -646,6 +738,8 @@ void AlloyBrowserHostImpl::DestroyBrowser() {
|
||||
OnBeforeClose();
|
||||
|
||||
// Destroy any platform constructs first.
|
||||
if (file_dialog_manager_.get())
|
||||
file_dialog_manager_->Destroy();
|
||||
if (javascript_dialog_manager_.get())
|
||||
javascript_dialog_manager_->Destroy();
|
||||
if (menu_manager_.get())
|
||||
@@ -728,6 +822,13 @@ void AlloyBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
|
||||
platform_delegate_->SetFocus(true);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::RunFileChooser(
|
||||
const CefFileDialogRunner::FileChooserParams& params,
|
||||
CefFileDialogRunner::RunFileChooserCallback callback) {
|
||||
EnsureFileDialogManager();
|
||||
file_dialog_manager_->RunFileChooser(params, std::move(callback));
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::EnterFullscreenModeForTab(
|
||||
content::RenderFrameHost* requesting_frame,
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
@@ -758,21 +859,13 @@ void AlloyBrowserHostImpl::FindReply(content::WebContents* web_contents,
|
||||
const gfx::Rect& selection_rect,
|
||||
int active_match_ordinal,
|
||||
bool final_update) {
|
||||
auto alloy_delegate =
|
||||
static_cast<CefBrowserPlatformDelegateAlloy*>(platform_delegate());
|
||||
if (alloy_delegate->HandleFindReply(request_id, number_of_matches,
|
||||
selection_rect, active_match_ordinal,
|
||||
final_update)) {
|
||||
if (client_) {
|
||||
if (auto handler = client_->GetFindHandler()) {
|
||||
const auto& details = alloy_delegate->last_search_result();
|
||||
CefRect rect(details.selection_rect().x(), details.selection_rect().y(),
|
||||
details.selection_rect().width(),
|
||||
details.selection_rect().height());
|
||||
handler->OnFindResult(
|
||||
this, details.request_id(), details.number_of_matches(), rect,
|
||||
details.active_match_ordinal(), details.final_update());
|
||||
}
|
||||
if (client_.get()) {
|
||||
CefRefPtr<CefFindHandler> handler = client_->GetFindHandler();
|
||||
if (handler.get()) {
|
||||
CefRect rect(selection_rect.x(), selection_rect.y(),
|
||||
selection_rect.width(), selection_rect.height());
|
||||
handler->OnFindResult(this, request_id, number_of_matches, rect,
|
||||
active_match_ordinal, final_update);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1032,8 +1125,8 @@ void AlloyBrowserHostImpl::AddNewContents(
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
contents_delegate_->LoadingStateChanged(source, should_show_loading_ui);
|
||||
bool to_different_document) {
|
||||
contents_delegate_->LoadingStateChanged(source, to_different_document);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::CloseContents(content::WebContents* source) {
|
||||
@@ -1124,13 +1217,6 @@ bool AlloyBrowserHostImpl::HandleContextMenu(
|
||||
return HandleContextMenu(web_contents(), params);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::CanDownload(
|
||||
const GURL& url,
|
||||
const std::string& request_method,
|
||||
base::OnceCallback<void(bool)> callback) {
|
||||
contents_delegate_->CanDownload(url, request_method, std::move(callback));
|
||||
}
|
||||
|
||||
KeyboardEventProcessingResult AlloyBrowserHostImpl::PreHandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
@@ -1249,9 +1335,8 @@ void AlloyBrowserHostImpl::RunFileChooser(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
scoped_refptr<content::FileSelectListener> listener,
|
||||
const blink::mojom::FileChooserParams& params) {
|
||||
// This will eventually call into CefFileDialogManager.
|
||||
FileSelectHelper::RunFileChooser(render_frame_host, std::move(listener),
|
||||
params);
|
||||
EnsureFileDialogManager();
|
||||
file_dialog_manager_->RunFileChooser(listener, params);
|
||||
}
|
||||
|
||||
bool AlloyBrowserHostImpl::HandleContextMenu(
|
||||
@@ -1267,7 +1352,7 @@ bool AlloyBrowserHostImpl::HandleContextMenu(
|
||||
|
||||
void AlloyBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
|
||||
const gfx::Size& pref_size) {
|
||||
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC))
|
||||
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MAC))
|
||||
CEF_REQUIRE_UIT();
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->SizeTo(pref_size.width(), pref_size.height());
|
||||
@@ -1363,13 +1448,15 @@ bool AlloyBrowserHostImpl::IsNeverComposited(
|
||||
}
|
||||
|
||||
content::PictureInPictureResult AlloyBrowserHostImpl::EnterPictureInPicture(
|
||||
content::WebContents* web_contents) {
|
||||
content::WebContents* web_contents,
|
||||
const viz::SurfaceId& surface_id,
|
||||
const gfx::Size& natural_size) {
|
||||
if (!IsPictureInPictureSupported()) {
|
||||
return content::PictureInPictureResult::kNotSupported;
|
||||
}
|
||||
|
||||
return PictureInPictureWindowManager::GetInstance()
|
||||
->EnterVideoPictureInPicture(web_contents);
|
||||
return PictureInPictureWindowManager::GetInstance()->EnterPictureInPicture(
|
||||
web_contents, surface_id, natural_size);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::ExitPictureInPicture() {
|
||||
@@ -1382,14 +1469,26 @@ bool AlloyBrowserHostImpl::IsBackForwardCacheSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AlloyBrowserHostImpl::IsPrerender2Supported(
|
||||
content::WebContents& web_contents) {
|
||||
bool AlloyBrowserHostImpl::IsPrerender2Supported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// content::WebContentsObserver methods.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void AlloyBrowserHostImpl::RenderFrameCreated(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
if (render_frame_host->GetParent() == nullptr) {
|
||||
auto render_view_host = render_frame_host->GetRenderViewHost();
|
||||
new CefWidgetHostInterceptor(this, render_view_host);
|
||||
platform_delegate_->RenderViewCreated(render_view_host);
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::RenderViewReady() {
|
||||
platform_delegate_->RenderViewReady();
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::DidFinishNavigation(
|
||||
content::NavigationHandle* navigation_handle) {
|
||||
if (web_contents()) {
|
||||
@@ -1547,3 +1646,11 @@ void AlloyBrowserHostImpl::UpdateDragCursor(
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->UpdateDragCursor(operation);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::EnsureFileDialogManager() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!file_dialog_manager_.get() && platform_delegate_) {
|
||||
file_dialog_manager_.reset(new CefFileDialogManager(
|
||||
this, platform_delegate_->CreateFileDialogRunner()));
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include "include/cef_frame.h"
|
||||
#include "libcef/browser/browser_host_base.h"
|
||||
#include "libcef/browser/browser_info.h"
|
||||
#include "libcef/browser/file_dialog_manager.h"
|
||||
#include "libcef/browser/frame_host_impl.h"
|
||||
#include "libcef/browser/javascript_dialog_manager.h"
|
||||
#include "libcef/browser/menu_manager.h"
|
||||
@@ -78,15 +79,23 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
// CefBrowserHost methods.
|
||||
void CloseBrowser(bool force_close) override;
|
||||
bool TryCloseBrowser() override;
|
||||
void SetFocus(bool focus) override;
|
||||
CefWindowHandle GetWindowHandle() override;
|
||||
CefWindowHandle GetOpenerWindowHandle() override;
|
||||
double GetZoomLevel() override;
|
||||
void SetZoomLevel(double zoomLevel) override;
|
||||
void RunFileDialog(FileDialogMode mode,
|
||||
const CefString& title,
|
||||
const CefString& default_file_path,
|
||||
const std::vector<CefString>& accept_filters,
|
||||
int selected_accept_filter,
|
||||
CefRefPtr<CefRunFileDialogCallback> callback) override;
|
||||
void Print() override;
|
||||
void PrintToPDF(const CefString& path,
|
||||
const CefPdfPrintSettings& settings,
|
||||
CefRefPtr<CefPdfPrintCallback> callback) override;
|
||||
void Find(const CefString& searchText,
|
||||
void Find(int identifier,
|
||||
const CefString& searchText,
|
||||
bool forward,
|
||||
bool matchCase,
|
||||
bool findNext) override;
|
||||
@@ -105,6 +114,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
void SendExternalBeginFrame() override;
|
||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||
void SendCaptureLostEvent() override;
|
||||
void NotifyMoveOrResizeStarted() override;
|
||||
int GetWindowlessFrameRate() override;
|
||||
void SetWindowlessFrameRate(int frame_rate) override;
|
||||
void ImeSetComposition(const CefString& text,
|
||||
@@ -171,6 +181,12 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
|
||||
void OnSetFocus(cef_focus_source_t source) override;
|
||||
|
||||
// Run the file chooser dialog specified by |params|. Only a single dialog may
|
||||
// be pending at any given time. |callback| will be executed asynchronously
|
||||
// after the dialog is dismissed or if another dialog is already pending.
|
||||
void RunFileChooser(const CefFileDialogRunner::FileChooserParams& params,
|
||||
CefFileDialogRunner::RunFileChooserCallback callback);
|
||||
|
||||
bool HandleContextMenu(content::WebContents* web_contents,
|
||||
const content::ContextMenuParams& params);
|
||||
|
||||
@@ -196,7 +212,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
bool user_gesture,
|
||||
bool* was_blocked) override;
|
||||
void LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) override;
|
||||
bool to_different_document) override;
|
||||
void CloseContents(content::WebContents* source) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
@@ -210,9 +226,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
bool TakeFocus(content::WebContents* source, bool reverse) override;
|
||||
bool HandleContextMenu(content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) override;
|
||||
void CanDownload(const GURL& url,
|
||||
const std::string& request_method,
|
||||
base::OnceCallback<void(bool)> callback) override;
|
||||
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
@@ -271,13 +284,17 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
blink::mojom::MediaStreamType type) override;
|
||||
bool IsNeverComposited(content::WebContents* web_contents) override;
|
||||
content::PictureInPictureResult EnterPictureInPicture(
|
||||
content::WebContents* web_contents) override;
|
||||
content::WebContents* web_contents,
|
||||
const viz::SurfaceId& surface_id,
|
||||
const gfx::Size& natural_size) override;
|
||||
void ExitPictureInPicture() override;
|
||||
bool IsBackForwardCacheSupported() override;
|
||||
bool IsPrerender2Supported(content::WebContents& web_contents) override;
|
||||
bool IsPrerender2Supported() override;
|
||||
|
||||
// content::WebContentsObserver methods.
|
||||
using content::WebContentsObserver::BeforeUnloadFired;
|
||||
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
||||
void RenderViewReady() override;
|
||||
void DidFinishNavigation(
|
||||
content::NavigationHandle* navigation_handle) override;
|
||||
void OnAudioStateChanged(bool audible) override;
|
||||
@@ -316,9 +333,14 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
// Give the platform delegate an opportunity to create the host window.
|
||||
bool CreateHostWindow();
|
||||
|
||||
// Create the CefFileDialogManager if it doesn't already exist.
|
||||
void EnsureFileDialogManager();
|
||||
|
||||
void StartAudioCapturer();
|
||||
void OnRecentlyAudibleTimerFired();
|
||||
|
||||
void SetFocusInternal(bool focus);
|
||||
|
||||
CefWindowHandle opener_;
|
||||
const bool is_windowless_;
|
||||
CefWindowHandle host_window_handle_ = kNullWindowHandle;
|
||||
@@ -333,6 +355,9 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
// on the UI thread.
|
||||
bool window_destroyed_ = false;
|
||||
|
||||
// Used for creating and managing file dialogs.
|
||||
std::unique_ptr<CefFileDialogManager> file_dialog_manager_;
|
||||
|
||||
// Used for creating and managing JavaScript dialogs.
|
||||
std::unique_ptr<CefJavaScriptDialogManager> javascript_dialog_manager_;
|
||||
|
||||
|
@@ -13,7 +13,6 @@
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/devtools/devtools_manager_delegate.h"
|
||||
#include "libcef/browser/extensions/extension_system_factory.h"
|
||||
#include "libcef/browser/file_dialog_runner.h"
|
||||
#include "libcef/browser/net/chrome_scheme_handler.h"
|
||||
#include "libcef/browser/printing/constrained_window_views_client.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
@@ -40,12 +39,9 @@
|
||||
#include "third_party/widevine/cdm/buildflags.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#include "ui/ozone/buildflags.h"
|
||||
#if defined(USE_AURA) && BUILDFLAG(OZONE_PLATFORM_X11)
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA)
|
||||
#include "ui/aura/env.h"
|
||||
@@ -53,47 +49,29 @@
|
||||
#include "ui/views/widget/desktop_aura/desktop_screen.h"
|
||||
#include "ui/wm/core/wm_state.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if defined(OS_WIN)
|
||||
#include "chrome/browser/chrome_browser_main_win.h"
|
||||
#include "chrome/browser/win/parental_controls.h"
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
#endif
|
||||
#endif // defined(USE_AURA)
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#if defined(OS_MAC)
|
||||
#include "chrome/browser/ui/views/chrome_layout_provider.h"
|
||||
#include "chrome/browser/ui/views/chrome_views_delegate.h"
|
||||
#else
|
||||
#include "ui/views/test/desktop_test_views_delegate.h"
|
||||
#endif
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
|
||||
#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
|
||||
#if defined(USE_AURA) && defined(OS_LINUX)
|
||||
#include "ui/base/ime/init/input_method_initializer.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#include "base/path_service.h"
|
||||
#include "chrome/browser/themes/theme_service_aura_linux.h"
|
||||
#include "chrome/browser/ui/views/theme_profile_key.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "chrome/grit/chromium_strings.h"
|
||||
#include "components/os_crypt/key_storage_config_linux.h"
|
||||
#if defined(OS_LINUX)
|
||||
#include "libcef/browser/printing/print_dialog_linux.h"
|
||||
#include "ui/base/cursor/cursor_factory.h"
|
||||
#include "ui/base/ime/input_method.h"
|
||||
#include "ui/base/ime/linux/fake_input_method_context_factory.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/linux/linux_ui_delegate.h"
|
||||
#include "ui/ozone/public/ozone_platform.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
|
||||
#if BUILDFLAG(USE_GTK)
|
||||
#include "ui/gtk/gtk_ui_factory.h"
|
||||
#endif
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
#if BUILDFLAG(ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM)
|
||||
#include "chrome/browser/component_updater/media_foundation_widevine_cdm_component_installer.h"
|
||||
@@ -103,83 +81,24 @@
|
||||
#include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
|
||||
std::unique_ptr<views::LinuxUI> BuildLinuxUI() {
|
||||
// We can't use GtkUi in combination with multi-threaded-message-loop because
|
||||
// Chromium's GTK implementation doesn't use GDK threads.
|
||||
if (!!CefContext::Get()->settings().multi_threaded_message_loop)
|
||||
return nullptr;
|
||||
|
||||
// If the ozone backend hasn't provided a LinuxUiDelegate, don't try to create
|
||||
// a LinuxUi instance as this may result in a crash in toolkit initialization.
|
||||
if (!ui::LinuxUiDelegate::GetInstance())
|
||||
return nullptr;
|
||||
|
||||
// GtkUi is the only LinuxUI implementation for now.
|
||||
#if BUILDFLAG(USE_GTK)
|
||||
return BuildGtkUi();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Based on chrome_browser_main_extra_parts_views_linux.cc
|
||||
void ToolkitInitializedLinux() {
|
||||
if (auto linux_ui = BuildLinuxUI()) {
|
||||
linux_ui->SetUseSystemThemeCallback(
|
||||
base::BindRepeating([](aura::Window* window) {
|
||||
if (!window)
|
||||
return true;
|
||||
return ThemeServiceAuraLinux::ShouldUseSystemThemeForProfile(
|
||||
GetThemeProfileForWindow(window));
|
||||
}));
|
||||
|
||||
linux_ui->Initialize();
|
||||
views::LinuxUI::SetInstance(std::move(linux_ui));
|
||||
|
||||
// Cursor theme changes are tracked by LinuxUI (via a CursorThemeManager
|
||||
// implementation). Start observing them once it's initialized.
|
||||
ui::CursorFactory::GetInstance()->ObserveThemeChanges();
|
||||
} else {
|
||||
// In case if GTK is not used, input method factory won't be set for X11 and
|
||||
// Ozone/X11. Set a fake one instead to avoid crashing browser later.
|
||||
DCHECK(!ui::LinuxInputMethodContextFactory::instance());
|
||||
// Try to create input method through Ozone so that the backend has a chance
|
||||
// to set factory by itself.
|
||||
ui::OzonePlatform::GetInstance()->CreateInputMethod(
|
||||
nullptr, gfx::kNullAcceleratedWidget);
|
||||
}
|
||||
// If factory is not set, set a fake instance.
|
||||
if (!ui::LinuxInputMethodContextFactory::instance()) {
|
||||
ui::LinuxInputMethodContextFactory::SetInstance(
|
||||
new ui::FakeInputMethodContextFactory());
|
||||
}
|
||||
|
||||
auto create_print_dialog_func =
|
||||
printing::PrintingContextLinux::SetCreatePrintDialogFunction(
|
||||
&CefPrintDialogLinux::CreatePrintDialog);
|
||||
auto pdf_paper_size_func =
|
||||
printing::PrintingContextLinux::SetPdfPaperSizeFunction(
|
||||
&CefPrintDialogLinux::GetPdfPaperSize);
|
||||
CefPrintDialogLinux::SetDefaultPrintingContextFuncs(create_print_dialog_func,
|
||||
pdf_paper_size_func);
|
||||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
} // namespace
|
||||
|
||||
AlloyBrowserMainParts::AlloyBrowserMainParts(
|
||||
content::MainFunctionParams parameters)
|
||||
: BrowserMainParts(), parameters_(std::move(parameters)) {}
|
||||
const content::MainFunctionParams& parameters)
|
||||
: BrowserMainParts(), devtools_delegate_(nullptr) {}
|
||||
|
||||
AlloyBrowserMainParts::~AlloyBrowserMainParts() {
|
||||
constrained_window::SetConstrainedWindowViewsClient(nullptr);
|
||||
}
|
||||
|
||||
int AlloyBrowserMainParts::PreEarlyInitialization() {
|
||||
#if defined(USE_AURA) && defined(OS_LINUX)
|
||||
// TODO(linux): Consider using a real input method or
|
||||
// views::LinuxUI::SetInstance.
|
||||
ui::InitializeInputMethodForTesting();
|
||||
#endif
|
||||
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
}
|
||||
|
||||
void AlloyBrowserMainParts::ToolkitInitialized() {
|
||||
SetConstrainedWindowViewsClient(CreateCefConstrainedWindowViewsClient());
|
||||
#if defined(USE_AURA)
|
||||
@@ -188,26 +107,22 @@ void AlloyBrowserMainParts::ToolkitInitialized() {
|
||||
wm_state_.reset(new wm::WMState);
|
||||
#endif // defined(USE_AURA)
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#if defined(OS_MAC)
|
||||
views_delegate_ = std::make_unique<ChromeViewsDelegate>();
|
||||
layout_provider_ = ChromeLayoutProvider::CreateLayoutProvider();
|
||||
#else
|
||||
views_delegate_ = std::make_unique<views::DesktopTestViewsDelegate>();
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
ToolkitInitializedLinux();
|
||||
#endif
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
}
|
||||
|
||||
void AlloyBrowserMainParts::PreCreateMainMessageLoop() {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#if defined(USE_AURA) && BUILDFLAG(OZONE_PLATFORM_X11)
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
ui::TouchFactory::SetTouchDeviceListFromCommandLine();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if defined(OS_WIN)
|
||||
// Initialize the OSCrypt.
|
||||
PrefService* local_state = g_browser_process->local_state();
|
||||
DCHECK(local_state);
|
||||
@@ -217,39 +132,22 @@ void AlloyBrowserMainParts::PreCreateMainMessageLoop() {
|
||||
// installer_util references strings that are normally compiled into
|
||||
// setup.exe. In Chrome, these strings are in the locale files.
|
||||
ChromeBrowserMainPartsWin::SetupInstallerUtilStrings();
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
media_router::ChromeMediaRouterFactory::DoPlatformInit();
|
||||
}
|
||||
|
||||
void AlloyBrowserMainParts::PostCreateMainMessageLoop() {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
const base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
|
||||
// Set up crypt config. This needs to be done before anything starts the
|
||||
// network service, as the raw encryption key needs to be shared with the
|
||||
// network service for encrypted cookie storage.
|
||||
// Based on ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop.
|
||||
std::unique_ptr<os_crypt::Config> config =
|
||||
std::make_unique<os_crypt::Config>();
|
||||
// Forward to os_crypt the flag to use a specific password store.
|
||||
config->store = command_line->GetSwitchValueASCII(switches::kPasswordStore);
|
||||
// Forward the product name (defaults to "Chromium").
|
||||
config->product_name = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
|
||||
// OSCrypt may target keyring, which requires calls from the main thread.
|
||||
config->main_thread_runner = content::GetUIThreadTaskRunner({});
|
||||
// OSCrypt can be disabled in a special settings file.
|
||||
config->should_use_preference =
|
||||
command_line->HasSwitch(switches::kEnableEncryptionSelection);
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &config->user_data_path);
|
||||
DCHECK(!config->user_data_path.empty());
|
||||
OSCrypt::SetConfig(std::move(config));
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
#if defined(OS_LINUX)
|
||||
printing::PrintingContextLinux::SetCreatePrintDialogFunction(
|
||||
&CefPrintDialogLinux::CreatePrintDialog);
|
||||
printing::PrintingContextLinux::SetPdfPaperSizeFunction(
|
||||
&CefPrintDialogLinux::GetPdfPaperSize);
|
||||
#endif
|
||||
}
|
||||
|
||||
int AlloyBrowserMainParts::PreCreateThreads() {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if defined(OS_WIN)
|
||||
PlatformInitialize();
|
||||
#endif
|
||||
|
||||
@@ -302,7 +200,7 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() {
|
||||
|
||||
CefDevToolsManagerDelegate::StartHttpHandler(browser_context);
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if defined(OS_WIN)
|
||||
// Windows parental controls calls can be slow, so we do an early init here
|
||||
// that calculates this value off of the UI thread.
|
||||
InitializeWinParentalControls();
|
||||
@@ -312,7 +210,6 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() {
|
||||
PluginFinder::GetInstance()->Init();
|
||||
|
||||
scheme::RegisterWebUIControllerFactory();
|
||||
file_dialog_runner::RegisterFactory();
|
||||
|
||||
#if BUILDFLAG(ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM) || \
|
||||
BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
|
||||
@@ -345,8 +242,10 @@ void AlloyBrowserMainParts::PostMainMessageLoopRun() {
|
||||
}
|
||||
|
||||
void AlloyBrowserMainParts::PostDestroyThreads() {
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
views_delegate_.reset();
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_MAC)
|
||||
layout_provider_.reset();
|
||||
#endif
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
}
|
||||
|
@@ -9,11 +9,15 @@
|
||||
#include "libcef/browser/request_context_impl.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/public/browser/browser_main_parts.h"
|
||||
#include "content/public/common/main_function_params.h"
|
||||
|
||||
namespace content {
|
||||
struct MainFunctionParams;
|
||||
}
|
||||
|
||||
#if defined(USE_AURA)
|
||||
namespace display {
|
||||
@@ -24,24 +28,23 @@ class WMState;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
namespace views {
|
||||
class ViewsDelegate;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_MAC)
|
||||
class LayoutProvider;
|
||||
#endif
|
||||
} // namespace views
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
|
||||
class CefDevToolsDelegate;
|
||||
|
||||
class AlloyBrowserMainParts : public content::BrowserMainParts {
|
||||
public:
|
||||
explicit AlloyBrowserMainParts(content::MainFunctionParams parameters);
|
||||
|
||||
AlloyBrowserMainParts(const AlloyBrowserMainParts&) = delete;
|
||||
AlloyBrowserMainParts& operator=(const AlloyBrowserMainParts&) = delete;
|
||||
|
||||
explicit AlloyBrowserMainParts(const content::MainFunctionParams& parameters);
|
||||
~AlloyBrowserMainParts() override;
|
||||
|
||||
int PreEarlyInitialization() override;
|
||||
void ToolkitInitialized() override;
|
||||
void PreCreateMainMessageLoop() override;
|
||||
void PostCreateMainMessageLoop() override;
|
||||
@@ -67,14 +70,12 @@ class AlloyBrowserMainParts : public content::BrowserMainParts {
|
||||
}
|
||||
|
||||
private:
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if defined(OS_WIN)
|
||||
void PlatformInitialize();
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
content::MainFunctionParams parameters_;
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
CefRefPtr<CefRequestContextImpl> global_request_context_;
|
||||
CefDevToolsDelegate* devtools_delegate_ = nullptr; // Deletes itself.
|
||||
CefDevToolsDelegate* devtools_delegate_; // Deletes itself.
|
||||
|
||||
// Blocking task runners exposed via CefTaskRunner. For consistency with
|
||||
// previous named thread behavior always execute all pending tasks before
|
||||
@@ -89,10 +90,14 @@ class AlloyBrowserMainParts : public content::BrowserMainParts {
|
||||
std::unique_ptr<wm::WMState> wm_state_;
|
||||
#endif
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
std::unique_ptr<views::ViewsDelegate> views_delegate_;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_MAC)
|
||||
std::unique_ptr<views::LayoutProvider> layout_provider_;
|
||||
#endif
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AlloyBrowserMainParts);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_MAIN_H_
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include "libcef/browser/alloy/alloy_content_browser_client.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
#include "include/cef_version.h"
|
||||
@@ -52,7 +51,6 @@
|
||||
#include "base/stl_util.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "chrome/browser/accessibility/live_caption_unavailability_notifier.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
||||
@@ -69,7 +67,6 @@
|
||||
#include "chrome/browser/profiles/renderer_updater_factory.h"
|
||||
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
|
||||
#include "chrome/browser/spellchecker/spell_check_host_chrome_impl.h"
|
||||
#include "chrome/browser/ui/chrome_select_file_policy.h"
|
||||
#include "chrome/common/chrome_content_client.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
@@ -110,14 +107,13 @@
|
||||
#include "content/public/common/storage_quota_params.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/user_agent.h"
|
||||
#include "crypto/crypto_buildflags.h"
|
||||
#include "extensions/browser/event_router.h"
|
||||
#include "extensions/browser/extension_message_filter.h"
|
||||
#include "extensions/browser/extension_protocols.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#include "extensions/browser/extension_web_contents_observer.h"
|
||||
#include "extensions/browser/extensions_browser_client.h"
|
||||
#include "extensions/browser/guest_view/extensions_guest_view.h"
|
||||
#include "extensions/browser/guest_view/extensions_guest_view_message_filter.h"
|
||||
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
|
||||
#include "extensions/browser/info_map.h"
|
||||
#include "extensions/browser/process_map.h"
|
||||
@@ -145,22 +141,25 @@
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#include "net/ssl/client_cert_store_mac.h"
|
||||
#include "services/video_capture/public/mojom/constants.mojom.h"
|
||||
#elif BUILDFLAG(IS_POSIX)
|
||||
#include "components/crash/core/app/crash_switches.h"
|
||||
#include "components/crash/core/app/crashpad.h"
|
||||
#if defined(OS_POSIX) && !defined(OS_MAC)
|
||||
#include "base/debug/leak_annotations.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "components/crash/content/browser/crash_handler_host_linux.h"
|
||||
#include "components/crash/core/app/breakpad_linux.h"
|
||||
#include "content/public/common/content_descriptors.h"
|
||||
#include "libcef/common/crash_reporting.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#if defined(OS_MAC)
|
||||
#include "net/ssl/client_cert_store_mac.h"
|
||||
#include "services/video_capture/public/mojom/constants.mojom.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "net/ssl/client_cert_store_win.h"
|
||||
#include "sandbox/win/src/sandbox_policy.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(USE_NSS_CERTS)
|
||||
#if defined(USE_NSS_CERTS)
|
||||
#include "net/ssl/client_cert_store_nss.h"
|
||||
#endif
|
||||
|
||||
@@ -177,9 +176,6 @@ class CefQuotaCallbackImpl : public CefCallback {
|
||||
explicit CefQuotaCallbackImpl(CallbackType callback)
|
||||
: callback_(std::move(callback)) {}
|
||||
|
||||
CefQuotaCallbackImpl(const CefQuotaCallbackImpl&) = delete;
|
||||
CefQuotaCallbackImpl& operator=(const CefQuotaCallbackImpl&) = delete;
|
||||
|
||||
~CefQuotaCallbackImpl() {
|
||||
if (!callback_.is_null()) {
|
||||
// The callback is still pending. Cancel it now.
|
||||
@@ -196,7 +192,7 @@ class CefQuotaCallbackImpl : public CefCallback {
|
||||
|
||||
void Cancel() override { ContinueNow(false); }
|
||||
|
||||
[[nodiscard]] CallbackType Disconnect() { return std::move(callback_); }
|
||||
CallbackType Disconnect() WARN_UNUSED_RESULT { return std::move(callback_); }
|
||||
|
||||
private:
|
||||
void ContinueNow(bool allow) {
|
||||
@@ -221,21 +217,17 @@ class CefQuotaCallbackImpl : public CefCallback {
|
||||
CallbackType callback_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefQuotaCallbackImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefQuotaCallbackImpl);
|
||||
};
|
||||
|
||||
class CefAllowCertificateErrorCallbackImpl : public CefCallback {
|
||||
public:
|
||||
using CallbackType =
|
||||
base::OnceCallback<void(content::CertificateRequestResultType)>;
|
||||
typedef base::OnceCallback<void(content::CertificateRequestResultType)>
|
||||
CallbackType;
|
||||
|
||||
explicit CefAllowCertificateErrorCallbackImpl(CallbackType callback)
|
||||
: callback_(std::move(callback)) {}
|
||||
|
||||
CefAllowCertificateErrorCallbackImpl(
|
||||
const CefAllowCertificateErrorCallbackImpl&) = delete;
|
||||
CefAllowCertificateErrorCallbackImpl& operator=(
|
||||
const CefAllowCertificateErrorCallbackImpl&) = delete;
|
||||
|
||||
~CefAllowCertificateErrorCallbackImpl() {
|
||||
if (!callback_.is_null()) {
|
||||
// The callback is still pending. Cancel it now.
|
||||
@@ -254,7 +246,7 @@ class CefAllowCertificateErrorCallbackImpl : public CefCallback {
|
||||
|
||||
void Cancel() override { ContinueNow(false); }
|
||||
|
||||
[[nodiscard]] CallbackType Disconnect() { return std::move(callback_); }
|
||||
CallbackType Disconnect() WARN_UNUSED_RESULT { return std::move(callback_); }
|
||||
|
||||
private:
|
||||
void ContinueNow(bool allow) {
|
||||
@@ -280,6 +272,7 @@ class CefAllowCertificateErrorCallbackImpl : public CefCallback {
|
||||
CallbackType callback_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefAllowCertificateErrorCallbackImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefAllowCertificateErrorCallbackImpl);
|
||||
};
|
||||
|
||||
class CefSelectClientCertificateCallbackImpl
|
||||
@@ -289,11 +282,6 @@ class CefSelectClientCertificateCallbackImpl
|
||||
std::unique_ptr<content::ClientCertificateDelegate> delegate)
|
||||
: delegate_(std::move(delegate)) {}
|
||||
|
||||
CefSelectClientCertificateCallbackImpl(
|
||||
const CefSelectClientCertificateCallbackImpl&) = delete;
|
||||
CefSelectClientCertificateCallbackImpl& operator=(
|
||||
const CefSelectClientCertificateCallbackImpl&) = delete;
|
||||
|
||||
~CefSelectClientCertificateCallbackImpl() {
|
||||
// If Select has not been called, call it with NULL to continue without any
|
||||
// client certificate.
|
||||
@@ -354,15 +342,12 @@ class CefSelectClientCertificateCallbackImpl
|
||||
std::unique_ptr<content::ClientCertificateDelegate> delegate_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefSelectClientCertificateCallbackImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefSelectClientCertificateCallbackImpl);
|
||||
};
|
||||
|
||||
class CefQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||
public:
|
||||
CefQuotaPermissionContext() = default;
|
||||
|
||||
CefQuotaPermissionContext(const CefQuotaPermissionContext&) = delete;
|
||||
CefQuotaPermissionContext& operator=(const CefQuotaPermissionContext&) =
|
||||
delete;
|
||||
CefQuotaPermissionContext() {}
|
||||
|
||||
// The callback will be dispatched on the IO thread.
|
||||
void RequestQuotaPermission(const content::StorageQuotaParams& params,
|
||||
@@ -404,19 +389,67 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||
}
|
||||
|
||||
private:
|
||||
~CefQuotaPermissionContext() override = default;
|
||||
~CefQuotaPermissionContext() override {}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefQuotaPermissionContext);
|
||||
};
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
int GetCrashSignalFD() {
|
||||
if (!crash_reporting::Enabled())
|
||||
#if defined(OS_POSIX) && !defined(OS_MAC)
|
||||
breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
|
||||
const std::string& process_type) {
|
||||
base::FilePath dumps_path;
|
||||
base::PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path);
|
||||
{
|
||||
ANNOTATE_SCOPED_MEMORY_LEAK;
|
||||
// Uploads will only occur if a non-empty crash URL is specified in
|
||||
// AlloyMainDelegate::InitCrashReporter.
|
||||
breakpad::CrashHandlerHostLinux* crash_handler =
|
||||
new breakpad::CrashHandlerHostLinux(process_type, dumps_path,
|
||||
true /* upload */);
|
||||
crash_handler->StartUploaderThread();
|
||||
return crash_handler;
|
||||
}
|
||||
}
|
||||
|
||||
int GetCrashSignalFD(const base::CommandLine& command_line) {
|
||||
if (!breakpad::IsCrashReporterEnabled())
|
||||
return -1;
|
||||
|
||||
int fd;
|
||||
pid_t pid;
|
||||
return crash_reporter::GetHandlerSocket(&fd, &pid) ? fd : -1;
|
||||
// Extensions have the same process type as renderers.
|
||||
if (command_line.HasSwitch(extensions::switches::kExtensionProcess)) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost("extension");
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
}
|
||||
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
if (process_type == switches::kRendererProcess) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost(process_type);
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
}
|
||||
|
||||
if (process_type == switches::kPpapiPluginProcess) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost(process_type);
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
}
|
||||
|
||||
if (process_type == switches::kGpuProcess) {
|
||||
static breakpad::CrashHandlerHostLinux* crash_handler = nullptr;
|
||||
if (!crash_handler)
|
||||
crash_handler = CreateCrashHandlerHost(process_type);
|
||||
return crash_handler->GetDeathSignalSocket();
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
#endif // defined(OS_POSIX) && !defined(OS_MAC)
|
||||
|
||||
// From chrome/browser/plugins/chrome_content_browser_client_plugins_part.cc.
|
||||
void BindPluginInfoHost(
|
||||
@@ -434,11 +467,6 @@ void BindPluginInfoHost(
|
||||
std::move(receiver));
|
||||
}
|
||||
|
||||
void BindMediaFoundationRendererNotifierHandler(
|
||||
content::RenderFrameHost* frame_host,
|
||||
mojo::PendingReceiver<media::mojom::MediaFoundationRendererNotifier>
|
||||
receiver) {}
|
||||
|
||||
base::FilePath GetRootCachePath() {
|
||||
// The CefContext::ValidateCachePath method enforces the requirement that all
|
||||
// cache_path values be either equal to or a child of root_cache_path.
|
||||
@@ -467,8 +495,8 @@ AlloyContentBrowserClient::~AlloyContentBrowserClient() = default;
|
||||
|
||||
std::unique_ptr<content::BrowserMainParts>
|
||||
AlloyContentBrowserClient::CreateBrowserMainParts(
|
||||
content::MainFunctionParams parameters) {
|
||||
browser_main_parts_ = new AlloyBrowserMainParts(std::move(parameters));
|
||||
const content::MainFunctionParams& parameters) {
|
||||
browser_main_parts_ = new AlloyBrowserMainParts(parameters);
|
||||
return base::WrapUnique(browser_main_parts_);
|
||||
}
|
||||
|
||||
@@ -479,6 +507,8 @@ void AlloyContentBrowserClient::RenderProcessWillLaunch(
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
host->AddFilter(new extensions::ExtensionMessageFilter(id, profile));
|
||||
host->AddFilter(
|
||||
new extensions::ExtensionsGuestViewMessageFilter(id, profile));
|
||||
}
|
||||
|
||||
// If the renderer process crashes then the host may already have
|
||||
@@ -533,6 +563,18 @@ bool AlloyContentBrowserClient::DoesSiteRequireDedicatedProcess(
|
||||
browser_context, effective_site_url);
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::ShouldLockProcessToSite(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& effective_site_url) {
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
return extensions::ChromeContentBrowserClientExtensionsPart::
|
||||
ShouldLockProcessToSite(browser_context, effective_site_url);
|
||||
}
|
||||
|
||||
return content::ContentBrowserClient::ShouldLockProcessToSite(
|
||||
browser_context, effective_site_url);
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
|
||||
base::StringPiece scheme,
|
||||
bool is_embedded_origin_secure) {
|
||||
@@ -583,19 +625,12 @@ void AlloyContentBrowserClient::GetAdditionalViewSourceSchemes(
|
||||
additional_schemes->push_back(extensions::kExtensionScheme);
|
||||
}
|
||||
|
||||
std::unique_ptr<ui::SelectFilePolicy>
|
||||
AlloyContentBrowserClient::CreateSelectFilePolicy(
|
||||
content::WebContents* web_contents) {
|
||||
return std::make_unique<ChromeSelectFilePolicy>(web_contents);
|
||||
}
|
||||
|
||||
void AlloyContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_allowed_schemes) {
|
||||
ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||
additional_allowed_schemes);
|
||||
additional_allowed_schemes->push_back(content::kChromeDevToolsScheme);
|
||||
additional_allowed_schemes->push_back(content::kChromeUIScheme);
|
||||
additional_allowed_schemes->push_back(content::kChromeUIUntrustedScheme);
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::IsWebUIAllowedToMakeNetworkRequests(
|
||||
@@ -692,7 +727,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
// associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kDisablePackLoading,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_MAC)
|
||||
switches::kFrameworkDirPath,
|
||||
switches::kMainBundlePath,
|
||||
#endif
|
||||
@@ -703,7 +738,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
switches::kUserAgentProductAndVersion,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
base::size(kSwitchNames));
|
||||
}
|
||||
|
||||
const std::string& process_type =
|
||||
@@ -714,6 +749,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kDisableExtensions,
|
||||
switches::kDisablePdfExtension,
|
||||
switches::kDisablePlugins,
|
||||
switches::kDisablePrintPreview,
|
||||
switches::kDisableScrollBounce,
|
||||
switches::kDisableSpellChecking,
|
||||
@@ -722,11 +758,19 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
network::switches::kUnsafelyTreatInsecureOriginAsSecure,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
base::size(kSwitchNames));
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
content::RenderProcessHost* process =
|
||||
content::RenderProcessHost::FromID(child_process_id);
|
||||
#if !defined(OS_WIN)
|
||||
// kPdfRenderer will be set for Windows in
|
||||
// RenderProcessHostImpl::AppendRendererCommandLine.
|
||||
if (process && process->IsPdf()) {
|
||||
command_line->AppendSwitch(switches::kPdfRenderer);
|
||||
}
|
||||
#endif // !defined(OS_WIN)
|
||||
|
||||
auto browser_context = process->GetBrowserContext();
|
||||
CefBrowserContext* cef_browser_context =
|
||||
process ? CefBrowserContext::FromBrowserContext(browser_context)
|
||||
@@ -751,7 +795,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
switches::kLang,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
base::size(kSwitchNames));
|
||||
}
|
||||
|
||||
// Necessary to populate DIR_USER_DATA in sub-processes.
|
||||
@@ -761,7 +805,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_LINUX)
|
||||
if (process_type == switches::kZygoteProcess) {
|
||||
if (browser_cmd->HasSwitch(switches::kBrowserSubprocessPath)) {
|
||||
// Force use of the sub-process executable path for the zygote process.
|
||||
@@ -777,19 +821,9 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
switches::kLogFile,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
base::size(kSwitchNames));
|
||||
}
|
||||
|
||||
if (crash_reporting::Enabled()) {
|
||||
int fd;
|
||||
pid_t pid;
|
||||
if (crash_reporter::GetHandlerSocket(&fd, &pid)) {
|
||||
command_line->AppendSwitchASCII(
|
||||
crash_reporter::switches::kCrashpadHandlerPid,
|
||||
base::NumberToString(pid));
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
CefRefPtr<CefApp> app = CefAppManager::Get()->GetApplication();
|
||||
if (app.get()) {
|
||||
@@ -799,7 +833,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
CefRefPtr<CefCommandLineImpl> commandLinePtr(
|
||||
new CefCommandLineImpl(command_line, false, false));
|
||||
handler->OnBeforeChildProcessLaunch(commandLinePtr.get());
|
||||
std::ignore = commandLinePtr->Detach(nullptr);
|
||||
ignore_result(commandLinePtr->Detach(nullptr));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1008,35 +1042,33 @@ AlloyContentBrowserClient::CreateDevToolsManagerDelegate() {
|
||||
return std::make_unique<CefDevToolsManagerDelegate>();
|
||||
}
|
||||
|
||||
void AlloyContentBrowserClient::
|
||||
RegisterAssociatedInterfaceBindersForRenderFrameHost(
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
blink::AssociatedInterfaceRegistry& associated_registry) {
|
||||
associated_registry.AddInterface(base::BindRepeating(
|
||||
[](content::RenderFrameHost* render_frame_host,
|
||||
mojo::PendingAssociatedReceiver<extensions::mojom::LocalFrameHost>
|
||||
receiver) {
|
||||
extensions::ExtensionWebContentsObserver::BindLocalFrameHost(
|
||||
std::move(receiver), render_frame_host);
|
||||
},
|
||||
&render_frame_host));
|
||||
bool AlloyContentBrowserClient::BindAssociatedReceiverFromFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedInterfaceEndpointHandle* handle) {
|
||||
if (interface_name == extensions::mojom::LocalFrameHost::Name_) {
|
||||
extensions::ExtensionWebContentsObserver::BindLocalFrameHost(
|
||||
mojo::PendingAssociatedReceiver<extensions::mojom::LocalFrameHost>(
|
||||
std::move(*handle)),
|
||||
render_frame_host);
|
||||
return true;
|
||||
}
|
||||
if (interface_name == printing::mojom::PrintManagerHost::Name_) {
|
||||
printing::CefPrintViewManager::BindPrintManagerHost(
|
||||
mojo::PendingAssociatedReceiver<printing::mojom::PrintManagerHost>(
|
||||
std::move(*handle)),
|
||||
render_frame_host);
|
||||
return true;
|
||||
}
|
||||
if (interface_name == pdf::mojom::PdfService::Name_) {
|
||||
pdf::PDFWebContentsHelper::BindPdfService(
|
||||
mojo::PendingAssociatedReceiver<pdf::mojom::PdfService>(
|
||||
std::move(*handle)),
|
||||
render_frame_host);
|
||||
return true;
|
||||
}
|
||||
|
||||
associated_registry.AddInterface(base::BindRepeating(
|
||||
[](content::RenderFrameHost* render_frame_host,
|
||||
mojo::PendingAssociatedReceiver<printing::mojom::PrintManagerHost>
|
||||
receiver) {
|
||||
printing::CefPrintViewManager::BindPrintManagerHost(std::move(receiver),
|
||||
render_frame_host);
|
||||
},
|
||||
&render_frame_host));
|
||||
|
||||
associated_registry.AddInterface(base::BindRepeating(
|
||||
[](content::RenderFrameHost* render_frame_host,
|
||||
mojo::PendingAssociatedReceiver<pdf::mojom::PdfService> receiver) {
|
||||
pdf::PDFWebContentsHelper::BindPdfService(std::move(receiver),
|
||||
render_frame_host);
|
||||
},
|
||||
&render_frame_host));
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<content::NavigationThrottle>>
|
||||
@@ -1106,17 +1138,17 @@ AlloyContentBrowserClient::WillCreateURLLoaderRequestInterceptors(
|
||||
return interceptors;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_LINUX)
|
||||
void AlloyContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
content::PosixFileDescriptorInfo* mappings) {
|
||||
int crash_signal_fd = GetCrashSignalFD();
|
||||
int crash_signal_fd = GetCrashSignalFD(command_line);
|
||||
if (crash_signal_fd >= 0) {
|
||||
mappings->Share(kCrashDumpSignal, crash_signal_fd);
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
#endif // defined(OS_LINUX)
|
||||
|
||||
void AlloyContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
service_manager::BinderRegistry* registry,
|
||||
@@ -1128,10 +1160,6 @@ void AlloyContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
associated_registry->AddInterface(base::BindRepeating(
|
||||
&extensions::EventRouter::BindForRenderer, host->GetID()));
|
||||
associated_registry->AddInterface(base::BindRepeating(
|
||||
&extensions::ExtensionsGuestView::CreateForComponents, host->GetID()));
|
||||
associated_registry->AddInterface(base::BindRepeating(
|
||||
&extensions::ExtensionsGuestView::CreateForExtensions, host->GetID()));
|
||||
}
|
||||
|
||||
CefBrowserManager::ExposeInterfacesToRenderer(registry, associated_registry,
|
||||
@@ -1142,13 +1170,13 @@ std::unique_ptr<net::ClientCertStore>
|
||||
AlloyContentBrowserClient::CreateClientCertStore(
|
||||
content::BrowserContext* browser_context) {
|
||||
// Match the logic in ProfileNetworkContextService::CreateClientCertStore.
|
||||
#if BUILDFLAG(USE_NSS_CERTS)
|
||||
#if defined(USE_NSS_CERTS)
|
||||
// TODO: Add support for client implementation of crypto password dialog.
|
||||
return std::unique_ptr<net::ClientCertStore>(new net::ClientCertStoreNSS(
|
||||
net::ClientCertStoreNSS::PasswordDelegateFactory()));
|
||||
#elif BUILDFLAG(IS_WIN)
|
||||
#elif defined(OS_WIN)
|
||||
return std::unique_ptr<net::ClientCertStore>(new net::ClientCertStoreWin());
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
#elif defined(OS_MAC)
|
||||
return std::unique_ptr<net::ClientCertStore>(new net::ClientCertStoreMac());
|
||||
#else
|
||||
#error Unknown platform.
|
||||
@@ -1189,7 +1217,6 @@ void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
|
||||
void AlloyContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
const absl::optional<url::Origin>& request_initiator_origin,
|
||||
NonNetworkURLLoaderFactoryMap* factories) {
|
||||
if (!extensions::ExtensionsEnabled())
|
||||
return;
|
||||
@@ -1337,15 +1364,14 @@ AlloyContentBrowserClient::GetNetworkContextsParentDirectory() {
|
||||
bool AlloyContentBrowserClient::HandleExternalProtocol(
|
||||
const GURL& url,
|
||||
content::WebContents::Getter web_contents_getter,
|
||||
int child_id,
|
||||
int frame_tree_node_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
bool is_primary_main_frame,
|
||||
bool is_in_fenced_frame_tree,
|
||||
bool is_main_frame,
|
||||
network::mojom::WebSandboxFlags sandbox_flags,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const absl::optional<url::Origin>& initiating_origin,
|
||||
content::RenderFrameHost* initiator_document,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
|
||||
// Call the other HandleExternalProtocol variant.
|
||||
return false;
|
||||
@@ -1355,12 +1381,8 @@ bool AlloyContentBrowserClient::HandleExternalProtocol(
|
||||
content::WebContents::Getter web_contents_getter,
|
||||
int frame_tree_node_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
bool is_primary_main_frame,
|
||||
bool is_in_fenced_frame_tree,
|
||||
network::mojom::WebSandboxFlags sandbox_flags,
|
||||
const network::ResourceRequest& resource_request,
|
||||
const absl::optional<url::Origin>& initiating_origin,
|
||||
content::RenderFrameHost* initiator_document,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver =
|
||||
out_factory->InitWithNewPipeAndPassReceiver();
|
||||
@@ -1376,38 +1398,25 @@ bool AlloyContentBrowserClient::HandleExternalProtocol(
|
||||
web_contents_getter, std::move(receiver), std::move(request_handler));
|
||||
return true;
|
||||
}
|
||||
std::unique_ptr<content::VideoOverlayWindow>
|
||||
AlloyContentBrowserClient::CreateWindowForVideoPictureInPicture(
|
||||
content::VideoPictureInPictureWindowController* controller) {
|
||||
// Note: content::VideoOverlayWindow::Create() is defined by platform-specific
|
||||
|
||||
std::unique_ptr<content::OverlayWindow>
|
||||
AlloyContentBrowserClient::CreateWindowForPictureInPicture(
|
||||
content::PictureInPictureWindowController* controller) {
|
||||
// Note: content::OverlayWindow::Create() is defined by platform-specific
|
||||
// implementation in chrome/browser/ui/views. This layering hack, which goes
|
||||
// through //content and ContentBrowserClient, allows us to work around the
|
||||
// dependency constraints that disallow directly calling
|
||||
// chrome/browser/ui/views code either from here or from other code in
|
||||
// chrome/browser.
|
||||
return content::VideoOverlayWindow::Create(controller);
|
||||
return content::OverlayWindow::Create(controller);
|
||||
}
|
||||
|
||||
std::unique_ptr<content::DocumentOverlayWindow>
|
||||
AlloyContentBrowserClient::CreateWindowForDocumentPictureInPicture(
|
||||
content::DocumentPictureInPictureWindowController* controller) {
|
||||
// Note: content::DocumentOverlayWindow::Create() is defined by
|
||||
// platform-specific implementation in chrome/browser/ui/views. This layering
|
||||
// hack, which goes through //content and ContentBrowserClient, allows us to
|
||||
// work around the dependency constraints that disallow directly calling
|
||||
// chrome/browser/ui/views code either from here or from other code in
|
||||
// chrome/browser.
|
||||
return content::DocumentOverlayWindow::Create(controller);
|
||||
}
|
||||
void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) {
|
||||
CefBrowserFrame::RegisterBrowserInterfaceBindersForFrame(render_frame_host,
|
||||
map);
|
||||
|
||||
map->Add<media::mojom::MediaFoundationRendererNotifier>(
|
||||
base::BindRepeating(&BindMediaFoundationRendererNotifierHandler));
|
||||
|
||||
if (!extensions::ExtensionsEnabled())
|
||||
return;
|
||||
|
||||
@@ -1438,7 +1447,7 @@ AlloyContentBrowserClient::GetSandboxedStorageServiceDataDirectory() {
|
||||
}
|
||||
|
||||
std::string AlloyContentBrowserClient::GetProduct() {
|
||||
return GetChromeProduct();
|
||||
return embedder_support::GetProduct();
|
||||
}
|
||||
|
||||
std::string AlloyContentBrowserClient::GetChromeProduct() {
|
||||
@@ -1449,10 +1458,6 @@ std::string AlloyContentBrowserClient::GetUserAgent() {
|
||||
return embedder_support::GetUserAgent();
|
||||
}
|
||||
|
||||
std::string AlloyContentBrowserClient::GetFullUserAgent() {
|
||||
return embedder_support::GetFullUserAgent();
|
||||
}
|
||||
|
||||
std::string AlloyContentBrowserClient::GetReducedUserAgent() {
|
||||
return embedder_support::GetReducedUserAgent();
|
||||
}
|
||||
@@ -1479,7 +1484,8 @@ AlloyContentBrowserClient::GetPluginMimeTypesWithExternalHandlers(
|
||||
auto map = PluginUtils::GetMimeTypeToExtensionIdMap(browser_context);
|
||||
for (const auto& pair : map)
|
||||
mime_types.insert(pair.first);
|
||||
mime_types.insert(pdf::kInternalPluginMimeType);
|
||||
if (pdf::IsInternalPluginExternallyHandled())
|
||||
mime_types.insert(pdf::kInternalPluginMimeType);
|
||||
return mime_types;
|
||||
}
|
||||
|
||||
@@ -1504,23 +1510,12 @@ bool AlloyContentBrowserClient::ShouldAllowPluginCreation(
|
||||
return true;
|
||||
}
|
||||
|
||||
void AlloyContentBrowserClient::OnWebContentsCreated(
|
||||
content::WebContents* web_contents) {
|
||||
// Attach universal WebContentsObservers. These are quite rare, and in most
|
||||
// cases CefBrowserPlatformDelegateAlloy::BrowserCreated and/or
|
||||
// CefExtensionsAPIClient::AttachWebContentsHelpers should be used instead.
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
extensions::CefExtensionWebContentsObserver::CreateForWebContents(
|
||||
web_contents);
|
||||
}
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::IsFindInPageDisabledForOrigin(
|
||||
const url::Origin& origin) {
|
||||
// For PDF viewing with the PPAPI-free PDF Viewer, find-in-page should only
|
||||
// display results from the PDF content, and not from the UI.
|
||||
return IsPdfExtensionOrigin(origin);
|
||||
return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned) &&
|
||||
IsPdfExtensionOrigin(origin);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestContextImpl> AlloyContentBrowserClient::request_context()
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include "include/cef_request_context_handler.h"
|
||||
#include "libcef/browser/request_context_impl.h"
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
@@ -35,7 +36,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
// ContentBrowserClient implementation.
|
||||
std::unique_ptr<content::BrowserMainParts> CreateBrowserMainParts(
|
||||
content::MainFunctionParams parameters) override;
|
||||
const content::MainFunctionParams& parameters) override;
|
||||
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
|
||||
bool ShouldUseProcessPerSite(content::BrowserContext* browser_context,
|
||||
const GURL& site_url) override;
|
||||
@@ -43,6 +44,8 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
const GURL& site_url) override;
|
||||
bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context,
|
||||
const GURL& effective_site_url) override;
|
||||
bool ShouldLockProcessToSite(content::BrowserContext* browser_context,
|
||||
const GURL& effective_site_url) override;
|
||||
bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
|
||||
base::StringPiece scheme,
|
||||
bool is_embedded_origin_secure) override;
|
||||
@@ -58,8 +61,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
std::vector<std::string>* additional_schemes) override;
|
||||
void GetAdditionalViewSourceSchemes(
|
||||
std::vector<std::string>* additional_schemes) override;
|
||||
std::unique_ptr<ui::SelectFilePolicy> CreateSelectFilePolicy(
|
||||
content::WebContents* web_contents) override;
|
||||
void GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_allowed_schemes) override;
|
||||
bool IsWebUIAllowedToMakeNetworkRequests(const url::Origin& origin) override;
|
||||
@@ -119,9 +120,10 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
|
||||
std::unique_ptr<content::DevToolsManagerDelegate>
|
||||
CreateDevToolsManagerDelegate() override;
|
||||
void RegisterAssociatedInterfaceBindersForRenderFrameHost(
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
blink::AssociatedInterfaceRegistry& associated_registry) override;
|
||||
bool BindAssociatedReceiverFromFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedInterfaceEndpointHandle* handle) override;
|
||||
std::vector<std::unique_ptr<content::NavigationThrottle>>
|
||||
CreateThrottlesForNavigation(
|
||||
content::NavigationHandle* navigation_handle) override;
|
||||
@@ -139,7 +141,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
const scoped_refptr<network::SharedURLLoaderFactory>&
|
||||
network_loader_factory) override;
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_LINUX)
|
||||
void GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
@@ -168,7 +170,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
void RegisterNonNetworkSubresourceURLLoaderFactories(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
const absl::optional<url::Origin>& request_initiator_origin,
|
||||
NonNetworkURLLoaderFactoryMap* factories) override;
|
||||
bool WillCreateURLLoaderFactory(
|
||||
content::BrowserContext* browser_context,
|
||||
@@ -197,35 +198,26 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool HandleExternalProtocol(
|
||||
const GURL& url,
|
||||
content::WebContents::Getter web_contents_getter,
|
||||
int child_id,
|
||||
int frame_tree_node_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
bool is_primary_main_frame,
|
||||
bool is_in_fenced_frame_tree,
|
||||
bool is_main_frame,
|
||||
network::mojom::WebSandboxFlags sandbox_flags,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const absl::optional<url::Origin>& initiating_origin,
|
||||
content::RenderFrameHost* initiator_document,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory)
|
||||
override;
|
||||
bool HandleExternalProtocol(
|
||||
content::WebContents::Getter web_contents_getter,
|
||||
int frame_tree_node_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
bool is_primary_main_frame,
|
||||
bool is_in_fenced_frame_tree,
|
||||
network::mojom::WebSandboxFlags sandbox_flags,
|
||||
const network::ResourceRequest& request,
|
||||
const absl::optional<url::Origin>& initiating_origin,
|
||||
content::RenderFrameHost* initiator_document,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory)
|
||||
override;
|
||||
std::unique_ptr<content::VideoOverlayWindow>
|
||||
CreateWindowForVideoPictureInPicture(
|
||||
content::VideoPictureInPictureWindowController* controller) override;
|
||||
std::unique_ptr<content::DocumentOverlayWindow>
|
||||
CreateWindowForDocumentPictureInPicture(
|
||||
content::DocumentPictureInPictureWindowController* controller) override;
|
||||
std::unique_ptr<content::OverlayWindow> CreateWindowForPictureInPicture(
|
||||
content::PictureInPictureWindowController* controller) override;
|
||||
void RegisterBrowserInterfaceBindersForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) override;
|
||||
@@ -233,7 +225,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
std::string GetProduct() override;
|
||||
std::string GetChromeProduct() override;
|
||||
std::string GetUserAgent() override;
|
||||
std::string GetFullUserAgent() override;
|
||||
std::string GetReducedUserAgent() override;
|
||||
blink::UserAgentMetadata GetUserAgentMetadata() override;
|
||||
base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(
|
||||
@@ -246,7 +237,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool ShouldAllowPluginCreation(
|
||||
const url::Origin& embedder_origin,
|
||||
const content::PepperPluginInfo& plugin_info) override;
|
||||
void OnWebContentsCreated(content::WebContents* web_contents) override;
|
||||
bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override;
|
||||
|
||||
CefRefPtr<CefRequestContextImpl> request_context() const;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user