Depend directly on chrome targets and unfork code (issue #1947)
This commit is contained in:
parent
62d177455b
commit
3cc539b506
250
BUILD.gn
250
BUILD.gn
|
@ -98,6 +98,7 @@
|
||||||
# https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md
|
# https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import("//build/config/allocator.gni")
|
||||||
import("//build/config/features.gni")
|
import("//build/config/features.gni")
|
||||||
import("//build/config/locales.gni")
|
import("//build/config/locales.gni")
|
||||||
import("//build/config/sanitizers/sanitizers.gni")
|
import("//build/config/sanitizers/sanitizers.gni")
|
||||||
|
@ -139,14 +140,6 @@ if (is_clang) {
|
||||||
assert(!clang_use_chrome_plugins)
|
assert(!clang_use_chrome_plugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_linux) {
|
|
||||||
# Disable theme support on Linux so we don't need to implement
|
|
||||||
# ThemeService[Factory] classes.
|
|
||||||
assert(!enable_themes)
|
|
||||||
} else {
|
|
||||||
assert(enable_themes)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Local variables.
|
# Local variables.
|
||||||
|
@ -351,7 +344,6 @@ static_library("libcef_static") {
|
||||||
"libcef/browser/pepper/pepper_flash_browser_host.h",
|
"libcef/browser/pepper/pepper_flash_browser_host.h",
|
||||||
"libcef/browser/pepper/pepper_isolated_file_system_message_filter.cc",
|
"libcef/browser/pepper/pepper_isolated_file_system_message_filter.cc",
|
||||||
"libcef/browser/pepper/pepper_isolated_file_system_message_filter.h",
|
"libcef/browser/pepper/pepper_isolated_file_system_message_filter.h",
|
||||||
"libcef/browser/pepper/device_id_fetcher.cc",
|
|
||||||
"libcef/browser/permissions/permission_context.cc",
|
"libcef/browser/permissions/permission_context.cc",
|
||||||
"libcef/browser/permissions/permission_context.h",
|
"libcef/browser/permissions/permission_context.h",
|
||||||
"libcef/browser/permissions/permission_manager.cc",
|
"libcef/browser/permissions/permission_manager.cc",
|
||||||
|
@ -375,7 +367,6 @@ static_library("libcef_static") {
|
||||||
"libcef/browser/printing/print_view_manager_base.cc",
|
"libcef/browser/printing/print_view_manager_base.cc",
|
||||||
"libcef/browser/printing/print_view_manager_base.h",
|
"libcef/browser/printing/print_view_manager_base.h",
|
||||||
"libcef/browser/process_util_impl.cc",
|
"libcef/browser/process_util_impl.cc",
|
||||||
"libcef/browser/proxy_stubs.cc",
|
|
||||||
"libcef/browser/resource_context.cc",
|
"libcef/browser/resource_context.cc",
|
||||||
"libcef/browser/resource_context.h",
|
"libcef/browser/resource_context.h",
|
||||||
"libcef/browser/resource_dispatcher_host_delegate.cc",
|
"libcef/browser/resource_dispatcher_host_delegate.cc",
|
||||||
|
@ -485,7 +476,6 @@ static_library("libcef_static") {
|
||||||
"libcef/renderer/media/cef_key_systems.h",
|
"libcef/renderer/media/cef_key_systems.h",
|
||||||
"libcef/renderer/pepper/pepper_helper.cc",
|
"libcef/renderer/pepper/pepper_helper.cc",
|
||||||
"libcef/renderer/pepper/pepper_helper.h",
|
"libcef/renderer/pepper/pepper_helper.h",
|
||||||
"libcef/renderer/pepper/pepper_uma_host.cc",
|
|
||||||
"libcef/renderer/pepper/renderer_pepper_host_factory.cc",
|
"libcef/renderer/pepper/renderer_pepper_host_factory.cc",
|
||||||
"libcef/renderer/pepper/renderer_pepper_host_factory.h",
|
"libcef/renderer/pepper/renderer_pepper_host_factory.h",
|
||||||
"libcef/renderer/plugins/cef_plugin_placeholder.cc",
|
"libcef/renderer/plugins/cef_plugin_placeholder.cc",
|
||||||
|
@ -508,186 +498,14 @@ static_library("libcef_static") {
|
||||||
"libcef/utility/content_utility_client.cc",
|
"libcef/utility/content_utility_client.cc",
|
||||||
"libcef/utility/content_utility_client.h",
|
"libcef/utility/content_utility_client.h",
|
||||||
|
|
||||||
# Include sources for chrome command-line switches.
|
# Part of //chrome/renderer. Not included by that target because CEF builds
|
||||||
"//chrome/common/chrome_switches.cc",
|
# with enable_print_preview=0.
|
||||||
"//chrome/common/chrome_switches.h",
|
|
||||||
|
|
||||||
# Include sources for proxy support.
|
|
||||||
"//chrome/browser/net/proxy_service_factory.cc",
|
|
||||||
"//chrome/browser/net/proxy_service_factory.h",
|
|
||||||
"//chrome/browser/net/utility_process_mojo_proxy_resolver_factory.cc",
|
|
||||||
"//chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h",
|
|
||||||
"//components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc",
|
|
||||||
"//components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h",
|
|
||||||
"//components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.cc",
|
|
||||||
"//components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h",
|
|
||||||
|
|
||||||
# Include sources for the loadtimes V8 extension.
|
|
||||||
"//chrome/renderer/loadtimes_extension_bindings.h",
|
|
||||||
"//chrome/renderer/loadtimes_extension_bindings.cc",
|
|
||||||
|
|
||||||
# Include sources for printing.
|
|
||||||
"//chrome/browser/printing/print_job.cc",
|
|
||||||
"//chrome/browser/printing/print_job.h",
|
|
||||||
"//chrome/browser/printing/print_job_manager.cc",
|
|
||||||
"//chrome/browser/printing/print_job_manager.h",
|
|
||||||
"//chrome/browser/printing/print_job_worker.cc",
|
|
||||||
"//chrome/browser/printing/print_job_worker.h",
|
|
||||||
"//chrome/browser/printing/print_job_worker_owner.cc",
|
|
||||||
"//chrome/browser/printing/print_job_worker_owner.h",
|
|
||||||
"//chrome/browser/printing/printer_query.cc",
|
|
||||||
"//chrome/browser/printing/printer_query.h",
|
|
||||||
"//chrome/common/extensions/extension_constants.cc",
|
|
||||||
"//chrome/common/extensions/extension_constants.h",
|
|
||||||
|
|
||||||
# Include header for stub creation (BrowserProcess) so print_job_worker can
|
|
||||||
# determine the current locale.
|
|
||||||
"//chrome/browser/browser_process.cc",
|
|
||||||
"//chrome/browser/browser_process.h",
|
|
||||||
|
|
||||||
# Include sources for spell checking support.
|
|
||||||
"//chrome/browser/spellchecker/feedback.cc",
|
|
||||||
"//chrome/browser/spellchecker/feedback.h",
|
|
||||||
"//chrome/browser/spellchecker/feedback_sender.cc",
|
|
||||||
"//chrome/browser/spellchecker/feedback_sender.h",
|
|
||||||
"//chrome/browser/spellchecker/misspelling.cc",
|
|
||||||
"//chrome/browser/spellchecker/misspelling.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_action.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_action.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_custom_dictionary.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_custom_dictionary.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_factory.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_factory.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_host_metrics.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_host_metrics.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_message_filter.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_message_filter.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_service.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_service.h",
|
|
||||||
"//chrome/browser/spellchecker/spelling_service_client.cc",
|
|
||||||
"//chrome/browser/spellchecker/spelling_service_client.h",
|
|
||||||
"//chrome/browser/spellchecker/word_trimmer.cc",
|
|
||||||
"//chrome/browser/spellchecker/word_trimmer.h",
|
|
||||||
"//chrome/common/chrome_constants.cc",
|
|
||||||
"//chrome/common/chrome_constants.h",
|
|
||||||
"//chrome/common/spellcheck_common.cc",
|
|
||||||
"//chrome/common/spellcheck_common.h",
|
|
||||||
"//chrome/common/spellcheck_marker.h",
|
|
||||||
"//chrome/common/spellcheck_messages.h",
|
|
||||||
"//chrome/common/spellcheck_result.h",
|
|
||||||
"//chrome/renderer/spellchecker/custom_dictionary_engine.cc",
|
|
||||||
"//chrome/renderer/spellchecker/custom_dictionary_engine.h",
|
|
||||||
"//chrome/renderer/spellchecker/hunspell_engine.cc",
|
|
||||||
"//chrome/renderer/spellchecker/hunspell_engine.h",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck.cc",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck.h",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck_language.cc",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck_language.h",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck_provider.cc",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck_provider.h",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck_worditerator.cc",
|
|
||||||
"//chrome/renderer/spellchecker/spellcheck_worditerator.h",
|
|
||||||
"//chrome/renderer/spellchecker/spelling_engine.h",
|
|
||||||
|
|
||||||
# Include sources for pepper flash support.
|
|
||||||
"//chrome/common/pepper_flash.cc",
|
|
||||||
"//chrome/common/pepper_flash.h",
|
|
||||||
"//chrome/common/ppapi_utils.cc",
|
|
||||||
"//chrome/common/ppapi_utils.h",
|
|
||||||
"//chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc",
|
|
||||||
"//chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h",
|
|
||||||
"//chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc",
|
|
||||||
"//chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_drm_renderer_host.h",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_font_file_host.cc",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_font_file_host.h",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_fullscreen_host.cc",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_fullscreen_host.h",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_menu_host.cc",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_menu_host.h",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_renderer_host.cc",
|
|
||||||
"//chrome/renderer/pepper/pepper_flash_renderer_host.h",
|
|
||||||
|
|
||||||
# Include sources required by chrome_utility_messages.h.
|
|
||||||
"//chrome/common/safe_browsing/zip_analyzer_results.h",
|
|
||||||
"//chrome/common/safe_browsing/zip_analyzer_results.cc",
|
|
||||||
|
|
||||||
# Include sources for pepper PDF support.
|
|
||||||
"//chrome/child/pdf_child_init.cc",
|
|
||||||
"//chrome/child/pdf_child_init.h",
|
|
||||||
"//chrome/renderer/pepper/chrome_pdf_print_client.cc",
|
"//chrome/renderer/pepper/chrome_pdf_print_client.cc",
|
||||||
"//chrome/renderer/pepper/chrome_pdf_print_client.h",
|
"//chrome/renderer/pepper/chrome_pdf_print_client.h",
|
||||||
|
|
||||||
# Include sources for extensions support.
|
# Part of //components/prefs:test_support which is testingonly.
|
||||||
"//chrome/common/extensions/chrome_manifest_url_handlers.cc",
|
|
||||||
"//chrome/common/extensions/chrome_manifest_url_handlers.h",
|
|
||||||
"//chrome/common/extensions/extension_process_policy.cc",
|
|
||||||
"//chrome/common/extensions/extension_process_policy.h",
|
|
||||||
"//chrome/common/pepper_permission_util.cc",
|
|
||||||
"//chrome/common/pepper_permission_util.h",
|
|
||||||
"//chrome/common/url_constants.cc",
|
|
||||||
"//chrome/common/url_constants.h",
|
|
||||||
"//chrome/renderer/extensions/resource_request_policy.cc",
|
|
||||||
"//chrome/renderer/extensions/resource_request_policy.h",
|
|
||||||
"//extensions/shell/browser/shell_display_info_provider.cc",
|
|
||||||
"//extensions/shell/browser/shell_display_info_provider.h",
|
|
||||||
"//extensions/shell/browser/shell_web_contents_modal_dialog_manager.cc",
|
|
||||||
|
|
||||||
# Include sources for component-updater support.
|
|
||||||
"//chrome/browser/component_updater/widevine_cdm_component_installer.cc",
|
|
||||||
"//chrome/browser/component_updater/widevine_cdm_component_installer.h",
|
|
||||||
|
|
||||||
# Include sources for widevine support.
|
|
||||||
"//chrome/common/widevine_cdm_constants.cc",
|
|
||||||
"//chrome/common/widevine_cdm_constants.h",
|
|
||||||
|
|
||||||
# Include sources for plugin placeholder support.
|
|
||||||
"//chrome/browser/plugins/plugin_finder.cc",
|
|
||||||
"//chrome/browser/plugins/plugin_finder.h",
|
|
||||||
"//chrome/browser/plugins/plugin_metadata.cc",
|
|
||||||
"//chrome/browser/plugins/plugin_metadata.h",
|
|
||||||
"//chrome/renderer/plugins/power_saver_info.cc",
|
|
||||||
"//chrome/renderer/plugins/power_saver_info.h",
|
|
||||||
"//components/nacl/common/nacl_constants.cc",
|
|
||||||
"//components/nacl/common/nacl_constants.h",
|
|
||||||
|
|
||||||
# Include sources for preferences support.
|
|
||||||
"//chrome/browser/accessibility/animation_policy_prefs.cc",
|
|
||||||
"//chrome/browser/accessibility/animation_policy_prefs.h",
|
|
||||||
"//chrome/browser/character_encoding.cc",
|
|
||||||
"//chrome/browser/character_encoding.h",
|
|
||||||
"//chrome/browser/defaults.cc",
|
|
||||||
"//chrome/browser/defaults.h",
|
|
||||||
"//chrome/browser/extensions/extension_webkit_preferences.cc",
|
|
||||||
"//chrome/browser/extensions/extension_webkit_preferences.h",
|
|
||||||
"//chrome/browser/font_family_cache.cc",
|
|
||||||
"//chrome/browser/font_family_cache.h",
|
|
||||||
"//chrome/browser/prefs/command_line_pref_store.cc",
|
|
||||||
"//chrome/browser/prefs/command_line_pref_store.h",
|
|
||||||
"//chrome/browser/renderer_preferences_util.cc",
|
|
||||||
"//chrome/browser/renderer_preferences_util.h",
|
|
||||||
"//chrome/browser/ui/prefs/prefs_tab_helper.cc",
|
|
||||||
"//chrome/browser/ui/prefs/prefs_tab_helper.h",
|
|
||||||
"//chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc",
|
|
||||||
"//chrome/browser/ui/zoom/chrome_zoom_level_prefs.h",
|
|
||||||
"//chrome/common/pref_font_webkit_names.h",
|
|
||||||
"//chrome/common/pref_names.cc",
|
|
||||||
"//chrome/common/pref_names.h",
|
|
||||||
"//chrome/common/pref_names_util.cc",
|
|
||||||
"//chrome/common/pref_names_util.h",
|
|
||||||
"//components/prefs/testing_pref_store.cc",
|
"//components/prefs/testing_pref_store.cc",
|
||||||
"//components/prefs/testing_pref_store.h",
|
"//components/prefs/testing_pref_store.h",
|
||||||
|
|
||||||
# Include sources for permissions support.
|
|
||||||
"//chrome/browser/permissions/permission_request_id.h",
|
|
||||||
"//chrome/browser/permissions/permission_request_id.cc",
|
|
||||||
|
|
||||||
# Include sources for SafeSearch support.
|
|
||||||
"//chrome/browser/net/safe_search_util.cc",
|
|
||||||
"//chrome/browser/net/safe_search_util.h",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
configs += [
|
configs += [
|
||||||
|
@ -710,15 +528,6 @@ static_library("libcef_static") {
|
||||||
# we include Blink headers.
|
# we include Blink headers.
|
||||||
"//third_party/WebKit/public/platform",
|
"//third_party/WebKit/public/platform",
|
||||||
"//third_party/WebKit/public/web",
|
"//third_party/WebKit/public/web",
|
||||||
|
|
||||||
# CEF references resources from the specified chrome targets in
|
|
||||||
# cef_strings.grd and/or cef_resources.grd. Include grit stub headers with
|
|
||||||
# the expected name that redirect to cef_resources.h/cef_strings.h.
|
|
||||||
# //chrome/app:generated_resources -> generated_resources.h
|
|
||||||
# //chrome/app/resources:locale_settings -> locale_settings.h
|
|
||||||
# //chrome/browser:resources -> browser_resources.h
|
|
||||||
"libcef/resources/grit_stub",
|
|
||||||
"libcef/resources/grit_stub/chrome",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -730,10 +539,6 @@ static_library("libcef_static") {
|
||||||
":pak_extensions",
|
":pak_extensions",
|
||||||
":repack_locales_pack",
|
":repack_locales_pack",
|
||||||
|
|
||||||
# Grit deps that generate .cc files must be listed both here and in the
|
|
||||||
# repack() target.
|
|
||||||
"//chrome/browser/resources:component_extension_resources",
|
|
||||||
|
|
||||||
# Generate API bindings for extensions.
|
# Generate API bindings for extensions.
|
||||||
"libcef/common/extensions/api",
|
"libcef/common/extensions/api",
|
||||||
"libcef/common/extensions/api:api_registration",
|
"libcef/common/extensions/api:api_registration",
|
||||||
|
@ -743,6 +548,10 @@ static_library("libcef_static") {
|
||||||
"//base:base_static",
|
"//base:base_static",
|
||||||
"//base/third_party/dynamic_annotations",
|
"//base/third_party/dynamic_annotations",
|
||||||
"//cc",
|
"//cc",
|
||||||
|
"//chrome/browser",
|
||||||
|
"//chrome/child",
|
||||||
|
"//chrome/common",
|
||||||
|
"//chrome/renderer",
|
||||||
"//components/cdm/renderer",
|
"//components/cdm/renderer",
|
||||||
"//components/component_updater",
|
"//components/component_updater",
|
||||||
"//components/content_settings/core/browser",
|
"//components/content_settings/core/browser",
|
||||||
|
@ -818,18 +627,6 @@ static_library("libcef_static") {
|
||||||
"//ui/gl",
|
"//ui/gl",
|
||||||
"//url",
|
"//url",
|
||||||
"//v8",
|
"//v8",
|
||||||
|
|
||||||
# Generate chrome/common/safe_browsing/csd.pb.h required by
|
|
||||||
# zip_analyzer_results.h via chrome_utility_messages.h
|
|
||||||
"//chrome/common/safe_browsing:proto",
|
|
||||||
|
|
||||||
# Generate chrome/common/features.h required by Chrome code that uses
|
|
||||||
# the BUILDFLAG() macro.
|
|
||||||
"//chrome/common:features",
|
|
||||||
|
|
||||||
# Generate chrome/common/chrome_version.h required by
|
|
||||||
# chrome/common/chrome_contants.cc
|
|
||||||
"//chrome/common:version_header",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!is_mac) {
|
if (!is_mac) {
|
||||||
|
@ -856,12 +653,8 @@ static_library("libcef_static") {
|
||||||
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
|
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
|
||||||
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
|
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
|
||||||
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
|
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
|
||||||
# Include sources for printing using PDF.
|
|
||||||
"libcef/utility/printing_handler.cc",
|
"libcef/utility/printing_handler.cc",
|
||||||
"libcef/utility/printing_handler.h",
|
"libcef/utility/printing_handler.h",
|
||||||
"//chrome/browser/printing/pdf_to_emf_converter.cc",
|
|
||||||
"//chrome/browser/printing/pdf_to_emf_converter.h",
|
|
||||||
"//chrome/common/chrome_utility_printing_messages.h",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -903,16 +696,6 @@ static_library("libcef_static") {
|
||||||
"libcef/browser/osr/text_input_client_osr_mac.h",
|
"libcef/browser/osr/text_input_client_osr_mac.h",
|
||||||
"libcef/common/util_mac.h",
|
"libcef/common/util_mac.h",
|
||||||
"libcef/common/util_mac.mm",
|
"libcef/common/util_mac.mm",
|
||||||
# Include sources for spell checking support.
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_message_filter_platform.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_message_filter_platform_mac.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_platform.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_platform_mac.mm",
|
|
||||||
"//chrome/renderer/spellchecker/platform_spelling_engine.cc",
|
|
||||||
"//chrome/renderer/spellchecker/platform_spelling_engine.h",
|
|
||||||
# Include sources for pepper flash support.
|
|
||||||
"//chrome/browser/renderer_host/pepper/monitor_finder_mac.h",
|
|
||||||
"//chrome/browser/renderer_host/pepper/monitor_finder_mac.mm",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -986,11 +769,15 @@ static_library("libcef_static") {
|
||||||
"libcef/browser/views/window_impl.h",
|
"libcef/browser/views/window_impl.h",
|
||||||
"libcef/browser/views/window_view.cc",
|
"libcef/browser/views/window_view.cc",
|
||||||
"libcef/browser/views/window_view.h",
|
"libcef/browser/views/window_view.h",
|
||||||
|
|
||||||
|
# Part of //ui/views:test_support which is testingonly.
|
||||||
"//ui/views/test/desktop_test_views_delegate.h",
|
"//ui/views/test/desktop_test_views_delegate.h",
|
||||||
"//ui/views/test/desktop_test_views_delegate_aura.cc",
|
"//ui/views/test/desktop_test_views_delegate_aura.cc",
|
||||||
"//ui/views/test/test_views_delegate.h",
|
"//ui/views/test/test_views_delegate.h",
|
||||||
"//ui/views/test/test_views_delegate_aura.cc",
|
"//ui/views/test/test_views_delegate_aura.cc",
|
||||||
|
|
||||||
# Support for UI input events.
|
# Support for UI input events.
|
||||||
|
# Part of //ui/base:test_support which is testingonly.
|
||||||
"//ui/base/test/ui_controls.h",
|
"//ui/base/test/ui_controls.h",
|
||||||
"//ui/base/test/ui_controls_aura.cc",
|
"//ui/base/test/ui_controls_aura.cc",
|
||||||
"//ui/aura/test/ui_controls_factory_aura.h",
|
"//ui/aura/test/ui_controls_factory_aura.h",
|
||||||
|
@ -1013,7 +800,9 @@ static_library("libcef_static") {
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
sources += [
|
sources += [
|
||||||
# Support for UI input events.
|
# Support for UI input events.
|
||||||
|
# Part of //ui/aura:test_support which is testingonly.
|
||||||
"//ui/aura/test/ui_controls_factory_aurawin.cc",
|
"//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.cc",
|
||||||
"//ui/base/test/ui_controls_internal_win.h",
|
"//ui/base/test/ui_controls_internal_win.h",
|
||||||
]
|
]
|
||||||
|
@ -1022,13 +811,16 @@ static_library("libcef_static") {
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
sources += [
|
sources += [
|
||||||
# Support for UI input events.
|
# 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.cc",
|
||||||
"//ui/aura/test/aura_test_utils.h",
|
"//ui/aura/test/aura_test_utils.h",
|
||||||
"//ui/aura/test/ui_controls_factory_aurax11.cc",
|
"//ui/aura/test/ui_controls_factory_aurax11.cc",
|
||||||
"//ui/aura/test/x11_event_sender.cc",
|
"//ui/aura/test/x11_event_sender.cc",
|
||||||
"//ui/aura/test/x11_event_sender.h",
|
"//ui/aura/test/x11_event_sender.h",
|
||||||
|
# Part of //ui/events:test_support which is testingonly.
|
||||||
"//ui/events/test/platform_event_waiter.cc",
|
"//ui/events/test/platform_event_waiter.cc",
|
||||||
"//ui/events/test/platform_event_waiter.h",
|
"//ui/events/test/platform_event_waiter.h",
|
||||||
|
# Part of //ui/views:test_support which is testingonly.
|
||||||
"//ui/views/test/ui_controls_factory_desktop_aurax11.cc",
|
"//ui/views/test/ui_controls_factory_desktop_aurax11.cc",
|
||||||
"//ui/views/test/ui_controls_factory_desktop_aurax11.h",
|
"//ui/views/test/ui_controls_factory_desktop_aurax11.h",
|
||||||
]
|
]
|
||||||
|
@ -1136,6 +928,7 @@ template("cef_pak_scaled") {
|
||||||
# Each input pak file should also have a deps line for completeness.
|
# Each input pak file should also have a deps line for completeness.
|
||||||
sources = [
|
sources = [
|
||||||
"$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
|
"$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
|
||||||
|
"$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
|
||||||
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
|
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
|
||||||
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
|
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
|
||||||
"$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak",
|
"$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak",
|
||||||
|
@ -1147,6 +940,7 @@ template("cef_pak_scaled") {
|
||||||
# listed both here and in the libcef_static target.
|
# listed both here and in the libcef_static target.
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"//third_party/WebKit/public:image_resources",
|
"//third_party/WebKit/public:image_resources",
|
||||||
|
"//chrome/renderer:resources",
|
||||||
"//components/resources:components_scaled_resources",
|
"//components/resources:components_scaled_resources",
|
||||||
"//content/app/resources",
|
"//content/app/resources",
|
||||||
"//extensions:extensions_browser_resources",
|
"//extensions:extensions_browser_resources",
|
||||||
|
@ -1254,6 +1048,8 @@ repack("pak") {
|
||||||
# Each input pak file should also have a deps line for completeness.
|
# Each input pak file should also have a deps line for completeness.
|
||||||
sources = [
|
sources = [
|
||||||
"$root_gen_dir/blink/public/resources/blink_resources.pak",
|
"$root_gen_dir/blink/public/resources/blink_resources.pak",
|
||||||
|
"$root_gen_dir/chrome/browser_resources.pak",
|
||||||
|
"$root_gen_dir/chrome/common_resources.pak",
|
||||||
"$root_gen_dir/components/components_resources.pak",
|
"$root_gen_dir/components/components_resources.pak",
|
||||||
"$root_gen_dir/cef/cef_resources.pak",
|
"$root_gen_dir/cef/cef_resources.pak",
|
||||||
"$root_gen_dir/content/content_resources.pak",
|
"$root_gen_dir/content/content_resources.pak",
|
||||||
|
@ -1265,6 +1061,8 @@ repack("pak") {
|
||||||
# listed both here and in the libcef_static target.
|
# listed both here and in the libcef_static target.
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"//third_party/WebKit/public:resources_grit",
|
"//third_party/WebKit/public:resources_grit",
|
||||||
|
"//chrome/browser:resources",
|
||||||
|
"//chrome/common:resources",
|
||||||
"//components/resources:components_resources",
|
"//components/resources:components_resources",
|
||||||
":cef_resources",
|
":cef_resources",
|
||||||
"//content:resources",
|
"//content:resources",
|
||||||
|
@ -1419,7 +1217,7 @@ if (is_mac) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_linux && !is_debug && !is_asan && use_allocator=="none") {
|
if (is_linux && !is_debug && !using_sanitizer && use_allocator=="none") {
|
||||||
# Only export necessary symbols from libcef.so.
|
# Only export necessary symbols from libcef.so.
|
||||||
# Don't do this in Debug builds because it causes the resulting application to crash.
|
# Don't do this in Debug builds because it causes the resulting application to crash.
|
||||||
ldflags = [ "-Wl,--version-script=" +
|
ldflags = [ "-Wl,--version-script=" +
|
||||||
|
|
256
cef.gyp
256
cef.gyp
|
@ -694,6 +694,7 @@
|
||||||
'target_name': 'cef_locales',
|
'target_name': 'cef_locales',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
|
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
|
||||||
'<(DEPTH)/chrome/chrome_resources.gyp:platform_locale_settings',
|
'<(DEPTH)/chrome/chrome_resources.gyp:platform_locale_settings',
|
||||||
'<(DEPTH)/components/components_strings.gyp:components_strings',
|
'<(DEPTH)/components/components_strings.gyp:components_strings',
|
||||||
'<(DEPTH)/content/app/strings/content_strings.gyp:content_strings',
|
'<(DEPTH)/content/app/strings/content_strings.gyp:content_strings',
|
||||||
|
@ -744,39 +745,16 @@
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
# Create the pack file for component extension resources.
|
|
||||||
'target_name': 'component_extension_resources',
|
|
||||||
'type': 'none',
|
|
||||||
'actions': [
|
|
||||||
{
|
|
||||||
'action_name': 'component_extension_resources',
|
|
||||||
'variables': {
|
|
||||||
'grit_grd_file': '../chrome/browser/resources/component_extension_resources.grd',
|
|
||||||
},
|
|
||||||
'includes': [ '../build/grit_action.gypi' ],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'includes': [ '../build/grit_target.gypi' ],
|
|
||||||
'copies': [
|
|
||||||
{
|
|
||||||
'destination': '<(PRODUCT_DIR)',
|
|
||||||
'files': [
|
|
||||||
'<(grit_out_dir)/component_extension_resources.pak'
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
# Combine all extensions-related non-localized pack file resources into a
|
# Combine all extensions-related non-localized pack file resources into a
|
||||||
# single CEF pack file. Scaled resources are still in cef_pak.
|
# single CEF pack file. Scaled resources are still in cef_pak.
|
||||||
'target_name': 'cef_extensions_pak',
|
'target_name': 'cef_extensions_pak',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
|
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_extra_resources',
|
||||||
'<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
|
'<(DEPTH)/extensions/extensions_resources.gyp:extensions_resources',
|
||||||
'<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
|
'<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
|
||||||
'<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
|
'<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
|
||||||
'component_extension_resources',
|
|
||||||
],
|
],
|
||||||
'variables': {
|
'variables': {
|
||||||
'make_pack_header_path': 'tools/make_pack_header.py',
|
'make_pack_header_path': 'tools/make_pack_header.py',
|
||||||
|
@ -786,10 +764,10 @@
|
||||||
'action_name': 'repack_cef_extensions_pack',
|
'action_name': 'repack_cef_extensions_pack',
|
||||||
'variables': {
|
'variables': {
|
||||||
'pak_inputs': [
|
'pak_inputs': [
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/component_extension_resources.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
|
||||||
'<(grit_out_dir)/component_extension_resources.pak',
|
|
||||||
],
|
],
|
||||||
'pak_output': '<(PRODUCT_DIR)/cef_extensions.pak',
|
'pak_output': '<(PRODUCT_DIR)/cef_extensions.pak',
|
||||||
},
|
},
|
||||||
|
@ -802,6 +780,7 @@
|
||||||
'target_name': 'cef_pak',
|
'target_name': 'cef_pak',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
|
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
|
||||||
'<(DEPTH)/components/components_resources.gyp:components_resources',
|
'<(DEPTH)/components/components_resources.gyp:components_resources',
|
||||||
'<(DEPTH)/components/components_strings.gyp:components_strings',
|
'<(DEPTH)/components/components_strings.gyp:components_strings',
|
||||||
'<(DEPTH)/content/app/resources/content_resources.gyp:content_resources',
|
'<(DEPTH)/content/app/resources/content_resources.gyp:content_resources',
|
||||||
|
@ -823,6 +802,8 @@
|
||||||
'variables': {
|
'variables': {
|
||||||
'pak_inputs': [
|
'pak_inputs': [
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.pak',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
|
||||||
|
@ -837,6 +818,7 @@
|
||||||
'variables': {
|
'variables': {
|
||||||
'pak_inputs': [
|
'pak_inputs': [
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_100_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_100_percent.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_100_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_100_percent.pak',
|
||||||
|
@ -852,6 +834,7 @@
|
||||||
'variables': {
|
'variables': {
|
||||||
'pak_inputs': [
|
'pak_inputs': [
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_200_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_200_percent.pak',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_200_percent.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_200_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_200_percent.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_200_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_200_percent.pak',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_200_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_browser_resources_200_percent.pak',
|
||||||
|
@ -868,6 +851,9 @@
|
||||||
'header_inputs': [
|
'header_inputs': [
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/blink/grit/devtools_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/blink/grit/devtools_resources.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/grit/blink_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/grit/blink_resources.h',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/browser_resources.h',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/common_resources.h',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/component_extension_resources.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/content/grit/content_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/content/grit/content_resources.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_browser_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_browser_resources.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_renderer_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/extensions/grit/extensions_renderer_resources.h',
|
||||||
|
@ -877,7 +863,6 @@
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/webui_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/webui_resources.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/ui/views/resources/grit/views_resources.h',
|
'<(SHARED_INTERMEDIATE_DIR)/ui/views/resources/grit/views_resources.h',
|
||||||
'<(grit_out_dir)/grit/cef_resources.h',
|
'<(grit_out_dir)/grit/cef_resources.h',
|
||||||
'<(grit_out_dir)/grit/component_extension_resources.h',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'inputs': [
|
'inputs': [
|
||||||
|
@ -894,6 +879,8 @@
|
||||||
'action_name': 'make_pack_strings_header',
|
'action_name': 'make_pack_strings_header',
|
||||||
'variables': {
|
'variables': {
|
||||||
'header_inputs': [
|
'header_inputs': [
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/generated_resources.h',
|
||||||
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/locale_settings.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/platform_locale_settings.h',
|
'<(SHARED_INTERMEDIATE_DIR)/chrome/grit/platform_locale_settings.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/components/strings/grit/components_strings.h',
|
'<(SHARED_INTERMEDIATE_DIR)/components/strings/grit/components_strings.h',
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/content/app/strings/grit/content_strings.h',
|
'<(SHARED_INTERMEDIATE_DIR)/content/app/strings/grit/content_strings.h',
|
||||||
|
@ -935,14 +922,6 @@
|
||||||
'.',
|
'.',
|
||||||
'<(DEPTH)/third_party/WebKit/public/platform',
|
'<(DEPTH)/third_party/WebKit/public/platform',
|
||||||
'<(DEPTH)/third_party/WebKit/public/web',
|
'<(DEPTH)/third_party/WebKit/public/web',
|
||||||
# CEF grit resource includes
|
|
||||||
'<(DEPTH)/cef/libcef/resources/grit_stub',
|
|
||||||
'<(DEPTH)/cef/libcef/resources/grit_stub/chrome',
|
|
||||||
'<(grit_out_dir)',
|
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/chrome',
|
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/components',
|
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/ui/resources',
|
|
||||||
'<(SHARED_INTERMEDIATE_DIR)/ui/strings',
|
|
||||||
],
|
],
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'<(DEPTH)/base/base.gyp:base',
|
'<(DEPTH)/base/base.gyp:base',
|
||||||
|
@ -950,15 +929,10 @@
|
||||||
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
|
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
|
||||||
'<(DEPTH)/cc/blink/cc_blink.gyp:cc_blink',
|
'<(DEPTH)/cc/blink/cc_blink.gyp:cc_blink',
|
||||||
'<(DEPTH)/cc/cc.gyp:cc',
|
'<(DEPTH)/cc/cc.gyp:cc',
|
||||||
# Generate chrome/common/safe_browsing/csd.pb.h required by
|
'<(DEPTH)/chrome/chrome.gyp:browser',
|
||||||
# zip_analyzer_results.h via chrome_utility_messages.h
|
'<(DEPTH)/chrome/chrome.gyp:child',
|
||||||
'<(DEPTH)/chrome/chrome.gyp:safe_browsing_proto',
|
'<(DEPTH)/chrome/chrome.gyp:common',
|
||||||
# Generate chrome/common/features.h required by Chrome code that uses
|
'<(DEPTH)/chrome/chrome.gyp:renderer',
|
||||||
# the BUILDFLAG() macro.
|
|
||||||
'<(DEPTH)/chrome/chrome_features.gyp:chrome_common_features',
|
|
||||||
# Generate chrome/common/chrome_version.h required by
|
|
||||||
# chrome/common/chrome_contants.cc
|
|
||||||
'<(DEPTH)/chrome/common_constants.gyp:version_header',
|
|
||||||
'<(DEPTH)/components/components.gyp:cdm_renderer',
|
'<(DEPTH)/components/components.gyp:cdm_renderer',
|
||||||
'<(DEPTH)/components/components.gyp:component_updater',
|
'<(DEPTH)/components/components.gyp:component_updater',
|
||||||
'<(DEPTH)/components/components.gyp:content_settings_core_browser',
|
'<(DEPTH)/components/components.gyp:content_settings_core_browser',
|
||||||
|
@ -1189,7 +1163,6 @@
|
||||||
'libcef/browser/pepper/pepper_flash_browser_host.h',
|
'libcef/browser/pepper/pepper_flash_browser_host.h',
|
||||||
'libcef/browser/pepper/pepper_isolated_file_system_message_filter.cc',
|
'libcef/browser/pepper/pepper_isolated_file_system_message_filter.cc',
|
||||||
'libcef/browser/pepper/pepper_isolated_file_system_message_filter.h',
|
'libcef/browser/pepper/pepper_isolated_file_system_message_filter.h',
|
||||||
'libcef/browser/pepper/device_id_fetcher.cc',
|
|
||||||
'libcef/browser/permissions/permission_context.cc',
|
'libcef/browser/permissions/permission_context.cc',
|
||||||
'libcef/browser/permissions/permission_context.h',
|
'libcef/browser/permissions/permission_context.h',
|
||||||
'libcef/browser/permissions/permission_manager.cc',
|
'libcef/browser/permissions/permission_manager.cc',
|
||||||
|
@ -1213,7 +1186,6 @@
|
||||||
'libcef/browser/printing/print_view_manager_base.cc',
|
'libcef/browser/printing/print_view_manager_base.cc',
|
||||||
'libcef/browser/printing/print_view_manager_base.h',
|
'libcef/browser/printing/print_view_manager_base.h',
|
||||||
'libcef/browser/process_util_impl.cc',
|
'libcef/browser/process_util_impl.cc',
|
||||||
'libcef/browser/proxy_stubs.cc',
|
|
||||||
'libcef/browser/resource_context.cc',
|
'libcef/browser/resource_context.cc',
|
||||||
'libcef/browser/resource_context.h',
|
'libcef/browser/resource_context.h',
|
||||||
'libcef/browser/resource_dispatcher_host_delegate.cc',
|
'libcef/browser/resource_dispatcher_host_delegate.cc',
|
||||||
|
@ -1323,7 +1295,6 @@
|
||||||
'libcef/renderer/media/cef_key_systems.h',
|
'libcef/renderer/media/cef_key_systems.h',
|
||||||
'libcef/renderer/pepper/pepper_helper.cc',
|
'libcef/renderer/pepper/pepper_helper.cc',
|
||||||
'libcef/renderer/pepper/pepper_helper.h',
|
'libcef/renderer/pepper/pepper_helper.h',
|
||||||
'libcef/renderer/pepper/pepper_uma_host.cc',
|
|
||||||
'libcef/renderer/pepper/renderer_pepper_host_factory.cc',
|
'libcef/renderer/pepper/renderer_pepper_host_factory.cc',
|
||||||
'libcef/renderer/pepper/renderer_pepper_host_factory.h',
|
'libcef/renderer/pepper/renderer_pepper_host_factory.h',
|
||||||
'libcef/renderer/plugins/cef_plugin_placeholder.cc',
|
'libcef/renderer/plugins/cef_plugin_placeholder.cc',
|
||||||
|
@ -1345,171 +1316,15 @@
|
||||||
'libcef/renderer/webkit_glue.h',
|
'libcef/renderer/webkit_glue.h',
|
||||||
'libcef/utility/content_utility_client.cc',
|
'libcef/utility/content_utility_client.cc',
|
||||||
'libcef/utility/content_utility_client.h',
|
'libcef/utility/content_utility_client.h',
|
||||||
'<(DEPTH)/chrome/common/chrome_switches.cc',
|
|
||||||
'<(DEPTH)/chrome/common/chrome_switches.h',
|
# Part of chrome/chrome.gyp:renderer. Not included by that target
|
||||||
# Include sources for proxy support.
|
# because CEF builds with enable_print_preview=0.
|
||||||
'<(DEPTH)/chrome/browser/net/proxy_service_factory.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/net/proxy_service_factory.h',
|
|
||||||
'<(DEPTH)/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h',
|
|
||||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc',
|
|
||||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h',
|
|
||||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.cc',
|
|
||||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h',
|
|
||||||
# Include sources for the loadtimes V8 extension.
|
|
||||||
'<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.cc',
|
|
||||||
# Include sources for printing.
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job.h',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job_manager.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job_manager.h',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job_worker.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job_worker.h',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job_worker_owner.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/print_job_worker_owner.h',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/printer_query.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/printer_query.h',
|
|
||||||
'<(DEPTH)/chrome/common/extensions/extension_constants.cc',
|
|
||||||
'<(DEPTH)/chrome/common/extensions/extension_constants.h',
|
|
||||||
# Include header for stub creation (BrowserProcess) so print_job_worker can
|
|
||||||
# determine the current locale.
|
|
||||||
'<(DEPTH)/chrome/browser/browser_process.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/browser_process.h',
|
|
||||||
# Include sources for spell checking support.
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/feedback.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/feedback.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/feedback_sender.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/feedback_sender.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/misspelling.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/misspelling.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_action.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_action.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_custom_dictionary.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_factory.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_factory.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_host_metrics.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_host_metrics.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_service.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_service.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spelling_service_client.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spelling_service_client.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/word_trimmer.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/word_trimmer.h',
|
|
||||||
'<(DEPTH)/chrome/common/chrome_constants.cc',
|
|
||||||
'<(DEPTH)/chrome/common/chrome_constants.h',
|
|
||||||
'<(DEPTH)/chrome/common/spellcheck_common.cc',
|
|
||||||
'<(DEPTH)/chrome/common/spellcheck_common.h',
|
|
||||||
'<(DEPTH)/chrome/common/spellcheck_marker.h',
|
|
||||||
'<(DEPTH)/chrome/common/spellcheck_messages.h',
|
|
||||||
'<(DEPTH)/chrome/common/spellcheck_result.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/custom_dictionary_engine.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/custom_dictionary_engine.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/hunspell_engine.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/hunspell_engine.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck_language.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck_language.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck_provider.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck_provider.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck_worditerator.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spellcheck_worditerator.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/spelling_engine.h',
|
|
||||||
# Include sources for pepper flash support.
|
|
||||||
'<(DEPTH)/chrome/common/pepper_flash.cc',
|
|
||||||
'<(DEPTH)/chrome/common/pepper_flash.h',
|
|
||||||
'<(DEPTH)/chrome/common/ppapi_utils.cc',
|
|
||||||
'<(DEPTH)/chrome/common/ppapi_utils.h',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_drm_renderer_host.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_font_file_host.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_font_file_host.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_fullscreen_host.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_fullscreen_host.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_menu_host.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_menu_host.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_renderer_host.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/pepper_flash_renderer_host.h',
|
|
||||||
# Include sources required by chrome_utility_messages.h.
|
|
||||||
'<(DEPTH)/chrome/common/safe_browsing/zip_analyzer_results.h',
|
|
||||||
'<(DEPTH)/chrome/common/safe_browsing/zip_analyzer_results.cc',
|
|
||||||
# Include sources for pepper PDF support.
|
|
||||||
'<(DEPTH)/chrome/child/pdf_child_init.cc',
|
|
||||||
'<(DEPTH)/chrome/child/pdf_child_init.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/pepper/chrome_pdf_print_client.cc',
|
'<(DEPTH)/chrome/renderer/pepper/chrome_pdf_print_client.cc',
|
||||||
'<(DEPTH)/chrome/renderer/pepper/chrome_pdf_print_client.h',
|
'<(DEPTH)/chrome/renderer/pepper/chrome_pdf_print_client.h',
|
||||||
# Include sources for extensions support.
|
|
||||||
'<(DEPTH)/chrome/common/extensions/chrome_manifest_url_handlers.cc',
|
# Part of components/components.gyp:prefs_test_support which is testing only.
|
||||||
'<(DEPTH)/chrome/common/extensions/chrome_manifest_url_handlers.h',
|
"<(DEPTH)/components/prefs/testing_pref_store.cc",
|
||||||
'<(DEPTH)/chrome/common/extensions/extension_process_policy.cc',
|
"<(DEPTH)/components/prefs/testing_pref_store.h",
|
||||||
'<(DEPTH)/chrome/common/extensions/extension_process_policy.h',
|
|
||||||
'<(DEPTH)/chrome/common/pepper_permission_util.cc',
|
|
||||||
'<(DEPTH)/chrome/common/pepper_permission_util.h',
|
|
||||||
'<(DEPTH)/chrome/common/url_constants.cc',
|
|
||||||
'<(DEPTH)/chrome/common/url_constants.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/extensions/resource_request_policy.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/extensions/resource_request_policy.h',
|
|
||||||
'<(DEPTH)/extensions/shell/browser/shell_display_info_provider.cc',
|
|
||||||
'<(DEPTH)/extensions/shell/browser/shell_display_info_provider.h',
|
|
||||||
'<(DEPTH)/extensions/shell/browser/shell_web_contents_modal_dialog_manager.cc',
|
|
||||||
'<(grit_out_dir)/grit/component_extension_resources_map.cc',
|
|
||||||
# Include sources for component-updater support.
|
|
||||||
'<(DEPTH)/chrome/browser/component_updater/widevine_cdm_component_installer.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/component_updater/widevine_cdm_component_installer.h',
|
|
||||||
# Include sources for widevine support.
|
|
||||||
'<(DEPTH)/chrome/common/widevine_cdm_constants.cc',
|
|
||||||
'<(DEPTH)/chrome/common/widevine_cdm_constants.h',
|
|
||||||
# Include sources for plugin placeholder support.
|
|
||||||
'<(DEPTH)/chrome/browser/plugins/plugin_finder.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/plugins/plugin_finder.h',
|
|
||||||
'<(DEPTH)/chrome/browser/plugins/plugin_metadata.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/plugins/plugin_metadata.h',
|
|
||||||
'<(DEPTH)/chrome/renderer/plugins/power_saver_info.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/plugins/power_saver_info.h',
|
|
||||||
'<(DEPTH)/components/nacl/common/nacl_constants.cc',
|
|
||||||
'<(DEPTH)/components/nacl/common/nacl_constants.h',
|
|
||||||
# Include sources for preferences support.
|
|
||||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/accessibility/animation_policy_prefs.h',
|
|
||||||
'<(DEPTH)/chrome/browser/character_encoding.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/character_encoding.h',
|
|
||||||
'<(DEPTH)/chrome/browser/defaults.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/defaults.h',
|
|
||||||
'<(DEPTH)/chrome/browser/extensions/extension_webkit_preferences.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/extensions/extension_webkit_preferences.h',
|
|
||||||
'<(DEPTH)/chrome/browser/font_family_cache.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/font_family_cache.h',
|
|
||||||
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/prefs/command_line_pref_store.h',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_preferences_util.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_preferences_util.h',
|
|
||||||
'<(DEPTH)/chrome/browser/ui/prefs/prefs_tab_helper.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/ui/prefs/prefs_tab_helper.h',
|
|
||||||
'<(DEPTH)/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/ui/zoom/chrome_zoom_level_prefs.h',
|
|
||||||
'<(DEPTH)/chrome/common/pref_font_webkit_names.h',
|
|
||||||
'<(DEPTH)/chrome/common/pref_names.cc',
|
|
||||||
'<(DEPTH)/chrome/common/pref_names.h',
|
|
||||||
'<(DEPTH)/chrome/common/pref_names_util.cc',
|
|
||||||
'<(DEPTH)/chrome/common/pref_names_util.h',
|
|
||||||
'<(DEPTH)/components/prefs/testing_pref_store.cc',
|
|
||||||
'<(DEPTH)/components/prefs/testing_pref_store.h',
|
|
||||||
# Include sources for permissions support.
|
|
||||||
'<(DEPTH)/chrome/browser/permissions/permission_request_id.h',
|
|
||||||
'<(DEPTH)/chrome/browser/permissions/permission_request_id.cc',
|
|
||||||
# Include sources for SafeSearch support.
|
|
||||||
'<(DEPTH)/chrome/browser/net/safe_search_util.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/net/safe_search_util.h',
|
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
|
@ -1532,12 +1347,8 @@
|
||||||
'libcef/browser/osr/browser_platform_delegate_osr_win.cc',
|
'libcef/browser/osr/browser_platform_delegate_osr_win.cc',
|
||||||
'libcef/browser/osr/browser_platform_delegate_osr_win.h',
|
'libcef/browser/osr/browser_platform_delegate_osr_win.h',
|
||||||
'libcef/browser/osr/render_widget_host_view_osr_win.cc',
|
'libcef/browser/osr/render_widget_host_view_osr_win.cc',
|
||||||
# Include sources for printing using PDF.
|
|
||||||
'libcef/utility/printing_handler.cc',
|
'libcef/utility/printing_handler.cc',
|
||||||
'libcef/utility/printing_handler.h',
|
'libcef/utility/printing_handler.h',
|
||||||
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.h',
|
|
||||||
'<(DEPTH)/chrome/common/chrome_utility_printing_messages.h',
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
|
@ -1558,16 +1369,6 @@
|
||||||
'libcef/browser/osr/text_input_client_osr_mac.h',
|
'libcef/browser/osr/text_input_client_osr_mac.h',
|
||||||
'libcef/common/util_mac.h',
|
'libcef/common/util_mac.h',
|
||||||
'libcef/common/util_mac.mm',
|
'libcef/common/util_mac.mm',
|
||||||
# Include sources for spell checking support.
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac.cc',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_platform.h',
|
|
||||||
'<(DEPTH)/chrome/browser/spellchecker/spellcheck_platform_mac.mm',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.cc',
|
|
||||||
'<(DEPTH)/chrome/renderer/spellchecker/platform_spelling_engine.h',
|
|
||||||
# Include sources for pepper flash support.
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/monitor_finder_mac.h',
|
|
||||||
'<(DEPTH)/chrome/browser/renderer_host/pepper/monitor_finder_mac.mm',
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||||
|
@ -1654,11 +1455,15 @@
|
||||||
'libcef/browser/views/window_impl.h',
|
'libcef/browser/views/window_impl.h',
|
||||||
'libcef/browser/views/window_view.cc',
|
'libcef/browser/views/window_view.cc',
|
||||||
'libcef/browser/views/window_view.h',
|
'libcef/browser/views/window_view.h',
|
||||||
|
|
||||||
|
# Part of ui/views/views.gyp:views_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/views/test/desktop_test_views_delegate.h',
|
'<(DEPTH)/ui/views/test/desktop_test_views_delegate.h',
|
||||||
'<(DEPTH)/ui/views/test/desktop_test_views_delegate_aura.cc',
|
'<(DEPTH)/ui/views/test/desktop_test_views_delegate_aura.cc',
|
||||||
'<(DEPTH)/ui/views/test/test_views_delegate.h',
|
'<(DEPTH)/ui/views/test/test_views_delegate.h',
|
||||||
'<(DEPTH)/ui/views/test/test_views_delegate_aura.cc',
|
'<(DEPTH)/ui/views/test/test_views_delegate_aura.cc',
|
||||||
|
|
||||||
# Support for UI input events.
|
# Support for UI input events.
|
||||||
|
# Part of ui/base/ui_base.gyp:ui_base_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/base/test/ui_controls.h',
|
'<(DEPTH)/ui/base/test/ui_controls.h',
|
||||||
'<(DEPTH)/ui/base/test/ui_controls_aura.cc',
|
'<(DEPTH)/ui/base/test/ui_controls_aura.cc',
|
||||||
'<(DEPTH)/ui/aura/test/ui_controls_factory_aura.h',
|
'<(DEPTH)/ui/aura/test/ui_controls_factory_aura.h',
|
||||||
|
@ -1672,7 +1477,9 @@
|
||||||
['use_aura==1 and OS=="win"', {
|
['use_aura==1 and OS=="win"', {
|
||||||
'sources': [
|
'sources': [
|
||||||
# Support for UI input events.
|
# Support for UI input events.
|
||||||
|
# Part of ui/aura/aura.gyp:aura_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/aura/test/ui_controls_factory_aurawin.cc',
|
'<(DEPTH)/ui/aura/test/ui_controls_factory_aurawin.cc',
|
||||||
|
# Part of ui/base/ui_base.gyp:ui_base_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/base/test/ui_controls_internal_win.cc',
|
'<(DEPTH)/ui/base/test/ui_controls_internal_win.cc',
|
||||||
'<(DEPTH)/ui/base/test/ui_controls_internal_win.h',
|
'<(DEPTH)/ui/base/test/ui_controls_internal_win.h',
|
||||||
],
|
],
|
||||||
|
@ -1680,13 +1487,16 @@
|
||||||
['use_aura==1 and (OS=="linux" or OS=="freebsd" or OS=="openbsd")', {
|
['use_aura==1 and (OS=="linux" or OS=="freebsd" or OS=="openbsd")', {
|
||||||
'sources': [
|
'sources': [
|
||||||
# Support for UI input events.
|
# Support for UI input events.
|
||||||
|
# Part of ui/aura/aura.gyp:aura_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/aura/test/aura_test_utils.cc',
|
'<(DEPTH)/ui/aura/test/aura_test_utils.cc',
|
||||||
'<(DEPTH)/ui/aura/test/aura_test_utils.h',
|
'<(DEPTH)/ui/aura/test/aura_test_utils.h',
|
||||||
'<(DEPTH)/ui/aura/test/ui_controls_factory_aurax11.cc',
|
'<(DEPTH)/ui/aura/test/ui_controls_factory_aurax11.cc',
|
||||||
'<(DEPTH)/ui/aura/test/x11_event_sender.cc',
|
'<(DEPTH)/ui/aura/test/x11_event_sender.cc',
|
||||||
'<(DEPTH)/ui/aura/test/x11_event_sender.h',
|
'<(DEPTH)/ui/aura/test/x11_event_sender.h',
|
||||||
|
# Part of ui/events/events.gyp:events_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/events/test/platform_event_waiter.cc',
|
'<(DEPTH)/ui/events/test/platform_event_waiter.cc',
|
||||||
'<(DEPTH)/ui/events/test/platform_event_waiter.h',
|
'<(DEPTH)/ui/events/test/platform_event_waiter.h',
|
||||||
|
# Part of ui/views/views.gyp:views_test_support which is testing only.
|
||||||
'<(DEPTH)/ui/views/test/ui_controls_factory_desktop_aurax11.cc',
|
'<(DEPTH)/ui/views/test/ui_controls_factory_desktop_aurax11.cc',
|
||||||
'<(DEPTH)/ui/views/test/ui_controls_factory_desktop_aurax11.h',
|
'<(DEPTH)/ui/views/test/ui_controls_factory_desktop_aurax11.h',
|
||||||
],
|
],
|
||||||
|
|
5
cef.gypi
5
cef.gypi
|
@ -24,11 +24,6 @@
|
||||||
# Strip symbols and create dSYM files for the Release target.
|
# Strip symbols and create dSYM files for the Release target.
|
||||||
'mac_strip_release': 1,
|
'mac_strip_release': 1,
|
||||||
}],
|
}],
|
||||||
['os_posix==1 and OS!="mac" and OS!="android"', {
|
|
||||||
# Disable theme support on Linux so we don't need to implement
|
|
||||||
# ThemeService[Factory] classes.
|
|
||||||
'enable_themes': 0,
|
|
||||||
}]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ template("_repack_one_locale") {
|
||||||
# Each input pak file should also have a deps line for completeness.
|
# Each input pak file should also have a deps line for completeness.
|
||||||
sources = [
|
sources = [
|
||||||
"${root_gen_dir}/cef/cef_strings_${locale}.pak",
|
"${root_gen_dir}/cef/cef_strings_${locale}.pak",
|
||||||
|
"${root_gen_dir}/chrome/generated_resources_${locale}.pak",
|
||||||
|
"${root_gen_dir}/chrome/locale_settings_${locale}.pak",
|
||||||
"${root_gen_dir}/chrome/platform_locale_settings_${locale}.pak",
|
"${root_gen_dir}/chrome/platform_locale_settings_${locale}.pak",
|
||||||
"${root_gen_dir}/components/strings/components_locale_settings_${locale}.pak",
|
"${root_gen_dir}/components/strings/components_locale_settings_${locale}.pak",
|
||||||
"${root_gen_dir}/components/strings/components_strings_${locale}.pak",
|
"${root_gen_dir}/components/strings/components_strings_${locale}.pak",
|
||||||
|
@ -43,6 +45,8 @@ template("_repack_one_locale") {
|
||||||
# listed both here and in the libcef_static target.
|
# listed both here and in the libcef_static target.
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":cef_strings",
|
":cef_strings",
|
||||||
|
"//chrome/app:generated_resources",
|
||||||
|
"//chrome/app/resources:locale_settings",
|
||||||
"//chrome/app/resources:platform_locale_settings",
|
"//chrome/app/resources:platform_locale_settings",
|
||||||
"//components/strings:components_locale_settings",
|
"//components/strings:components_locale_settings",
|
||||||
"//components/strings:components_strings",
|
"//components/strings:components_strings",
|
||||||
|
|
|
@ -733,7 +733,7 @@ void CefBrowserHostImpl::Print() {
|
||||||
content::WebContents* actionable_contents = GetActionableWebContents();
|
content::WebContents* actionable_contents = GetActionableWebContents();
|
||||||
if (!actionable_contents)
|
if (!actionable_contents)
|
||||||
return;
|
return;
|
||||||
printing::PrintViewManager::FromWebContents(
|
printing::CefPrintViewManager::FromWebContents(
|
||||||
actionable_contents)->PrintNow();
|
actionable_contents)->PrintNow();
|
||||||
} else {
|
} else {
|
||||||
CEF_POST_TASK(CEF_UIT,
|
CEF_POST_TASK(CEF_UIT,
|
||||||
|
@ -749,12 +749,12 @@ void CefBrowserHostImpl::PrintToPDF(const CefString& path,
|
||||||
if (!actionable_contents)
|
if (!actionable_contents)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printing::PrintViewManager::PdfPrintCallback pdf_callback;
|
printing::CefPrintViewManager::PdfPrintCallback pdf_callback;
|
||||||
if (callback.get()) {
|
if (callback.get()) {
|
||||||
pdf_callback = base::Bind(&CefPdfPrintCallback::OnPdfPrintFinished,
|
pdf_callback = base::Bind(&CefPdfPrintCallback::OnPdfPrintFinished,
|
||||||
callback.get(), path);
|
callback.get(), path);
|
||||||
}
|
}
|
||||||
printing::PrintViewManager::FromWebContents(actionable_contents)->
|
printing::CefPrintViewManager::FromWebContents(actionable_contents)->
|
||||||
PrintToPDF(base::FilePath(path), settings, pdf_callback);
|
PrintToPDF(base::FilePath(path), settings, pdf_callback);
|
||||||
} else {
|
} else {
|
||||||
CEF_POST_TASK(CEF_UIT,
|
CEF_POST_TASK(CEF_UIT,
|
||||||
|
@ -2798,7 +2798,7 @@ CefBrowserHostImpl::CefBrowserHostImpl(
|
||||||
CefFrameHostImpl::kInvalidFrameId);
|
CefFrameHostImpl::kInvalidFrameId);
|
||||||
|
|
||||||
PrefsTabHelper::CreateForWebContents(web_contents_.get());
|
PrefsTabHelper::CreateForWebContents(web_contents_.get());
|
||||||
printing::PrintViewManager::CreateForWebContents(web_contents_.get());
|
printing::CefPrintViewManager::CreateForWebContents(web_contents_.get());
|
||||||
|
|
||||||
// Make sure RenderViewCreated is called at least one time.
|
// Make sure RenderViewCreated is called at least one time.
|
||||||
RenderViewCreated(web_contents->GetRenderViewHost());
|
RenderViewCreated(web_contents->GetRenderViewHost());
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
#include "libcef/browser/browser_main.h"
|
#include "libcef/browser/browser_main.h"
|
||||||
|
|
||||||
|
#include "cef/grit/cef_strings.h"
|
||||||
#include "chrome/common/chrome_utility_messages.h"
|
#include "chrome/common/chrome_utility_messages.h"
|
||||||
#include "content/public/browser/utility_process_host.h"
|
#include "content/public/browser/utility_process_host.h"
|
||||||
#include "content/public/browser/utility_process_host_client.h"
|
#include "content/public/browser/utility_process_host_client.h"
|
||||||
#include "grit/cef_strings.h"
|
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
#include "ui/gfx/win/direct_write.h"
|
#include "ui/gfx/win/direct_write.h"
|
||||||
|
|
||||||
|
|
|
@ -5,84 +5,6 @@
|
||||||
|
|
||||||
#include "libcef/browser/chrome_profile_stub.h"
|
#include "libcef/browser/chrome_profile_stub.h"
|
||||||
|
|
||||||
// Profile implementation.
|
|
||||||
// Based on chrome/browser/profiles/profile.cc.
|
|
||||||
|
|
||||||
Profile::Profile() {
|
|
||||||
}
|
|
||||||
|
|
||||||
Profile::~Profile() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
Profile* Profile::FromBrowserContext(content::BrowserContext* browser_context) {
|
|
||||||
// This is safe; this is the only implementation of the browser context.
|
|
||||||
return static_cast<Profile*>(browser_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
Profile* Profile::FromWebUI(content::WebUI* web_ui) {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
TestingProfile* Profile::AsTestingProfile() {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChromeZoomLevelPrefs* Profile::GetZoomLevelPrefs() {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string Profile::GetDebugName() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return std::string();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Profile::IsGuestSession() const {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Profile::IsSystemProfile() const {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Profile::IsNewProfile() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Profile::IsSyncAllowed() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Profile::MaybeSendDestroyedNotification() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ProfileCompare::operator()(Profile* a, Profile* b) const {
|
|
||||||
DCHECK(a && b);
|
|
||||||
if (a->IsSameProfile(b))
|
|
||||||
return false;
|
|
||||||
return a->GetOriginalProfile() < b->GetOriginalProfile();
|
|
||||||
}
|
|
||||||
|
|
||||||
double Profile::GetDefaultZoomLevelForProfile() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ChromeProfileStub implementation.
|
|
||||||
|
|
||||||
ChromeProfileStub::ChromeProfileStub(){
|
ChromeProfileStub::ChromeProfileStub(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -444,7 +444,7 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
|
||||||
const int id = host->GetID();
|
const int id = host->GetID();
|
||||||
|
|
||||||
host->GetChannel()->AddFilter(new CefBrowserMessageFilter(id));
|
host->GetChannel()->AddFilter(new CefBrowserMessageFilter(id));
|
||||||
host->AddFilter(new printing::PrintingMessageFilter(id));
|
host->AddFilter(new printing::CefPrintingMessageFilter(id));
|
||||||
|
|
||||||
if (!command_line->HasSwitch(switches::kDisableSpellChecking)) {
|
if (!command_line->HasSwitch(switches::kDisableSpellChecking)) {
|
||||||
host->AddFilter(new SpellCheckMessageFilter(id));
|
host->AddFilter(new SpellCheckMessageFilter(id));
|
||||||
|
|
|
@ -16,10 +16,11 @@
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "content/public/browser/devtools_agent_host.h"
|
|
||||||
#include "base/time/time.h"
|
#include "base/time/time.h"
|
||||||
|
#include "cef/grit/cef_resources.h"
|
||||||
#include "components/devtools_discovery/basic_target_descriptor.h"
|
#include "components/devtools_discovery/basic_target_descriptor.h"
|
||||||
#include "components/devtools_discovery/devtools_discovery_manager.h"
|
#include "components/devtools_discovery/devtools_discovery_manager.h"
|
||||||
|
#include "content/public/browser/devtools_agent_host.h"
|
||||||
#include "content/public/browser/devtools_frontend_host.h"
|
#include "content/public/browser/devtools_frontend_host.h"
|
||||||
#include "content/public/browser/favicon_status.h"
|
#include "content/public/browser/favicon_status.h"
|
||||||
#include "content/public/browser/navigation_entry.h"
|
#include "content/public/browser/navigation_entry.h"
|
||||||
|
@ -29,7 +30,6 @@
|
||||||
#include "content/public/browser/web_contents_delegate.h"
|
#include "content/public/browser/web_contents_delegate.h"
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
#include "grit/cef_resources.h"
|
|
||||||
#include "net/base/net_errors.h"
|
#include "net/base/net_errors.h"
|
||||||
#include "net/socket/tcp_server_socket.h"
|
#include "net/socket/tcp_server_socket.h"
|
||||||
#include "ui/base/layout.h"
|
#include "ui/base/layout.h"
|
||||||
|
|
|
@ -45,24 +45,25 @@ void CreateResponseHeadersDictionary(const net::HttpResponseHeaders* headers,
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace streams_private = api::streams_private;
|
namespace streams_private = api::cef::streams_private;
|
||||||
|
|
||||||
// static
|
// static
|
||||||
StreamsPrivateAPI* StreamsPrivateAPI::Get(content::BrowserContext* context) {
|
CefStreamsPrivateAPI* CefStreamsPrivateAPI::Get(
|
||||||
|
content::BrowserContext* context) {
|
||||||
return GetFactoryInstance()->Get(context);
|
return GetFactoryInstance()->Get(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamsPrivateAPI::StreamsPrivateAPI(content::BrowserContext* context)
|
CefStreamsPrivateAPI::CefStreamsPrivateAPI(content::BrowserContext* context)
|
||||||
: browser_context_(context),
|
: browser_context_(context),
|
||||||
extension_registry_observer_(this),
|
extension_registry_observer_(this),
|
||||||
weak_ptr_factory_(this) {
|
weak_ptr_factory_(this) {
|
||||||
extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
|
extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamsPrivateAPI::~StreamsPrivateAPI() {
|
CefStreamsPrivateAPI::~CefStreamsPrivateAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamsPrivateAPI::ExecuteMimeTypeHandler(
|
void CefStreamsPrivateAPI::ExecuteMimeTypeHandler(
|
||||||
const std::string& extension_id,
|
const std::string& extension_id,
|
||||||
int tab_id,
|
int tab_id,
|
||||||
std::unique_ptr<content::StreamInfo> stream,
|
std::unique_ptr<content::StreamInfo> stream,
|
||||||
|
@ -123,7 +124,7 @@ void StreamsPrivateAPI::ExecuteMimeTypeHandler(
|
||||||
streams_[extension_id][url] = make_linked_ptr(stream->handle.release());
|
streams_[extension_id][url] = make_linked_ptr(stream->handle.release());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamsPrivateAPI::AbortStream(const std::string& extension_id,
|
void CefStreamsPrivateAPI::AbortStream(const std::string& extension_id,
|
||||||
const GURL& stream_url,
|
const GURL& stream_url,
|
||||||
const base::Closure& callback) {
|
const base::Closure& callback) {
|
||||||
StreamMap::iterator extension_it = streams_.find(extension_id);
|
StreamMap::iterator extension_it = streams_.find(extension_id);
|
||||||
|
@ -143,36 +144,36 @@ void StreamsPrivateAPI::AbortStream(const std::string& extension_id,
|
||||||
url_map->erase(url_it);
|
url_map->erase(url_it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamsPrivateAPI::OnExtensionUnloaded(
|
void CefStreamsPrivateAPI::OnExtensionUnloaded(
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
const Extension* extension,
|
const Extension* extension,
|
||||||
UnloadedExtensionInfo::Reason reason) {
|
UnloadedExtensionInfo::Reason reason) {
|
||||||
streams_.erase(extension->id());
|
streams_.erase(extension->id());
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamsPrivateAbortFunction::StreamsPrivateAbortFunction() {
|
CefStreamsPrivateAbortFunction::CefStreamsPrivateAbortFunction() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtensionFunction::ResponseAction StreamsPrivateAbortFunction::Run() {
|
ExtensionFunction::ResponseAction CefStreamsPrivateAbortFunction::Run() {
|
||||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||||
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &stream_url_));
|
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &stream_url_));
|
||||||
StreamsPrivateAPI::Get(browser_context())->AbortStream(
|
CefStreamsPrivateAPI::Get(browser_context())->AbortStream(
|
||||||
extension_id(), GURL(stream_url_), base::Bind(
|
extension_id(), GURL(stream_url_), base::Bind(
|
||||||
&StreamsPrivateAbortFunction::OnClose, this));
|
&CefStreamsPrivateAbortFunction::OnClose, this));
|
||||||
return RespondLater();
|
return RespondLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamsPrivateAbortFunction::OnClose() {
|
void CefStreamsPrivateAbortFunction::OnClose() {
|
||||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||||
Respond(NoArguments());
|
Respond(NoArguments());
|
||||||
}
|
}
|
||||||
|
|
||||||
static base::LazyInstance<BrowserContextKeyedAPIFactory<StreamsPrivateAPI> >
|
static base::LazyInstance<BrowserContextKeyedAPIFactory<CefStreamsPrivateAPI> >
|
||||||
g_factory = LAZY_INSTANCE_INITIALIZER;
|
g_factory = LAZY_INSTANCE_INITIALIZER;
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BrowserContextKeyedAPIFactory<StreamsPrivateAPI>*
|
BrowserContextKeyedAPIFactory<CefStreamsPrivateAPI>*
|
||||||
StreamsPrivateAPI::GetFactoryInstance() {
|
CefStreamsPrivateAPI::GetFactoryInstance() {
|
||||||
return g_factory.Pointer();
|
return g_factory.Pointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,14 @@ struct StreamInfo;
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
class ExtensionRegistry;
|
class ExtensionRegistry;
|
||||||
|
|
||||||
class StreamsPrivateAPI : public BrowserContextKeyedAPI,
|
class CefStreamsPrivateAPI : public BrowserContextKeyedAPI,
|
||||||
public ExtensionRegistryObserver {
|
public ExtensionRegistryObserver {
|
||||||
public:
|
public:
|
||||||
// Convenience method to get the StreamsPrivateAPI for a BrowserContext.
|
// Convenience method to get the CefStreamsPrivateAPI for a BrowserContext.
|
||||||
static StreamsPrivateAPI* Get(content::BrowserContext* context);
|
static CefStreamsPrivateAPI* Get(content::BrowserContext* context);
|
||||||
|
|
||||||
explicit StreamsPrivateAPI(content::BrowserContext* context);
|
explicit CefStreamsPrivateAPI(content::BrowserContext* context);
|
||||||
~StreamsPrivateAPI() override;
|
~CefStreamsPrivateAPI() override;
|
||||||
|
|
||||||
// Send the onExecuteMimeTypeHandler event to |extension_id|.
|
// Send the onExecuteMimeTypeHandler event to |extension_id|.
|
||||||
// |tab_id| is used to determine the tabId where the document is being
|
// |tab_id| is used to determine the tabId where the document is being
|
||||||
|
@ -53,10 +53,11 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
|
||||||
const base::Closure& callback);
|
const base::Closure& callback);
|
||||||
|
|
||||||
// BrowserContextKeyedAPI implementation.
|
// BrowserContextKeyedAPI implementation.
|
||||||
static BrowserContextKeyedAPIFactory<StreamsPrivateAPI>* GetFactoryInstance();
|
static BrowserContextKeyedAPIFactory<CefStreamsPrivateAPI>*
|
||||||
|
GetFactoryInstance();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class BrowserContextKeyedAPIFactory<StreamsPrivateAPI>;
|
friend class BrowserContextKeyedAPIFactory<CefStreamsPrivateAPI>;
|
||||||
typedef std::map<std::string,
|
typedef std::map<std::string,
|
||||||
std::map<GURL,
|
std::map<GURL,
|
||||||
linked_ptr<content::StreamHandle> > > StreamMap;
|
linked_ptr<content::StreamHandle> > > StreamMap;
|
||||||
|
@ -68,7 +69,7 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
|
||||||
|
|
||||||
// BrowserContextKeyedAPI implementation.
|
// BrowserContextKeyedAPI implementation.
|
||||||
static const char* service_name() {
|
static const char* service_name() {
|
||||||
return "StreamsPrivateAPI";
|
return "CefStreamsPrivateAPI";
|
||||||
}
|
}
|
||||||
static const bool kServiceIsNULLWhileTesting = true;
|
static const bool kServiceIsNULLWhileTesting = true;
|
||||||
static const bool kServiceRedirectedInIncognito = true;
|
static const bool kServiceRedirectedInIncognito = true;
|
||||||
|
@ -80,17 +81,17 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI,
|
||||||
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
|
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
|
||||||
extension_registry_observer_;
|
extension_registry_observer_;
|
||||||
|
|
||||||
base::WeakPtrFactory<StreamsPrivateAPI> weak_ptr_factory_;
|
base::WeakPtrFactory<CefStreamsPrivateAPI> weak_ptr_factory_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class StreamsPrivateAbortFunction : public UIThreadExtensionFunction {
|
class CefStreamsPrivateAbortFunction : public UIThreadExtensionFunction {
|
||||||
public:
|
public:
|
||||||
StreamsPrivateAbortFunction();
|
CefStreamsPrivateAbortFunction();
|
||||||
DECLARE_EXTENSION_FUNCTION("streamsPrivate.abort", STREAMSPRIVATE_ABORT)
|
DECLARE_EXTENSION_FUNCTION("streamsPrivate.abort", STREAMSPRIVATE_ABORT)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~StreamsPrivateAbortFunction() override {}
|
~CefStreamsPrivateAbortFunction() override {}
|
||||||
|
|
||||||
// ExtensionFunction:
|
// ExtensionFunction:
|
||||||
ExtensionFunction::ResponseAction Run() override;
|
ExtensionFunction::ResponseAction Run() override;
|
||||||
|
@ -101,6 +102,10 @@ class StreamsPrivateAbortFunction : public UIThreadExtensionFunction {
|
||||||
std::string stream_url_;
|
std::string stream_url_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// For compatibility with generated_api_registration.cc.
|
||||||
|
typedef CefStreamsPrivateAPI StreamsPrivateAPI;
|
||||||
|
typedef CefStreamsPrivateAbortFunction StreamsPrivateAbortFunction;
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_
|
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace cef {
|
||||||
void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
|
void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
|
||||||
PrefsTabHelper::GetServiceInstance();
|
PrefsTabHelper::GetServiceInstance();
|
||||||
RendererStartupHelperFactory::GetInstance();
|
RendererStartupHelperFactory::GetInstance();
|
||||||
StreamsPrivateAPI::GetFactoryInstance();
|
CefStreamsPrivateAPI::GetFactoryInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace cef
|
} // namespace cef
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
#include "chrome/common/chrome_paths.h"
|
#include "chrome/common/chrome_paths.h"
|
||||||
#include "grit/component_extension_resources_map.h"
|
#include "chrome/grit/component_extension_resources_map.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,13 @@ using content::BrowserThread;
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
|
||||||
EventRouterForwarder::EventRouterForwarder() {
|
CefEventRouterForwarder::CefEventRouterForwarder() {
|
||||||
}
|
}
|
||||||
|
|
||||||
EventRouterForwarder::~EventRouterForwarder() {
|
CefEventRouterForwarder::~CefEventRouterForwarder() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventRouterForwarder::BroadcastEventToRenderers(
|
void CefEventRouterForwarder::BroadcastEventToRenderers(
|
||||||
events::HistogramValue histogram_value,
|
events::HistogramValue histogram_value,
|
||||||
const std::string& event_name,
|
const std::string& event_name,
|
||||||
std::unique_ptr<base::ListValue> event_args,
|
std::unique_ptr<base::ListValue> event_args,
|
||||||
|
@ -35,7 +35,7 @@ void EventRouterForwarder::BroadcastEventToRenderers(
|
||||||
0, true, event_url);
|
0, true, event_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventRouterForwarder::DispatchEventToRenderers(
|
void CefEventRouterForwarder::DispatchEventToRenderers(
|
||||||
events::HistogramValue histogram_value,
|
events::HistogramValue histogram_value,
|
||||||
const std::string& event_name,
|
const std::string& event_name,
|
||||||
std::unique_ptr<base::ListValue> event_args,
|
std::unique_ptr<base::ListValue> event_args,
|
||||||
|
@ -48,7 +48,7 @@ void EventRouterForwarder::DispatchEventToRenderers(
|
||||||
profile, use_profile_to_restrict_events, event_url);
|
profile, use_profile_to_restrict_events, event_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventRouterForwarder::BroadcastEventToExtension(
|
void CefEventRouterForwarder::BroadcastEventToExtension(
|
||||||
const std::string& extension_id,
|
const std::string& extension_id,
|
||||||
events::HistogramValue histogram_value,
|
events::HistogramValue histogram_value,
|
||||||
const std::string& event_name,
|
const std::string& event_name,
|
||||||
|
@ -58,7 +58,7 @@ void EventRouterForwarder::BroadcastEventToExtension(
|
||||||
0, true, event_url);
|
0, true, event_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventRouterForwarder::DispatchEventToExtension(
|
void CefEventRouterForwarder::DispatchEventToExtension(
|
||||||
const std::string& extension_id,
|
const std::string& extension_id,
|
||||||
events::HistogramValue histogram_value,
|
events::HistogramValue histogram_value,
|
||||||
const std::string& event_name,
|
const std::string& event_name,
|
||||||
|
@ -72,7 +72,7 @@ void EventRouterForwarder::DispatchEventToExtension(
|
||||||
profile, use_profile_to_restrict_events, event_url);
|
profile, use_profile_to_restrict_events, event_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventRouterForwarder::HandleEvent(
|
void CefEventRouterForwarder::HandleEvent(
|
||||||
const std::string& extension_id,
|
const std::string& extension_id,
|
||||||
events::HistogramValue histogram_value,
|
events::HistogramValue histogram_value,
|
||||||
const std::string& event_name,
|
const std::string& event_name,
|
||||||
|
@ -83,7 +83,7 @@ void EventRouterForwarder::HandleEvent(
|
||||||
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
|
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
|
||||||
BrowserThread::PostTask(
|
BrowserThread::PostTask(
|
||||||
BrowserThread::UI, FROM_HERE,
|
BrowserThread::UI, FROM_HERE,
|
||||||
base::Bind(&EventRouterForwarder::HandleEvent, this, extension_id,
|
base::Bind(&CefEventRouterForwarder::HandleEvent, this, extension_id,
|
||||||
histogram_value, event_name, base::Passed(&event_args),
|
histogram_value, event_name, base::Passed(&event_args),
|
||||||
profile_ptr, use_profile_to_restrict_events, event_url));
|
profile_ptr, use_profile_to_restrict_events, event_url));
|
||||||
return;
|
return;
|
||||||
|
@ -113,7 +113,7 @@ void EventRouterForwarder::HandleEvent(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventRouterForwarder::CallEventRouter(
|
void CefEventRouterForwarder::CallEventRouter(
|
||||||
content::BrowserContext* profile,
|
content::BrowserContext* profile,
|
||||||
const std::string& extension_id,
|
const std::string& extension_id,
|
||||||
events::HistogramValue histogram_value,
|
events::HistogramValue histogram_value,
|
||||||
|
|
|
@ -29,10 +29,11 @@ namespace extensions {
|
||||||
// - this class can be used in contexts that are not governed by a profile, e.g.
|
// - this class can be used in contexts that are not governed by a profile, e.g.
|
||||||
// by system URLRequestContexts. In these cases the |restrict_to_profile|
|
// by system URLRequestContexts. In these cases the |restrict_to_profile|
|
||||||
// parameter remains NULL and events are broadcasted to all profiles.
|
// parameter remains NULL and events are broadcasted to all profiles.
|
||||||
class EventRouterForwarder
|
// TODO(cef/chrome): Unfork this class once CEF supports ProfileManager.
|
||||||
: public base::RefCountedThreadSafe<EventRouterForwarder> {
|
class CefEventRouterForwarder
|
||||||
|
: public base::RefCountedThreadSafe<CefEventRouterForwarder> {
|
||||||
public:
|
public:
|
||||||
EventRouterForwarder();
|
CefEventRouterForwarder();
|
||||||
|
|
||||||
// Calls
|
// Calls
|
||||||
// DispatchEventToRenderers(event_name, event_args, profile, event_url)
|
// DispatchEventToRenderers(event_name, event_args, profile, event_url)
|
||||||
|
@ -79,7 +80,7 @@ class EventRouterForwarder
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Protected for testing.
|
// Protected for testing.
|
||||||
virtual ~EventRouterForwarder();
|
virtual ~CefEventRouterForwarder();
|
||||||
|
|
||||||
// Helper function for {Broadcast,Dispatch}EventTo{Extension,Renderers}.
|
// Helper function for {Broadcast,Dispatch}EventTo{Extension,Renderers}.
|
||||||
// Virtual for testing.
|
// Virtual for testing.
|
||||||
|
@ -104,9 +105,9 @@ class EventRouterForwarder
|
||||||
const GURL& event_url);
|
const GURL& event_url);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class base::RefCountedThreadSafe<EventRouterForwarder>;
|
friend class base::RefCountedThreadSafe<CefEventRouterForwarder>;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(EventRouterForwarder);
|
DISALLOW_COPY_AND_ASSIGN(CefEventRouterForwarder);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace extensions
|
} // namespace extensions
|
||||||
|
|
|
@ -54,7 +54,7 @@ CefExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
|
||||||
void CefExtensionsAPIClient::AttachWebContentsHelpers(
|
void CefExtensionsAPIClient::AttachWebContentsHelpers(
|
||||||
content::WebContents* web_contents) const {
|
content::WebContents* web_contents) const {
|
||||||
PrefsTabHelper::CreateForWebContents(web_contents);
|
PrefsTabHelper::CreateForWebContents(web_contents);
|
||||||
printing::PrintViewManager::CreateForWebContents(web_contents);
|
printing::CefPrintViewManager::CreateForWebContents(web_contents);
|
||||||
pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
|
pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
|
||||||
web_contents,
|
web_contents,
|
||||||
std::unique_ptr<pdf::PDFWebContentsHelperClient>(
|
std::unique_ptr<pdf::PDFWebContentsHelperClient>(
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace extensions {
|
||||||
CefExtensionsBrowserClient::CefExtensionsBrowserClient()
|
CefExtensionsBrowserClient::CefExtensionsBrowserClient()
|
||||||
: api_client_(new CefExtensionsAPIClient),
|
: api_client_(new CefExtensionsAPIClient),
|
||||||
resource_manager_(new CefComponentExtensionResourceManager),
|
resource_manager_(new CefComponentExtensionResourceManager),
|
||||||
event_router_forwarder_(new EventRouterForwarder) {
|
event_router_forwarder_(new CefEventRouterForwarder) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CefExtensionsBrowserClient::~CefExtensionsBrowserClient() {
|
CefExtensionsBrowserClient::~CefExtensionsBrowserClient() {
|
||||||
|
@ -181,7 +181,7 @@ void CefExtensionsBrowserClient::RegisterExtensionFunctions(
|
||||||
api::GeneratedFunctionRegistry::RegisterAll(registry);
|
api::GeneratedFunctionRegistry::RegisterAll(registry);
|
||||||
|
|
||||||
// CEF-only APIs.
|
// CEF-only APIs.
|
||||||
api::ChromeGeneratedFunctionRegistry::RegisterAll(registry);
|
api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefExtensionsBrowserClient::RegisterMojoServices(
|
void CefExtensionsBrowserClient::RegisterMojoServices(
|
||||||
|
|
|
@ -93,7 +93,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||||
// Resource manager used to supply resources from pak files.
|
// Resource manager used to supply resources from pak files.
|
||||||
std::unique_ptr<ComponentExtensionResourceManager> resource_manager_;
|
std::unique_ptr<ComponentExtensionResourceManager> resource_manager_;
|
||||||
|
|
||||||
scoped_refptr<EventRouterForwarder> event_router_forwarder_;
|
scoped_refptr<CefEventRouterForwarder> event_router_forwarder_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefExtensionsBrowserClient);
|
DISALLOW_COPY_AND_ASSIGN(CefExtensionsBrowserClient);
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "libcef/browser/extensions/pdf_extension_util.h"
|
#include "libcef/browser/extensions/pdf_extension_util.h"
|
||||||
|
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "grit/cef_resources.h"
|
#include "chrome/grit/browser_resources.h"
|
||||||
#include "ui/base/resource/resource_bundle.h"
|
#include "ui/base/resource/resource_bundle.h"
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
|
|
@ -14,10 +14,11 @@
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
|
#include "cef/grit/cef_strings.h"
|
||||||
|
#include "chrome/grit/generated_resources.h"
|
||||||
#include "content/public/browser/render_frame_host.h"
|
#include "content/public/browser/render_frame_host.h"
|
||||||
#include "content/public/browser/render_process_host.h"
|
#include "content/public/browser/render_process_host.h"
|
||||||
#include "content/public/browser/render_widget_host_view.h"
|
#include "content/public/browser/render_widget_host_view.h"
|
||||||
#include "grit/cef_strings.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
|
#include "cef/grit/cef_strings.h"
|
||||||
#include "content/public/common/file_chooser_params.h"
|
#include "content/public/common/file_chooser_params.h"
|
||||||
#include "grit/cef_strings.h"
|
|
||||||
#include "net/base/mime_util.h"
|
#include "net/base/mime_util.h"
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
#include "ui/strings/grit/ui_strings.h"
|
#include "ui/strings/grit/ui_strings.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/win/registry.h"
|
#include "base/win/registry.h"
|
||||||
#include "base/win/scoped_comptr.h"
|
#include "base/win/scoped_comptr.h"
|
||||||
#include "grit/cef_strings.h"
|
#include "cef/grit/cef_strings.h"
|
||||||
#include "net/base/mime_util.h"
|
#include "net/base/mime_util.h"
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
#include "ui/base/win/shell.h"
|
#include "ui/base/win/shell.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@ bool CefMenuRunnerWin::RunContextMenu(
|
||||||
CefMenuModelImpl* model,
|
CefMenuModelImpl* model,
|
||||||
const content::ContextMenuParams& params) {
|
const content::ContextMenuParams& params) {
|
||||||
// Create a menu based on the model.
|
// Create a menu based on the model.
|
||||||
menu_.reset(new views::NativeMenuWin(model->model(), NULL));
|
menu_.reset(new views::CefNativeMenuWin(model->model(), NULL));
|
||||||
menu_->Rebuild(NULL);
|
menu_->Rebuild(NULL);
|
||||||
|
|
||||||
// Make sure events can be pumped while the menu is up.
|
// Make sure events can be pumped while the menu is up.
|
||||||
|
|
|
@ -21,7 +21,7 @@ class CefMenuRunnerWin : public CefMenuRunner {
|
||||||
const content::ContextMenuParams& params) override;
|
const content::ContextMenuParams& params) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<views::NativeMenuWin> menu_;
|
std::unique_ptr<views::CefNativeMenuWin> menu_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_BROWSER_NATIVE_MENU_RUNNER_WIN_H_
|
#endif // CEF_LIBCEF_BROWSER_NATIVE_MENU_RUNNER_WIN_H_
|
||||||
|
|
|
@ -47,7 +47,7 @@ static const int kItemLeftMargin = 4;
|
||||||
// The width for displaying the sub-menu arrow.
|
// The width for displaying the sub-menu arrow.
|
||||||
static const int kArrowWidth = 10;
|
static const int kArrowWidth = 10;
|
||||||
|
|
||||||
struct NativeMenuWin::ItemData {
|
struct CefNativeMenuWin::ItemData {
|
||||||
// The Windows API requires that whoever creates the menus must own the
|
// The Windows API requires that whoever creates the menus must own the
|
||||||
// strings used for labels, and keep them around for the lifetime of the
|
// strings used for labels, and keep them around for the lifetime of the
|
||||||
// created menu. So be it.
|
// created menu. So be it.
|
||||||
|
@ -57,26 +57,26 @@ struct NativeMenuWin::ItemData {
|
||||||
std::unique_ptr<Menu2> submenu;
|
std::unique_ptr<Menu2> submenu;
|
||||||
|
|
||||||
// We need a pointer back to the containing menu in various circumstances.
|
// We need a pointer back to the containing menu in various circumstances.
|
||||||
NativeMenuWin* native_menu_win;
|
CefNativeMenuWin* native_menu_win;
|
||||||
|
|
||||||
// The index of the item within the menu's model.
|
// The index of the item within the menu's model.
|
||||||
int model_index;
|
int model_index;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns the NativeMenuWin for a particular HMENU.
|
// Returns the CefNativeMenuWin for a particular HMENU.
|
||||||
static NativeMenuWin* GetNativeMenuWinFromHMENU(HMENU hmenu) {
|
static CefNativeMenuWin* GetCefNativeMenuWinFromHMENU(HMENU hmenu) {
|
||||||
MENUINFO mi = {0};
|
MENUINFO mi = {0};
|
||||||
mi.cbSize = sizeof(mi);
|
mi.cbSize = sizeof(mi);
|
||||||
mi.fMask = MIM_MENUDATA | MIM_STYLE;
|
mi.fMask = MIM_MENUDATA | MIM_STYLE;
|
||||||
GetMenuInfo(hmenu, &mi);
|
GetMenuInfo(hmenu, &mi);
|
||||||
return reinterpret_cast<NativeMenuWin*>(mi.dwMenuData);
|
return reinterpret_cast<CefNativeMenuWin*>(mi.dwMenuData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// A window that receives messages from Windows relevant to the native menu
|
// A window that receives messages from Windows relevant to the native menu
|
||||||
// structure we have constructed in NativeMenuWin.
|
// structure we have constructed in CefNativeMenuWin.
|
||||||
class NativeMenuWin::MenuHostWindow {
|
class CefNativeMenuWin::MenuHostWindow {
|
||||||
public:
|
public:
|
||||||
explicit MenuHostWindow(NativeMenuWin* parent) : parent_(parent) {
|
explicit MenuHostWindow(CefNativeMenuWin* parent) : parent_(parent) {
|
||||||
RegisterClass();
|
RegisterClass();
|
||||||
hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName,
|
hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName,
|
||||||
L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
|
L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
|
||||||
|
@ -138,15 +138,15 @@ class NativeMenuWin::MenuHostWindow {
|
||||||
return w_param;
|
return w_param;
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeMenuWin::ItemData* GetItemData(ULONG_PTR item_data) {
|
CefNativeMenuWin::ItemData* GetItemData(ULONG_PTR item_data) {
|
||||||
return reinterpret_cast<NativeMenuWin::ItemData*>(item_data);
|
return reinterpret_cast<CefNativeMenuWin::ItemData*>(item_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the user selects a specific item.
|
// Called when the user selects a specific item.
|
||||||
void OnMenuCommand(int position, HMENU menu) {
|
void OnMenuCommand(int position, HMENU menu) {
|
||||||
NativeMenuWin* menu_win = GetNativeMenuWinFromHMENU(menu);
|
CefNativeMenuWin* menu_win = GetCefNativeMenuWinFromHMENU(menu);
|
||||||
ui::MenuModel* model = menu_win->model_;
|
ui::MenuModel* model = menu_win->model_;
|
||||||
NativeMenuWin* root_menu = menu_win;
|
CefNativeMenuWin* root_menu = menu_win;
|
||||||
while (root_menu->parent_)
|
while (root_menu->parent_)
|
||||||
root_menu = root_menu->parent_;
|
root_menu = root_menu->parent_;
|
||||||
|
|
||||||
|
@ -164,12 +164,13 @@ class NativeMenuWin::MenuHostWindow {
|
||||||
|
|
||||||
int position = GetMenuItemIndexFromWPARAM(menu, w_param);
|
int position = GetMenuItemIndexFromWPARAM(menu, w_param);
|
||||||
if (position >= 0)
|
if (position >= 0)
|
||||||
GetNativeMenuWinFromHMENU(menu)->model_->HighlightChangedTo(position);
|
GetCefNativeMenuWinFromHMENU(menu)->model_->HighlightChangedTo(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called by Windows to measure the size of an owner-drawn menu item.
|
// Called by Windows to measure the size of an owner-drawn menu item.
|
||||||
void OnMeasureItem(WPARAM w_param, MEASUREITEMSTRUCT* measure_item_struct) {
|
void OnMeasureItem(WPARAM w_param, MEASUREITEMSTRUCT* measure_item_struct) {
|
||||||
NativeMenuWin::ItemData* data = GetItemData(measure_item_struct->itemData);
|
CefNativeMenuWin::ItemData* data =
|
||||||
|
GetItemData(measure_item_struct->itemData);
|
||||||
if (data) {
|
if (data) {
|
||||||
gfx::FontList font_list;
|
gfx::FontList font_list;
|
||||||
measure_item_struct->itemWidth =
|
measure_item_struct->itemWidth =
|
||||||
|
@ -208,7 +209,8 @@ class NativeMenuWin::MenuHostWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (draw_item_struct->itemData) {
|
if (draw_item_struct->itemData) {
|
||||||
NativeMenuWin::ItemData* data = GetItemData(draw_item_struct->itemData);
|
CefNativeMenuWin::ItemData* data =
|
||||||
|
GetItemData(draw_item_struct->itemData);
|
||||||
// Draw the background.
|
// Draw the background.
|
||||||
HBRUSH hbr = CreateSolidBrush(GetBkColor(dc));
|
HBRUSH hbr = CreateSolidBrush(GetBkColor(dc));
|
||||||
FillRect(dc, &draw_item_struct->rcItem, hbr);
|
FillRect(dc, &draw_item_struct->rcItem, hbr);
|
||||||
|
@ -355,12 +357,12 @@ class NativeMenuWin::MenuHostWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND hwnd_;
|
HWND hwnd_;
|
||||||
NativeMenuWin* parent_;
|
CefNativeMenuWin* parent_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(MenuHostWindow);
|
DISALLOW_COPY_AND_ASSIGN(MenuHostWindow);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct NativeMenuWin::HighlightedMenuItemInfo {
|
struct CefNativeMenuWin::HighlightedMenuItemInfo {
|
||||||
HighlightedMenuItemInfo()
|
HighlightedMenuItemInfo()
|
||||||
: has_parent(false),
|
: has_parent(false),
|
||||||
has_submenu(false),
|
has_submenu(false),
|
||||||
|
@ -372,18 +374,18 @@ struct NativeMenuWin::HighlightedMenuItemInfo {
|
||||||
bool has_submenu;
|
bool has_submenu;
|
||||||
|
|
||||||
// The menu and position. These are only set for non-disabled menu items.
|
// The menu and position. These are only set for non-disabled menu items.
|
||||||
NativeMenuWin* menu;
|
CefNativeMenuWin* menu;
|
||||||
int position;
|
int position;
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
const wchar_t* NativeMenuWin::MenuHostWindow::kWindowClassName =
|
const wchar_t* CefNativeMenuWin::MenuHostWindow::kWindowClassName =
|
||||||
L"ViewsMenuHostWindow";
|
L"ViewsMenuHostWindow";
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// NativeMenuWin, public:
|
// CefNativeMenuWin, public:
|
||||||
|
|
||||||
NativeMenuWin::NativeMenuWin(ui::MenuModel* model, HWND system_menu_for)
|
CefNativeMenuWin::CefNativeMenuWin(ui::MenuModel* model, HWND system_menu_for)
|
||||||
: model_(model),
|
: model_(model),
|
||||||
menu_(NULL),
|
menu_(NULL),
|
||||||
owner_draw_(l10n_util::NeedOverrideDefaultUIFont(NULL, NULL) &&
|
owner_draw_(l10n_util::NeedOverrideDefaultUIFont(NULL, NULL) &&
|
||||||
|
@ -398,7 +400,7 @@ NativeMenuWin::NativeMenuWin(ui::MenuModel* model, HWND system_menu_for)
|
||||||
menu_to_select_factory_(this) {
|
menu_to_select_factory_(this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeMenuWin::~NativeMenuWin() {
|
CefNativeMenuWin::~CefNativeMenuWin() {
|
||||||
if (destroyed_flag_)
|
if (destroyed_flag_)
|
||||||
*destroyed_flag_ = true;
|
*destroyed_flag_ = true;
|
||||||
STLDeleteContainerPointers(items_.begin(), items_.end());
|
STLDeleteContainerPointers(items_.begin(), items_.end());
|
||||||
|
@ -406,9 +408,9 @@ NativeMenuWin::~NativeMenuWin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// NativeMenuWin, MenuWrapper implementation:
|
// CefNativeMenuWin, MenuWrapper implementation:
|
||||||
|
|
||||||
void NativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
|
void CefNativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
|
||||||
CreateHostWindow();
|
CreateHostWindow();
|
||||||
UpdateStates();
|
UpdateStates();
|
||||||
UINT flags = TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RECURSE;
|
UINT flags = TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RECURSE;
|
||||||
|
@ -450,7 +452,7 @@ void NativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
|
||||||
menu_to_select_factory_.InvalidateWeakPtrs();
|
menu_to_select_factory_.InvalidateWeakPtrs();
|
||||||
base::MessageLoop::current()->PostTask(
|
base::MessageLoop::current()->PostTask(
|
||||||
FROM_HERE,
|
FROM_HERE,
|
||||||
base::Bind(&NativeMenuWin::DelayedSelect,
|
base::Bind(&CefNativeMenuWin::DelayedSelect,
|
||||||
menu_to_select_factory_.GetWeakPtr()));
|
menu_to_select_factory_.GetWeakPtr()));
|
||||||
menu_action_ = MENU_ACTION_SELECTED;
|
menu_action_ = MENU_ACTION_SELECTED;
|
||||||
}
|
}
|
||||||
|
@ -459,11 +461,11 @@ void NativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
|
||||||
model_->MenuClosed();
|
model_->MenuClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::CancelMenu() {
|
void CefNativeMenuWin::CancelMenu() {
|
||||||
EndMenu();
|
EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::Rebuild(MenuInsertionDelegateWin* delegate) {
|
void CefNativeMenuWin::Rebuild(MenuInsertionDelegateWin* delegate) {
|
||||||
ResetNativeMenu();
|
ResetNativeMenu();
|
||||||
items_.clear();
|
items_.clear();
|
||||||
|
|
||||||
|
@ -479,7 +481,7 @@ void NativeMenuWin::Rebuild(MenuInsertionDelegateWin* delegate) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::UpdateStates() {
|
void CefNativeMenuWin::UpdateStates() {
|
||||||
// A depth-first walk of the menu items, updating states.
|
// A depth-first walk of the menu items, updating states.
|
||||||
int model_index = 0;
|
int model_index = 0;
|
||||||
std::vector<ItemData*>::const_iterator it;
|
std::vector<ItemData*>::const_iterator it;
|
||||||
|
@ -498,39 +500,39 @@ void NativeMenuWin::UpdateStates() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HMENU NativeMenuWin::GetNativeMenu() const {
|
HMENU CefNativeMenuWin::GetNativeMenu() const {
|
||||||
return menu_;
|
return menu_;
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeMenuWin::MenuAction NativeMenuWin::GetMenuAction() const {
|
CefNativeMenuWin::MenuAction CefNativeMenuWin::GetMenuAction() const {
|
||||||
return menu_action_;
|
return menu_action_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::AddMenuListener(MenuListener* listener) {
|
void CefNativeMenuWin::AddMenuListener(MenuListener* listener) {
|
||||||
listeners_.AddObserver(listener);
|
listeners_.AddObserver(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::RemoveMenuListener(MenuListener* listener) {
|
void CefNativeMenuWin::RemoveMenuListener(MenuListener* listener) {
|
||||||
listeners_.RemoveObserver(listener);
|
listeners_.RemoveObserver(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::SetMinimumWidth(int width) {
|
void CefNativeMenuWin::SetMinimumWidth(int width) {
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// NativeMenuWin, private:
|
// CefNativeMenuWin, private:
|
||||||
|
|
||||||
// static
|
// static
|
||||||
NativeMenuWin* NativeMenuWin::open_native_menu_win_ = NULL;
|
CefNativeMenuWin* CefNativeMenuWin::open_native_menu_win_ = NULL;
|
||||||
|
|
||||||
void NativeMenuWin::DelayedSelect() {
|
void CefNativeMenuWin::DelayedSelect() {
|
||||||
if (menu_to_select_)
|
if (menu_to_select_)
|
||||||
menu_to_select_->model_->ActivatedAt(position_to_select_);
|
menu_to_select_->model_->ActivatedAt(position_to_select_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
bool NativeMenuWin::GetHighlightedMenuItemInfo(
|
bool CefNativeMenuWin::GetHighlightedMenuItemInfo(
|
||||||
HMENU menu,
|
HMENU menu,
|
||||||
HighlightedMenuItemInfo* info) {
|
HighlightedMenuItemInfo* info) {
|
||||||
for (int i = 0; i < ::GetMenuItemCount(menu); i++) {
|
for (int i = 0; i < ::GetMenuItemCount(menu); i++) {
|
||||||
|
@ -543,7 +545,7 @@ bool NativeMenuWin::GetHighlightedMenuItemInfo(
|
||||||
else
|
else
|
||||||
info->has_submenu = true;
|
info->has_submenu = true;
|
||||||
} else if (!(state & MF_SEPARATOR) && !(state & MF_DISABLED)) {
|
} else if (!(state & MF_SEPARATOR) && !(state & MF_DISABLED)) {
|
||||||
info->menu = GetNativeMenuWinFromHMENU(menu);
|
info->menu = GetCefNativeMenuWinFromHMENU(menu);
|
||||||
info->position = i;
|
info->position = i;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -553,11 +555,11 @@ bool NativeMenuWin::GetHighlightedMenuItemInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
LRESULT CALLBACK NativeMenuWin::MenuMessageHook(
|
LRESULT CALLBACK CefNativeMenuWin::MenuMessageHook(
|
||||||
int n_code, WPARAM w_param, LPARAM l_param) {
|
int n_code, WPARAM w_param, LPARAM l_param) {
|
||||||
LRESULT result = CallNextHookEx(NULL, n_code, w_param, l_param);
|
LRESULT result = CallNextHookEx(NULL, n_code, w_param, l_param);
|
||||||
|
|
||||||
NativeMenuWin* this_ptr = open_native_menu_win_;
|
CefNativeMenuWin* this_ptr = open_native_menu_win_;
|
||||||
if (!this_ptr)
|
if (!this_ptr)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@ -602,7 +604,7 @@ LRESULT CALLBACK NativeMenuWin::MenuMessageHook(
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeMenuWin::IsSeparatorItemAt(int menu_index) const {
|
bool CefNativeMenuWin::IsSeparatorItemAt(int menu_index) const {
|
||||||
MENUITEMINFO mii = {0};
|
MENUITEMINFO mii = {0};
|
||||||
mii.cbSize = sizeof(mii);
|
mii.cbSize = sizeof(mii);
|
||||||
mii.fMask = MIIM_FTYPE;
|
mii.fMask = MIIM_FTYPE;
|
||||||
|
@ -610,7 +612,7 @@ bool NativeMenuWin::IsSeparatorItemAt(int menu_index) const {
|
||||||
return !!(mii.fType & MF_SEPARATOR);
|
return !!(mii.fType & MF_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::AddMenuItemAt(int menu_index, int model_index) {
|
void CefNativeMenuWin::AddMenuItemAt(int menu_index, int model_index) {
|
||||||
MENUITEMINFO mii = {0};
|
MENUITEMINFO mii = {0};
|
||||||
mii.cbSize = sizeof(mii);
|
mii.cbSize = sizeof(mii);
|
||||||
mii.fMask = MIIM_FTYPE | MIIM_ID | MIIM_DATA;
|
mii.fMask = MIIM_FTYPE | MIIM_ID | MIIM_DATA;
|
||||||
|
@ -626,7 +628,7 @@ void NativeMenuWin::AddMenuItemAt(int menu_index, int model_index) {
|
||||||
item_data->submenu.reset(new Menu2(model_->GetSubmenuModelAt(model_index)));
|
item_data->submenu.reset(new Menu2(model_->GetSubmenuModelAt(model_index)));
|
||||||
mii.fMask |= MIIM_SUBMENU;
|
mii.fMask |= MIIM_SUBMENU;
|
||||||
mii.hSubMenu = item_data->submenu->GetNativeMenu();
|
mii.hSubMenu = item_data->submenu->GetNativeMenu();
|
||||||
GetNativeMenuWinFromHMENU(mii.hSubMenu)->parent_ = this;
|
GetCefNativeMenuWinFromHMENU(mii.hSubMenu)->parent_ = this;
|
||||||
} else {
|
} else {
|
||||||
if (type == ui::MenuModel::TYPE_RADIO)
|
if (type == ui::MenuModel::TYPE_RADIO)
|
||||||
mii.fType |= MFT_RADIOCHECK;
|
mii.fType |= MFT_RADIOCHECK;
|
||||||
|
@ -641,7 +643,7 @@ void NativeMenuWin::AddMenuItemAt(int menu_index, int model_index) {
|
||||||
InsertMenuItem(menu_, menu_index, TRUE, &mii);
|
InsertMenuItem(menu_, menu_index, TRUE, &mii);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::AddSeparatorItemAt(int menu_index, int model_index) {
|
void CefNativeMenuWin::AddSeparatorItemAt(int menu_index, int model_index) {
|
||||||
MENUITEMINFO mii = {0};
|
MENUITEMINFO mii = {0};
|
||||||
mii.cbSize = sizeof(mii);
|
mii.cbSize = sizeof(mii);
|
||||||
mii.fMask = MIIM_FTYPE;
|
mii.fMask = MIIM_FTYPE;
|
||||||
|
@ -652,8 +654,8 @@ void NativeMenuWin::AddSeparatorItemAt(int menu_index, int model_index) {
|
||||||
InsertMenuItem(menu_, menu_index, TRUE, &mii);
|
InsertMenuItem(menu_, menu_index, TRUE, &mii);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::SetMenuItemState(int menu_index, bool enabled, bool checked,
|
void CefNativeMenuWin::SetMenuItemState(
|
||||||
bool is_default) {
|
int menu_index, bool enabled, bool checked, bool is_default) {
|
||||||
if (IsSeparatorItemAt(menu_index))
|
if (IsSeparatorItemAt(menu_index))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -670,7 +672,7 @@ void NativeMenuWin::SetMenuItemState(int menu_index, bool enabled, bool checked,
|
||||||
SetMenuItemInfo(menu_, menu_index, MF_BYPOSITION, &mii);
|
SetMenuItemInfo(menu_, menu_index, MF_BYPOSITION, &mii);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::SetMenuItemLabel(int menu_index,
|
void CefNativeMenuWin::SetMenuItemLabel(int menu_index,
|
||||||
int model_index,
|
int model_index,
|
||||||
const base::string16& label) {
|
const base::string16& label) {
|
||||||
if (IsSeparatorItemAt(menu_index))
|
if (IsSeparatorItemAt(menu_index))
|
||||||
|
@ -682,7 +684,7 @@ void NativeMenuWin::SetMenuItemLabel(int menu_index,
|
||||||
SetMenuItemInfo(menu_, menu_index, MF_BYPOSITION, &mii);
|
SetMenuItemInfo(menu_, menu_index, MF_BYPOSITION, &mii);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::UpdateMenuItemInfoForString(MENUITEMINFO* mii,
|
void CefNativeMenuWin::UpdateMenuItemInfoForString(MENUITEMINFO* mii,
|
||||||
int model_index,
|
int model_index,
|
||||||
const base::string16& label) {
|
const base::string16& label) {
|
||||||
base::string16 formatted = label;
|
base::string16 formatted = label;
|
||||||
|
@ -709,7 +711,7 @@ void NativeMenuWin::UpdateMenuItemInfoForString(MENUITEMINFO* mii,
|
||||||
const_cast<wchar_t*>(items_[model_index]->label.c_str());
|
const_cast<wchar_t*>(items_[model_index]->label.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT NativeMenuWin::GetAlignmentFlags(int alignment) const {
|
UINT CefNativeMenuWin::GetAlignmentFlags(int alignment) const {
|
||||||
UINT alignment_flags = TPM_TOPALIGN;
|
UINT alignment_flags = TPM_TOPALIGN;
|
||||||
if (alignment == Menu2::ALIGN_TOPLEFT)
|
if (alignment == Menu2::ALIGN_TOPLEFT)
|
||||||
alignment_flags |= TPM_LEFTALIGN;
|
alignment_flags |= TPM_LEFTALIGN;
|
||||||
|
@ -718,7 +720,7 @@ UINT NativeMenuWin::GetAlignmentFlags(int alignment) const {
|
||||||
return alignment_flags;
|
return alignment_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::ResetNativeMenu() {
|
void CefNativeMenuWin::ResetNativeMenu() {
|
||||||
if (IsWindow(system_menu_for_)) {
|
if (IsWindow(system_menu_for_)) {
|
||||||
if (menu_)
|
if (menu_)
|
||||||
GetSystemMenu(system_menu_for_, TRUE);
|
GetSystemMenu(system_menu_for_, TRUE);
|
||||||
|
@ -739,9 +741,9 @@ void NativeMenuWin::ResetNativeMenu() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeMenuWin::CreateHostWindow() {
|
void CefNativeMenuWin::CreateHostWindow() {
|
||||||
// This only gets called from RunMenuAt, and as such there is only ever one
|
// This only gets called from RunMenuAt, and as such there is only ever one
|
||||||
// host window per menu hierarchy, no matter how many NativeMenuWin objects
|
// host window per menu hierarchy, no matter how many CefNativeMenuWin objects
|
||||||
// exist wrapping submenus.
|
// exist wrapping submenus.
|
||||||
if (!host_window_.get())
|
if (!host_window_.get())
|
||||||
host_window_.reset(new MenuHostWindow(this));
|
host_window_.reset(new MenuHostWindow(this));
|
||||||
|
@ -752,7 +754,7 @@ void NativeMenuWin::CreateHostWindow() {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
MenuWrapper* MenuWrapper::CreateWrapper(ui::MenuModel* model) {
|
MenuWrapper* MenuWrapper::CreateWrapper(ui::MenuModel* model) {
|
||||||
return new NativeMenuWin(model, NULL);
|
return new CefNativeMenuWin(model, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace views
|
} // namespace views
|
||||||
|
|
|
@ -23,13 +23,14 @@ namespace views {
|
||||||
|
|
||||||
// A Windows implementation of MenuWrapper.
|
// A Windows implementation of MenuWrapper.
|
||||||
// TODO(beng): rename to MenuWin once the old class is dead.
|
// TODO(beng): rename to MenuWin once the old class is dead.
|
||||||
class NativeMenuWin : public MenuWrapper {
|
class CefNativeMenuWin : public MenuWrapper {
|
||||||
public:
|
public:
|
||||||
// Construct a NativeMenuWin, with a model and delegate. If |system_menu_for|
|
// Construct a CefNativeMenuWin, with a model and delegate. If
|
||||||
// is non-NULL, the NativeMenuWin wraps the system menu for that window.
|
// |system_menu_for| is non-NULL, the CefNativeMenuWin wraps the system menu
|
||||||
|
// for that window.
|
||||||
// The caller owns the model and the delegate.
|
// The caller owns the model and the delegate.
|
||||||
NativeMenuWin(ui::MenuModel* model, HWND system_menu_for);
|
CefNativeMenuWin(ui::MenuModel* model, HWND system_menu_for);
|
||||||
~NativeMenuWin() override;
|
~CefNativeMenuWin() override;
|
||||||
|
|
||||||
// Overridden from MenuWrapper:
|
// Overridden from MenuWrapper:
|
||||||
void RunMenuAt(const gfx::Point& point, int alignment) override;
|
void RunMenuAt(const gfx::Point& point, int alignment) override;
|
||||||
|
@ -143,25 +144,25 @@ class NativeMenuWin : public MenuWrapper {
|
||||||
bool listeners_called_;
|
bool listeners_called_;
|
||||||
|
|
||||||
// See comment in MenuMessageHook for details on these.
|
// See comment in MenuMessageHook for details on these.
|
||||||
NativeMenuWin* menu_to_select_;
|
CefNativeMenuWin* menu_to_select_;
|
||||||
int position_to_select_;
|
int position_to_select_;
|
||||||
|
|
||||||
// If we're a submenu, this is our parent.
|
// If we're a submenu, this is our parent.
|
||||||
NativeMenuWin* parent_;
|
CefNativeMenuWin* parent_;
|
||||||
|
|
||||||
// If non-null the destructor sets this to true. This is set to non-null while
|
// If non-null the destructor sets this to true. This is set to non-null while
|
||||||
// the menu is showing. It is used to detect if the menu was deleted while
|
// the menu is showing. It is used to detect if the menu was deleted while
|
||||||
// running.
|
// running.
|
||||||
bool* destroyed_flag_;
|
bool* destroyed_flag_;
|
||||||
|
|
||||||
base::WeakPtrFactory<NativeMenuWin> menu_to_select_factory_;
|
base::WeakPtrFactory<CefNativeMenuWin> menu_to_select_factory_;
|
||||||
|
|
||||||
// Ugly: a static pointer to the instance of this class that currently
|
// Ugly: a static pointer to the instance of this class that currently
|
||||||
// has a menu open, because our hook function that receives keyboard
|
// has a menu open, because our hook function that receives keyboard
|
||||||
// events doesn't have a mechanism to get a user data pointer.
|
// events doesn't have a mechanism to get a user data pointer.
|
||||||
static NativeMenuWin* open_native_menu_win_;
|
static CefNativeMenuWin* open_native_menu_win_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(NativeMenuWin);
|
DISALLOW_COPY_AND_ASSIGN(CefNativeMenuWin);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace views
|
} // namespace views
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
|
#include "cef/grit/cef_resources.h"
|
||||||
|
#include "components/grit/components_resources.h"
|
||||||
#include "content/browser/net/view_http_cache_job_factory.h"
|
#include "content/browser/net/view_http_cache_job_factory.h"
|
||||||
#include "content/browser/net/view_blob_internals_job_factory.h"
|
#include "content/browser/net/view_blob_internals_job_factory.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
#include "content/public/common/user_agent.h"
|
#include "content/public/common/user_agent.h"
|
||||||
#include "grit/cef_resources.h"
|
|
||||||
#include "grit/components_resources.h"
|
|
||||||
#include "ipc/ipc_channel.h"
|
#include "ipc/ipc_channel.h"
|
||||||
#include "net/url_request/url_request.h"
|
#include "net/url_request/url_request.h"
|
||||||
#include "ui/base/webui/web_ui_util.h"
|
#include "ui/base/webui/web_ui_util.h"
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
#include "base/memory/ptr_util.h"
|
#include "base/memory/ptr_util.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
|
#include "blink/grit/devtools_resources_map.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
#include "grit/devtools_resources_map.h"
|
|
||||||
|
|
||||||
namespace scheme {
|
namespace scheme {
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
#include "libcef/browser/browser_host_impl.h"
|
#include "libcef/browser/browser_host_impl.h"
|
||||||
#include "libcef/browser/content_browser_client.h"
|
#include "libcef/browser/content_browser_client.h"
|
||||||
|
|
||||||
#include "grit/ui_unscaled_resources.h"
|
|
||||||
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
||||||
|
#include "ui/resources/grit/ui_unscaled_resources.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -1,218 +0,0 @@
|
||||||
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
|
|
||||||
|
|
||||||
#include "base/files/file_util.h"
|
|
||||||
#include "base/macros.h"
|
|
||||||
#include "base/strings/string_number_conversions.h"
|
|
||||||
#include "build/build_config.h"
|
|
||||||
#include "chrome/common/pref_names.h"
|
|
||||||
#if defined(OS_CHROMEOS)
|
|
||||||
#include "chromeos/cryptohome/system_salt_getter.h"
|
|
||||||
#endif
|
|
||||||
#include "components/prefs/pref_service.h"
|
|
||||||
#include "components/pref_registry/pref_registry_syncable.h"
|
|
||||||
#include "components/user_prefs/user_prefs.h"
|
|
||||||
#include "content/public/browser/browser_context.h"
|
|
||||||
#include "content/public/browser/browser_ppapi_host.h"
|
|
||||||
#include "content/public/browser/browser_thread.h"
|
|
||||||
#include "content/public/browser/render_process_host.h"
|
|
||||||
#include "crypto/encryptor.h"
|
|
||||||
#include "crypto/random.h"
|
|
||||||
#include "crypto/sha2.h"
|
|
||||||
#include "ppapi/c/pp_errors.h"
|
|
||||||
#if defined(ENABLE_RLZ)
|
|
||||||
#include "rlz/lib/machine_id.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using content::BrowserPpapiHost;
|
|
||||||
using content::BrowserThread;
|
|
||||||
using content::RenderProcessHost;
|
|
||||||
|
|
||||||
namespace chrome {
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const char kDRMIdentifierFile[] = "Pepper DRM ID.0";
|
|
||||||
|
|
||||||
const uint32_t kSaltLength = 32;
|
|
||||||
|
|
||||||
void GetMachineIDAsync(
|
|
||||||
const base::Callback<void(const std::string&)>& callback) {
|
|
||||||
#if defined(OS_WIN) && defined(ENABLE_RLZ)
|
|
||||||
std::string result;
|
|
||||||
rlz_lib::GetMachineId(&result);
|
|
||||||
callback.Run(result);
|
|
||||||
#elif defined(OS_CHROMEOS)
|
|
||||||
chromeos::SystemSaltGetter::Get()->GetSystemSalt(callback);
|
|
||||||
#else
|
|
||||||
// Not implemented for other platforms.
|
|
||||||
NOTREACHED();
|
|
||||||
callback.Run(std::string());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
DeviceIDFetcher::DeviceIDFetcher(int render_process_id)
|
|
||||||
: in_progress_(false), render_process_id_(render_process_id) {
|
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceIDFetcher::~DeviceIDFetcher() {}
|
|
||||||
|
|
||||||
bool DeviceIDFetcher::Start(const IDCallback& callback) {
|
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
|
||||||
|
|
||||||
if (in_progress_)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
in_progress_ = true;
|
|
||||||
callback_ = callback;
|
|
||||||
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::UI,
|
|
||||||
FROM_HERE,
|
|
||||||
base::Bind(&DeviceIDFetcher::CheckPrefsOnUIThread, this));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
void DeviceIDFetcher::RegisterProfilePrefs(
|
|
||||||
user_prefs::PrefRegistrySyncable* prefs) {
|
|
||||||
prefs->RegisterBooleanPref(prefs::kEnableDRM, true);
|
|
||||||
prefs->RegisterStringPref(prefs::kDRMSalt, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
base::FilePath DeviceIDFetcher::GetLegacyDeviceIDPath(
|
|
||||||
const base::FilePath& profile_path) {
|
|
||||||
return profile_path.AppendASCII(kDRMIdentifierFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceIDFetcher::CheckPrefsOnUIThread() {
|
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
||||||
|
|
||||||
RenderProcessHost* render_process_host =
|
|
||||||
RenderProcessHost::FromID(render_process_id_);
|
|
||||||
content::BrowserContext* browser_context = NULL;
|
|
||||||
if (render_process_host)
|
|
||||||
browser_context = render_process_host->GetBrowserContext();
|
|
||||||
|
|
||||||
PrefService* prefs = NULL;
|
|
||||||
if (browser_context) {
|
|
||||||
prefs = user_prefs::UserPrefs::Get(browser_context);
|
|
||||||
DCHECK(prefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!browser_context || browser_context->IsOffTheRecord() ||
|
|
||||||
!prefs->GetBoolean(prefs::kEnableDRM)) {
|
|
||||||
RunCallbackOnIOThread(std::string(), PP_ERROR_NOACCESS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the salt pref is set. If it isn't, set it.
|
|
||||||
std::string salt = prefs->GetString(prefs::kDRMSalt);
|
|
||||||
if (salt.empty()) {
|
|
||||||
uint8_t salt_bytes[kSaltLength];
|
|
||||||
crypto::RandBytes(salt_bytes, arraysize(salt_bytes));
|
|
||||||
// Since it will be stored in a string pref, convert it to hex.
|
|
||||||
salt = base::HexEncode(salt_bytes, arraysize(salt_bytes));
|
|
||||||
prefs->SetString(prefs::kDRMSalt, salt);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(OS_CHROMEOS)
|
|
||||||
// Try the legacy path first for ChromeOS. We pass the new salt in as well
|
|
||||||
// in case the legacy id doesn't exist.
|
|
||||||
BrowserThread::PostBlockingPoolTask(
|
|
||||||
FROM_HERE,
|
|
||||||
base::Bind(&DeviceIDFetcher::LegacyComputeOnBlockingPool,
|
|
||||||
this,
|
|
||||||
profile->GetPath(),
|
|
||||||
salt));
|
|
||||||
#else
|
|
||||||
// Get the machine ID and call ComputeOnUIThread with salt + machine_id.
|
|
||||||
GetMachineIDAsync(
|
|
||||||
base::Bind(&DeviceIDFetcher::ComputeOnUIThread, this, salt));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceIDFetcher::ComputeOnUIThread(const std::string& salt,
|
|
||||||
const std::string& machine_id) {
|
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
||||||
|
|
||||||
if (machine_id.empty()) {
|
|
||||||
LOG(ERROR) << "Empty machine id";
|
|
||||||
RunCallbackOnIOThread(std::string(), PP_ERROR_FAILED);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build the identifier as follows:
|
|
||||||
// SHA256(machine-id||service||SHA256(machine-id||service||salt))
|
|
||||||
std::vector<uint8_t> salt_bytes;
|
|
||||||
if (!base::HexStringToBytes(salt, &salt_bytes))
|
|
||||||
salt_bytes.clear();
|
|
||||||
if (salt_bytes.size() != kSaltLength) {
|
|
||||||
LOG(ERROR) << "Unexpected salt bytes length: " << salt_bytes.size();
|
|
||||||
RunCallbackOnIOThread(std::string(), PP_ERROR_FAILED);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
char id_buf[256 / 8]; // 256-bits for SHA256
|
|
||||||
std::string input = machine_id;
|
|
||||||
input.append(kDRMIdentifierFile);
|
|
||||||
input.append(salt_bytes.begin(), salt_bytes.end());
|
|
||||||
crypto::SHA256HashString(input, &id_buf, sizeof(id_buf));
|
|
||||||
std::string id = base::ToLowerASCII(
|
|
||||||
base::HexEncode(reinterpret_cast<const void*>(id_buf), sizeof(id_buf)));
|
|
||||||
input = machine_id;
|
|
||||||
input.append(kDRMIdentifierFile);
|
|
||||||
input.append(id);
|
|
||||||
crypto::SHA256HashString(input, &id_buf, sizeof(id_buf));
|
|
||||||
id = base::ToLowerASCII(
|
|
||||||
base::HexEncode(reinterpret_cast<const void*>(id_buf), sizeof(id_buf)));
|
|
||||||
|
|
||||||
RunCallbackOnIOThread(id, PP_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(raymes): This is temporary code to migrate ChromeOS devices to the new
|
|
||||||
// scheme for generating device IDs. Delete this once we are sure most ChromeOS
|
|
||||||
// devices have been migrated.
|
|
||||||
void DeviceIDFetcher::LegacyComputeOnBlockingPool(
|
|
||||||
const base::FilePath& profile_path,
|
|
||||||
const std::string& salt) {
|
|
||||||
std::string id;
|
|
||||||
// First check if the legacy device ID file exists on ChromeOS. If it does, we
|
|
||||||
// should just return that.
|
|
||||||
base::FilePath id_path = GetLegacyDeviceIDPath(profile_path);
|
|
||||||
if (base::PathExists(id_path)) {
|
|
||||||
if (base::ReadFileToString(id_path, &id) && !id.empty()) {
|
|
||||||
RunCallbackOnIOThread(id, PP_OK);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// If we didn't find an ID, get the machine ID and call the new code path to
|
|
||||||
// generate an ID.
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::UI,
|
|
||||||
FROM_HERE,
|
|
||||||
base::Bind(&GetMachineIDAsync,
|
|
||||||
base::Bind(&DeviceIDFetcher::ComputeOnUIThread, this, salt)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceIDFetcher::RunCallbackOnIOThread(const std::string& id,
|
|
||||||
int32_t result) {
|
|
||||||
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::IO,
|
|
||||||
FROM_HERE,
|
|
||||||
base::Bind(&DeviceIDFetcher::RunCallbackOnIOThread, this, id, result));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
in_progress_ = false;
|
|
||||||
callback_.Run(id, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace chrome
|
|
|
@ -14,8 +14,10 @@
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "chrome/browser/prefs/command_line_pref_store.h"
|
#include "chrome/browser/prefs/command_line_pref_store.h"
|
||||||
|
#include "chrome/browser/themes/theme_service.h"
|
||||||
#include "chrome/common/chrome_switches.h"
|
#include "chrome/common/chrome_switches.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
|
#include "chrome/grit/locale_settings.h"
|
||||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||||
#include "components/prefs/json_pref_store.h"
|
#include "components/prefs/json_pref_store.h"
|
||||||
#include "components/prefs/pref_filter.h"
|
#include "components/prefs/pref_filter.h"
|
||||||
|
@ -29,7 +31,6 @@
|
||||||
#include "components/update_client/update_client.h"
|
#include "components/update_client/update_client.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "extensions/browser/extension_prefs.h"
|
#include "extensions/browser/extension_prefs.h"
|
||||||
#include "grit/cef_strings.h"
|
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
|
|
||||||
namespace browser_prefs {
|
namespace browser_prefs {
|
||||||
|
@ -162,6 +163,21 @@ std::unique_ptr<PrefService> CreatePrefService(const base::FilePath& pref_path)
|
||||||
registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false);
|
registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false);
|
||||||
registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false);
|
registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false);
|
||||||
|
|
||||||
|
// Theme preferences.
|
||||||
|
// Based on ThemeServiceFactory::RegisterProfilePrefs.
|
||||||
|
// TODO(cef/chrome): Remove this once CEF supports ThemeService.
|
||||||
|
#if defined(USE_X11)
|
||||||
|
registry->RegisterBooleanPref(prefs::kUsesSystemTheme, false);
|
||||||
|
#endif
|
||||||
|
registry->RegisterFilePathPref(prefs::kCurrentThemePackFilename,
|
||||||
|
base::FilePath());
|
||||||
|
registry->RegisterStringPref(prefs::kCurrentThemeID,
|
||||||
|
ThemeService::kDefaultThemeID);
|
||||||
|
registry->RegisterDictionaryPref(prefs::kCurrentThemeImages);
|
||||||
|
registry->RegisterDictionaryPref(prefs::kCurrentThemeColors);
|
||||||
|
registry->RegisterDictionaryPref(prefs::kCurrentThemeTints);
|
||||||
|
registry->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties);
|
||||||
|
|
||||||
if (command_line->HasSwitch(switches::kEnablePreferenceTesting)) {
|
if (command_line->HasSwitch(switches::kEnablePreferenceTesting)) {
|
||||||
// Preferences used with unit tests.
|
// Preferences used with unit tests.
|
||||||
registry->RegisterBooleanPref("test.bool", true);
|
registry->RegisterBooleanPref("test.bool", true);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
using content::BrowserThread;
|
using content::BrowserThread;
|
||||||
|
|
||||||
DEFINE_WEB_CONTENTS_USER_DATA_KEY(printing::PrintViewManager);
|
DEFINE_WEB_CONTENTS_USER_DATA_KEY(printing::CefPrintViewManager);
|
||||||
|
|
||||||
namespace printing {
|
namespace printing {
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ GetDataFromHandle(base::SharedMemoryHandle handle, uint32_t data_size) {
|
||||||
// Write the PDF file to disk.
|
// Write the PDF file to disk.
|
||||||
void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
|
void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
|
||||||
const base::FilePath& path,
|
const base::FilePath& path,
|
||||||
const PrintViewManager::PdfPrintCallback& callback) {
|
const CefPrintViewManager::PdfPrintCallback& callback) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
|
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
|
||||||
DCHECK_GT(data->size(), 0U);
|
DCHECK_GT(data->size(), 0U);
|
||||||
|
|
||||||
|
@ -156,23 +156,23 @@ void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
PrintViewManager::PrintViewManager(content::WebContents* web_contents)
|
CefPrintViewManager::CefPrintViewManager(content::WebContents* web_contents)
|
||||||
: PrintViewManagerBase(web_contents) {
|
: CefPrintViewManagerBase(web_contents) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintViewManager::~PrintViewManager() {
|
CefPrintViewManager::~CefPrintViewManager() {
|
||||||
TerminatePdfPrintJob();
|
TerminatePdfPrintJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
bool PrintViewManager::PrintForSystemDialogNow() {
|
bool CefPrintViewManager::PrintForSystemDialogNow() {
|
||||||
return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id()));
|
return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id()));
|
||||||
}
|
}
|
||||||
#endif // ENABLE_BASIC_PRINTING
|
#endif // ENABLE_BASIC_PRINTING
|
||||||
|
|
||||||
bool PrintViewManager::OnMessageReceived(const IPC::Message& message) {
|
bool CefPrintViewManager::OnMessageReceived(const IPC::Message& message) {
|
||||||
bool handled = true;
|
bool handled = true;
|
||||||
IPC_BEGIN_MESSAGE_MAP(PrintViewManager, message)
|
IPC_BEGIN_MESSAGE_MAP(CefPrintViewManager, message)
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_DidShowPrintDialog, OnDidShowPrintDialog)
|
IPC_MESSAGE_HANDLER(PrintHostMsg_DidShowPrintDialog, OnDidShowPrintDialog)
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview,
|
IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview,
|
||||||
OnRequestPrintPreview)
|
OnRequestPrintPreview)
|
||||||
|
@ -181,20 +181,20 @@ bool PrintViewManager::OnMessageReceived(const IPC::Message& message) {
|
||||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||||
IPC_END_MESSAGE_MAP()
|
IPC_END_MESSAGE_MAP()
|
||||||
|
|
||||||
return handled ? true : PrintViewManagerBase::OnMessageReceived(message);
|
return handled ? true : CefPrintViewManagerBase::OnMessageReceived(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::NavigationStopped() {
|
void CefPrintViewManager::NavigationStopped() {
|
||||||
PrintViewManagerBase::NavigationStopped();
|
CefPrintViewManagerBase::NavigationStopped();
|
||||||
TerminatePdfPrintJob();
|
TerminatePdfPrintJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::RenderProcessGone(base::TerminationStatus status) {
|
void CefPrintViewManager::RenderProcessGone(base::TerminationStatus status) {
|
||||||
PrintViewManagerBase::RenderProcessGone(status);
|
CefPrintViewManagerBase::RenderProcessGone(status);
|
||||||
TerminatePdfPrintJob();
|
TerminatePdfPrintJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::PrintToPDF(const base::FilePath& path,
|
void CefPrintViewManager::PrintToPDF(const base::FilePath& path,
|
||||||
const CefPdfPrintSettings& settings,
|
const CefPdfPrintSettings& settings,
|
||||||
const PdfPrintCallback& callback) {
|
const PdfPrintCallback& callback) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||||
|
@ -213,10 +213,10 @@ void PrintViewManager::PrintToPDF(const base::FilePath& path,
|
||||||
!!settings.selection_only));
|
!!settings.selection_only));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::OnDidShowPrintDialog() {
|
void CefPrintViewManager::OnDidShowPrintDialog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::OnRequestPrintPreview(
|
void CefPrintViewManager::OnRequestPrintPreview(
|
||||||
const PrintHostMsg_RequestPrintPreview_Params&) {
|
const PrintHostMsg_RequestPrintPreview_Params&) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||||
if (!web_contents() || !pdf_print_settings_)
|
if (!web_contents() || !pdf_print_settings_)
|
||||||
|
@ -225,7 +225,7 @@ void PrintViewManager::OnRequestPrintPreview(
|
||||||
Send(new PrintMsg_PrintPreview(routing_id(), *pdf_print_settings_));
|
Send(new PrintMsg_PrintPreview(routing_id(), *pdf_print_settings_));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::OnMetafileReadyForPrinting(
|
void CefPrintViewManager::OnMetafileReadyForPrinting(
|
||||||
const PrintHostMsg_DidPreviewDocument_Params& params) {
|
const PrintHostMsg_DidPreviewDocument_Params& params) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||||
StopWorker(params.document_cookie);
|
StopWorker(params.document_cookie);
|
||||||
|
@ -252,7 +252,7 @@ void PrintViewManager::OnMetafileReadyForPrinting(
|
||||||
pdf_print_callback));
|
pdf_print_callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManager::TerminatePdfPrintJob() {
|
void CefPrintViewManager::TerminatePdfPrintJob() {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||||
if (!pdf_print_settings_.get())
|
if (!pdf_print_settings_.get())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -20,10 +20,11 @@ class RenderProcessHost;
|
||||||
namespace printing {
|
namespace printing {
|
||||||
|
|
||||||
// Manages the print commands for a WebContents.
|
// Manages the print commands for a WebContents.
|
||||||
class PrintViewManager : public PrintViewManagerBase,
|
class CefPrintViewManager :
|
||||||
public content::WebContentsUserData<PrintViewManager> {
|
public CefPrintViewManagerBase,
|
||||||
|
public content::WebContentsUserData<CefPrintViewManager> {
|
||||||
public:
|
public:
|
||||||
~PrintViewManager() override;
|
~CefPrintViewManager() override;
|
||||||
|
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
// Same as PrintNow(), but for the case where a user prints with the system
|
// Same as PrintNow(), but for the case where a user prints with the system
|
||||||
|
@ -49,8 +50,8 @@ class PrintViewManager : public PrintViewManagerBase,
|
||||||
const PdfPrintCallback& callback);
|
const PdfPrintCallback& callback);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit PrintViewManager(content::WebContents* web_contents);
|
explicit CefPrintViewManager(content::WebContents* web_contents);
|
||||||
friend class content::WebContentsUserData<PrintViewManager>;
|
friend class content::WebContentsUserData<CefPrintViewManager>;
|
||||||
|
|
||||||
// IPC Message handlers.
|
// IPC Message handlers.
|
||||||
void OnDidShowPrintDialog();
|
void OnDidShowPrintDialog();
|
||||||
|
@ -66,7 +67,7 @@ class PrintViewManager : public PrintViewManagerBase,
|
||||||
std::unique_ptr<base::DictionaryValue> pdf_print_settings_;
|
std::unique_ptr<base::DictionaryValue> pdf_print_settings_;
|
||||||
PdfPrintCallback pdf_print_callback_;
|
PdfPrintCallback pdf_print_callback_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(PrintViewManager);
|
DISALLOW_COPY_AND_ASSIGN(CefPrintViewManager);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace printing
|
} // namespace printing
|
||||||
|
|
|
@ -40,7 +40,8 @@ using content::BrowserThread;
|
||||||
|
|
||||||
namespace printing {
|
namespace printing {
|
||||||
|
|
||||||
PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
CefPrintViewManagerBase::CefPrintViewManagerBase(
|
||||||
|
content::WebContents* web_contents)
|
||||||
: PrintManager(web_contents),
|
: PrintManager(web_contents),
|
||||||
printing_succeeded_(false),
|
printing_succeeded_(false),
|
||||||
inside_inner_message_loop_(false),
|
inside_inner_message_loop_(false),
|
||||||
|
@ -55,33 +56,34 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||||
printing_enabled_.Init(
|
printing_enabled_.Init(
|
||||||
prefs::kPrintingEnabled,
|
prefs::kPrintingEnabled,
|
||||||
pref_service,
|
pref_service,
|
||||||
base::Bind(&PrintViewManagerBase::UpdateScriptedPrintingBlocked,
|
base::Bind(&CefPrintViewManagerBase::UpdateScriptedPrintingBlocked,
|
||||||
base::Unretained(this)));
|
base::Unretained(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
CefPrintViewManagerBase::~CefPrintViewManagerBase() {
|
||||||
ReleasePrinterQuery();
|
ReleasePrinterQuery();
|
||||||
DisconnectFromCurrentPrintJob();
|
DisconnectFromCurrentPrintJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
bool PrintViewManagerBase::PrintNow() {
|
bool CefPrintViewManagerBase::PrintNow() {
|
||||||
return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
|
return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void PrintViewManagerBase::UpdateScriptedPrintingBlocked() {
|
void CefPrintViewManagerBase::UpdateScriptedPrintingBlocked() {
|
||||||
Send(new PrintMsg_SetScriptedPrintingBlocked(
|
Send(new PrintMsg_SetScriptedPrintingBlocked(
|
||||||
routing_id(),
|
routing_id(),
|
||||||
!printing_enabled_.GetValue()));
|
!printing_enabled_.GetValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::NavigationStopped() {
|
void CefPrintViewManagerBase::NavigationStopped() {
|
||||||
// Cancel the current job, wait for the worker to finish.
|
// Cancel the current job, wait for the worker to finish.
|
||||||
TerminatePrintJob(true);
|
TerminatePrintJob(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::RenderProcessGone(base::TerminationStatus status) {
|
void CefPrintViewManagerBase::RenderProcessGone(
|
||||||
|
base::TerminationStatus status) {
|
||||||
PrintManager::RenderProcessGone(status);
|
PrintManager::RenderProcessGone(status);
|
||||||
ReleasePrinterQuery();
|
ReleasePrinterQuery();
|
||||||
|
|
||||||
|
@ -97,20 +99,20 @@ void PrintViewManagerBase::RenderProcessGone(base::TerminationStatus status) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base::string16 PrintViewManagerBase::RenderSourceName() {
|
base::string16 CefPrintViewManagerBase::RenderSourceName() {
|
||||||
base::string16 name(web_contents()->GetTitle());
|
base::string16 name(web_contents()->GetTitle());
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
name = l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE);
|
name = l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE);
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::OnDidGetPrintedPagesCount(int cookie,
|
void CefPrintViewManagerBase::OnDidGetPrintedPagesCount(int cookie,
|
||||||
int number_pages) {
|
int number_pages) {
|
||||||
PrintManager::OnDidGetPrintedPagesCount(cookie, number_pages);
|
PrintManager::OnDidGetPrintedPagesCount(cookie, number_pages);
|
||||||
OpportunisticallyCreatePrintJob(cookie);
|
OpportunisticallyCreatePrintJob(cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::OnDidPrintPage(
|
void CefPrintViewManagerBase::OnDidPrintPage(
|
||||||
const PrintHostMsg_DidPrintPage_Params& params) {
|
const PrintHostMsg_DidPrintPage_Params& params) {
|
||||||
if (!OpportunisticallyCreatePrintJob(params.document_cookie))
|
if (!OpportunisticallyCreatePrintJob(params.document_cookie))
|
||||||
return;
|
return;
|
||||||
|
@ -183,7 +185,7 @@ void PrintViewManagerBase::OnDidPrintPage(
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::OnPrintingFailed(int cookie) {
|
void CefPrintViewManagerBase::OnPrintingFailed(int cookie) {
|
||||||
PrintManager::OnPrintingFailed(cookie);
|
PrintManager::OnPrintingFailed(cookie);
|
||||||
|
|
||||||
ReleasePrinterQuery();
|
ReleasePrinterQuery();
|
||||||
|
@ -194,16 +196,16 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
|
||||||
content::NotificationService::NoDetails());
|
content::NotificationService::NoDetails());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::OnShowInvalidPrinterSettingsError() {
|
void CefPrintViewManagerBase::OnShowInvalidPrinterSettingsError() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::DidStartLoading() {
|
void CefPrintViewManagerBase::DidStartLoading() {
|
||||||
UpdateScriptedPrintingBlocked();
|
UpdateScriptedPrintingBlocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintViewManagerBase::OnMessageReceived(const IPC::Message& message) {
|
bool CefPrintViewManagerBase::OnMessageReceived(const IPC::Message& message) {
|
||||||
bool handled = true;
|
bool handled = true;
|
||||||
IPC_BEGIN_MESSAGE_MAP(PrintViewManagerBase, message)
|
IPC_BEGIN_MESSAGE_MAP(CefPrintViewManagerBase, message)
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_DidPrintPage, OnDidPrintPage)
|
IPC_MESSAGE_HANDLER(PrintHostMsg_DidPrintPage, OnDidPrintPage)
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_ShowInvalidPrinterSettingsError,
|
IPC_MESSAGE_HANDLER(PrintHostMsg_ShowInvalidPrinterSettingsError,
|
||||||
OnShowInvalidPrinterSettingsError);
|
OnShowInvalidPrinterSettingsError);
|
||||||
|
@ -212,7 +214,7 @@ bool PrintViewManagerBase::OnMessageReceived(const IPC::Message& message) {
|
||||||
return handled || PrintManager::OnMessageReceived(message);
|
return handled || PrintManager::OnMessageReceived(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::Observe(
|
void CefPrintViewManagerBase::Observe(
|
||||||
int type,
|
int type,
|
||||||
const content::NotificationSource& source,
|
const content::NotificationSource& source,
|
||||||
const content::NotificationDetails& details) {
|
const content::NotificationDetails& details) {
|
||||||
|
@ -220,7 +222,7 @@ void PrintViewManagerBase::Observe(
|
||||||
OnNotifyPrintJobEvent(*content::Details<JobEventDetails>(details).ptr());
|
OnNotifyPrintJobEvent(*content::Details<JobEventDetails>(details).ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
void CefPrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||||
const JobEventDetails& event_details) {
|
const JobEventDetails& event_details) {
|
||||||
switch (event_details.type()) {
|
switch (event_details.type()) {
|
||||||
case JobEventDetails::FAILED: {
|
case JobEventDetails::FAILED: {
|
||||||
|
@ -269,7 +271,7 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
bool CefPrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||||
if (!print_job_.get() || !print_job_->is_job_pending())
|
if (!print_job_.get() || !print_job_->is_job_pending())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -305,7 +307,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
|
void CefPrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
|
||||||
// Look at the reason.
|
// Look at the reason.
|
||||||
DCHECK(print_job_->document());
|
DCHECK(print_job_->document());
|
||||||
if (print_job_->document() &&
|
if (print_job_->document() &&
|
||||||
|
@ -318,7 +320,7 @@ void PrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) {
|
bool CefPrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) {
|
||||||
DCHECK(!inside_inner_message_loop_);
|
DCHECK(!inside_inner_message_loop_);
|
||||||
|
|
||||||
// Disconnect the current print_job_.
|
// Disconnect the current print_job_.
|
||||||
|
@ -345,7 +347,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::DisconnectFromCurrentPrintJob() {
|
void CefPrintViewManagerBase::DisconnectFromCurrentPrintJob() {
|
||||||
// Make sure all the necessary rendered page are done. Don't bother with the
|
// Make sure all the necessary rendered page are done. Don't bother with the
|
||||||
// return value.
|
// return value.
|
||||||
bool result = RenderAllMissingPagesNow();
|
bool result = RenderAllMissingPagesNow();
|
||||||
|
@ -366,13 +368,13 @@ void PrintViewManagerBase::DisconnectFromCurrentPrintJob() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::PrintingDone(bool success) {
|
void CefPrintViewManagerBase::PrintingDone(bool success) {
|
||||||
if (!print_job_.get())
|
if (!print_job_.get())
|
||||||
return;
|
return;
|
||||||
Send(new PrintMsg_PrintingDone(routing_id(), success));
|
Send(new PrintMsg_PrintingDone(routing_id(), success));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::TerminatePrintJob(bool cancel) {
|
void CefPrintViewManagerBase::TerminatePrintJob(bool cancel) {
|
||||||
if (!print_job_.get())
|
if (!print_job_.get())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -392,7 +394,7 @@ void PrintViewManagerBase::TerminatePrintJob(bool cancel) {
|
||||||
ReleasePrintJob();
|
ReleasePrintJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::ReleasePrintJob() {
|
void CefPrintViewManagerBase::ReleasePrintJob() {
|
||||||
if (!print_job_.get())
|
if (!print_job_.get())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -405,7 +407,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||||
print_job_ = NULL;
|
print_job_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintViewManagerBase::RunInnerMessageLoop() {
|
bool CefPrintViewManagerBase::RunInnerMessageLoop() {
|
||||||
// This value may actually be too low:
|
// This value may actually be too low:
|
||||||
//
|
//
|
||||||
// - If we're looping because of printer settings initialization, the premise
|
// - If we're looping because of printer settings initialization, the premise
|
||||||
|
@ -442,7 +444,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
bool CefPrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||||
if (print_job_.get())
|
if (print_job_.get())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -471,7 +473,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintViewManagerBase::PrintNowInternal(IPC::Message* message) {
|
bool CefPrintViewManagerBase::PrintNowInternal(IPC::Message* message) {
|
||||||
// Don't print / print preview interstitials or crashed tabs.
|
// Don't print / print preview interstitials or crashed tabs.
|
||||||
if (web_contents()->ShowingInterstitialPage() ||
|
if (web_contents()->ShowingInterstitialPage() ||
|
||||||
web_contents()->IsCrashed()) {
|
web_contents()->IsCrashed()) {
|
||||||
|
@ -481,7 +483,7 @@ bool PrintViewManagerBase::PrintNowInternal(IPC::Message* message) {
|
||||||
return Send(message);
|
return Send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintViewManagerBase::ReleasePrinterQuery() {
|
void CefPrintViewManagerBase::ReleasePrinterQuery() {
|
||||||
if (!cookie_)
|
if (!cookie_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,11 @@ class PrintJobWorkerOwner;
|
||||||
class PrintQueriesQueue;
|
class PrintQueriesQueue;
|
||||||
|
|
||||||
// Base class for managing the print commands for a WebContents.
|
// Base class for managing the print commands for a WebContents.
|
||||||
class PrintViewManagerBase : public content::NotificationObserver,
|
class CefPrintViewManagerBase : public content::NotificationObserver,
|
||||||
public PrintedPagesSource,
|
public PrintedPagesSource,
|
||||||
public PrintManager {
|
public PrintManager {
|
||||||
public:
|
public:
|
||||||
~PrintViewManagerBase() override;
|
~CefPrintViewManagerBase() override;
|
||||||
|
|
||||||
#if defined(ENABLE_BASIC_PRINTING)
|
#if defined(ENABLE_BASIC_PRINTING)
|
||||||
// Prints the current document immediately. Since the rendering is
|
// Prints the current document immediately. Since the rendering is
|
||||||
|
@ -50,7 +50,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||||
base::string16 RenderSourceName() override;
|
base::string16 RenderSourceName() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
explicit CefPrintViewManagerBase(content::WebContents* web_contents);
|
||||||
|
|
||||||
// Helper method for Print*Now().
|
// Helper method for Print*Now().
|
||||||
bool PrintNowInternal(IPC::Message* message);
|
bool PrintNowInternal(IPC::Message* message);
|
||||||
|
@ -153,7 +153,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||||
|
|
||||||
scoped_refptr<printing::PrintQueriesQueue> queue_;
|
scoped_refptr<printing::PrintQueriesQueue> queue_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(PrintViewManagerBase);
|
DISALLOW_COPY_AND_ASSIGN(CefPrintViewManagerBase);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace printing
|
} // namespace printing
|
||||||
|
|
|
@ -26,23 +26,23 @@ using content::BrowserThread;
|
||||||
|
|
||||||
namespace printing {
|
namespace printing {
|
||||||
|
|
||||||
PrintingMessageFilter::PrintingMessageFilter(int render_process_id)
|
CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id)
|
||||||
: content::BrowserMessageFilter(PrintMsgStart),
|
: content::BrowserMessageFilter(PrintMsgStart),
|
||||||
render_process_id_(render_process_id),
|
render_process_id_(render_process_id),
|
||||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||||
DCHECK(queue_.get());
|
DCHECK(queue_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintingMessageFilter::~PrintingMessageFilter() {
|
CefPrintingMessageFilter::~CefPrintingMessageFilter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OverrideThreadForMessage(
|
void CefPrintingMessageFilter::OverrideThreadForMessage(
|
||||||
const IPC::Message& message, BrowserThread::ID* thread) {
|
const IPC::Message& message, BrowserThread::ID* thread) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
bool CefPrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||||
bool handled = true;
|
bool handled = true;
|
||||||
IPC_BEGIN_MESSAGE_MAP(PrintingMessageFilter, message)
|
IPC_BEGIN_MESSAGE_MAP(CefPrintingMessageFilter, message)
|
||||||
IPC_MESSAGE_HANDLER(PrintHostMsg_IsPrintingEnabled, OnIsPrintingEnabled)
|
IPC_MESSAGE_HANDLER(PrintHostMsg_IsPrintingEnabled, OnIsPrintingEnabled)
|
||||||
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_GetDefaultPrintSettings,
|
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_GetDefaultPrintSettings,
|
||||||
OnGetDefaultPrintSettings)
|
OnGetDefaultPrintSettings)
|
||||||
|
@ -55,12 +55,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnIsPrintingEnabled(bool* is_enabled) {
|
void CefPrintingMessageFilter::OnIsPrintingEnabled(bool* is_enabled) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||||
*is_enabled = true;
|
*is_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
|
void CefPrintingMessageFilter::OnGetDefaultPrintSettings(
|
||||||
|
IPC::Message* reply_msg) {
|
||||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||||
#if defined(OS_LINUX)
|
#if defined(OS_LINUX)
|
||||||
// Send notification to the client.
|
// Send notification to the client.
|
||||||
|
@ -83,13 +84,13 @@ void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
|
||||||
false,
|
false,
|
||||||
DEFAULT_MARGINS,
|
DEFAULT_MARGINS,
|
||||||
false,
|
false,
|
||||||
base::Bind(&PrintingMessageFilter::OnGetDefaultPrintSettingsReply,
|
base::Bind(&CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply,
|
||||||
this,
|
this,
|
||||||
printer_query,
|
printer_query,
|
||||||
reply_msg));
|
reply_msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
void CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||||
scoped_refptr<PrinterQuery> printer_query,
|
scoped_refptr<PrinterQuery> printer_query,
|
||||||
IPC::Message* reply_msg) {
|
IPC::Message* reply_msg) {
|
||||||
PrintMsg_Print_Params params;
|
PrintMsg_Print_Params params;
|
||||||
|
@ -113,7 +114,7 @@ void PrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnScriptedPrint(
|
void CefPrintingMessageFilter::OnScriptedPrint(
|
||||||
const PrintHostMsg_ScriptedPrint_Params& params,
|
const PrintHostMsg_ScriptedPrint_Params& params,
|
||||||
IPC::Message* reply_msg) {
|
IPC::Message* reply_msg) {
|
||||||
scoped_refptr<PrinterQuery> printer_query =
|
scoped_refptr<PrinterQuery> printer_query =
|
||||||
|
@ -128,13 +129,13 @@ void PrintingMessageFilter::OnScriptedPrint(
|
||||||
params.has_selection,
|
params.has_selection,
|
||||||
params.margin_type,
|
params.margin_type,
|
||||||
params.is_scripted,
|
params.is_scripted,
|
||||||
base::Bind(&PrintingMessageFilter::OnScriptedPrintReply,
|
base::Bind(&CefPrintingMessageFilter::OnScriptedPrintReply,
|
||||||
this,
|
this,
|
||||||
printer_query,
|
printer_query,
|
||||||
reply_msg));
|
reply_msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnScriptedPrintReply(
|
void CefPrintingMessageFilter::OnScriptedPrintReply(
|
||||||
scoped_refptr<PrinterQuery> printer_query,
|
scoped_refptr<PrinterQuery> printer_query,
|
||||||
IPC::Message* reply_msg) {
|
IPC::Message* reply_msg) {
|
||||||
PrintMsg_PrintPages_Params params;
|
PrintMsg_PrintPages_Params params;
|
||||||
|
@ -160,7 +161,7 @@ void PrintingMessageFilter::OnScriptedPrintReply(
|
||||||
if (base::StringToInt(device_name, &file_descriptor)) {
|
if (base::StringToInt(device_name, &file_descriptor)) {
|
||||||
BrowserThread::PostTask(
|
BrowserThread::PostTask(
|
||||||
BrowserThread::UI, FROM_HERE,
|
BrowserThread::UI, FROM_HERE,
|
||||||
base::Bind(&PrintingMessageFilter::UpdateFileDescriptor, this,
|
base::Bind(&CefPrintingMessageFilter::UpdateFileDescriptor, this,
|
||||||
routing_id, file_descriptor));
|
routing_id, file_descriptor));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -170,7 +171,7 @@ void PrintingMessageFilter::OnScriptedPrintReply(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnUpdatePrintSettings(
|
void CefPrintingMessageFilter::OnUpdatePrintSettings(
|
||||||
int document_cookie, const base::DictionaryValue& job_settings,
|
int document_cookie, const base::DictionaryValue& job_settings,
|
||||||
IPC::Message* reply_msg) {
|
IPC::Message* reply_msg) {
|
||||||
std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
|
std::unique_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
|
||||||
|
@ -191,11 +192,11 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
|
||||||
}
|
}
|
||||||
printer_query->SetSettings(
|
printer_query->SetSettings(
|
||||||
std::move(new_settings),
|
std::move(new_settings),
|
||||||
base::Bind(&PrintingMessageFilter::OnUpdatePrintSettingsReply, this,
|
base::Bind(&CefPrintingMessageFilter::OnUpdatePrintSettingsReply, this,
|
||||||
printer_query, reply_msg));
|
printer_query, reply_msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
void CefPrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||||
scoped_refptr<PrinterQuery> printer_query,
|
scoped_refptr<PrinterQuery> printer_query,
|
||||||
IPC::Message* reply_msg) {
|
IPC::Message* reply_msg) {
|
||||||
PrintMsg_PrintPages_Params params;
|
PrintMsg_PrintPages_Params params;
|
||||||
|
@ -223,9 +224,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintingMessageFilter::OnCheckForCancel(int32_t preview_ui_id,
|
void CefPrintingMessageFilter::OnCheckForCancel(int32_t preview_ui_id,
|
||||||
int preview_request_id,
|
int preview_request_id,
|
||||||
bool* cancel) {
|
bool* cancel) {
|
||||||
*cancel = false;
|
*cancel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,9 @@ class PrinterQuery;
|
||||||
|
|
||||||
// This class filters out incoming printing related IPC messages for the
|
// This class filters out incoming printing related IPC messages for the
|
||||||
// renderer process on the IPC thread.
|
// renderer process on the IPC thread.
|
||||||
class PrintingMessageFilter : public content::BrowserMessageFilter {
|
class CefPrintingMessageFilter : public content::BrowserMessageFilter {
|
||||||
public:
|
public:
|
||||||
explicit PrintingMessageFilter(int render_process_id);
|
explicit CefPrintingMessageFilter(int render_process_id);
|
||||||
|
|
||||||
// content::BrowserMessageFilter methods.
|
// content::BrowserMessageFilter methods.
|
||||||
void OverrideThreadForMessage(const IPC::Message& message,
|
void OverrideThreadForMessage(const IPC::Message& message,
|
||||||
|
@ -47,7 +47,7 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||||
bool OnMessageReceived(const IPC::Message& message) override;
|
bool OnMessageReceived(const IPC::Message& message) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~PrintingMessageFilter() override;
|
~CefPrintingMessageFilter() override;
|
||||||
|
|
||||||
// GetPrintSettingsForRenderView must be called via PostTask and
|
// GetPrintSettingsForRenderView must be called via PostTask and
|
||||||
// base::Bind. Collapse the settings-specific params into a
|
// base::Bind. Collapse the settings-specific params into a
|
||||||
|
@ -88,7 +88,7 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||||
|
|
||||||
scoped_refptr<PrintQueriesQueue> queue_;
|
scoped_refptr<PrintQueriesQueue> queue_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(PrintingMessageFilter);
|
DISALLOW_COPY_AND_ASSIGN(CefPrintingMessageFilter);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace printing
|
} // namespace printing
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "base/logging.h"
|
|
||||||
#include "content/public/browser/browser_context.h"
|
|
||||||
|
|
||||||
// Used by chrome/browser/spellchecker/spellcheck_factory.cc.
|
|
||||||
namespace chrome {
|
|
||||||
|
|
||||||
// Returns the original browser context even for Incognito contexts.
|
|
||||||
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
|
|
||||||
content::BrowserContext* context) {
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns non-NULL even for Incognito contexts so that a separate
|
|
||||||
// instance of a service is created for the Incognito context.
|
|
||||||
content::BrowserContext* GetBrowserContextOwnInstanceInIncognito(
|
|
||||||
content::BrowserContext* context) {
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace chrome
|
|
|
@ -55,8 +55,8 @@ void SendExecuteMimeTypeHandlerEvent(
|
||||||
|
|
||||||
content::BrowserContext* browser_context = web_contents->GetBrowserContext();
|
content::BrowserContext* browser_context = web_contents->GetBrowserContext();
|
||||||
|
|
||||||
extensions::StreamsPrivateAPI* streams_private =
|
extensions::CefStreamsPrivateAPI* streams_private =
|
||||||
extensions::StreamsPrivateAPI::Get(browser_context);
|
extensions::CefStreamsPrivateAPI::Get(browser_context);
|
||||||
if (!streams_private)
|
if (!streams_private)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,3 @@
|
||||||
// Multiply-included file, hence no include guard.
|
// Multiply-included file, hence no include guard.
|
||||||
|
|
||||||
#include "libcef/common/cef_messages.h"
|
#include "libcef/common/cef_messages.h"
|
||||||
|
|
||||||
#include "chrome/common/chrome_utility_messages.h"
|
|
||||||
#include "chrome/common/spellcheck_messages.h"
|
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
#include "chrome/common/chrome_utility_printing_messages.h"
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ json_schema_api("api") {
|
||||||
schemas = true
|
schemas = true
|
||||||
bundle = true
|
bundle = true
|
||||||
configs = [ "//build/config:precompiled_headers" ]
|
configs = [ "//build/config:precompiled_headers" ]
|
||||||
bundle_name = "Chrome"
|
bundle_name = "Cef"
|
||||||
|
|
||||||
deps = schema_dependencies
|
deps = schema_dependencies
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ json_schema_api("api_registration") {
|
||||||
impl_dir = "//cef/libcef/browser/extensions/api"
|
impl_dir = "//cef/libcef/browser/extensions/api"
|
||||||
bundle_registration = true
|
bundle_registration = true
|
||||||
configs = [ "//build/config:precompiled_headers" ]
|
configs = [ "//build/config:precompiled_headers" ]
|
||||||
bundle_name = "Chrome"
|
bundle_name = "Cef"
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":api",
|
":api",
|
||||||
|
|
|
@ -11,6 +11,6 @@ sources = gypi_values.schema_files
|
||||||
|
|
||||||
uncompiled_sources = gypi_values.non_compiled_schema_files
|
uncompiled_sources = gypi_values.non_compiled_schema_files
|
||||||
|
|
||||||
root_namespace = "extensions::api::%(namespace)s"
|
root_namespace = "extensions::api::cef::%(namespace)s"
|
||||||
schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::%(namespace)s"
|
schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::cef::%(namespace)s"
|
||||||
schema_dependencies = [ "//extensions/common/api" ]
|
schema_dependencies = [ "//extensions/common/api" ]
|
||||||
|
|
|
@ -15,9 +15,8 @@
|
||||||
|
|
||||||
'chromium_code': 1,
|
'chromium_code': 1,
|
||||||
'cc_dir': 'cef/libcef/common/extensions/api',
|
'cc_dir': 'cef/libcef/common/extensions/api',
|
||||||
# Match the Chrome namespace and bundle name to minimize code changes.
|
'root_namespace': 'extensions::api::cef::%(namespace)s',
|
||||||
'root_namespace': 'extensions::api::%(namespace)s',
|
'bundle_name': 'Cef',
|
||||||
'bundle_name': 'Chrome',
|
|
||||||
'impl_dir_': 'cef/libcef/browser/extensions/api',
|
'impl_dir_': 'cef/libcef/browser/extensions/api',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "base/lazy_instance.h"
|
#include "base/lazy_instance.h"
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
|
#include "cef/grit/cef_resources.h"
|
||||||
#include "cef/libcef/common/extensions/api/generated_schemas.h"
|
#include "cef/libcef/common/extensions/api/generated_schemas.h"
|
||||||
#include "extensions/common/api/generated_schemas.h"
|
#include "extensions/common/api/generated_schemas.h"
|
||||||
#include "extensions/common/common_manifest_handlers.h"
|
#include "extensions/common/common_manifest_handlers.h"
|
||||||
|
@ -27,8 +28,7 @@
|
||||||
#include "extensions/common/permissions/permissions_info.h"
|
#include "extensions/common/permissions/permissions_info.h"
|
||||||
#include "extensions/common/permissions/permissions_provider.h"
|
#include "extensions/common/permissions/permissions_provider.h"
|
||||||
#include "extensions/common/url_pattern_set.h"
|
#include "extensions/common/url_pattern_set.h"
|
||||||
#include "grit/cef_resources.h"
|
#include "extensions/grit/extensions_resources.h"
|
||||||
#include "grit/extensions_resources.h"
|
|
||||||
|
|
||||||
namespace extensions {
|
namespace extensions {
|
||||||
|
|
||||||
|
@ -179,14 +179,14 @@ bool CefExtensionsClient::IsScriptableURL(const GURL& url,
|
||||||
bool CefExtensionsClient::IsAPISchemaGenerated(
|
bool CefExtensionsClient::IsAPISchemaGenerated(
|
||||||
const std::string& name) const {
|
const std::string& name) const {
|
||||||
return api::GeneratedSchemas::IsGenerated(name) ||
|
return api::GeneratedSchemas::IsGenerated(name) ||
|
||||||
api::ChromeGeneratedSchemas::IsGenerated(name);
|
api::cef::CefGeneratedSchemas::IsGenerated(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
base::StringPiece CefExtensionsClient::GetAPISchema(
|
base::StringPiece CefExtensionsClient::GetAPISchema(
|
||||||
const std::string& name) const {
|
const std::string& name) const {
|
||||||
// Schema for CEF-only APIs.
|
// Schema for CEF-only APIs.
|
||||||
if (api::ChromeGeneratedSchemas::IsGenerated(name))
|
if (api::cef::CefGeneratedSchemas::IsGenerated(name))
|
||||||
return api::ChromeGeneratedSchemas::Get(name);
|
return api::cef::CefGeneratedSchemas::Get(name);
|
||||||
|
|
||||||
// Core extensions APIs.
|
// Core extensions APIs.
|
||||||
return api::GeneratedSchemas::Get(name);
|
return api::GeneratedSchemas::Get(name);
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "chrome/common/pepper_permission_util.h"
|
#include "chrome/common/pepper_permission_util.h"
|
||||||
#include "chrome/common/url_constants.h"
|
#include "chrome/common/url_constants.h"
|
||||||
#include "chrome/grit/generated_resources.h"
|
#include "chrome/grit/generated_resources.h"
|
||||||
|
#include "chrome/grit/renderer_resources.h"
|
||||||
#include "chrome/renderer/content_settings_observer.h"
|
#include "chrome/renderer/content_settings_observer.h"
|
||||||
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
||||||
#include "chrome/renderer/pepper/chrome_pdf_print_client.h"
|
#include "chrome/renderer/pepper/chrome_pdf_print_client.h"
|
||||||
|
@ -657,16 +658,6 @@ void CefContentRendererClient::WillDestroyCurrentMessageLoop() {
|
||||||
single_process_cleanup_complete_ = true;
|
single_process_cleanup_complete_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
bool CefContentRendererClient::IsExtensionOrSharedModuleWhitelisted(
|
|
||||||
const GURL& url, const std::set<std::string>& whitelist) {
|
|
||||||
DCHECK(extensions::ExtensionsEnabled());
|
|
||||||
const extensions::ExtensionSet* extension_set =
|
|
||||||
extensions::RendererExtensionRegistry::Get()->GetMainThreadExtensionSet();
|
|
||||||
return chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set,
|
|
||||||
whitelist);
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
blink::WebPlugin* CefContentRendererClient::CreatePlugin(
|
blink::WebPlugin* CefContentRendererClient::CreatePlugin(
|
||||||
content::RenderFrame* render_frame,
|
content::RenderFrame* render_frame,
|
||||||
|
|
|
@ -135,9 +135,6 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
||||||
// MessageLoop::DestructionObserver implementation.
|
// MessageLoop::DestructionObserver implementation.
|
||||||
void WillDestroyCurrentMessageLoop() override;
|
void WillDestroyCurrentMessageLoop() override;
|
||||||
|
|
||||||
static bool IsExtensionOrSharedModuleWhitelisted(
|
|
||||||
const GURL& url, const std::set<std::string>& whitelist);
|
|
||||||
|
|
||||||
static blink::WebPlugin* CreatePlugin(
|
static blink::WebPlugin* CreatePlugin(
|
||||||
content::RenderFrame* render_frame,
|
content::RenderFrame* render_frame,
|
||||||
blink::WebLocalFrame* frame,
|
blink::WebLocalFrame* frame,
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
using media::KeySystemProperties;
|
using media::KeySystemProperties;
|
||||||
using media::SupportedCodecs;
|
using media::SupportedCodecs;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
#if defined(ENABLE_PEPPER_CDMS)
|
#if defined(ENABLE_PEPPER_CDMS)
|
||||||
static bool IsPepperCdmAvailable(
|
bool IsPepperCdmAvailable(
|
||||||
const std::string& pepper_type,
|
const std::string& pepper_type,
|
||||||
std::vector<base::string16>* additional_param_names,
|
std::vector<base::string16>* additional_param_names,
|
||||||
std::vector<base::string16>* additional_param_values) {
|
std::vector<base::string16>* additional_param_values) {
|
||||||
|
@ -74,7 +76,7 @@ void GetSupportedCodecsForPepperCdm(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddPepperBasedWidevine(
|
void AddPepperBasedWidevine(
|
||||||
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
|
std::vector<std::unique_ptr<KeySystemProperties>>* concrete_key_systems) {
|
||||||
#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
#if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
|
||||||
Version glibc_version(gnu_get_libc_version());
|
Version glibc_version(gnu_get_libc_version());
|
||||||
|
@ -135,6 +137,8 @@ static void AddPepperBasedWidevine(
|
||||||
#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
||||||
#endif // defined(ENABLE_PEPPER_CDMS)
|
#endif // defined(ENABLE_PEPPER_CDMS)
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
void AddCefKeySystems(
|
void AddCefKeySystems(
|
||||||
std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
|
std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
|
||||||
#if defined(ENABLE_PEPPER_CDMS)
|
#if defined(ENABLE_PEPPER_CDMS)
|
||||||
|
|
|
@ -1,222 +0,0 @@
|
||||||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "chrome/renderer/pepper/pepper_uma_host.h"
|
|
||||||
|
|
||||||
#include "libcef/common/cef_messages.h"
|
|
||||||
#include "libcef/common/content_client.h"
|
|
||||||
#include "libcef/renderer/content_renderer_client.h"
|
|
||||||
|
|
||||||
#include "base/metrics/histogram.h"
|
|
||||||
#include "base/sha1.h"
|
|
||||||
#include "base/strings/string_number_conversions.h"
|
|
||||||
#include "chrome/common/chrome_switches.h"
|
|
||||||
#include "content/public/renderer/pepper_plugin_instance.h"
|
|
||||||
#include "content/public/renderer/render_thread.h"
|
|
||||||
#include "content/public/renderer/renderer_ppapi_host.h"
|
|
||||||
#include "ppapi/c/pp_errors.h"
|
|
||||||
#include "ppapi/host/dispatch_host_message.h"
|
|
||||||
#include "ppapi/host/host_message_context.h"
|
|
||||||
#include "ppapi/host/ppapi_host.h"
|
|
||||||
#include "ppapi/proxy/ppapi_messages.h"
|
|
||||||
|
|
||||||
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
|
||||||
|
|
||||||
#if defined(ENABLE_EXTENSIONS)
|
|
||||||
#include "extensions/common/constants.h"
|
|
||||||
#include "extensions/common/extension.h"
|
|
||||||
#endif // defined(ENABLE_EXTENSIONS)
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const char* const kPredefinedAllowedUMAOrigins[] = {
|
|
||||||
"6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see http://crbug.com/317833
|
|
||||||
"4EB74897CB187C7633357C2FE832E0AD6A44883A", // see http://crbug.com/317833
|
|
||||||
"9E527CDA9D7C50844E8A5DB964A54A640AE48F98", // see http://crbug.com/521189
|
|
||||||
"DF52618D0B040D8A054D8348D2E84DDEEE5974E7", // see http://crbug.com/521189
|
|
||||||
"269D721F163E587BC53C6F83553BF9CE2BB143CD", // see http://crbug.com/521189
|
|
||||||
"6B55A5329E3F1F30F6032BDB20B2EB4378DBF767", // see http://crbug.com/521189
|
|
||||||
"C449A798C495E6CF7D6AF10162113D564E67AD12", // see http://crbug.com/521189
|
|
||||||
"01E9FFA9A8F3C18271FE91BEE46207F3B81755CC", // see http://crbug.com/521189
|
|
||||||
"97B23E01B2AA064E8332EE43A7A85C628AADC3F2", // see http://crbug.com/521189
|
|
||||||
};
|
|
||||||
|
|
||||||
const char* const kWhitelistedHistogramPrefixes[] = {
|
|
||||||
"22F67DA2061FFC4DC9A4974036348D9C38C22919", // see http://crbug.com/390221
|
|
||||||
"3FEA4650221C5E6C39CF5C5C9F464FF74EAB6CE1", // see http://crbug.com/521189
|
|
||||||
};
|
|
||||||
|
|
||||||
const char* const kWhitelistedPluginBaseNames[] = {
|
|
||||||
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
|
|
||||||
kWidevineCdmAdapterFileName, // see http://crbug.com/368743
|
|
||||||
// and http://crbug.com/410630
|
|
||||||
#endif
|
|
||||||
CefContentClient::kPDFPluginPath,
|
|
||||||
};
|
|
||||||
|
|
||||||
std::string HashPrefix(const std::string& histogram) {
|
|
||||||
const std::string id_hash =
|
|
||||||
base::SHA1HashString(histogram.substr(0, histogram.find('.')));
|
|
||||||
DCHECK_EQ(id_hash.length(), base::kSHA1Length);
|
|
||||||
return base::HexEncode(id_hash.c_str(), id_hash.length());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
PepperUMAHost::PepperUMAHost(content::RendererPpapiHost* host,
|
|
||||||
PP_Instance instance,
|
|
||||||
PP_Resource resource)
|
|
||||||
: ResourceHost(host->GetPpapiHost(), instance, resource),
|
|
||||||
document_url_(host->GetDocumentURL(instance)),
|
|
||||||
is_plugin_in_process_(host->IsRunningInProcess()) {
|
|
||||||
if (host->GetPluginInstance(instance)) {
|
|
||||||
plugin_base_name_ =
|
|
||||||
host->GetPluginInstance(instance)->GetModulePath().BaseName();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = 0; i < arraysize(kPredefinedAllowedUMAOrigins); ++i)
|
|
||||||
allowed_origins_.insert(kPredefinedAllowedUMAOrigins[i]);
|
|
||||||
for (size_t i = 0; i < arraysize(kWhitelistedHistogramPrefixes); ++i)
|
|
||||||
allowed_histogram_prefixes_.insert(kWhitelistedHistogramPrefixes[i]);
|
|
||||||
for (size_t i = 0; i < arraysize(kWhitelistedPluginBaseNames); ++i)
|
|
||||||
allowed_plugin_base_names_.insert(kWhitelistedPluginBaseNames[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
PepperUMAHost::~PepperUMAHost() {}
|
|
||||||
|
|
||||||
int32_t PepperUMAHost::OnResourceMessageReceived(
|
|
||||||
const IPC::Message& msg,
|
|
||||||
ppapi::host::HostMessageContext* context) {
|
|
||||||
PPAPI_BEGIN_MESSAGE_MAP(PepperUMAHost, msg)
|
|
||||||
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_UMA_HistogramCustomTimes,
|
|
||||||
OnHistogramCustomTimes)
|
|
||||||
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_UMA_HistogramCustomCounts,
|
|
||||||
OnHistogramCustomCounts)
|
|
||||||
PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_UMA_HistogramEnumeration,
|
|
||||||
OnHistogramEnumeration)
|
|
||||||
PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(
|
|
||||||
PpapiHostMsg_UMA_IsCrashReportingEnabled, OnIsCrashReportingEnabled)
|
|
||||||
PPAPI_END_MESSAGE_MAP()
|
|
||||||
return PP_ERROR_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PepperUMAHost::IsPluginWhitelisted() {
|
|
||||||
#if defined(ENABLE_EXTENSIONS)
|
|
||||||
return CefContentRendererClient::IsExtensionOrSharedModuleWhitelisted(
|
|
||||||
document_url_, allowed_origins_);
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PepperUMAHost::IsHistogramAllowed(const std::string& histogram) {
|
|
||||||
if (is_plugin_in_process_ && histogram.find("NaCl.") == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsPluginWhitelisted() &&
|
|
||||||
ContainsKey(allowed_histogram_prefixes_, HashPrefix(histogram))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ContainsKey(allowed_plugin_base_names_,
|
|
||||||
plugin_base_name_.MaybeAsASCII())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG(ERROR) << "Host or histogram name is not allowed to use the UMA API.";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RETURN_IF_BAD_ARGS(_min, _max, _buckets) \
|
|
||||||
do { \
|
|
||||||
if (_min >= _max || _buckets <= 1) \
|
|
||||||
return PP_ERROR_BADARGUMENT; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
int32_t PepperUMAHost::OnHistogramCustomTimes(
|
|
||||||
ppapi::host::HostMessageContext* context,
|
|
||||||
const std::string& name,
|
|
||||||
int64_t sample,
|
|
||||||
int64_t min,
|
|
||||||
int64_t max,
|
|
||||||
uint32_t bucket_count) {
|
|
||||||
if (!IsHistogramAllowed(name)) {
|
|
||||||
return PP_ERROR_NOACCESS;
|
|
||||||
}
|
|
||||||
RETURN_IF_BAD_ARGS(min, max, bucket_count);
|
|
||||||
|
|
||||||
base::HistogramBase* counter = base::Histogram::FactoryTimeGet(
|
|
||||||
name,
|
|
||||||
base::TimeDelta::FromMilliseconds(min),
|
|
||||||
base::TimeDelta::FromMilliseconds(max),
|
|
||||||
bucket_count,
|
|
||||||
base::HistogramBase::kUmaTargetedHistogramFlag);
|
|
||||||
// The histogram can be NULL if it is constructed with bad arguments. Ignore
|
|
||||||
// that data for this API. An error message will be logged.
|
|
||||||
if (counter)
|
|
||||||
counter->AddTime(base::TimeDelta::FromMilliseconds(sample));
|
|
||||||
return PP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t PepperUMAHost::OnHistogramCustomCounts(
|
|
||||||
ppapi::host::HostMessageContext* context,
|
|
||||||
const std::string& name,
|
|
||||||
int32_t sample,
|
|
||||||
int32_t min,
|
|
||||||
int32_t max,
|
|
||||||
uint32_t bucket_count) {
|
|
||||||
if (!IsHistogramAllowed(name)) {
|
|
||||||
return PP_ERROR_NOACCESS;
|
|
||||||
}
|
|
||||||
RETURN_IF_BAD_ARGS(min, max, bucket_count);
|
|
||||||
|
|
||||||
base::HistogramBase* counter = base::Histogram::FactoryGet(
|
|
||||||
name,
|
|
||||||
min,
|
|
||||||
max,
|
|
||||||
bucket_count,
|
|
||||||
base::HistogramBase::kUmaTargetedHistogramFlag);
|
|
||||||
// The histogram can be NULL if it is constructed with bad arguments. Ignore
|
|
||||||
// that data for this API. An error message will be logged.
|
|
||||||
if (counter)
|
|
||||||
counter->Add(sample);
|
|
||||||
return PP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t PepperUMAHost::OnHistogramEnumeration(
|
|
||||||
ppapi::host::HostMessageContext* context,
|
|
||||||
const std::string& name,
|
|
||||||
int32_t sample,
|
|
||||||
int32_t boundary_value) {
|
|
||||||
if (!IsHistogramAllowed(name)) {
|
|
||||||
return PP_ERROR_NOACCESS;
|
|
||||||
}
|
|
||||||
RETURN_IF_BAD_ARGS(0, boundary_value, boundary_value + 1);
|
|
||||||
|
|
||||||
base::HistogramBase* counter = base::LinearHistogram::FactoryGet(
|
|
||||||
name,
|
|
||||||
1,
|
|
||||||
boundary_value,
|
|
||||||
boundary_value + 1,
|
|
||||||
base::HistogramBase::kUmaTargetedHistogramFlag);
|
|
||||||
// The histogram can be NULL if it is constructed with bad arguments. Ignore
|
|
||||||
// that data for this API. An error message will be logged.
|
|
||||||
if (counter)
|
|
||||||
counter->Add(sample);
|
|
||||||
return PP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t PepperUMAHost::OnIsCrashReportingEnabled(
|
|
||||||
ppapi::host::HostMessageContext* context) {
|
|
||||||
if (!IsPluginWhitelisted())
|
|
||||||
return PP_ERROR_NOACCESS;
|
|
||||||
// TODO(extensions): Chrome uses ChromeViewHostMsg_IsCrashReportingEnabled to
|
|
||||||
// retrieve this value. Explore whether it's useful for CEF clients when crash
|
|
||||||
// reporting is enabled.
|
|
||||||
bool enabled = false;
|
|
||||||
if (enabled)
|
|
||||||
return PP_OK;
|
|
||||||
return PP_ERROR_FAILED;
|
|
||||||
}
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "chrome/grit/generated_resources.h"
|
#include "chrome/grit/generated_resources.h"
|
||||||
|
#include "chrome/grit/renderer_resources.h"
|
||||||
#include "chrome/renderer/custom_menu_commands.h"
|
#include "chrome/renderer/custom_menu_commands.h"
|
||||||
#include "components/content_settings/content/common/content_settings_messages.h"
|
#include "components/content_settings/content/common/content_settings_messages.h"
|
||||||
#include "components/strings/grit/components_strings.h"
|
#include "components/strings/grit/components_strings.h"
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "base/base64.h"
|
#include "base/base64.h"
|
||||||
#include "chrome/grit/generated_resources.h"
|
#include "chrome/grit/generated_resources.h"
|
||||||
|
#include "chrome/grit/renderer_resources.h"
|
||||||
#include "chrome/renderer/plugins/power_saver_info.h"
|
#include "chrome/renderer/plugins/power_saver_info.h"
|
||||||
#include "third_party/WebKit/public/platform/WebRect.h"
|
#include "third_party/WebKit/public/platform/WebRect.h"
|
||||||
#include "third_party/WebKit/public/web/WebElement.h"
|
#include "third_party/WebKit/public/web/WebElement.h"
|
||||||
|
|
|
@ -9,13 +9,17 @@
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/message_loop/message_loop.h"
|
#include "base/message_loop/message_loop.h"
|
||||||
|
#include "chrome/common/render_messages.h"
|
||||||
#include "content/common/devtools_messages.h"
|
#include "content/common/devtools_messages.h"
|
||||||
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/renderer/devtools/devtools_agent.h"
|
#include "content/renderer/devtools/devtools_agent.h"
|
||||||
#include "third_party/WebKit/public/platform/WebString.h"
|
#include "third_party/WebKit/public/platform/WebString.h"
|
||||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
#include "url/url_util.h"
|
#include "url/url_util.h"
|
||||||
|
|
||||||
|
using content::BrowserThread;
|
||||||
|
|
||||||
CefRenderMessageFilter::CefRenderMessageFilter()
|
CefRenderMessageFilter::CefRenderMessageFilter()
|
||||||
: sender_(NULL) {
|
: sender_(NULL) {
|
||||||
}
|
}
|
||||||
|
@ -43,11 +47,40 @@ bool CefRenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
||||||
|
|
||||||
IPC_BEGIN_MESSAGE_MAP(CefRenderMessageFilter, message)
|
IPC_BEGIN_MESSAGE_MAP(CefRenderMessageFilter, message)
|
||||||
IPC_MESSAGE_HANDLER(DevToolsAgentMsg_Attach, OnDevToolsAgentAttach)
|
IPC_MESSAGE_HANDLER(DevToolsAgentMsg_Attach, OnDevToolsAgentAttach)
|
||||||
|
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_IsCrashReportingEnabled,
|
||||||
|
OnIsCrashReportingEnabled)
|
||||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||||
IPC_END_MESSAGE_MAP()
|
IPC_END_MESSAGE_MAP()
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Based on BrowserMessageFilter::Send.
|
||||||
|
bool CefRenderMessageFilter::Send(IPC::Message* message) {
|
||||||
|
if (message->is_sync()) {
|
||||||
|
// We don't support sending synchronous messages from the browser. If we
|
||||||
|
// really needed it, we can make this class derive from SyncMessageFilter
|
||||||
|
// but it seems better to not allow sending synchronous messages from the
|
||||||
|
// browser, since it might allow a corrupt/malicious renderer to hang us.
|
||||||
|
NOTREACHED() << "Can't send sync message through CefRenderMessageFilter!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
|
||||||
|
BrowserThread::PostTask(
|
||||||
|
BrowserThread::IO,
|
||||||
|
FROM_HERE,
|
||||||
|
base::Bind(base::IgnoreResult(&CefRenderMessageFilter::Send), this,
|
||||||
|
message));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sender_)
|
||||||
|
return sender_->Send(message);
|
||||||
|
|
||||||
|
delete message;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CefRenderMessageFilter::OnDevToolsAgentAttach(
|
void CefRenderMessageFilter::OnDevToolsAgentAttach(
|
||||||
const std::string& host_id, int session_id) {
|
const std::string& host_id, int session_id) {
|
||||||
CEF_POST_TASK_RT(
|
CEF_POST_TASK_RT(
|
||||||
|
@ -60,6 +93,12 @@ void CefRenderMessageFilter::OnDevToolsAgentDetach(int32_t routing_id) {
|
||||||
routing_id));
|
routing_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) {
|
||||||
|
// TODO(cef): Explore whether it's useful for CEF clients to report when crash
|
||||||
|
// reporting is enabled.
|
||||||
|
*enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
void CefRenderMessageFilter::OnDevToolsAgentAttach_RT() {
|
void CefRenderMessageFilter::OnDevToolsAgentAttach_RT() {
|
||||||
CEF_REQUIRE_RT();
|
CEF_REQUIRE_RT();
|
||||||
CefContentRendererClient::Get()->DevToolsAgentAttached();
|
CefContentRendererClient::Get()->DevToolsAgentAttached();
|
||||||
|
@ -83,3 +122,4 @@ void CefRenderMessageFilter::OnDevToolsAgentDetach_RT(int32_t routing_id) {
|
||||||
|
|
||||||
CefContentRendererClient::Get()->DevToolsAgentDetached();
|
CefContentRendererClient::Get()->DevToolsAgentDetached();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,13 @@ class CefRenderMessageFilter : public IPC::MessageFilter {
|
||||||
void OnFilterRemoved() override;
|
void OnFilterRemoved() override;
|
||||||
bool OnMessageReceived(const IPC::Message& message) override;
|
bool OnMessageReceived(const IPC::Message& message) override;
|
||||||
|
|
||||||
|
bool Send(IPC::Message* message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Message handlers called on the IO thread.
|
// Message handlers called on the IO thread.
|
||||||
void OnDevToolsAgentAttach(const std::string& host_id, int session_id);
|
void OnDevToolsAgentAttach(const std::string& host_id, int session_id);
|
||||||
void OnDevToolsAgentDetach(int32_t routing_id);
|
void OnDevToolsAgentDetach(int32_t routing_id);
|
||||||
|
void OnIsCrashReportingEnabled(bool* enabled);
|
||||||
|
|
||||||
void OnDevToolsAgentAttach_RT();
|
void OnDevToolsAgentAttach_RT();
|
||||||
void OnDevToolsAgentDetach_RT(int32_t routing_id);
|
void OnDevToolsAgentDetach_RT(int32_t routing_id);
|
||||||
|
|
|
@ -2363,13 +2363,9 @@ CefV8StackFrameImpl::CefV8StackFrameImpl(
|
||||||
is_constructor_(false) {
|
is_constructor_(false) {
|
||||||
if (handle.IsEmpty())
|
if (handle.IsEmpty())
|
||||||
return;
|
return;
|
||||||
GetCefString(v8::Local<v8::String>::Cast(handle->GetScriptName()),
|
GetCefString(handle->GetScriptName(), script_name_);
|
||||||
script_name_);
|
GetCefString(handle->GetScriptNameOrSourceURL(), script_name_or_source_url_);
|
||||||
GetCefString(
|
GetCefString(handle->GetFunctionName(), function_name_);
|
||||||
v8::Local<v8::String>::Cast(handle->GetScriptNameOrSourceURL()),
|
|
||||||
script_name_or_source_url_);
|
|
||||||
GetCefString(v8::Local<v8::String>::Cast(handle->GetFunctionName()),
|
|
||||||
function_name_);
|
|
||||||
line_number_ = handle->GetLineNumber();
|
line_number_ = handle->GetLineNumber();
|
||||||
column_ = handle->GetColumn();
|
column_ = handle->GetColumn();
|
||||||
is_eval_ = handle->IsEval();
|
is_eval_ = handle->IsEval();
|
||||||
|
|
|
@ -15,25 +15,6 @@
|
||||||
|
|
||||||
<!-- Features specific to CEF. -->
|
<!-- Features specific to CEF. -->
|
||||||
<include name="IDR_CEF_EXTENSION_API_FEATURES" file="..\common\extensions\api\_api_features.json" type="BINDATA" />
|
<include name="IDR_CEF_EXTENSION_API_FEATURES" file="..\common\extensions\api\_api_features.json" type="BINDATA" />
|
||||||
|
|
||||||
<!-- Manifest files for built-in extensions. -->
|
|
||||||
<include name="IDR_PDF_MANIFEST" file="..\..\..\chrome\browser\resources\pdf\manifest.json" type="BINDATA" />
|
|
||||||
|
|
||||||
<!-- Plugin placeholders. -->
|
|
||||||
<include name="IDR_BLOCKED_PLUGIN_HTML" file="..\..\..\chrome\renderer\resources\plugins\blocked_plugin.html" flattenhtml="true" type="BINDATA" />
|
|
||||||
<include name="IDR_PLUGIN_POSTER_HTML" file="..\..\..\chrome\renderer\resources\plugins\plugin_poster.html" flattenhtml="true" type="BINDATA" />
|
|
||||||
|
|
||||||
<!-- Plugin finder. -->
|
|
||||||
<if expr="is_win">
|
|
||||||
<include name="IDR_PLUGIN_DB_JSON" file="..\..\..\chrome\browser\resources\plugin_metadata\plugins_win.json" type="BINDATA" />
|
|
||||||
</if>
|
|
||||||
<if expr="is_macosx">
|
|
||||||
<include name="IDR_PLUGIN_DB_JSON" file="..\..\..\chrome\browser\resources\plugin_metadata\plugins_mac.json" type="BINDATA" />
|
|
||||||
</if>
|
|
||||||
<if expr="desktop_linux or (is_android and enable_plugins)">
|
|
||||||
<include name="IDR_PLUGIN_DB_JSON" file="..\..\..\chrome\browser\resources\plugin_metadata\plugins_linux.json" type="BINDATA" />
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</includes>
|
</includes>
|
||||||
</release>
|
</release>
|
||||||
</grit>
|
</grit>
|
||||||
|
|
|
@ -104,151 +104,6 @@ need to be translated for each locale.-->
|
||||||
<output filename="cef_strings_zh-CN.pak" type="data_package" lang="zh-CN" />
|
<output filename="cef_strings_zh-CN.pak" type="data_package" lang="zh-CN" />
|
||||||
<output filename="cef_strings_zh-TW.pak" type="data_package" lang="zh-TW" />
|
<output filename="cef_strings_zh-TW.pak" type="data_package" lang="zh-TW" />
|
||||||
</outputs>
|
</outputs>
|
||||||
<translations>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_am.xtb" lang="am" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ar.xtb" lang="ar" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ast.xtb" lang="ast" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_bg.xtb" lang="bg" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_bn.xtb" lang="bn" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_bs.xtb" lang="bs" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ca.xtb" lang="ca" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ca-valencia.xtb" lang="ca@valencia" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_cs.xtb" lang="cs" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_da.xtb" lang="da" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_de.xtb" lang="de" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_el.xtb" lang="el" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_en-AU.xtb" lang="en-AU" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_en-GB.xtb" lang="en-GB" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_eo.xtb" lang="eo" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_es.xtb" lang="es" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_es-419.xtb" lang="es-419" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_et.xtb" lang="et" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_eu.xtb" lang="eu" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_fa.xtb" lang="fa" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_fi.xtb" lang="fi" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_fil.xtb" lang="fil" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_fr.xtb" lang="fr" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_gl.xtb" lang="gl" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_gu.xtb" lang="gu" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_hi.xtb" lang="hi" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_hr.xtb" lang="hr" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_hu.xtb" lang="hu" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_hy.xtb" lang="hy" />
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ia.xtb" lang="ia" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_id.xtb" lang="id" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_it.xtb" lang="it" />
|
|
||||||
<!-- The translation console uses 'iw' for Hebrew, but we use 'he'. -->
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_iw.xtb" lang="he" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ja.xtb" lang="ja" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ka.xtb" lang="ka" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_kn.xtb" lang="kn" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ko.xtb" lang="ko" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ku.xtb" lang="ku" />
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_kw.xtb" lang="kw" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_lt.xtb" lang="lt" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_lv.xtb" lang="lv" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ml.xtb" lang="ml" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_mr.xtb" lang="mr" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ms.xtb" lang="ms" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_nl.xtb" lang="nl" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_no.xtb" lang="no" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_pl.xtb" lang="pl" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_pt-BR.xtb" lang="pt-BR" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_pt-PT.xtb" lang="pt-PT" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ro.xtb" lang="ro" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ru.xtb" lang="ru" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_sk.xtb" lang="sk" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_sl.xtb" lang="sl" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_sr.xtb" lang="sr" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_sv.xtb" lang="sv" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_sw.xtb" lang="sw" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_ta.xtb" lang="ta" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_te.xtb" lang="te" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_th.xtb" lang="th" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_tr.xtb" lang="tr" />
|
|
||||||
<if expr="use_third_party_translations">
|
|
||||||
<file path="../../../third_party/launchpad_translations/generated_resources_ug.xtb" lang="ug" />
|
|
||||||
</if>
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_uk.xtb" lang="uk" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_vi.xtb" lang="vi" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_zh-CN.xtb" lang="zh-CN" />
|
|
||||||
<file path="../../../chrome/app/resources/generated_resources_zh-TW.xtb" lang="zh-TW" />
|
|
||||||
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_am.xtb" lang="am" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ar.xtb" lang="ar" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_bg.xtb" lang="bg" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_bn.xtb" lang="bn" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ca.xtb" lang="ca" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_cs.xtb" lang="cs" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_da.xtb" lang="da" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_de.xtb" lang="de" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_el.xtb" lang="el" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_en-GB.xtb" lang="en-GB" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_es.xtb" lang="es" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_es-419.xtb" lang="es-419" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_et.xtb" lang="et" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_fa.xtb" lang="fa" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_fi.xtb" lang="fi" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_fil.xtb" lang="fil" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_fr.xtb" lang="fr" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_gu.xtb" lang="gu" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_he.xtb" lang="he" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_hi.xtb" lang="hi" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_hr.xtb" lang="hr" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_hu.xtb" lang="hu" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_id.xtb" lang="id" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_it.xtb" lang="it" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ja.xtb" lang="ja" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_kn.xtb" lang="kn" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ko.xtb" lang="ko" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_lt.xtb" lang="lt" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_lv.xtb" lang="lv" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ml.xtb" lang="ml" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_mr.xtb" lang="mr" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ms.xtb" lang="ms" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_nl.xtb" lang="nl" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_nb.xtb" lang="no" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_pl.xtb" lang="pl" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_pt-BR.xtb" lang="pt-BR" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_pt-PT.xtb" lang="pt-PT" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ro.xtb" lang="ro" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ru.xtb" lang="ru" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_sk.xtb" lang="sk" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_sl.xtb" lang="sl" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_sr.xtb" lang="sr" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_sv.xtb" lang="sv" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_sw.xtb" lang="sw" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_ta.xtb" lang="ta" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_te.xtb" lang="te" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_th.xtb" lang="th" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_tr.xtb" lang="tr" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_uk.xtb" lang="uk" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_vi.xtb" lang="vi" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_zh-CN.xtb" lang="zh-CN" />
|
|
||||||
<file path="../../../chrome/app/resources/locale_settings_zh-TW.xtb" lang="zh-TW" />
|
|
||||||
</translations>
|
|
||||||
<release seq="1" allow_pseudo="false">
|
<release seq="1" allow_pseudo="false">
|
||||||
<messages fallback_to_english="true">
|
<messages fallback_to_english="true">
|
||||||
<!-- TODO add all of your "string table" messages here. Remember to
|
<!-- TODO add all of your "string table" messages here. Remember to
|
||||||
|
@ -313,162 +168,6 @@ need to be translated for each locale.-->
|
||||||
<message name="IDS_APP_VIDEO_FILES" desc="The text label for the Video Files filter in file open/save dialogs.">
|
<message name="IDS_APP_VIDEO_FILES" desc="The text label for the Video Files filter in file open/save dialogs.">
|
||||||
Video Files
|
Video Files
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<!-- Print -->
|
|
||||||
<message name="IDS_DEFAULT_PRINT_DOCUMENT_TITLE" desc="Default title for a print document">
|
|
||||||
Untitled Document
|
|
||||||
</message>
|
|
||||||
<message name="IDS_PRINT_SPOOL_FAILED_TITLE_TEXT" desc="Title of a message box when printing fails because of printer issues.">
|
|
||||||
Print Failed
|
|
||||||
</message>
|
|
||||||
<message name="IDS_PRINT_SPOOL_FAILED_ERROR_TEXT" desc="Text in a messagebox when printing fails because of printer issues.">
|
|
||||||
Something went wrong when trying to print. Please check your printer and try again.
|
|
||||||
</message>
|
|
||||||
<message name="IDS_PRINT_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid.">
|
|
||||||
The selected printer is not available or not installed correctly. Check your printer or try selecting another printer.
|
|
||||||
</message>
|
|
||||||
<if expr="is_win">
|
|
||||||
<message name="IDS_UTILITY_PROCESS_EMF_CONVERTOR_NAME" desc="The name of the utility process used for converting PDFs to EMFs.">
|
|
||||||
EMF Convertor
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<!-- Proxy settings -->
|
|
||||||
<message name="IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME" desc="The name of the utility process used for out-of-process V8 proxy resolution.">
|
|
||||||
V8 Proxy Resolver
|
|
||||||
</message>
|
|
||||||
|
|
||||||
<!-- Spell checking -->
|
|
||||||
<!-- The file name of the spellchecking dictionary without the extension (case-sensitive). -->
|
|
||||||
<message name="IDS_SPELLCHECK_DICTIONARY" use_name_for_id="true">
|
|
||||||
en-US
|
|
||||||
</message>
|
|
||||||
<message name="IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY" desc="The name of the Add to dictionary command in the content area context menu">
|
|
||||||
&Add to dictionary
|
|
||||||
</message>
|
|
||||||
<message name="IDS_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS" desc="The name of the No Spelling Suggestions display in the content area context menu">
|
|
||||||
&No spelling suggestions
|
|
||||||
</message>
|
|
||||||
|
|
||||||
<!-- Font cache -->
|
|
||||||
<if expr="is_win">
|
|
||||||
<message name="IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME" desc="The name of the utility process used for building the DirectWrite font cache.">
|
|
||||||
DirectWrite Font Cache Builder
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<!-- Plugin placeholders. -->
|
|
||||||
<message name="IDS_PLUGIN_HIDE" desc="The tooltip for hiding a blocked plugin, displayed in the click to play UI.">
|
|
||||||
Hide this plugin
|
|
||||||
</message>
|
|
||||||
<if expr="is_macosx">
|
|
||||||
<message name="IDS_PLUGIN_BLOCKED" desc="The placeholder text for a blocked plugin.">
|
|
||||||
Control-click to play <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>.
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
<if expr="not is_macosx">
|
|
||||||
<message name="IDS_PLUGIN_BLOCKED" desc="The placeholder text for a blocked plugin.">
|
|
||||||
Right-click to play <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>.
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
<message name="IDS_PLUGIN_NOT_SUPPORTED_METRO" desc="The placeholder text for a plugin that can't run in Windows Metro mode.">
|
|
||||||
This plugin only works on the desktop.
|
|
||||||
</message>
|
|
||||||
<message name="IDS_PLUGIN_OUTDATED" desc="The placeholder text for an outdated plugin.">
|
|
||||||
<ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is out of date.
|
|
||||||
</message>
|
|
||||||
<message name="IDS_PLUGIN_NOT_AUTHORIZED" desc="The placeholder text for a plugin that requires user permission to run.">
|
|
||||||
<ph name="PLUGIN_NAME">$1<ex>Java</ex></ph> needs your permission to run.
|
|
||||||
</message>
|
|
||||||
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">
|
|
||||||
<ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is not allowed.
|
|
||||||
</message>
|
|
||||||
<if expr="not use_titlecase">
|
|
||||||
<message name="IDS_CONTENT_CONTEXT_PLUGIN_RUN" desc="The name of the Run command on the blocked plugin context menu">
|
|
||||||
Run this plugin
|
|
||||||
</message>
|
|
||||||
<message name="IDS_CONTENT_CONTEXT_PLUGIN_HIDE" desc="The name of the Hide command on the blocked plugin context menu">
|
|
||||||
Hide this plugin
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
<if expr="use_titlecase">
|
|
||||||
<message name="IDS_CONTENT_CONTEXT_PLUGIN_RUN" desc="In Title Case: The name of the Run command on the blocked plugin context menu">
|
|
||||||
Run This Plugin
|
|
||||||
</message>
|
|
||||||
<message name="IDS_CONTENT_CONTEXT_PLUGIN_HIDE" desc="In Title Case: The name of the Hide command on the blocked plugin context menu">
|
|
||||||
Hide This Plugin
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<!-- Preferences. -->
|
|
||||||
<!-- The default value for |WebPreference::uses_universal_detector|. -->
|
|
||||||
<message name="IDS_USES_UNIVERSAL_DETECTOR" use_name_for_id="true">
|
|
||||||
false
|
|
||||||
</message>
|
|
||||||
<!-- Locale-dependent static encodings string -->
|
|
||||||
<message name="IDS_STATIC_ENCODING_LIST" use_name_for_id="true">
|
|
||||||
windows-1252
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_DISPLAY_TEMPLATE" desc="The format of encodings in the encoding menu. Encoding categories are Unicode, Western, Turkish, Cyrillic, Chinese Simplified, Thai, Arabic, Hebrew and so forth. Encoding names are UTF-8, Windows-1252, ISO-8859-8, GB2312, etc.">
|
|
||||||
<ph name="ENCODING_CATEGORY">$1<ex>Japanese</ex></ph> (<ph name="ENCODING_NAME">$2<ex>Shift_JIS</ex></ph>)
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_UNICODE" desc="The text label of Unicode encodings">
|
|
||||||
Unicode
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_WESTERN" desc="The text label of West European character encoding">
|
|
||||||
Western
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_SIMP_CHINESE" desc="The text label of Simplified Chinese encodings">
|
|
||||||
Chinese Simplified
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_TRAD_CHINESE" desc="The text label of Traditional Chinese encodings">
|
|
||||||
Chinese Traditional
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_KOREAN" desc="The text label of Korean encoding">
|
|
||||||
Korean
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_JAPANESE" desc="The text label of Japanese encodings">
|
|
||||||
Japanese
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_THAI" desc="The text label of encoding thai language">
|
|
||||||
Thai
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_CENTRAL_EUROPEAN" desc="The text label of encoding Central European">
|
|
||||||
Central European
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_CYRILLIC" desc="The text label of Cyrillic encodings">
|
|
||||||
Cyrillic
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_GREEK" desc="The text label of Greek encodings">
|
|
||||||
Greek
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_BALTIC" desc="The text label of Baltic encodings">
|
|
||||||
Baltic
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_SOUTH_EUROPEAN" desc="The text label of South European encodings">
|
|
||||||
South European
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_NORDIC" desc="The text label of Nordic encoding">
|
|
||||||
Nordic
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_CELTIC" desc="The text label of Celtic encodings">
|
|
||||||
Celtic
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_ROMANIAN" desc="The text label of Romanian encoding">
|
|
||||||
Romanian
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_TURKISH" desc="The text label of Turkish encodings">
|
|
||||||
Turkish
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_ARABIC" desc="The text label of Arabic encodings">
|
|
||||||
Arabic
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_HEBREW" desc="The text label of Hebrew encodings">
|
|
||||||
Hebrew
|
|
||||||
</message>
|
|
||||||
<message name="IDS_ENCODING_VIETNAMESE" desc="The text label of Vietnamese encoding">
|
|
||||||
Vietnamese
|
|
||||||
</message>
|
|
||||||
</messages>
|
</messages>
|
||||||
</release>
|
</release>
|
||||||
</grit>
|
</grit>
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#include <grit/cef_resources.h>
|
|
||||||
#include <grit/cef_strings.h>
|
|
|
@ -1,2 +0,0 @@
|
||||||
#include <grit/cef_resources.h>
|
|
||||||
#include <grit/cef_strings.h>
|
|
|
@ -1,2 +0,0 @@
|
||||||
#include <grit/cef_resources.h>
|
|
||||||
#include <grit/cef_strings.h>
|
|
|
@ -97,8 +97,8 @@ patches = [
|
||||||
{
|
{
|
||||||
# Allow specification of a custom WebContentsView.
|
# Allow specification of a custom WebContentsView.
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/1257
|
# https://bitbucket.org/chromiumembedded/cef/issues/1257
|
||||||
'name': 'public_browser_1257',
|
'name': 'web_contents_1257',
|
||||||
'path': '../content/public/browser/',
|
'path': '../',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Allow creation of a custom SoftwareOutputDevice.
|
# Allow creation of a custom SoftwareOutputDevice.
|
||||||
|
@ -106,32 +106,6 @@ patches = [
|
||||||
'name': 'compositor_1368',
|
'name': 'compositor_1368',
|
||||||
'path': '../',
|
'path': '../',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
# Allow specification of a custom WebContentsView.
|
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/1257
|
|
||||||
'name': 'browser_web_contents_1257',
|
|
||||||
'path': '../content/browser/web_contents/',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
# Allow specification of a custom WebContentsView.
|
|
||||||
# This change is required due to chrome_browser_process_stub.h indirectly
|
|
||||||
# including chrome/browser/ui/browser.h on OS X.
|
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/1257
|
|
||||||
'name': 'chrome_browser_1257',
|
|
||||||
'path': '../chrome/browser/',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
# Allow specification of a custom WebContentsView.
|
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/1257
|
|
||||||
'name': 'ui_webview_1257',
|
|
||||||
'path': '../ui/views/controls/webview/',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
# Allow specification of a custom WebContentsView.
|
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/1257
|
|
||||||
'name': 'extensions_1257',
|
|
||||||
'path': '../extensions/',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
# Allow specification of a custom WebContentsViewGuest implementation for
|
# Allow specification of a custom WebContentsViewGuest implementation for
|
||||||
# MimeHandlerView.
|
# MimeHandlerView.
|
||||||
|
@ -195,12 +169,16 @@ patches = [
|
||||||
{
|
{
|
||||||
# Enable support for print header and footer.
|
# Enable support for print header and footer.
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issue/1478
|
# https://bitbucket.org/chromiumembedded/cef/issue/1478
|
||||||
|
#
|
||||||
# Fix printing of PDF documents via PrintToPDF.
|
# Fix printing of PDF documents via PrintToPDF.
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/1565
|
# https://bitbucket.org/chromiumembedded/cef/issues/1565
|
||||||
|
#
|
||||||
# Revert ENABLE_PRINT_PREVIEW changes from the following changeset.
|
# Revert ENABLE_PRINT_PREVIEW changes from the following changeset.
|
||||||
# https://codereview.chromium.org/1556463003
|
# https://codereview.chromium.org/1556463003
|
||||||
|
#
|
||||||
|
# Add missing ENABLE_PRINT_PREVIEW checks in chrome/ on Mac.
|
||||||
'name': 'print_header_footer_1478_1565',
|
'name': 'print_header_footer_1478_1565',
|
||||||
'path': '../components/',
|
'path': '../',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Remove DCHECK on Linux when initialized CEF from a non-main thread.
|
# Remove DCHECK on Linux when initialized CEF from a non-main thread.
|
||||||
|
@ -279,9 +257,28 @@ patches = [
|
||||||
'name': 'gyp_build_626150',
|
'name': 'gyp_build_626150',
|
||||||
'path': '../',
|
'path': '../',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Fix GYP build error on Windows.
|
||||||
|
# https://bugs.chromium.org/p/chromium/issues/detail?id=627924
|
||||||
|
# TODO(cef): Remove this patch when GYP support is removed.
|
||||||
|
'name': 'gyp_build_627924',
|
||||||
|
'path': '../',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
# Expose ui::Compositor via BrowserCompositorMac for OSR.
|
# Expose ui::Compositor via BrowserCompositorMac for OSR.
|
||||||
'name': 'browser_compositor_mac',
|
'name': 'browser_compositor_mac',
|
||||||
'path': '../',
|
'path': '../',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Fix chrome Widevine build on Linux.
|
||||||
|
'name': 'chrome_widevine',
|
||||||
|
'path': '../',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# Remove references to crashpad from chrome/ code on Mac. This avoids
|
||||||
|
# linker conflicts with breakpad.
|
||||||
|
# TODO(cef/chrome): Remove this patch once crashpad is supported.
|
||||||
|
'name': 'chrome_crashpad_mac',
|
||||||
|
'path': '../',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
diff --git web_contents_impl.cc web_contents_impl.cc
|
|
||||||
index db8263e..07f1989 100644
|
|
||||||
--- web_contents_impl.cc
|
|
||||||
+++ web_contents_impl.cc
|
|
||||||
@@ -1502,6 +1502,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
|
||||||
std::string unique_name = params.main_frame_name;
|
|
||||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
|
||||||
|
|
||||||
+ if (params.view && params.delegate_view) {
|
|
||||||
+ view_.reset(params.view);
|
|
||||||
+ render_view_host_delegate_view_ = params.delegate_view;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!view_) {
|
|
||||||
WebContentsViewDelegate* delegate =
|
|
||||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
|
||||||
|
|
||||||
@@ -1534,6 +1540,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
|
||||||
std::move(view_),
|
|
||||||
&render_view_host_delegate_view_));
|
|
||||||
}
|
|
||||||
+ }
|
|
||||||
CHECK(render_view_host_delegate_view_);
|
|
||||||
CHECK(view_.get());
|
|
||||||
|
|
||||||
@@ -1977,11 +1984,14 @@ void WebContentsImpl::CreateNewWindow(
|
|
||||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
|
||||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
|
||||||
|
|
||||||
+ content::WebContentsView* view = NULL;
|
|
||||||
+ content::RenderViewHostDelegateView* delegate_view = NULL;
|
|
||||||
+
|
|
||||||
if (delegate_ &&
|
|
||||||
!delegate_->ShouldCreateWebContents(
|
|
||||||
this, route_id, main_frame_route_id, main_frame_widget_route_id,
|
|
||||||
params.window_container_type, params.frame_name, params.target_url,
|
|
||||||
- partition_id, session_storage_namespace)) {
|
|
||||||
+ partition_id, session_storage_namespace, &view, &delegate_view)) {
|
|
||||||
if (route_id != MSG_ROUTING_NONE &&
|
|
||||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
|
||||||
// If the embedder didn't create a WebContents for this route, we need to
|
|
||||||
@@ -2005,6 +2015,8 @@ void WebContentsImpl::CreateNewWindow(
|
|
||||||
create_params.opener_render_process_id = render_process_id;
|
|
||||||
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
|
||||||
create_params.opener_suppressed = params.opener_suppressed;
|
|
||||||
+ create_params.view = view;
|
|
||||||
+ create_params.delegate_view = delegate_view;
|
|
||||||
if (params.disposition == NEW_BACKGROUND_TAB)
|
|
||||||
create_params.initially_hidden = true;
|
|
||||||
create_params.renderer_initiated_creation =
|
|
|
@ -1,30 +0,0 @@
|
||||||
diff --git ui/browser.cc ui/browser.cc
|
|
||||||
index b10b2df..a47dd18 100644
|
|
||||||
--- ui/browser.cc
|
|
||||||
+++ ui/browser.cc
|
|
||||||
@@ -1618,7 +1618,9 @@ bool Browser::ShouldCreateWebContents(
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- content::SessionStorageNamespace* session_storage_namespace) {
|
|
||||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) {
|
|
||||||
if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) {
|
|
||||||
// If a BackgroundContents is created, suppress the normal WebContents.
|
|
||||||
return !MaybeCreateBackgroundContents(
|
|
||||||
diff --git ui/browser.h ui/browser.h
|
|
||||||
index 693e84d..be1f1dd 100644
|
|
||||||
--- ui/browser.h
|
|
||||||
+++ ui/browser.h
|
|
||||||
@@ -617,7 +617,9 @@ class Browser : public TabStripModelObserver,
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- content::SessionStorageNamespace* session_storage_namespace) override;
|
|
||||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) override;
|
|
||||||
void WebContentsCreated(content::WebContents* source_contents,
|
|
||||||
int opener_render_frame_id,
|
|
||||||
const std::string& frame_name,
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
|
||||||
|
index 11d7ff4..1013b2ce 100644
|
||||||
|
--- chrome/browser/chrome_browser_main_mac.mm
|
||||||
|
+++ chrome/browser/chrome_browser_main_mac.mm
|
||||||
|
@@ -186,7 +186,7 @@ void EnsureMetadataNeverIndexFile(const base::FilePath& user_data_dir) {
|
||||||
|
ChromeBrowserMainPartsPosix::PostProfileInit();
|
||||||
|
|
||||||
|
g_browser_process->metrics_service()->RecordBreakpadRegistration(
|
||||||
|
- crash_reporter::GetUploadsEnabled());
|
||||||
|
+ false);
|
||||||
|
|
||||||
|
// TODO(calamity): Make this gated on first_run::IsChromeFirstRun() in M45.
|
||||||
|
content::BrowserThread::PostAfterStartupTask(
|
||||||
|
diff --git chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
|
||||||
|
index af1bbec..6b92a7c 100644
|
||||||
|
--- chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
|
||||||
|
+++ chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
|
||||||
|
@@ -73,8 +73,6 @@ void CrashUploadListCrashpad::LoadUploadList(
|
||||||
|
// database lives in the .exe, so we need to grab a pointer to a helper in the
|
||||||
|
// exe to get our reports list.
|
||||||
|
GetReportsThunk(&reports);
|
||||||
|
-#else
|
||||||
|
- crash_reporter::GetReports(&reports);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (const crash_reporter::Report& report : reports) {
|
||||||
|
diff --git chrome/browser/google/google_update_settings_posix.cc chrome/browser/google/google_update_settings_posix.cc
|
||||||
|
index 059672e..cdecb1a 100644
|
||||||
|
--- chrome/browser/google/google_update_settings_posix.cc
|
||||||
|
+++ chrome/browser/google/google_update_settings_posix.cc
|
||||||
|
@@ -63,10 +63,6 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
|
||||||
|
|
||||||
|
// static
|
||||||
|
bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
|
||||||
|
-#if defined(OS_MACOSX)
|
||||||
|
- crash_reporter::SetUploadsEnabled(consented);
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
base::FilePath consent_dir;
|
||||||
|
PathService::Get(chrome::DIR_USER_DATA, &consent_dir);
|
||||||
|
if (!base::DirectoryExists(consent_dir))
|
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||||
|
index 57355af2..01cde06 100644
|
||||||
|
--- chrome/common/chrome_content_client.cc
|
||||||
|
+++ chrome/common/chrome_content_client.cc
|
||||||
|
@@ -76,7 +76,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \
|
||||||
|
- !defined(WIDEVINE_CDM_IS_COMPONENT)
|
||||||
|
+ !defined(WIDEVINE_CDM_IS_COMPONENT) && defined(WIDEVINE_CDM_VERSION_STRING)
|
||||||
|
#define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT
|
||||||
|
#include "chrome/common/widevine_cdm_constants.h"
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
diff --git browser/guest_view/extension_options/extension_options_guest.cc browser/guest_view/extension_options/extension_options_guest.cc
|
|
||||||
index 3849b7e..a974f34 100644
|
|
||||||
--- browser/guest_view/extension_options/extension_options_guest.cc
|
|
||||||
+++ browser/guest_view/extension_options/extension_options_guest.cc
|
|
||||||
@@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- content::SessionStorageNamespace* session_storage_namespace) {
|
|
||||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) {
|
|
||||||
// This method handles opening links from within the guest. Since this guest
|
|
||||||
// view is used for displaying embedded extension options, we want any
|
|
||||||
// external links to be opened in a new tab, not in a new guest view.
|
|
||||||
diff --git browser/guest_view/extension_options/extension_options_guest.h browser/guest_view/extension_options/extension_options_guest.h
|
|
||||||
index e0309f7..f6a3878 100644
|
|
||||||
--- browser/guest_view/extension_options/extension_options_guest.h
|
|
||||||
+++ browser/guest_view/extension_options/extension_options_guest.h
|
|
||||||
@@ -56,7 +56,9 @@ class ExtensionOptionsGuest
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- content::SessionStorageNamespace* session_storage_namespace) final;
|
|
||||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) final;
|
|
||||||
|
|
||||||
// content::WebContentsObserver implementation.
|
|
||||||
void DidNavigateMainFrame(const content::LoadCommittedDetails& details,
|
|
|
@ -23,19 +23,6 @@ index 23e67d9..c3d4ec6 100644
|
||||||
"//chrome/test:telemetry_perf_unittests",
|
"//chrome/test:telemetry_perf_unittests",
|
||||||
"//chrome/test:unit_tests",
|
"//chrome/test:unit_tests",
|
||||||
"//components:components_browsertests",
|
"//components:components_browsertests",
|
||||||
diff --git build/config/features.gni build/config/features.gni
|
|
||||||
index 9d33d91..d460e86 100644
|
|
||||||
--- build/config/features.gni
|
|
||||||
+++ build/config/features.gni
|
|
||||||
@@ -148,7 +148,7 @@ enable_web_speech = !is_android && !is_ios
|
|
||||||
|
|
||||||
enable_task_manager = !is_ios && !is_android
|
|
||||||
|
|
||||||
-enable_themes = !is_android && !is_ios
|
|
||||||
+enable_themes = !is_android && !is_ios && !is_linux
|
|
||||||
|
|
||||||
# Whether we are using the rlz library or not. Platforms like Android send
|
|
||||||
# rlz codes for searches but do not use the library.
|
|
||||||
diff --git build/config/mac/base_rules.gni build/config/mac/base_rules.gni
|
diff --git build/config/mac/base_rules.gni build/config/mac/base_rules.gni
|
||||||
index 109710d..d2c442e 100644
|
index 109710d..d2c442e 100644
|
||||||
--- build/config/mac/base_rules.gni
|
--- build/config/mac/base_rules.gni
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git chrome_elf/chrome_elf.gyp chrome_elf/chrome_elf.gyp
|
||||||
|
index 7a49fe8..b4be214 100644
|
||||||
|
--- chrome_elf/chrome_elf.gyp
|
||||||
|
+++ chrome_elf/chrome_elf.gyp
|
||||||
|
@@ -59,12 +59,6 @@
|
||||||
|
],
|
||||||
|
# Set /SUBSYSTEM:WINDOWS.
|
||||||
|
'SubSystem': '2',
|
||||||
|
- 'AdditionalDependencies!': [
|
||||||
|
- 'user32.lib',
|
||||||
|
- ],
|
||||||
|
- 'IgnoreDefaultLibraryNames': [
|
||||||
|
- 'user32.lib',
|
||||||
|
- ],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
|
@ -1,7 +1,37 @@
|
||||||
diff --git printing/common/print_messages.cc printing/common/print_messages.cc
|
diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||||
|
index b43b88b..7779496 100644
|
||||||
|
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||||
|
+++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||||
|
@@ -9,7 +9,9 @@
|
||||||
|
#include "base/logging.h"
|
||||||
|
#import "base/mac/scoped_nsobject.h"
|
||||||
|
#include "base/strings/sys_string_conversions.h"
|
||||||
|
+#if defined(ENABLE_PRINT_PREVIEW)
|
||||||
|
#include "chrome/browser/printing/print_view_manager.h"
|
||||||
|
+#endif
|
||||||
|
#include "chrome/browser/sessions/session_tab_helper.h"
|
||||||
|
#include "chrome/browser/ui/cocoa/applescript/apple_event_util.h"
|
||||||
|
#include "chrome/browser/ui/cocoa/applescript/error_applescript.h"
|
||||||
|
@@ -227,11 +229,15 @@ - (void)handlesStopScriptCommand:(NSScriptCommand*)command {
|
||||||
|
|
||||||
|
- (void)handlesPrintScriptCommand:(NSScriptCommand*)command {
|
||||||
|
AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_PRINT);
|
||||||
|
+#if defined(ENABLE_PRINT_PREVIEW)
|
||||||
|
bool initiated =
|
||||||
|
printing::PrintViewManager::FromWebContents(webContents_)->PrintNow();
|
||||||
|
if (!initiated) {
|
||||||
|
AppleScript::SetError(AppleScript::errInitiatePrinting);
|
||||||
|
}
|
||||||
|
+#else
|
||||||
|
+ NOTIMPLEMENTED();
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)handlesSaveScriptCommand:(NSScriptCommand*)command {
|
||||||
|
diff --git components/printing/common/print_messages.cc components/printing/common/print_messages.cc
|
||||||
index 6798e35..215777f 100644
|
index 6798e35..215777f 100644
|
||||||
--- printing/common/print_messages.cc
|
--- components/printing/common/print_messages.cc
|
||||||
+++ printing/common/print_messages.cc
|
+++ components/printing/common/print_messages.cc
|
||||||
@@ -103,7 +103,6 @@ void PrintMsg_PrintPages_Params::Reset() {
|
@@ -103,7 +103,6 @@ void PrintMsg_PrintPages_Params::Reset() {
|
||||||
pages = std::vector<int>();
|
pages = std::vector<int>();
|
||||||
}
|
}
|
||||||
|
@ -15,10 +45,10 @@ index 6798e35..215777f 100644
|
||||||
~PrintHostMsg_SetOptionsFromDocument_Params() {
|
~PrintHostMsg_SetOptionsFromDocument_Params() {
|
||||||
}
|
}
|
||||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||||
diff --git printing/common/print_messages.h printing/common/print_messages.h
|
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
|
||||||
index 705211b..a524333 100644
|
index 705211b..a524333 100644
|
||||||
--- printing/common/print_messages.h
|
--- components/printing/common/print_messages.h
|
||||||
+++ printing/common/print_messages.h
|
+++ components/printing/common/print_messages.h
|
||||||
@@ -71,7 +71,6 @@ struct PrintMsg_PrintPages_Params {
|
@@ -71,7 +71,6 @@ struct PrintMsg_PrintPages_Params {
|
||||||
std::vector<int> pages;
|
std::vector<int> pages;
|
||||||
};
|
};
|
||||||
|
@ -135,10 +165,10 @@ index 705211b..a524333 100644
|
||||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
|
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
|
||||||
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
|
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
|
||||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||||
diff --git printing/renderer/print_web_view_helper.cc printing/renderer/print_web_view_helper.cc
|
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
|
||||||
index b25340c..47d419e 100644
|
index b25340c..47d419e 100644
|
||||||
--- printing/renderer/print_web_view_helper.cc
|
--- components/printing/renderer/print_web_view_helper.cc
|
||||||
+++ printing/renderer/print_web_view_helper.cc
|
+++ components/printing/renderer/print_web_view_helper.cc
|
||||||
@@ -83,6 +83,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
|
@@ -83,6 +83,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
|
||||||
|
|
||||||
#if defined(ENABLE_PRINT_PREVIEW)
|
#if defined(ENABLE_PRINT_PREVIEW)
|
||||||
|
@ -394,10 +424,10 @@ index b25340c..47d419e 100644
|
||||||
|
|
||||||
PrintWebViewHelper::PrintPreviewContext::PrintPreviewContext()
|
PrintWebViewHelper::PrintPreviewContext::PrintPreviewContext()
|
||||||
: total_page_count_(0),
|
: total_page_count_(0),
|
||||||
diff --git printing/renderer/print_web_view_helper.h printing/renderer/print_web_view_helper.h
|
diff --git components/printing/renderer/print_web_view_helper.h components/printing/renderer/print_web_view_helper.h
|
||||||
index fe33d5e..3f1b7b5 100644
|
index fe33d5e..3f1b7b5 100644
|
||||||
--- printing/renderer/print_web_view_helper.h
|
--- components/printing/renderer/print_web_view_helper.h
|
||||||
+++ printing/renderer/print_web_view_helper.h
|
+++ components/printing/renderer/print_web_view_helper.h
|
||||||
@@ -137,9 +137,7 @@ class PrintWebViewHelper
|
@@ -137,9 +137,7 @@ class PrintWebViewHelper
|
||||||
OK,
|
OK,
|
||||||
FAIL_PRINT_INIT,
|
FAIL_PRINT_INIT,
|
||||||
|
@ -491,10 +521,10 @@ index fe33d5e..3f1b7b5 100644
|
||||||
PrintPreviewContext print_preview_context_;
|
PrintPreviewContext print_preview_context_;
|
||||||
bool is_loading_;
|
bool is_loading_;
|
||||||
bool is_scripted_preview_delayed_;
|
bool is_scripted_preview_delayed_;
|
||||||
diff --git printing/renderer/print_web_view_helper_mac.mm printing/renderer/print_web_view_helper_mac.mm
|
diff --git components/printing/renderer/print_web_view_helper_mac.mm components/printing/renderer/print_web_view_helper_mac.mm
|
||||||
index d227c5e..f362093 100644
|
index d227c5e..f362093 100644
|
||||||
--- printing/renderer/print_web_view_helper_mac.mm
|
--- components/printing/renderer/print_web_view_helper_mac.mm
|
||||||
+++ printing/renderer/print_web_view_helper_mac.mm
|
+++ components/printing/renderer/print_web_view_helper_mac.mm
|
||||||
@@ -68,7 +68,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
@@ -68,7 +68,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||||
Send(new PrintHostMsg_DidPrintPage(routing_id(), page_params));
|
Send(new PrintHostMsg_DidPrintPage(routing_id(), page_params));
|
||||||
}
|
}
|
||||||
|
@ -526,10 +556,10 @@ index d227c5e..f362093 100644
|
||||||
RenderPageContent(frame, page_number, canvas_area, content_area,
|
RenderPageContent(frame, page_number, canvas_area, content_area,
|
||||||
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
||||||
}
|
}
|
||||||
diff --git resources/printing_resources.grdp resources/printing_resources.grdp
|
diff --git components/resources/printing_resources.grdp components/resources/printing_resources.grdp
|
||||||
index 7213746..32b8b1e 100644
|
index 7213746..32b8b1e 100644
|
||||||
--- resources/printing_resources.grdp
|
--- components/resources/printing_resources.grdp
|
||||||
+++ resources/printing_resources.grdp
|
+++ components/resources/printing_resources.grdp
|
||||||
@@ -1,6 +1,4 @@
|
@@ -1,6 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<grit-part>
|
<grit-part>
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
diff --git web_contents.cc web_contents.cc
|
|
||||||
index fa0afb5..d677b31 100644
|
|
||||||
--- web_contents.cc
|
|
||||||
+++ web_contents.cc
|
|
||||||
@@ -29,7 +29,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
|
|
||||||
guest_delegate(nullptr),
|
|
||||||
context(nullptr),
|
|
||||||
renderer_initiated_creation(false),
|
|
||||||
- initialize_renderer(false) {
|
|
||||||
+ initialize_renderer(false),
|
|
||||||
+ view(nullptr),
|
|
||||||
+ delegate_view(nullptr) {
|
|
||||||
}
|
|
||||||
|
|
||||||
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
|
||||||
diff --git web_contents.h web_contents.h
|
|
||||||
index 9ccb6fe..d8561f9 100644
|
|
||||||
--- web_contents.h
|
|
||||||
+++ web_contents.h
|
|
||||||
@@ -55,8 +55,10 @@ class PageState;
|
|
||||||
class RenderFrameHost;
|
|
||||||
class RenderProcessHost;
|
|
||||||
class RenderViewHost;
|
|
||||||
+class RenderViewHostDelegateView;
|
|
||||||
class RenderWidgetHostView;
|
|
||||||
class WebContentsDelegate;
|
|
||||||
+class WebContentsView;
|
|
||||||
struct CustomContextMenuContext;
|
|
||||||
struct DropData;
|
|
||||||
struct Manifest;
|
|
||||||
@@ -157,6 +159,10 @@ class WebContents : public PageNavigator,
|
|
||||||
// Note that the pre-created renderer process may not be used if the first
|
|
||||||
// navigation requires a dedicated or privileged process, such as a WebUI.
|
|
||||||
bool initialize_renderer;
|
|
||||||
+
|
|
||||||
+ // Optionally specify the view and delegate view.
|
|
||||||
+ content::WebContentsView* view;
|
|
||||||
+ content::RenderViewHostDelegateView* delegate_view;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Creates a new WebContents.
|
|
||||||
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
|
||||||
index df97348..8e2168e 100644
|
|
||||||
--- web_contents_delegate.cc
|
|
||||||
+++ web_contents_delegate.cc
|
|
||||||
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- SessionStorageNamespace* session_storage_namespace) {
|
|
||||||
+ SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git web_contents_delegate.h web_contents_delegate.h
|
|
||||||
index 2816c4d..387821f 100644
|
|
||||||
--- web_contents_delegate.h
|
|
||||||
+++ web_contents_delegate.h
|
|
||||||
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;
|
|
||||||
class PageState;
|
|
||||||
class RenderFrameHost;
|
|
||||||
class RenderViewHost;
|
|
||||||
+class RenderViewHostDelegateView;
|
|
||||||
class SessionStorageNamespace;
|
|
||||||
class WebContents;
|
|
||||||
class WebContentsImpl;
|
|
||||||
+class WebContentsView;
|
|
||||||
struct ColorSuggestion;
|
|
||||||
struct ContextMenuParams;
|
|
||||||
struct DropData;
|
|
||||||
@@ -307,7 +309,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- SessionStorageNamespace* session_storage_namespace);
|
|
||||||
+ SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view);
|
|
||||||
|
|
||||||
// Notifies the delegate about the creation of a new WebContents. This
|
|
||||||
// typically happens when popups are created.
|
|
|
@ -1,30 +0,0 @@
|
||||||
diff --git web_dialog_view.cc web_dialog_view.cc
|
|
||||||
index d8afe6e..59259b7 100644
|
|
||||||
--- web_dialog_view.cc
|
|
||||||
+++ web_dialog_view.cc
|
|
||||||
@@ -341,7 +341,9 @@ bool WebDialogView::ShouldCreateWebContents(
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- content::SessionStorageNamespace* session_storage_namespace) {
|
|
||||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) {
|
|
||||||
if (delegate_)
|
|
||||||
return delegate_->HandleShouldCreateWebContents();
|
|
||||||
return true;
|
|
||||||
diff --git web_dialog_view.h web_dialog_view.h
|
|
||||||
index 65be6d54..7802d6d 100644
|
|
||||||
--- web_dialog_view.h
|
|
||||||
+++ web_dialog_view.h
|
|
||||||
@@ -123,7 +123,9 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
|
|
||||||
const std::string& frame_name,
|
|
||||||
const GURL& target_url,
|
|
||||||
const std::string& partition_id,
|
|
||||||
- content::SessionStorageNamespace* session_storage_namespace) override;
|
|
||||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
|
||||||
+ content::WebContentsView** view,
|
|
||||||
+ content::RenderViewHostDelegateView** delegate_view) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
FRIEND_TEST_ALL_PREFIXES(WebDialogBrowserTest, WebContentRendered);
|
|
|
@ -0,0 +1,283 @@
|
||||||
|
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.cc chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
||||||
|
index ddc31cf..81b7d1c 100644
|
||||||
|
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
||||||
|
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
||||||
|
@@ -203,7 +203,9 @@ bool OffscreenTab::ShouldCreateWebContents(
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) {
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||||
|
DCHECK_EQ(offscreen_tab_web_contents_.get(), contents);
|
||||||
|
// Disallow creating separate WebContentses. The WebContents implementation
|
||||||
|
// uses this to spawn new windows/tabs, which is also not allowed for
|
||||||
|
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.h chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
||||||
|
index 712c117..4dc59be 100644
|
||||||
|
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
||||||
|
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
||||||
|
@@ -149,7 +149,9 @@ class OffscreenTab : protected content::WebContentsDelegate,
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) final;
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) final;
|
||||||
|
bool EmbedsFullscreenWidget() const final;
|
||||||
|
void EnterFullscreenModeForTab(content::WebContents* contents,
|
||||||
|
const GURL& origin) final;
|
||||||
|
diff --git chrome/browser/prerender/prerender_contents.cc chrome/browser/prerender/prerender_contents.cc
|
||||||
|
index d646060..697bf1b 100644
|
||||||
|
--- chrome/browser/prerender/prerender_contents.cc
|
||||||
|
+++ chrome/browser/prerender/prerender_contents.cc
|
||||||
|
@@ -129,7 +129,9 @@ class PrerenderContents::WebContentsDelegateImpl
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- SessionStorageNamespace* session_storage_namespace) override {
|
||||||
|
+ SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) override {
|
||||||
|
// Since we don't want to permit child windows that would have a
|
||||||
|
// window.opener property, terminate prerendering.
|
||||||
|
prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
|
||||||
|
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||||
|
index b10b2df..a47dd18 100644
|
||||||
|
--- chrome/browser/ui/browser.cc
|
||||||
|
+++ chrome/browser/ui/browser.cc
|
||||||
|
@@ -1618,7 +1618,9 @@ bool Browser::ShouldCreateWebContents(
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) {
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||||
|
if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) {
|
||||||
|
// If a BackgroundContents is created, suppress the normal WebContents.
|
||||||
|
return !MaybeCreateBackgroundContents(
|
||||||
|
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||||
|
index 693e84d..be1f1dd 100644
|
||||||
|
--- chrome/browser/ui/browser.h
|
||||||
|
+++ chrome/browser/ui/browser.h
|
||||||
|
@@ -617,7 +617,9 @@ class Browser : public TabStripModelObserver,
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) override;
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) override;
|
||||||
|
void WebContentsCreated(content::WebContents* source_contents,
|
||||||
|
int opener_render_frame_id,
|
||||||
|
const std::string& frame_name,
|
||||||
|
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||||
|
index db8263e..07f1989 100644
|
||||||
|
--- content/browser/web_contents/web_contents_impl.cc
|
||||||
|
+++ content/browser/web_contents/web_contents_impl.cc
|
||||||
|
@@ -1502,6 +1502,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||||
|
std::string unique_name = params.main_frame_name;
|
||||||
|
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||||
|
|
||||||
|
+ if (params.view && params.delegate_view) {
|
||||||
|
+ view_.reset(params.view);
|
||||||
|
+ render_view_host_delegate_view_ = params.delegate_view;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!view_) {
|
||||||
|
WebContentsViewDelegate* delegate =
|
||||||
|
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||||
|
|
||||||
|
@@ -1534,6 +1540,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||||
|
std::move(view_),
|
||||||
|
&render_view_host_delegate_view_));
|
||||||
|
}
|
||||||
|
+ }
|
||||||
|
CHECK(render_view_host_delegate_view_);
|
||||||
|
CHECK(view_.get());
|
||||||
|
|
||||||
|
@@ -1977,11 +1984,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||||
|
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||||
|
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||||
|
|
||||||
|
+ content::WebContentsView* view = NULL;
|
||||||
|
+ content::RenderViewHostDelegateView* delegate_view = NULL;
|
||||||
|
+
|
||||||
|
if (delegate_ &&
|
||||||
|
!delegate_->ShouldCreateWebContents(
|
||||||
|
this, route_id, main_frame_route_id, main_frame_widget_route_id,
|
||||||
|
params.window_container_type, params.frame_name, params.target_url,
|
||||||
|
- partition_id, session_storage_namespace)) {
|
||||||
|
+ partition_id, session_storage_namespace, &view, &delegate_view)) {
|
||||||
|
if (route_id != MSG_ROUTING_NONE &&
|
||||||
|
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||||
|
// If the embedder didn't create a WebContents for this route, we need to
|
||||||
|
@@ -2005,6 +2015,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||||
|
create_params.opener_render_process_id = render_process_id;
|
||||||
|
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
||||||
|
create_params.opener_suppressed = params.opener_suppressed;
|
||||||
|
+ create_params.view = view;
|
||||||
|
+ create_params.delegate_view = delegate_view;
|
||||||
|
if (params.disposition == NEW_BACKGROUND_TAB)
|
||||||
|
create_params.initially_hidden = true;
|
||||||
|
create_params.renderer_initiated_creation =
|
||||||
|
diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc
|
||||||
|
index fa0afb5..d677b31 100644
|
||||||
|
--- content/public/browser/web_contents.cc
|
||||||
|
+++ content/public/browser/web_contents.cc
|
||||||
|
@@ -29,7 +29,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
|
||||||
|
guest_delegate(nullptr),
|
||||||
|
context(nullptr),
|
||||||
|
renderer_initiated_creation(false),
|
||||||
|
- initialize_renderer(false) {
|
||||||
|
+ initialize_renderer(false),
|
||||||
|
+ view(nullptr),
|
||||||
|
+ delegate_view(nullptr) {
|
||||||
|
}
|
||||||
|
|
||||||
|
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
||||||
|
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
|
||||||
|
index 9ccb6fe..d8561f9 100644
|
||||||
|
--- content/public/browser/web_contents.h
|
||||||
|
+++ content/public/browser/web_contents.h
|
||||||
|
@@ -55,8 +55,10 @@ class PageState;
|
||||||
|
class RenderFrameHost;
|
||||||
|
class RenderProcessHost;
|
||||||
|
class RenderViewHost;
|
||||||
|
+class RenderViewHostDelegateView;
|
||||||
|
class RenderWidgetHostView;
|
||||||
|
class WebContentsDelegate;
|
||||||
|
+class WebContentsView;
|
||||||
|
struct CustomContextMenuContext;
|
||||||
|
struct DropData;
|
||||||
|
struct Manifest;
|
||||||
|
@@ -157,6 +159,10 @@ class WebContents : public PageNavigator,
|
||||||
|
// Note that the pre-created renderer process may not be used if the first
|
||||||
|
// navigation requires a dedicated or privileged process, such as a WebUI.
|
||||||
|
bool initialize_renderer;
|
||||||
|
+
|
||||||
|
+ // Optionally specify the view and delegate view.
|
||||||
|
+ content::WebContentsView* view;
|
||||||
|
+ content::RenderViewHostDelegateView* delegate_view;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Creates a new WebContents.
|
||||||
|
diff --git content/public/browser/web_contents_delegate.cc content/public/browser/web_contents_delegate.cc
|
||||||
|
index df97348..8e2168e 100644
|
||||||
|
--- content/public/browser/web_contents_delegate.cc
|
||||||
|
+++ content/public/browser/web_contents_delegate.cc
|
||||||
|
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- SessionStorageNamespace* session_storage_namespace) {
|
||||||
|
+ SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
|
||||||
|
index 2816c4d..387821f 100644
|
||||||
|
--- content/public/browser/web_contents_delegate.h
|
||||||
|
+++ content/public/browser/web_contents_delegate.h
|
||||||
|
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;
|
||||||
|
class PageState;
|
||||||
|
class RenderFrameHost;
|
||||||
|
class RenderViewHost;
|
||||||
|
+class RenderViewHostDelegateView;
|
||||||
|
class SessionStorageNamespace;
|
||||||
|
class WebContents;
|
||||||
|
class WebContentsImpl;
|
||||||
|
+class WebContentsView;
|
||||||
|
struct ColorSuggestion;
|
||||||
|
struct ContextMenuParams;
|
||||||
|
struct DropData;
|
||||||
|
@@ -307,7 +309,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- SessionStorageNamespace* session_storage_namespace);
|
||||||
|
+ SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view);
|
||||||
|
|
||||||
|
// Notifies the delegate about the creation of a new WebContents. This
|
||||||
|
// typically happens when popups are created.
|
||||||
|
diff --git extensions/browser/guest_view/extension_options/extension_options_guest.cc extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||||
|
index 3849b7e..a974f34 100644
|
||||||
|
--- extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||||
|
+++ extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||||
|
@@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) {
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||||
|
// This method handles opening links from within the guest. Since this guest
|
||||||
|
// view is used for displaying embedded extension options, we want any
|
||||||
|
// external links to be opened in a new tab, not in a new guest view.
|
||||||
|
diff --git extensions/browser/guest_view/extension_options/extension_options_guest.h extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||||
|
index e0309f7..f6a3878 100644
|
||||||
|
--- extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||||
|
+++ extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||||
|
@@ -56,7 +56,9 @@ class ExtensionOptionsGuest
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) final;
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) final;
|
||||||
|
|
||||||
|
// content::WebContentsObserver implementation.
|
||||||
|
void DidNavigateMainFrame(const content::LoadCommittedDetails& details,
|
||||||
|
diff --git ui/keyboard/content/keyboard_ui_content.cc ui/keyboard/content/keyboard_ui_content.cc
|
||||||
|
index cd6a2ab..ef2c820 100644
|
||||||
|
--- ui/keyboard/content/keyboard_ui_content.cc
|
||||||
|
+++ ui/keyboard/content/keyboard_ui_content.cc
|
||||||
|
@@ -64,7 +64,9 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) override {
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) override {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git ui/views/controls/webview/web_dialog_view.cc ui/views/controls/webview/web_dialog_view.cc
|
||||||
|
index d8afe6e..59259b7 100644
|
||||||
|
--- ui/views/controls/webview/web_dialog_view.cc
|
||||||
|
+++ ui/views/controls/webview/web_dialog_view.cc
|
||||||
|
@@ -341,7 +341,9 @@ bool WebDialogView::ShouldCreateWebContents(
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) {
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||||
|
if (delegate_)
|
||||||
|
return delegate_->HandleShouldCreateWebContents();
|
||||||
|
return true;
|
||||||
|
diff --git ui/views/controls/webview/web_dialog_view.h ui/views/controls/webview/web_dialog_view.h
|
||||||
|
index 65be6d54..7802d6d 100644
|
||||||
|
--- ui/views/controls/webview/web_dialog_view.h
|
||||||
|
+++ ui/views/controls/webview/web_dialog_view.h
|
||||||
|
@@ -123,7 +123,9 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
|
||||||
|
const std::string& frame_name,
|
||||||
|
const GURL& target_url,
|
||||||
|
const std::string& partition_id,
|
||||||
|
- content::SessionStorageNamespace* session_storage_namespace) override;
|
||||||
|
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||||
|
+ content::WebContentsView** view,
|
||||||
|
+ content::RenderViewHostDelegateView** delegate_view) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
FRIEND_TEST_ALL_PREFIXES(WebDialogBrowserTest, WebContentRendered);
|
|
@ -54,6 +54,16 @@ def calc_inputs(locale):
|
||||||
"""Determine the files that need processing for the given locale."""
|
"""Determine the files that need processing for the given locale."""
|
||||||
inputs = []
|
inputs = []
|
||||||
|
|
||||||
|
#e.g.
|
||||||
|
# '<(SHARED_INTERMEDIATE_DIR)/chrome/generated_resources_da.pak'
|
||||||
|
inputs.append(os.path.join(SHARE_INT_DIR, 'chrome',
|
||||||
|
'generated_resources_%s.pak' % locale))
|
||||||
|
|
||||||
|
#e.g.
|
||||||
|
# '<(SHARED_INTERMEDIATE_DIR)/chrome/locale_settings_da.pak'
|
||||||
|
inputs.append(os.path.join(SHARE_INT_DIR, 'chrome',
|
||||||
|
'locale_settings_%s.pak' % locale))
|
||||||
|
|
||||||
#e.g.
|
#e.g.
|
||||||
# '<(SHARED_INTERMEDIATE_DIR)/chrome/platform_locale_settings_da.pak'
|
# '<(SHARED_INTERMEDIATE_DIR)/chrome/platform_locale_settings_da.pak'
|
||||||
inputs.append(os.path.join(SHARE_INT_DIR, 'chrome',
|
inputs.append(os.path.join(SHARE_INT_DIR, 'chrome',
|
||||||
|
|
Loading…
Reference in New Issue