chore: bump chromium to f30828899e4cd7161f6dc6507023f (master) (#20824)

* chore: bump chromium in DEPS to 0476932294da8809a19189b9f54cee11d50cc512

* update chromium patches (#20838)

* chore: bump chromium in DEPS to 838863f5ec9e8a12132a10bb47be8382ad9756a7

* IsRendererTransferNeededForNavigation went away

https://chromium-review.googlesource.com/c/chromium/src/+/1867031

* [arraybuffer] Move the ArrayBuffer implementation from wtf to core

https://chromium-review.googlesource.com/c/chromium/src/+/1875731

* URLLoaderRequest new mojo types

* context menu enums moved around

https://chromium-review.googlesource.com/c/chromium/src/+/1872004

https://chromium-review.googlesource.com/c/chromium/src/+/1876088

https://chromium-review.googlesource.com/c/chromium/src/+/1866520

* chore: bump chromium in DEPS to dc9525d251bf30828899e4cd7161f6dc6507023f

* update chromium patches

* [WIP] Convert network hints IPC to Mojo

https://chromium-review.googlesource.com/c/chromium/src/+/1881967

* jumbo build is no longer supported

https://chromium-review.googlesource.com/c/chromium/src/+/1881967

* fix disable-color-correct-rendering

* [FIXME] fix printing patch

compiles but prob doesn't work

* explicitly include ax_enums

https://chromium-review.googlesource.com/c/chromium/src/+/1759821

* fixup! [WIP] Convert network hints IPC to Mojo

* fix base::span

* fix AsarURLLoader to not double-std::move

* fix debug build

* fix msstl patch

* lint

* more fix msstl

* mooooore fix msstl

* fix compile

* update backport_fix_msstl_compat_in_ui_events.patch

* update msstl compat patch

* don't try to build chrome's prefetch predictor

* build: fix compilation on windows

* Fixup patches for MAS build

* Free up disk space for mac debug builds

* fix: apply custom site instance only for main frame

* Fixup from rebase

* Try not generating symbols for mac debug builds

* Remove double entry of patch

* FIx compile errors

* Trigger CI

* Set symbol_level to 1 for mac debug builds
This commit is contained in:
Electron Bot 2019-11-05 18:41:20 -05:00 коммит произвёл John Kleinschmidt
Родитель f18fca0729
Коммит 9a198e8ef4
60 изменённых файлов: 759 добавлений и 686 удалений

Просмотреть файл

@ -77,6 +77,10 @@ env-debug-build: &env-debug-build
GN_CONFIG: //electron/build/args/debug.gn
SKIP_DIST_ZIP: '1'
env-mac-debug-build: &env-mac-debug-build
# Set symbol level to 1 so that debug builds do not run out of disk space
GN_BUILDFLAG_ARGS: 'symbol_level = 1'
env-testing-build: &env-testing-build
GN_CONFIG: //electron/build/args/testing.gn
CHECK_DIST_MANIFEST: '1'
@ -246,6 +250,12 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac
command: |
if [ "`uname`" == "Darwin" ]; then
sudo rm -rf /Library/Developer/CoreSimulator
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform
sudo rm -rf /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
fi
step-delete-git-directories: &step-delete-git-directories
@ -1590,6 +1600,7 @@ jobs:
environment:
<<: *env-mac-large
<<: *env-debug-build
<<: *env-mac-debug-build
<<: *env-enable-sccache
<<: *env-ninja-status
<<: *steps-electron-build
@ -1652,6 +1663,7 @@ jobs:
<<: *env-mac-large
<<: *env-mas
<<: *env-debug-build
<<: *env-mac-debug-build
<<: *env-enable-sccache
<<: *env-ninja-status
<<: *steps-electron-build

Просмотреть файл

@ -363,7 +363,8 @@ source_set("electron_lib") {
"//components/certificate_transparency",
"//components/language/core/browser",
"//components/net_log",
"//components/network_hints/common",
"//components/network_hints/browser",
"//components/network_hints/common:mojo_bindings",
"//components/network_hints/renderer",
"//components/network_session_configurator/common",
"//components/prefs",

2
DEPS
Просмотреть файл

@ -11,7 +11,7 @@ gclient_gn_args = [
vars = {
'chromium_version':
'62521aaefdef5b345dd470f14eef6e44732ccf23',
'dc9525d251bf30828899e4cd7161f6dc6507023f',
'node_version':
'v12.13.0',
'nan_version':

Просмотреть файл

@ -1,5 +1,4 @@
is_electron_build = true
use_jumbo_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json

Просмотреть файл

@ -5,4 +5,3 @@ is_debug = false
is_component_build = false
is_component_ffmpeg = false
symbol_level = 1
use_jumbo_build = true

Просмотреть файл

@ -1,9 +1,50 @@
import("//build/config/mac/mac_sdk.gni")
# This is imported from /ios becuase this functionality was moved
# after Chromium stopped using xib files for macOS menu functionality
# See https://chromium-review.googlesource.com/c/chromium/src/+/1648695
import("//build/config/ios/rules.gni")
# Template to compile .xib and .storyboard files.
# (copied from src/build/config/ios/rules.gni)
#
# Arguments
#
# sources:
# list of string, sources to compile
#
# ibtool_flags:
# (optional) list of string, additional flags to pass to the ibtool
template("compile_ib_files") {
action_foreach(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
assert(defined(invoker.sources),
"sources must be specified for $target_name")
assert(defined(invoker.output_extension),
"output_extension must be specified for $target_name")
ibtool_flags = []
if (defined(invoker.ibtool_flags)) {
ibtool_flags = invoker.ibtool_flags
}
_output_extension = invoker.output_extension
script = "//build/config/ios/compile_ib_files.py"
sources = invoker.sources
outputs = [
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
]
args = [
"--input",
"{{source}}",
"--output",
rebase_path(
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
root_build_dir),
]
args += ibtool_flags
}
}
# Template is copied here from Chromium but was removed in
# https://chromium-review.googlesource.com/c/chromium/src/+/1637981

Просмотреть файл

@ -40,6 +40,8 @@ static_library("chrome") {
"//chrome/browser/net/proxy_service_factory.h",
"//chrome/browser/predictors/preconnect_manager.cc",
"//chrome/browser/predictors/preconnect_manager.h",
"//chrome/browser/predictors/predictors_features.cc",
"//chrome/browser/predictors/predictors_features.h",
"//chrome/browser/predictors/proxy_lookup_client_impl.cc",
"//chrome/browser/predictors/proxy_lookup_client_impl.h",
"//chrome/browser/predictors/resolve_host_client_impl.cc",
@ -319,6 +321,7 @@ source_set("chrome_spellchecker") {
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.h",
"//chrome/browser/spellchecker/spellcheck_service.cc",
"//chrome/browser/spellchecker/spellcheck_service.h",
"//chrome/common/pref_names.h",
]
if (has_spellcheck_panel) {

Просмотреть файл

@ -22,6 +22,11 @@ filenames = {
]
lib_sources = [
"chromium_src/chrome/browser/process_singleton.h",
"chromium_src/chrome/browser/process_singleton_posix.cc",
"chromium_src/chrome/browser/process_singleton_win.cc",
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc",
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h",
"shell/app/atom_content_client.cc",
"shell/app/atom_content_client.h",
"shell/app/atom_main_delegate.cc",
@ -32,17 +37,17 @@ filenames = {
"shell/app/command_line_args.h",
"shell/app/uv_task_runner.cc",
"shell/app/uv_task_runner.h",
"shell/browser/api/atom_api_app_mac.mm",
"shell/browser/api/atom_api_app.cc",
"shell/browser/font_defaults.cc",
"shell/browser/font_defaults.h",
"shell/browser/feature_list.cc",
"shell/browser/feature_list.h",
"shell/browser/api/atom_api_app.h",
"shell/browser/api/atom_api_app_mac.mm",
"shell/browser/api/atom_api_auto_updater.cc",
"shell/browser/api/atom_api_auto_updater.h",
"shell/browser/api/atom_api_browser_view.cc",
"shell/browser/api/atom_api_browser_view.h",
"shell/browser/api/atom_api_browser_window.cc",
"shell/browser/api/atom_api_browser_window.h",
"shell/browser/api/atom_api_browser_window_mac.mm",
"shell/browser/api/atom_api_browser_window_views.cc",
"shell/browser/api/atom_api_content_tracing.cc",
"shell/browser/api/atom_api_cookies.cc",
"shell/browser/api/atom_api_cookies.h",
@ -73,10 +78,10 @@ filenames = {
"shell/browser/api/atom_api_net_log.h",
"shell/browser/api/atom_api_notification.cc",
"shell/browser/api/atom_api_notification.h",
"shell/browser/api/atom_api_power_monitor_mac.mm",
"shell/browser/api/atom_api_power_monitor_win.cc",
"shell/browser/api/atom_api_power_monitor.cc",
"shell/browser/api/atom_api_power_monitor.h",
"shell/browser/api/atom_api_power_monitor_mac.mm",
"shell/browser/api/atom_api_power_monitor_win.cc",
"shell/browser/api/atom_api_power_save_blocker.cc",
"shell/browser/api/atom_api_power_save_blocker.h",
"shell/browser/api/atom_api_protocol.cc",
@ -106,10 +111,6 @@ filenames = {
"shell/browser/api/atom_api_web_request.cc",
"shell/browser/api/atom_api_web_request.h",
"shell/browser/api/atom_api_web_view_manager.cc",
"shell/browser/api/atom_api_browser_window.cc",
"shell/browser/api/atom_api_browser_window.h",
"shell/browser/api/atom_api_browser_window_mac.mm",
"shell/browser/api/atom_api_browser_window_views.cc",
"shell/browser/api/event.cc",
"shell/browser/api/event.h",
"shell/browser/api/frame_subscriber.cc",
@ -122,29 +123,26 @@ filenames = {
"shell/browser/api/process_metric.h",
"shell/browser/api/save_page_handler.cc",
"shell/browser/api/save_page_handler.h",
"shell/browser/auto_updater.cc",
"shell/browser/auto_updater.h",
"shell/browser/auto_updater_mac.mm",
"shell/browser/atom_autofill_driver.cc",
"shell/browser/atom_autofill_driver_factory.cc",
"shell/browser/atom_autofill_driver_factory.h",
"shell/browser/atom_autofill_driver.cc",
"shell/browser/atom_autofill_driver.h",
"shell/browser/atom_browser_client.cc",
"shell/browser/atom_browser_client.h",
"shell/browser/atom_browser_context.cc",
"shell/browser/atom_browser_context.h",
"shell/browser/atom_download_manager_delegate.cc",
"shell/browser/atom_download_manager_delegate.h",
"shell/browser/atom_gpu_client.cc",
"shell/browser/atom_gpu_client.h",
"shell/browser/atom_browser_main_parts.cc",
"shell/browser/atom_browser_main_parts.h",
"shell/browser/atom_browser_main_parts_mac.mm",
"shell/browser/atom_browser_main_parts_posix.cc",
"shell/browser/atom_download_manager_delegate.cc",
"shell/browser/atom_download_manager_delegate.h",
"shell/browser/atom_gpu_client.cc",
"shell/browser/atom_gpu_client.h",
"shell/browser/atom_javascript_dialog_manager.cc",
"shell/browser/atom_javascript_dialog_manager.h",
"shell/browser/atom_navigation_throttle.h",
"shell/browser/atom_navigation_throttle.cc",
"shell/browser/atom_navigation_throttle.h",
"shell/browser/atom_paths.h",
"shell/browser/atom_permission_manager.cc",
"shell/browser/atom_permission_manager.h",
@ -154,37 +152,44 @@ filenames = {
"shell/browser/atom_speech_recognition_manager_delegate.h",
"shell/browser/atom_web_ui_controller_factory.cc",
"shell/browser/atom_web_ui_controller_factory.h",
"shell/browser/auto_updater.cc",
"shell/browser/auto_updater.h",
"shell/browser/auto_updater_mac.mm",
"shell/browser/browser.cc",
"shell/browser/browser.h",
"shell/browser/browser_linux.cc",
"shell/browser/browser_mac.mm",
"shell/browser/browser_win.cc",
"shell/browser/browser_observer.h",
"shell/browser/browser_process_impl.cc",
"shell/browser/browser_process_impl.h",
"shell/browser/browser_win.cc",
"shell/browser/child_web_contents_tracker.cc",
"shell/browser/child_web_contents_tracker.h",
"shell/browser/common_web_contents_delegate_mac.mm",
"shell/browser/common_web_contents_delegate_views.cc",
"shell/browser/common_web_contents_delegate.cc",
"shell/browser/common_web_contents_delegate.h",
"shell/browser/common_web_contents_delegate_mac.mm",
"shell/browser/common_web_contents_delegate_views.cc",
"shell/browser/cookie_change_notifier.cc",
"shell/browser/cookie_change_notifier.h",
"shell/browser/feature_list.cc",
"shell/browser/feature_list.h",
"shell/browser/font_defaults.cc",
"shell/browser/font_defaults.h",
"shell/browser/javascript_environment.cc",
"shell/browser/javascript_environment.h",
"shell/browser/lib/bluetooth_chooser.cc",
"shell/browser/lib/bluetooth_chooser.h",
"shell/browser/lib/power_observer.h",
"shell/browser/lib/power_observer_linux.h",
"shell/browser/lib/power_observer_linux.cc",
"shell/browser/lib/power_observer_linux.h",
"shell/browser/linux/unity_service.cc",
"shell/browser/linux/unity_service.h",
"shell/browser/login_handler.cc",
"shell/browser/login_handler.h",
"shell/browser/mac/atom_application.h",
"shell/browser/mac/atom_application.mm",
"shell/browser/mac/atom_application_delegate.h",
"shell/browser/mac/atom_application_delegate.mm",
"shell/browser/mac/atom_application.h",
"shell/browser/mac/atom_application.mm",
"shell/browser/mac/dict_util.h",
"shell/browser/mac/dict_util.mm",
"shell/browser/mac/in_app_purchase.h",
@ -193,48 +198,52 @@ filenames = {
"shell/browser/mac/in_app_purchase_observer.mm",
"shell/browser/mac/in_app_purchase_product.h",
"shell/browser/mac/in_app_purchase_product.mm",
"shell/browser/microtasks_runner.cc",
"shell/browser/microtasks_runner.h",
"shell/browser/native_browser_view.cc",
"shell/browser/native_browser_view.h",
"shell/browser/native_browser_view_mac.h",
"shell/browser/native_browser_view_mac.mm",
"shell/browser/native_browser_view_views.h",
"shell/browser/native_browser_view_views.cc",
"shell/browser/native_window.cc",
"shell/browser/native_window.h",
"shell/browser/native_window_views_win.cc",
"shell/browser/native_window_views.cc",
"shell/browser/native_window_views.h",
"shell/browser/native_window_mac.h",
"shell/browser/native_window_mac.mm",
"shell/browser/native_window_observer.h",
"shell/browser/media/media_capture_devices_dispatcher.cc",
"shell/browser/media/media_capture_devices_dispatcher.h",
"shell/browser/media/media_device_id_salt.cc",
"shell/browser/media/media_device_id_salt.h",
"shell/browser/media/media_stream_devices_controller.cc",
"shell/browser/media/media_stream_devices_controller.h",
"shell/browser/microtasks_runner.cc",
"shell/browser/microtasks_runner.h",
"shell/browser/native_browser_view.cc",
"shell/browser/native_browser_view.h",
"shell/browser/native_browser_view_mac.h",
"shell/browser/native_browser_view_mac.mm",
"shell/browser/native_browser_view_views.cc",
"shell/browser/native_browser_view_views.h",
"shell/browser/native_window.cc",
"shell/browser/native_window.h",
"shell/browser/native_window_mac.h",
"shell/browser/native_window_mac.mm",
"shell/browser/native_window_observer.h",
"shell/browser/native_window_views.cc",
"shell/browser/native_window_views.h",
"shell/browser/native_window_views_win.cc",
"shell/browser/net/asar/asar_url_loader.cc",
"shell/browser/net/asar/asar_url_loader.h",
"shell/browser/net/atom_url_loader_factory.cc",
"shell/browser/net/atom_url_loader_factory.h",
"shell/browser/net/cert_verifier_client.cc",
"shell/browser/net/cert_verifier_client.h",
"shell/browser/net/proxying_url_loader_factory.cc",
"shell/browser/net/proxying_url_loader_factory.h",
"shell/browser/net/network_context_service.cc",
"shell/browser/net/network_context_service_factory.cc",
"shell/browser/net/network_context_service_factory.h",
"shell/browser/net/network_context_service.cc",
"shell/browser/net/network_context_service.h",
"shell/browser/net/node_stream_loader.cc",
"shell/browser/net/node_stream_loader.h",
"shell/browser/net/proxying_url_loader_factory.cc",
"shell/browser/net/proxying_url_loader_factory.h",
"shell/browser/net/resolve_proxy_helper.cc",
"shell/browser/net/resolve_proxy_helper.h",
"shell/browser/net/system_network_context_manager.cc",
"shell/browser/net/system_network_context_manager.h",
"shell/browser/net/url_pipe_loader.cc",
"shell/browser/net/url_pipe_loader.h",
"shell/browser/network_hints_handler_impl.cc",
"shell/browser/network_hints_handler_impl.h",
"shell/browser/node_debugger.cc",
"shell/browser/node_debugger.h",
"shell/browser/notifications/linux/libnotify_notification.cc",
"shell/browser/notifications/linux/libnotify_notification.h",
"shell/browser/notifications/linux/notification_presenter_linux.cc",
@ -246,16 +255,16 @@ filenames = {
"shell/browser/notifications/mac/notification_presenter_mac.h",
"shell/browser/notifications/mac/notification_presenter_mac.mm",
"shell/browser/notifications/notification.cc",
"shell/browser/notifications/notification.h",
"shell/browser/notifications/notification_delegate.h",
"shell/browser/notifications/notification.h",
"shell/browser/notifications/notification_presenter.cc",
"shell/browser/notifications/notification_presenter.h",
"shell/browser/notifications/platform_notification_service.cc",
"shell/browser/notifications/platform_notification_service.h",
"shell/browser/notifications/win/notification_presenter_win.cc",
"shell/browser/notifications/win/notification_presenter_win.h",
"shell/browser/notifications/win/notification_presenter_win7.cc",
"shell/browser/notifications/win/notification_presenter_win7.h",
"shell/browser/notifications/win/notification_presenter_win.cc",
"shell/browser/notifications/win/notification_presenter_win.h",
"shell/browser/notifications/win/win32_desktop_notifications/common.h",
"shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc",
"shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h",
@ -267,17 +276,13 @@ filenames = {
"shell/browser/notifications/win/win32_notification.h",
"shell/browser/notifications/win/windows_toast_notification.cc",
"shell/browser/notifications/win/windows_toast_notification.h",
"shell/browser/node_debugger.cc",
"shell/browser/node_debugger.h",
"shell/browser/pref_store_delegate.cc",
"shell/browser/pref_store_delegate.h",
"shell/browser/relauncher.cc",
"shell/browser/relauncher.h",
"shell/browser/relauncher_linux.cc",
"shell/browser/relauncher_mac.cc",
"shell/browser/relauncher_win.cc",
"shell/browser/relauncher.cc",
"shell/browser/relauncher.h",
"shell/browser/renderer_host/electron_render_message_filter.cc",
"shell/browser/renderer_host/electron_render_message_filter.h",
"shell/browser/session_preferences.cc",
"shell/browser/session_preferences.h",
"shell/browser/special_storage_policy.cc",
@ -293,63 +298,63 @@ filenames = {
"shell/browser/ui/certificate_trust_win.cc",
"shell/browser/ui/cocoa/atom_bundle_mover.h",
"shell/browser/ui/cocoa/atom_bundle_mover.mm",
"shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h",
"shell/browser/ui/cocoa/atom_inspectable_web_contents_view.mm",
"shell/browser/ui/cocoa/atom_menu_controller.h",
"shell/browser/ui/cocoa/atom_menu_controller.mm",
"shell/browser/ui/cocoa/atom_native_widget_mac.h",
"shell/browser/ui/cocoa/atom_native_widget_mac.mm",
"shell/browser/ui/cocoa/atom_ns_window.h",
"shell/browser/ui/cocoa/atom_ns_window.mm",
"shell/browser/ui/cocoa/atom_ns_window_delegate.h",
"shell/browser/ui/cocoa/atom_ns_window_delegate.mm",
"shell/browser/ui/cocoa/atom_ns_window.h",
"shell/browser/ui/cocoa/atom_ns_window.mm",
"shell/browser/ui/cocoa/atom_preview_item.h",
"shell/browser/ui/cocoa/atom_preview_item.mm",
"shell/browser/ui/cocoa/atom_touch_bar.h",
"shell/browser/ui/cocoa/atom_touch_bar.mm",
"shell/browser/ui/cocoa/delayed_native_view_host.cc",
"shell/browser/ui/cocoa/delayed_native_view_host.h",
"shell/browser/ui/cocoa/views_delegate_mac.h",
"shell/browser/ui/cocoa/views_delegate_mac.mm",
"shell/browser/ui/cocoa/root_view_mac.mm",
"shell/browser/ui/cocoa/root_view_mac.h",
"shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h",
"shell/browser/ui/cocoa/atom_inspectable_web_contents_view.mm",
"shell/browser/ui/cocoa/event_dispatching_window.h",
"shell/browser/ui/cocoa/event_dispatching_window.mm",
"shell/browser/ui/cocoa/NSColor+Hex.h",
"shell/browser/ui/cocoa/NSColor+Hex.mm",
"shell/browser/ui/cocoa/NSString+ANSI.h",
"shell/browser/ui/cocoa/NSString+ANSI.mm",
"shell/browser/ui/cocoa/root_view_mac.h",
"shell/browser/ui/cocoa/root_view_mac.mm",
"shell/browser/ui/cocoa/views_delegate_mac.h",
"shell/browser/ui/cocoa/views_delegate_mac.mm",
"shell/browser/ui/devtools_manager_delegate.cc",
"shell/browser/ui/devtools_manager_delegate.h",
"shell/browser/ui/devtools_ui.cc",
"shell/browser/ui/devtools_ui.h",
"shell/browser/ui/drag_util.h",
"shell/browser/ui/drag_util_mac.mm",
"shell/browser/ui/drag_util_views.cc",
"shell/browser/ui/drag_util.h",
"shell/browser/ui/file_dialog.h",
"shell/browser/ui/file_dialog_gtk.cc",
"shell/browser/ui/file_dialog.h",
"shell/browser/ui/file_dialog_mac.mm",
"shell/browser/ui/file_dialog_win.cc",
"shell/browser/ui/inspectable_web_contents.cc",
"shell/browser/ui/inspectable_web_contents.h",
"shell/browser/ui/inspectable_web_contents_delegate.h",
"shell/browser/ui/inspectable_web_contents.h",
"shell/browser/ui/inspectable_web_contents_impl.cc",
"shell/browser/ui/inspectable_web_contents_impl.h",
"shell/browser/ui/inspectable_web_contents_view.h",
"shell/browser/ui/inspectable_web_contents_view_delegate.cc",
"shell/browser/ui/inspectable_web_contents_view_delegate.h",
"shell/browser/ui/inspectable_web_contents_view.h",
"shell/browser/ui/inspectable_web_contents_view_mac.h",
"shell/browser/ui/inspectable_web_contents_view_mac.mm",
"shell/browser/ui/message_box.h",
"shell/browser/ui/message_box_gtk.cc",
"shell/browser/ui/message_box.h",
"shell/browser/ui/message_box_mac.mm",
"shell/browser/ui/message_box_win.cc",
"shell/browser/ui/cocoa/NSColor+Hex.mm",
"shell/browser/ui/cocoa/NSColor+Hex.h",
"shell/browser/ui/cocoa/NSString+ANSI.mm",
"shell/browser/ui/cocoa/NSString+ANSI.h",
"shell/browser/ui/tray_icon.cc",
"shell/browser/ui/tray_icon.h",
"shell/browser/ui/tray_icon_gtk.cc",
"shell/browser/ui/tray_icon_gtk.h",
"shell/browser/ui/tray_icon_cocoa.h",
"shell/browser/ui/tray_icon_cocoa.mm",
"shell/browser/ui/tray_icon_gtk.cc",
"shell/browser/ui/tray_icon_gtk.h",
"shell/browser/ui/tray_icon.h",
"shell/browser/ui/tray_icon_observer.h",
"shell/browser/ui/tray_icon_win.cc",
"shell/browser/ui/views/atom_views_delegate.cc",
@ -382,10 +387,10 @@ filenames = {
"shell/browser/ui/win/atom_desktop_window_tree_host_win.h",
"shell/browser/ui/win/jump_list.cc",
"shell/browser/ui/win/jump_list.h",
"shell/browser/ui/win/notify_icon_host.cc",
"shell/browser/ui/win/notify_icon_host.h",
"shell/browser/ui/win/notify_icon.cc",
"shell/browser/ui/win/notify_icon.h",
"shell/browser/ui/win/notify_icon_host.cc",
"shell/browser/ui/win/notify_icon_host.h",
"shell/browser/ui/win/taskbar_host.cc",
"shell/browser/ui/win/taskbar_host.h",
"shell/browser/ui/x/event_disabler.cc",
@ -396,8 +401,6 @@ filenames = {
"shell/browser/ui/x/x_window_utils.h",
"shell/browser/unresponsive_suppressor.cc",
"shell/browser/unresponsive_suppressor.h",
"shell/browser/win/scoped_hstring.cc",
"shell/browser/win/scoped_hstring.h",
"shell/browser/web_contents_permission_helper.cc",
"shell/browser/web_contents_permission_helper.h",
"shell/browser/web_contents_preferences.cc",
@ -413,6 +416,8 @@ filenames = {
"shell/browser/window_list.cc",
"shell/browser/window_list.h",
"shell/browser/window_list_observer.h",
"shell/browser/win/scoped_hstring.cc",
"shell/browser/win/scoped_hstring.h",
"shell/browser/zoom_level_delegate.cc",
"shell/browser/zoom_level_delegate.h",
"shell/common/api/atom_api_asar.cc",
@ -427,21 +432,22 @@ filenames = {
"shell/common/api/atom_api_native_image_mac.mm",
"shell/common/api/atom_api_shell.cc",
"shell/common/api/atom_api_v8_util.cc",
"shell/common/api/constructor.h",
"shell/common/api/electron_bindings.cc",
"shell/common/api/electron_bindings.h",
"shell/common/api/constructor.h",
"shell/common/api/features.cc",
"shell/common/application_info.cc",
"shell/common/application_info.h",
"shell/common/application_info_linux.cc",
"shell/common/application_info_mac.mm",
"shell/common/application_info_win.cc",
"shell/common/asar/archive.cc",
"shell/common/asar/archive.h",
"shell/common/asar/asar_util.cc",
"shell/common/asar/asar_util.h",
"shell/common/asar/scoped_temporary_file.cc",
"shell/common/asar/scoped_temporary_file.h",
"shell/common/application_info_linux.cc",
"shell/common/application_info_mac.mm",
"shell/common/application_info_win.cc",
"shell/common/application_info.cc",
"shell/common/application_info.h",
"shell/common/atom_command_line.cc",
"shell/common/atom_command_line.h",
"shell/common/atom_constants.cc",
@ -454,12 +460,14 @@ filenames = {
"shell/common/crash_reporter/crash_reporter_linux.h",
"shell/common/crash_reporter/crash_reporter_mac.h",
"shell/common/crash_reporter/crash_reporter_mac.mm",
"shell/common/crash_reporter/crash_reporter_win.h",
"shell/common/crash_reporter/crash_reporter_win.cc",
"shell/common/crash_reporter/crash_reporter_win.h",
"shell/common/crash_reporter/linux/crash_dump_handler.cc",
"shell/common/crash_reporter/linux/crash_dump_handler.h",
"shell/common/crash_reporter/win/crash_service_main.cc",
"shell/common/crash_reporter/win/crash_service_main.h",
"shell/common/deprecate_util.cc",
"shell/common/deprecate_util.h",
"shell/common/gin_converters/accelerator_converter.cc",
"shell/common/gin_converters/accelerator_converter.h",
"shell/common/gin_converters/blink_converter.cc",
@ -510,15 +518,13 @@ filenames = {
"shell/common/gin_helper/trackable_object.h",
"shell/common/heap_snapshot.cc",
"shell/common/heap_snapshot.h",
"shell/common/key_weak_map.h",
"shell/common/keyboard_util.cc",
"shell/common/keyboard_util.h",
"shell/common/deprecate_util.cc",
"shell/common/deprecate_util.h",
"shell/common/mouse_util.cc",
"shell/common/mouse_util.h",
"shell/common/key_weak_map.h",
"shell/common/mac/main_application_bundle.h",
"shell/common/mac/main_application_bundle.mm",
"shell/common/mouse_util.cc",
"shell/common/mouse_util.h",
"shell/common/node_bindings.cc",
"shell/common/node_bindings.h",
"shell/common/node_bindings_linux.cc",
@ -528,40 +534,40 @@ filenames = {
"shell/common/node_bindings_win.cc",
"shell/common/node_bindings_win.h",
"shell/common/node_includes.h",
"shell/common/node_util.h",
"shell/common/node_util.cc",
"shell/common/node_util.h",
"shell/common/options_switches.cc",
"shell/common/options_switches.h",
"shell/common/platform_util.h",
"shell/common/platform_util_linux.cc",
"shell/common/platform_util_mac.mm",
"shell/common/platform_util_win.cc",
"shell/common/skia_util.h",
"shell/common/skia_util.cc",
"shell/common/skia_util.h",
"shell/common/v8_value_converter.cc",
"shell/common/v8_value_converter.h",
"shell/renderer/api/context_bridge/render_frame_context_bridge_store.cc",
"shell/renderer/api/context_bridge/render_frame_context_bridge_store.h",
"shell/renderer/api/atom_api_context_bridge.cc",
"shell/renderer/api/atom_api_context_bridge.h",
"shell/renderer/api/atom_api_renderer_ipc.cc",
"shell/renderer/api/atom_api_spell_check_client.cc",
"shell/renderer/api/atom_api_spell_check_client.h",
"shell/renderer/api/atom_api_web_frame.cc",
"shell/renderer/api/context_bridge/render_frame_context_bridge_store.cc",
"shell/renderer/api/context_bridge/render_frame_context_bridge_store.h",
"shell/renderer/atom_autofill_agent.cc",
"shell/renderer/atom_autofill_agent.h",
"shell/renderer/atom_render_frame_observer.cc",
"shell/renderer/atom_render_frame_observer.h",
"shell/renderer/atom_renderer_client.cc",
"shell/renderer/atom_renderer_client.h",
"shell/renderer/atom_render_frame_observer.cc",
"shell/renderer/atom_render_frame_observer.h",
"shell/renderer/atom_sandboxed_renderer_client.cc",
"shell/renderer/atom_sandboxed_renderer_client.h",
"shell/renderer/content_settings_observer.cc",
"shell/renderer/content_settings_observer.h",
"shell/renderer/electron_api_service_impl.cc",
"shell/renderer/electron_api_service_impl.h",
"shell/renderer/electron_renderer_pepper_host_factory.cc",
"shell/renderer/electron_renderer_pepper_host_factory.h",
"shell/renderer/atom_sandboxed_renderer_client.cc",
"shell/renderer/atom_sandboxed_renderer_client.h",
"shell/renderer/guest_view_container.cc",
"shell/renderer/guest_view_container.h",
"shell/renderer/renderer_client_base.cc",
@ -570,11 +576,6 @@ filenames = {
"shell/renderer/web_worker_observer.h",
"shell/utility/atom_content_utility_client.cc",
"shell/utility/atom_content_utility_client.h",
"chromium_src/chrome/browser/process_singleton_posix.cc",
"chromium_src/chrome/browser/process_singleton_win.cc",
"chromium_src/chrome/browser/process_singleton.h",
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc",
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h",
]
lib_sources_nss = [

Просмотреть файл

@ -73,14 +73,15 @@ allow_new_privileges_in_unsandboxed_child_processes.patch
expose_setuseragent_on_networkcontext.patch
feat_add_set_theme_source_to_allow_apps_to.patch
revert_cleanup_remove_menu_subtitles_sublabels.patch
ui_views_fix_jumbo_build.patch
export_fetchapi_mojo_traits_to_fix_component_build.patch
add_zoom_limit_setters_to_webcontents.patch
revert_remove_contentrendererclient_shouldfork.patch
build_win_disable_zc_twophase.patch
ignore_rc_check.patch
build_win_fix_ambiguous_reference_with_msstl.patch
build_win_iwyu_for_smil_time.patch
remove_usage_of_incognito_apis_in_the_spellchecker.patch
chore_use_electron_resources_not_chrome_for_spellchecker.patch
feat_unset_window_aspect_ratio_on_linux.patch
fix_ambiguous_reference_to_data.patch
backport_fix_msstl_compat_in_ui_events.patch
build_win_fix_msstl_compatibility_for_pdf.patch

Просмотреть файл

@ -33,7 +33,7 @@ index 0de66bc85b1d392fba44858e3a478d918e538393..a21e318b2108223bb4ca6a74d3c654c3
client->PostIOThreadCreated(gpu_process.io_task_runner());
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index 830d5e89af7bd3ddb409ac7bf9d8eb3109830d41..7d544536ec846c294deb6626f51d5de7846fc5c2 100644
index 3331f7152da864712e1878b4d2a2f5e2fa34b4ed..38b14405b42813d51406671ce0c4655a85bd88d0 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -39,6 +39,10 @@ class CONTENT_EXPORT ContentGpuClient {

Просмотреть файл

@ -39,41 +39,41 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index f2d49df56a524fd1cc76623ec76fc7059957d476..bcb437fe328ccb95446ed0b8525017118546d41e 100644
index 7fb51da7c03f9bd6bfcb8724710edf72dc81c79e..138a6fca7e85db767dea0e06be735fff81fe9c49 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -648,6 +648,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, WTF::ArrayBufferContents::kDontInitialize);
@@ -647,6 +647,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, ArrayBufferContents::kDontInitialize);
}
+ void* Realloc(void* data, size_t size) override {
+ return WTF::ArrayBufferContents::Realloc(data, size);
+ return ArrayBufferContents::Realloc(data, size);
+ }
+
void Free(void* data, size_t size) override {
WTF::ArrayBufferContents::FreeMemory(data);
ArrayBufferContents::FreeMemory(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
index 8cd9b210bdb16fca7935b44dbc42829e1d193643..5c8ccbcc27a0ed6cc3a3b717f3336ddee4e82c0a 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
@@ -127,6 +127,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
index ac525b62a1282839bc906b1ee59837211a83476c..5e6c54b87e88ea2741bc7986bf76ddaa48723e56 100644
--- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
+++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
@@ -126,6 +126,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
return AllocateMemoryWithFlags(size, policy, base::PartitionAllocReturnNull);
}
+void* ArrayBufferContents::Realloc(void* data, size_t size) {
+ return Partitions::ArrayBufferPartition()->Realloc(data, size,
+ return WTF::Partitions::ArrayBufferPartition()->Realloc(data, size,
+ WTF_HEAP_PROFILER_TYPE_NAME(ArrayBufferContents));
+}
+
void ArrayBufferContents::FreeMemory(void* data) {
Partitions::ArrayBufferPartition()->Free(data);
WTF::Partitions::ArrayBufferPartition()->Free(data);
}
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
index 841e87c219e5d3c66bd3394a63bcfa13bf34640a..b47a6794febf699eef36505a2f0540ec542bd155 100644
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
@@ -150,6 +150,7 @@ class WTF_EXPORT ArrayBufferContents {
diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
index 1adf4924657624059dcbe4e88cef684478787752..3b14d852b0654309cb53f933e396dc1e7b479790 100644
--- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
+++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
@@ -149,6 +149,7 @@ class CORE_EXPORT ArrayBufferContents {
void CopyTo(ArrayBufferContents& other);
static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

Просмотреть файл

@ -8,10 +8,10 @@ This is needed by Electron to allow apps to limit how much an app can zoom in
or out.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 03ae4f288371d85493561f22e2429ade5de32339..9010eba2118c14d2cf3497bf78fb78ffe8f6ecf3 100644
index c13511e26189e68376e29f38c4ae2e1cc8fd3c57..a5c4162b3c69b534f843e1b6737392c867fc88ea 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4110,10 +4110,18 @@ bool WebContentsImpl::GetClosedByUserGesture() {
@@ -4124,10 +4124,18 @@ bool WebContentsImpl::GetClosedByUserGesture() {
return closed_by_user_gesture_;
}
@ -31,10 +31,10 @@ index 03ae4f288371d85493561f22e2429ade5de32339..9010eba2118c14d2cf3497bf78fb78ff
return maximum_zoom_percent_;
}
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 37d4d79ea76db037fc95d3b15a96e70f320d3d55..060a16bd4f378bf0316e5af168a53ae3a734310a 100644
index ea1b3581ead984ac084fc9a2b9daf85f6756ea5c..b967e02b4052426855a2af88abbced2076b3e04a 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -448,7 +448,9 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -447,7 +447,9 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
void SystemDragEnded(RenderWidgetHost* source_rwh) override;
void SetClosedByUserGesture(bool value) override;
bool GetClosedByUserGesture() override;
@ -44,7 +44,7 @@ index 37d4d79ea76db037fc95d3b15a96e70f320d3d55..060a16bd4f378bf0316e5af168a53ae3
int GetMaximumZoomPercent() override;
void SetPageScale(float page_scale_factor) override;
gfx::Size GetPreferredSize() override;
@@ -1699,8 +1701,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -1690,8 +1692,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
bool closed_by_user_gesture_;
// Minimum/maximum zoom percent.

Просмотреть файл

@ -0,0 +1,46 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 31 Oct 2019 14:22:50 -0700
Subject: backport: fix MSSTL compat in ui/events
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/1893754
diff --git a/ui/events/blink/prediction/least_squares_predictor.cc b/ui/events/blink/prediction/least_squares_predictor.cc
index b43fe1893134992937fc7d97ce335344683bfa6b..8a95e17d0835afebd7594c206438cb54022853c9 100644
--- a/ui/events/blink/prediction/least_squares_predictor.cc
+++ b/ui/events/blink/prediction/least_squares_predictor.cc
@@ -5,6 +5,8 @@
#include "ui/events/blink/prediction/least_squares_predictor.h"
#include "ui/events/blink/prediction/predictor_factory.h"
+#include <algorithm>
+
namespace ui {
namespace {
diff --git a/ui/events/blink/prediction/linear_predictor.cc b/ui/events/blink/prediction/linear_predictor.cc
index e97f579d80573a1f801986c724bb33cd8bc52e8a..190fa1b3894ef5f7828e2f265566e16ce10e84c5 100644
--- a/ui/events/blink/prediction/linear_predictor.cc
+++ b/ui/events/blink/prediction/linear_predictor.cc
@@ -5,6 +5,8 @@
#include "ui/events/blink/prediction/linear_predictor.h"
#include "ui/events/blink/prediction/predictor_factory.h"
+#include <algorithm>
+
namespace ui {
LinearPredictor::LinearPredictor(EquationOrder order) {
diff --git a/ui/events/blink/prediction/linear_resampling.cc b/ui/events/blink/prediction/linear_resampling.cc
index e2a8757b779ba270cd3ae8f1735543be3cc324e0..2b2efe7f132055dfc1f650707a9cbb7a5842ca1a 100644
--- a/ui/events/blink/prediction/linear_resampling.cc
+++ b/ui/events/blink/prediction/linear_resampling.cc
@@ -4,6 +4,8 @@
#include "ui/events/blink/prediction/linear_resampling.h"
+#include <algorithm>
+
#include "ui/events/blink/prediction/predictor_factory.h"
namespace ui {

Просмотреть файл

@ -14,7 +14,7 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 06f6b33d2137450ecea6d03bbe75f9b78d33c82a..c86fddc75758cd893932aa6ee29455810e051193 100644
index fa4e26718e2d663305a2be664d8ffbf1a64b3c34..7ba237076e14f0806b94a2fcae3894fec31d0e71 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -333,10 +333,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {

Просмотреть файл

@ -5,7 +5,7 @@ Subject: blink_world_context.patch
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 98c18915bff9ac57fa99f07f3213c4b75795e47f..d696c5b9cf3a31233b91d395bea1ac389e182192 100644
index fd5d927dda08bb8ea9fe89ae752d700c67ca1bbe..81a452bf2d2e61cbff0c4573223b0af5a5e20083 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -343,6 +343,9 @@ class WebLocalFrame : public WebFrame {
@ -19,7 +19,7 @@ index 98c18915bff9ac57fa99f07f3213c4b75795e47f..d696c5b9cf3a31233b91d395bea1ac38
// that the script evaluated to with callback. Script execution can be
// suspend.
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index d87ab3ddb5e85f820fc2deb03a245bddd74f0c38..8981f9b0101de4e99e2b5585bb05fa82464b34ff 100644
index 81c8e59d81af696b6175f3cf6ce5441d8ae9c265..dd77b47e884a703590a3ad74513f189621ca89e6 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -880,6 +880,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@ -37,7 +37,7 @@ index d87ab3ddb5e85f820fc2deb03a245bddd74f0c38..8981f9b0101de4e99e2b5585bb05fa82
return BindingSecurity::ShouldAllowAccessToFrame(
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 7e2986c37ed7946a180c2c61adeb1047f7e39291..01ec09ad30949e16d1e037124cd3d82065d3d4f6 100644
index 16e0460b1c4d7e239e0516a52a3f375c016f37b8..1d5f93c1a79a68815273191ae89f8b995ed97256 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -170,6 +170,8 @@ class CORE_EXPORT WebLocalFrameImpl final

Просмотреть файл

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 25 Oct 2019 15:35:45 -0700
Subject: build,[win]: fix ambiguous reference with MSSTL
size if defined in `<xutility>` with VS 2019
diff --git a/base/command_line.cc b/base/command_line.cc
index 4bb290dfa616eb9c7f5f8004eabe33336e9582d5..e9cd0806b1cd58affbfb1d39f7b3fa7a95bec747 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -43,7 +43,7 @@ constexpr CommandLine::StringPieceType kSwitchPrefixes[] = {L"--", L"-", L"/"};
// Unixes don't use slash as a switch.
constexpr CommandLine::StringPieceType kSwitchPrefixes[] = {"--", "-"};
#endif
-size_t switch_prefix_count = size(kSwitchPrefixes);
+size_t switch_prefix_count = base::size(kSwitchPrefixes);
size_t GetSwitchPrefixLength(CommandLine::StringPieceType string) {
for (size_t i = 0; i < switch_prefix_count; ++i) {
@@ -201,7 +201,7 @@ void CommandLine::set_slash_is_not_a_switch() {
// The last switch prefix should be slash, so adjust the size to skip it.
static_assert(base::make_span(kSwitchPrefixes).back() == L"/",
"Error: Last switch prefix is not a slash.");
- switch_prefix_count = size(kSwitchPrefixes) - 1;
+ switch_prefix_count = base::size(kSwitchPrefixes) - 1;
}
// static

Просмотреть файл

@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Deepak Mohan <hop2deep@gmail.com>
Date: Fri, 1 Nov 2019 15:13:55 -0700
Subject: build,[win]: fix msstl compatibility for //pdf
diff --git a/pdf/document_layout.cc b/pdf/document_layout.cc
index 51064a3496f8d9354d00db6085cc9c5d23f7ec0c..b53da54e153b2078a2e18c9af38cfbbbae8da5b8 100644
--- a/pdf/document_layout.cc
+++ b/pdf/document_layout.cc
@@ -4,6 +4,8 @@
#include "pdf/document_layout.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/size.h"
diff --git a/pdf/draw_utils/coordinates.cc b/pdf/draw_utils/coordinates.cc
index 49c272f269ce312a72921506bd0abeeea283050f..11b7cca86116940810da374dd64ec437986ccccc 100644
--- a/pdf/draw_utils/coordinates.cc
+++ b/pdf/draw_utils/coordinates.cc
@@ -4,6 +4,7 @@
#include "pdf/draw_utils/coordinates.h"
+#include <algorithm>
#include <math.h>
#include "base/logging.h"

Просмотреть файл

@ -5,10 +5,10 @@ Subject: can_create_window.patch
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 12b13750a26229fb0cb91ed37c24d1b81fdb9f65..887d31761e0f4d065f8d5f5ad1333874b305cadd 100644
index 6dc225ede0a64d77c103b80fc76d51299170cc44..0f89422b5c73c608df289834587ec98376079ee2 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -4308,6 +4308,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -4307,6 +4307,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@ -17,10 +17,10 @@ index 12b13750a26229fb0cb91ed37c24d1b81fdb9f65..887d31761e0f4d065f8d5f5ad1333874
&no_javascript_access);
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index cacab917f7bafd494c783bce7eddbeb58420b6e6..815a04e4a8b4abc2b21fe38188c77497e9f3eaae 100644
index 23aa37d474df2b52f91d6d07a3423728f2f6e776..4583407a4a287c9fe39e013fee3a0e3a1cf9fe12 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -314,6 +314,10 @@ struct CreateNewWindowParams {
@@ -296,6 +296,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;

Просмотреть файл

@ -20,7 +20,7 @@ index 48ac0a24efde0cb7d3ba71c8b8bdf5178f606e80..e2beefc276098fdc8f1cdab2e0edb8fa
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
index d5e4c09e1722232df44b112ce39cdacea03a4710..c6caf7eacd9eed439ab5167e51b9fcce5d6af664 100644
index 4fd35c8d5bba01c25c906b19bb251222ba3d25b4..4770f0d6a8d145e5d16931d5caf4f1f85abead20 100644
--- a/components/language/core/browser/language_prefs.cc
+++ b/components/language/core/browser/language_prefs.cc
@@ -21,7 +21,7 @@

Просмотреть файл

@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
in atom::CommonWebContentsDelegate::ResetManageWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index fbb9132e81a7d2e1ffa264eedcb385429e47042f..a0eb7e09745a7678ba27bb88fb2b4e28c06a9469 100644
index 3af6a64be2f12cc4b7618f2c4db1a70fe7df0689..a81a8a3ba12b75fffd871b63bfc5c0564ea87826 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1515,7 +1515,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1541,7 +1541,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
NOTREACHED();
#else
base::RunLoop run_loop;

Просмотреть файл

@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 57936884b27abdf4b7ce77697b51faeee986b844..384c9eec1710abaffd814fd1a9d3be13364cc5d4 100644
index 855b96ae0c398506ec81bd24c0430f2573706d80..977c07db32933a9cc04b1f0613014718d4725640 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1822,6 +1822,12 @@ const gfx::ColorSpace& LayerTreeHostImpl::GetRasterColorSpace() const {
@ -220,10 +220,10 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index e42a2f780170f01edce84753d60b1fba3a429aeb..3cb62924adf93c4d437c8fa81529efc5188d7f77 100644
index 6deb2a50ff258ce3b1f892abccd6be2f9cf4e255..ab723f93e259453689ece2b2f447cbed1854e4c1 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -196,6 +196,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -186,6 +186,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
// Command-line switches to propagate to the GPU process.
static const char* const kSwitchNames[] = {
@ -266,10 +266,18 @@ index 84af6512284655c8781fd839fc50cd3a75395889..d51198f40580d023d2bfcb6a131b7e5a
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..df2b5b120483225c2bd21a337e6085dbceca4ec4 100644
index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..0113b09e2f2bb85b4ec43a90503b9ed98e42fd0f 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
@@ -12,6 +12,7 @@
@@ -4,6 +4,7 @@
#include "third_party/blink/renderer/platform/graphics/canvas_color_params.h"
+#include "base/command_line.h"
#include "cc/paint/skia_paint_canvas.h"
#include "components/viz/common/resources/resource_format_utils.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
@@ -12,6 +13,7 @@
#include "third_party/khronos/GLES3/gl3.h"
#include "third_party/skia/include/core/SkSurfaceProps.h"
#include "ui/gfx/color_space.h"
@ -277,7 +285,7 @@ index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..df2b5b120483225c2bd21a337e6085db
namespace blink {
@@ -89,6 +90,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
@@ -89,6 +91,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
}
gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
@ -289,7 +297,7 @@ index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..df2b5b120483225c2bd21a337e6085db
gfx::ColorSpace::PrimaryID primary_id = GetPrimaryID(color_space_);
// TODO(ccameron): This needs to take into account whether or not this texture
@@ -102,6 +108,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
@@ -102,6 +109,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
}
gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const {

Просмотреть файл

@ -6,7 +6,7 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
See https://github.com/electron/electron/issues/10754
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index 02cce1fc162b87229a9f969f328ff857d64047c3..505aac60a0c04344f4bddd25b99efe267bcc124d 100644
index 511aac290866fa739e4c51d487baa8cfdbe52c78..c608456b22923568b83da5a0ae5c78c4af8c7970 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4150,7 +4150,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,

Просмотреть файл

@ -7,7 +7,7 @@ Compilation of those files fails with the Chromium 68.
Remove the patch during the Chromium 69 upgrade.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 40ad9a77f2277a95db2f2b198c9f53be28ff1e7b..5e8008d6e8de92f3af0c5ed8df3db1df44e3a8cf 100644
index f3ced1e7233389f421a0b3b6090ad4ffdb40a6f4..2e65ad0b41158fbec82e628a6a90ae09a6f3a0d5 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1807,7 +1807,7 @@ jumbo_source_set("blink_platform_unittests_sources") {

Просмотреть файл

@ -33,7 +33,7 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
};
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index f0981821bf55594169a35c2db16d79ea0321b565..95407bd68c2c1001408b3a4db093f26f41d21526 100644
index 144714a3a1e63bb891b86cba12a27de50be7f976..e98a296a6b52ec4c6eb336e2d882a36e6f58b76c 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -931,6 +931,13 @@ void NetworkContext::SetNetworkConditions(
@ -51,7 +51,7 @@ index f0981821bf55594169a35c2db16d79ea0321b565..95407bd68c2c1001408b3a4db093f26f
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index af1fcc847fbfa699d1fa3b8bdc04a6326cb9c3b9..22b8821a6e8dbe21168cbcd73c7012b9cfd91eb7 100644
index f0a41d64804eab8195c389b457f6c0119d24a783..b531fa64af4ae625cd8b79c40d08b64b40a76d1e 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -226,6 +226,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@ -63,7 +63,7 @@ index af1fcc847fbfa699d1fa3b8bdc04a6326cb9c3b9..22b8821a6e8dbe21168cbcd73c7012b9
void SetEnableReferrers(bool enable_referrers) override;
#if defined(OS_CHROMEOS)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index cab46e7c1730a8886653380d36a6ec0cdddbf302..4f915806bf743f0e13fcd33abf7c74792c36f8ff 100644
index 88e78f46415d7a416534e88c13bb45b26cc856f3..6b14d8354375377526e141ee499a7583be3f22b0 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -932,6 +932,9 @@ interface NetworkContext {
@ -77,7 +77,7 @@ index cab46e7c1730a8886653380d36a6ec0cdddbf302..4f915806bf743f0e13fcd33abf7c7479
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 1c76fab5c50983d798bdb24e9fca89566b7c52c1..5ba5a6012335059c71c5bbacba4448c229f23f81 100644
index f7f7e16c5bd6d85e3a65065a61df27d92f38ff1b..62161a5e54ddcbfd37c8ebfe631cb6d697b3d530 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -99,6 +99,7 @@ class TestNetworkContext : public mojom::NetworkContext {

Просмотреть файл

@ -12,10 +12,10 @@ this patch.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/1895789.
diff --git a/ui/base/x/x11_window.cc b/ui/base/x/x11_window.cc
index 7df0a3a8ed268e9b2ca1bad8ac5fd35115b98f77..a895defd2b695e2d5b2b4324551adcaac487f588 100644
index c2cd00336856dc06499540dc601ac737348ce905..60adb7dcb326695ad97473d8a362a75461f66c2b 100644
--- a/ui/base/x/x11_window.cc
+++ b/ui/base/x/x11_window.cc
@@ -676,9 +676,14 @@ void XWindow::SetAspectRatio(const gfx::SizeF& aspect_ratio) {
@@ -742,9 +742,14 @@ void XWindow::SetXWindowAspectRatio(const gfx::SizeF& aspect_ratio) {
long supplied_return;
XGetWMNormalHints(xdisplay_, xwindow_, &size_hints, &supplied_return);

Просмотреть файл

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Wed, 30 Oct 2019 16:26:29 -0700
Subject: fix ambiguous reference to 'data'
Upstreamed: https://chromium-review.googlesource.com/c/chromium/src/+/1891762
diff --git a/base/containers/span.h b/base/containers/span.h
index 2c402495a960f348275b7f925ca5dcdbf691ff7a..0faa4ad502d3982293f4faa50525a2340dbf2abd 100644
--- a/base/containers/span.h
+++ b/base/containers/span.h
@@ -498,7 +498,7 @@ template <size_t N,
decltype(base::data(std::declval<Container&>()))>,
typename = internal::EnableIfSpanCompatibleContainer<Container&, T>>
constexpr span<T, N> make_span(Container& container) noexcept {
- return span<T, N>(data(container), size(container));
+ return span<T, N>(base::data(container), base::size(container));
}
template <
@@ -509,7 +509,7 @@ template <
decltype(base::data(std::declval<const Container&>()))>,
typename = internal::EnableIfSpanCompatibleContainer<const Container&, T>>
constexpr span<T, N> make_span(const Container& container) noexcept {
- return span<T, N>(data(container), size(container));
+ return span<T, N>(base::data(container), base::size(container));
}
template <int&... ExplicitArgumentBarrier, typename T, size_t X>

Просмотреть файл

@ -42,115 +42,95 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
// another SiteInstance for the same site.
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index ef19485423d15cd4c7d1f8bc19391af407f36813..0d7b72cd7ec4002251db939be3a93c5f7c07a885 100644
index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce6b5dea64 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -2201,6 +2201,21 @@ bool RenderFrameHostManager::InitRenderView(
@@ -2130,6 +2130,16 @@ bool RenderFrameHostManager::InitRenderView(
scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
NavigationRequest* request) {
+ BrowserContext* browser_context = nullptr;
+ scoped_refptr<SiteInstanceImpl> candidate_site_instance;
+ if (!GetContentClient()->browser()->CanUseCustomSiteInstance()) {
+ browser_context =
+ delegate_->GetControllerForRenderManager().GetBrowserContext();
+ // If the navigation can swap SiteInstances, compute the SiteInstance it
+ // should use.
+ // TODO(clamy): We should also consider as a candidate SiteInstance the
+ // speculative SiteInstance that was computed on redirects.
+ candidate_site_instance =
+ speculative_render_frame_host_
+ ? speculative_render_frame_host_->GetSiteInstance()
+ : nullptr;
+ }
+ // Compute the SiteInstance that the navigation should use, which will be
+ // either the current SiteInstance or a new one.
+ //
+ // TODO(clamy): We should also consider as a candidate SiteInstance the
+ // speculative SiteInstance that was computed on redirects.
+ SiteInstanceImpl* candidate_site_instance =
+ speculative_render_frame_host_
+ ? speculative_render_frame_host_->GetSiteInstance()
+ : nullptr;
+
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
// All children of MHTML documents must be MHTML documents. They all live in
@@ -2244,6 +2259,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->common_params().url);
no_renderer_swap_allowed |=
request->from_begin_navigation() && !can_renderer_initiate_transfer;
+
+ if (!GetContentClient()->browser()->CanUseCustomSiteInstance()) {
+ bool has_navigation_started = request->state() != NavigationRequest::NOT_STARTED;
+ bool has_response_started =
+ (request->state() == NavigationRequest::RESPONSE_STARTED ||
+ request->state() == NavigationRequest::FAILED) &&
+ !speculative_render_frame_host_;
+ // Gives user a chance to choose a custom site instance.
+ SiteInstance* affinity_site_instance = nullptr;
+ scoped_refptr<SiteInstance> overriden_site_instance;
+ bool should_register_site_instance = false;
+ ContentBrowserClient::SiteInstanceForNavigationType siteInstanceType =
+ GetContentClient()->browser()->ShouldOverrideSiteInstanceForNavigation(
+ current_frame_host(), speculative_frame_host(), browser_context,
+ request->common_params().url, has_navigation_started,
+ has_response_started, &affinity_site_instance);
+ switch (siteInstanceType) {
+ case ContentBrowserClient::SiteInstanceForNavigationType::
+ FORCE_CANDIDATE_OR_NEW:
+ overriden_site_instance =
+ candidate_site_instance
+ ? candidate_site_instance
+ : current_site_instance->CreateRelatedSiteInstance(
+ request->common_params().url);
+ should_register_site_instance = true;
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::FORCE_NEW:
+ overriden_site_instance = current_site_instance->CreateRelatedSiteInstance(
+ request->common_params().url);
+ should_register_site_instance = true;
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::FORCE_CURRENT:
+ overriden_site_instance = render_frame_host_->GetSiteInstance();
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::FORCE_AFFINITY:
+ DCHECK(affinity_site_instance);
+ overriden_site_instance =
+ scoped_refptr<SiteInstance>(affinity_site_instance);
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::ASK_CHROMIUM:
+ DCHECK(!affinity_site_instance);
+ break;
+ default:
+ break;
+ }
+ if (overriden_site_instance) {
+ if (should_register_site_instance) {
+ GetContentClient()->browser()->RegisterPendingSiteInstance(
+ render_frame_host_.get(), overriden_site_instance.get());
+ }
+ return overriden_site_instance;
+ }
+ }
} else {
// Subframe navigations will use the current renderer, unless specifically
// allowed to swap processes.
@@ -2255,23 +2323,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
if (no_renderer_swap_allowed && !should_swap_for_error_isolation)
return scoped_refptr<SiteInstance>(current_site_instance);
+ if (GetContentClient()->browser()->CanUseCustomSiteInstance()) {
// If the navigation can swap SiteInstances, compute the SiteInstance it
// should use.
@@ -2149,10 +2159,61 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
//
// TODO(clamy): We should also consider as a candidate SiteInstance the
// speculative SiteInstance that was computed on redirects.
- SiteInstanceImpl* candidate_site_instance =
+ candidate_site_instance =
speculative_render_frame_host_
? speculative_render_frame_host_->GetSiteInstance()
: nullptr;
- speculative_render_frame_host_
- ? speculative_render_frame_host_->GetSiteInstance()
- : nullptr;
+ if (!GetContentClient()->browser()->CanUseCustomSiteInstance() &&
+ frame_tree_node_->IsMainFrame()) {
+ BrowserContext* browser_context =
+ delegate_->GetControllerForRenderManager().GetBrowserContext();
+ bool has_navigation_started = request->state() != NavigationRequest::NOT_STARTED;
+ bool has_response_started =
+ (request->state() == NavigationRequest::RESPONSE_STARTED ||
+ request->state() == NavigationRequest::FAILED) &&
+ !speculative_render_frame_host_;
+ // Gives user a chance to choose a custom site instance.
+ SiteInstance* affinity_site_instance = nullptr;
+ scoped_refptr<SiteInstance> overriden_site_instance;
+ bool should_register_site_instance = false;
+ ContentBrowserClient::SiteInstanceForNavigationType siteInstanceType =
+ GetContentClient()->browser()->ShouldOverrideSiteInstanceForNavigation(
+ current_frame_host(), speculative_frame_host(), browser_context,
+ request->common_params().url, has_navigation_started,
+ has_response_started, &affinity_site_instance);
+ switch (siteInstanceType) {
+ case ContentBrowserClient::SiteInstanceForNavigationType::
+ FORCE_CANDIDATE_OR_NEW:
+ overriden_site_instance =
+ candidate_site_instance
+ ? candidate_site_instance
+ : current_site_instance->CreateRelatedSiteInstance(
+ request->common_params().url);
+ should_register_site_instance = true;
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::FORCE_NEW:
+ overriden_site_instance = current_site_instance->CreateRelatedSiteInstance(
+ request->common_params().url);
+ should_register_site_instance = true;
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::FORCE_CURRENT:
+ overriden_site_instance = render_frame_host_->GetSiteInstance();
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::FORCE_AFFINITY:
+ DCHECK(affinity_site_instance);
+ overriden_site_instance =
+ scoped_refptr<SiteInstance>(affinity_site_instance);
+ break;
+ case ContentBrowserClient::SiteInstanceForNavigationType::ASK_CHROMIUM:
+ DCHECK(!affinity_site_instance);
+ break;
+ default:
+ break;
+ }
+ if (overriden_site_instance) {
+ if (should_register_site_instance) {
+ GetContentClient()->browser()->RegisterPendingSiteInstance(
+ render_frame_host_.get(), overriden_site_instance.get());
+ }
+ return overriden_site_instance;
+ }
+ }
scoped_refptr<SiteInstance> dest_site_instance = GetSiteInstanceForNavigation(
request->common_params().url, request->GetSourceSiteInstance(),
- request->dest_site_instance(), candidate_site_instance,
+ request->dest_site_instance(), candidate_site_instance.get(),
request->common_params().transition,
request->state() == NavigationRequest::FAILED,
@@ -2162,6 +2223,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->GetRestoreType() != RestoreType::NONE, request->is_view_source(),
was_server_redirect);
request->WasServerRedirect());
+ GetContentClient()->browser()->RegisterPendingSiteInstance(
+ render_frame_host_.get(), dest_site_instance.get());

Просмотреть файл

@ -7,10 +7,10 @@ Dont compare RC.exe and RC.py output.
FIXME: It has to be reverted once the script is fixed.
diff --git a/build/toolchain/win/rc/rc.py b/build/toolchain/win/rc/rc.py
index cb09bf714a9b639697f0acd7ca8e023cf5281d1a..d6420d79092f40e6fc3f8d06ec468506a31b51a0 100755
index 5c0442bef19334004647bf6e5dcbabcf399f2ec6..05fb71a1a18d35d361cac8eddece95b665f74ed8 100755
--- a/build/toolchain/win/rc/rc.py
+++ b/build/toolchain/win/rc/rc.py
@@ -233,7 +233,10 @@ def CompareToMsRcOutput(preprocessed_output, is_utf8, flags):
@@ -234,7 +234,10 @@ def CompareToMsRcOutput(preprocessed_output, is_utf8, flags):
# Assert Microsoft rc.exe and rc.py produced identical .res files.
if rc_exe_exit_code == 0:
import filecmp

Просмотреть файл

@ -50,10 +50,26 @@ index 743d1364bcd13e24ecbe5ced730161d15b8c3e93..a5529ac8841b79f230f0fa8eae2b3cb2
// is concerned.
@property(nonatomic, readonly) NSString* subrole;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c2ebb8926 100644
index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e53f3eb42 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -241,6 +241,7 @@
@@ -207,6 +207,7 @@
NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute =
@"AXLengthForTextMarkerRange";
+#ifndef MAS_BUILD
// Private attributes that can be used for testing text markers, e.g. in dump
// tree tests.
NSString* const
@@ -218,6 +219,7 @@
NSString* const
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
@"AXTextMarkerNodeDebugDescription";
+#endif
// Other private attributes.
NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute =
@@ -241,6 +243,7 @@
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
const int kAXResultsLimitNoLimit = -1;
@ -61,7 +77,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
extern "C" {
// The following are private accessibility APIs required for cursor navigation
@@ -480,6 +481,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
@@ -480,6 +483,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
AddMisspelledTextAttributes(ax_range, attributed_text);
return attributed_text;
}
@ -69,7 +85,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
@@ -748,7 +750,9 @@ + (void)initialize {
@@ -748,7 +752,9 @@ + (void)initialize {
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@ -79,7 +95,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -760,8 +764,10 @@ + (void)initialize {
@@ -760,8 +766,10 @@ + (void)initialize {
{NSAccessibilityHighestEditableAncestorAttribute,
@"highestEditableAncestor"},
{NSAccessibilityIndexAttribute, @"index"},
@ -90,7 +106,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
{NSAccessibilityInvalidAttribute, @"invalid"},
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
{NSAccessibilityLanguageAttribute, @"language"},
@@ -783,13 +789,17 @@ + (void)initialize {
@@ -783,13 +791,17 @@ + (void)initialize {
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@ -108,7 +124,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1285,6 +1295,7 @@ - (NSNumber*)enabled {
@@ -1285,6 +1297,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled];
}
@ -116,7 +132,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1295,6 +1306,7 @@ - (id)endTextMarker {
@@ -1295,6 +1308,7 @@ - (id)endTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@ -124,7 +140,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1440,6 +1452,8 @@ - (NSNumber*)index {
@@ -1440,6 +1454,8 @@ - (NSNumber*)index {
return nil;
}
@ -133,7 +149,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
- (NSNumber*)insertionPointLineNumber {
if (![self instanceActive])
return nil;
@@ -1462,6 +1476,7 @@ - (NSNumber*)insertionPointLineNumber {
@@ -1462,6 +1478,7 @@ - (NSNumber*)insertionPointLineNumber {
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
}
@ -141,7 +157,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -2147,6 +2162,7 @@ - (NSArray*)selectedChildren {
@@ -2147,6 +2164,7 @@ - (NSArray*)selectedChildren {
return ret;
}
@ -149,7 +165,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
- (NSString*)selectedText {
if (![self instanceActive])
return nil;
@@ -2158,11 +2174,13 @@ - (NSString*)selectedText {
@@ -2158,11 +2176,13 @@ - (NSString*)selectedText {
return nil;
return base::SysUTF16ToNSString(range.GetText());
}
@ -163,7 +179,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
- (NSValue*)selectedTextRange {
if (![self instanceActive])
return nil;
@@ -2183,12 +2201,15 @@ - (NSValue*)selectedTextRange {
@@ -2183,12 +2203,15 @@ - (NSValue*)selectedTextRange {
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@ -179,7 +195,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
- (NSValue*)size {
if (![self instanceActive])
@@ -2221,6 +2242,7 @@ - (NSString*)sortDirection {
@@ -2221,6 +2244,7 @@ - (NSString*)sortDirection {
return nil;
}
@ -187,7 +203,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2231,6 +2253,7 @@ - (id)startTextMarker {
@@ -2231,6 +2255,7 @@ - (id)startTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@ -195,7 +211,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
// Returns a subrole based upon the role.
- (NSString*)subrole {
@@ -2522,11 +2545,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2522,11 +2547,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedValue =
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
@ -209,7 +225,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
return [attributedValue attributedSubstringFromRange:range];
}
@@ -2629,9 +2654,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2629,9 +2656,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return ToBrowserAccessibilityCocoa(cell);
}
@ -221,7 +237,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
if (!position->IsNullPosition())
@@ -2942,6 +2966,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -2942,6 +2968,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return CreateTextMarker(root->CreatePositionAt(index));
}
@ -229,7 +245,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -2975,6 +3000,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -2975,6 +3002,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return nil;
}
@ -237,7 +253,7 @@ index 2851641d0219164185567a100c2c19d49274c233..c787f7adf7bfb3b9caebe72eecfba55c
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3081,6 +3107,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
@@ -3081,6 +3109,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
return @(child->GetIndexInParent());
}

Просмотреть файл

@ -5,7 +5,7 @@ Subject: network_service_allow_remote_certificate_verification_logic.patch
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 1a790a06d802947e64ca84a37eb7d671a223a125..f0981821bf55594169a35c2db16d79ea0321b565 100644
index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de50be7f976 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -91,6 +91,11 @@
@ -158,7 +158,7 @@ index 1a790a06d802947e64ca84a37eb7d671a223a125..f0981821bf55594169a35c2db16d79ea
std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
std::make_unique<NetworkServiceNetworkDelegate>(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 1ecf63fe12c63ce43481cb1035bc69829b38c83d..af1fcc847fbfa699d1fa3b8bdc04a6326cb9c3b9 100644
index 696144daa4165c33287c8d982dbcbe861871302e..f0a41d64804eab8195c389b457f6c0119d24a783 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -84,6 +84,7 @@ class DomainReliabilityMonitor;
@ -178,7 +178,7 @@ index 1ecf63fe12c63ce43481cb1035bc69829b38c83d..af1fcc847fbfa699d1fa3b8bdc04a632
void ResetURLLoaderFactories() override;
void GetCookieManager(
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
@@ -585,6 +588,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -586,6 +589,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
#endif
@ -188,7 +188,7 @@ index 1ecf63fe12c63ce43481cb1035bc69829b38c83d..af1fcc847fbfa699d1fa3b8bdc04a632
// CertNetFetcher is not used by the current platform.
scoped_refptr<net::CertNetFetcherImpl> cert_net_fetcher_;
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index b5f93999c664fe9c401107989974c3d5dae97209..cab46e7c1730a8886653380d36a6ec0cdddbf302 100644
index 8628bc8e055bf483c39b745bb63371f1e363817a..88e78f46415d7a416534e88c13bb45b26cc856f3 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -181,6 +181,17 @@ interface TrustedURLLoaderHeaderClient {

Просмотреть файл

@ -55,7 +55,7 @@ index 5253f6be778cc78571b3df0a33d364a9b1e6ef52..dc5307e6500b0bfb5da83e8d8ff8886b
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
index 09769a0b05e4c0257f290be107d91c96a7936df0..75d5c8bb7433d151841842b297950753d9da0e96 100644
index 951dc88b44e76b6736aa0ff30d548022486f0f6a..ea7f72b7aa05c31972e4abbdc6529ab044117b0b 100644
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
@@ -139,7 +139,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {

Просмотреть файл

@ -7,7 +7,7 @@ This tweaks Chrome's pepper flash and PDF plugin support to make it
usable from Electron.
diff --git a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
index 37245c48cacbc5db164c61e4499f34ee83e0fce7..0fef12892e965e319e45f5dd1a9c5c9fc606aa9a 100644
index 4bb88c55a82a83cef8330ec8157b49d5adb097ce..48f4e385a57eb0e00c90488fbf052900b6884775 100644
--- a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
@@ -7,10 +7,12 @@
@ -31,8 +31,8 @@ index 37245c48cacbc5db164c61e4499f34ee83e0fce7..0fef12892e965e319e45f5dd1a9c5c9f
Profile* profile =
Profile::FromBrowserContext(render_process_host->GetBrowserContext());
HostContentSettingsMap* content_settings =
@@ -70,5 +73,6 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
std::string());
@@ -68,5 +71,6 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
std::string());
if (setting == CONTENT_SETTING_ALLOW)
return PP_OK;
- return PP_ERROR_FAILED;
@ -40,7 +40,7 @@ index 37245c48cacbc5db164c61e4499f34ee83e0fce7..0fef12892e965e319e45f5dd1a9c5c9f
+ return PP_OK;
}
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
index 91c1562d9894e57fd5c3abfde157127144b31a91..8f4caca848d649db9bd26a4ce37509b29865f3c1 100644
index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdccdfe34af 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
@@ -8,9 +8,11 @@
@ -65,7 +65,7 @@ index 91c1562d9894e57fd5c3abfde157127144b31a91..8f4caca848d649db9bd26a4ce37509b2
int render_process_id) {
@@ -55,6 +58,7 @@ scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
}
return NULL;
return nullptr;
}
+#endif

Просмотреть файл

@ -63,7 +63,7 @@ index ab32d5475a0e269d32f6ab71f7dc82aa9e02035a..9ada750416f02d23c2f9faae0c41e4a7
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672f2c3a8ad 100644
index 81cb954f02363c829947dde830f340a761c80a77..2a26bb6d5367337fa13da07cb07588684d1ea05a 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -27,10 +27,7 @@
@ -117,25 +117,28 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -123,12 +126,14 @@ PrintViewManagerBase::~PrintViewManagerBase() {
@@ -123,7 +126,8 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob();
}
-bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
+bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh,
+ std::unique_ptr<IPC::Message> message,
+ CompletionCallback callback) {
DisconnectFromCurrentPrintJob();
// Don't print / print preview interstitials or crashed tabs.
@@ -131,7 +135,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
return false;
SetPrintingRFH(rfh);
- int32_t id = rfh->GetRoutingID();
- return PrintNowInternal(rfh, std::make_unique<PrintMsg_PrintPages>(id));
- GetPrintRenderFrame(rfh)->PrintRequestedPages();
+ callback_ = std::move(callback);
+ return PrintNowInternal(rfh, std::move(message));
+ // FIXME: pass 'silent' through from the caller..?
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(false /* silent */);
return true;
}
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -242,9 +247,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
@@ -246,9 +252,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
void PrintViewManagerBase::UpdatePrintingEnabled() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// The Unretained() is safe because ForEachFrame() is synchronous.
@ -148,7 +151,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
}
void PrintViewManagerBase::NavigationStopped() {
@@ -347,7 +352,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
@@ -351,7 +357,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
PrintManager::OnPrintingFailed(cookie);
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@ -157,7 +160,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
#endif
ReleasePrinterQuery();
@@ -445,9 +450,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
@@ -449,9 +455,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
content::NotificationService::NoDetails());
break;
}
@ -173,7 +176,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
NOTREACHED();
break;
}
@@ -542,8 +551,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -546,8 +556,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
DCHECK(!quit_inner_loop_);
DCHECK(query);
@ -182,7 +185,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
// We can't print if there is no renderer.
if (!web_contents()->GetRenderViewHost() ||
@@ -558,8 +565,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -562,8 +570,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
print_job_->SetSource(PrintJob::Source::PRINT_PREVIEW, /*source_id=*/"");
#endif // defined(OS_CHROMEOS)
@ -191,7 +194,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
printing_succeeded_ = false;
return true;
}
@@ -608,6 +613,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -612,14 +618,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
@ -205,9 +208,8 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
if (!print_job_)
return;
@@ -617,8 +629,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
rfh->Send(msg.release());
}
if (rfh)
GetPrintRenderFrame(rfh)->PrintingDone(printing_succeeded_);
- registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
- content::Source<PrintJob>(print_job_.get()));
@ -217,7 +219,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
// Don't close the worker thread.
print_job_ = nullptr;
}
@@ -693,6 +706,9 @@ bool PrintViewManagerBase::PrintNowInternal(
@@ -694,6 +708,9 @@ bool PrintViewManagerBase::PrintNowInternal(
// Don't print / print preview interstitials or crashed tabs.
if (IsInterstitialOrCrashed())
return false;
@ -228,7 +230,7 @@ index 7d1e56b3b1a8691477598b0103e2c69c171ec2c8..980971e2b8dd143fde3376f17352f672
}
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index af49d3e2f8abaf7dc4d82dc3f9beccdf4fbd9f18..dd9eb11d31b4ee3d415b1fca7d97872da132203d 100644
index af49d3e2f8abaf7dc4d82dc3f9beccdf4fbd9f18..26eecede8e698046c4b304a06b49946a9e5342ff 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -33,6 +33,8 @@ class PrintJob;
@ -240,18 +242,17 @@ index af49d3e2f8abaf7dc4d82dc3f9beccdf4fbd9f18..dd9eb11d31b4ee3d415b1fca7d97872d
// Base class for managing the print commands for a WebContents.
class PrintViewManagerBase : public content::NotificationObserver,
public PrintManager {
@@ -42,7 +44,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -42,7 +44,8 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
- virtual bool PrintNow(content::RenderFrameHost* rfh);
+ virtual bool PrintNow(content::RenderFrameHost* rfh,
+ std::unique_ptr<IPC::Message> message,
+ CompletionCallback callback);
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in |print_data| with settings specified in
@@ -206,9 +210,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -206,9 +209,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
// The current RFH that is printing with a system printing dialog.
content::RenderFrameHost* printing_rfh_;
@ -379,23 +380,21 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6
// content::BrowserMessageFilter:
bool OnMessageReceived(const IPC::Message& message) override;
diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h
index 200288ee10e3e3dd452d6e9e44ac0af88357ccd3..2403f9a80b3d53c703bd4d63f7656afbe22ecd69 100644
--- a/components/printing/common/print_messages.h
+++ b/components/printing/common/print_messages.h
@@ -365,7 +365,9 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
#if BUILDFLAG(ENABLE_PRINTING)
// Tells the RenderFrame to switch the CSS to print media type, renders every
// requested pages and switch back the CSS to display media type.
-IPC_MESSAGE_ROUTED0(PrintMsg_PrintPages)
+IPC_MESSAGE_ROUTED2(PrintMsg_PrintPages,
+ bool /* silent print */,
+ base::DictionaryValue /* settings */)
#endif
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
index d5ff612320fb3f324b58c91b0c05e0eac689beef..9fafde963ecce596c9514384d2aa11a7540e0d87 100644
--- a/components/printing/common/print.mojom
+++ b/components/printing/common/print.mojom
@@ -16,7 +16,7 @@ interface PrintRenderer {
interface PrintRenderFrame {
// Tells the RenderFrame to switch the CSS to print media type, render every
// requested page, and then switch back the CSS to display media type.
- PrintRequestedPages();
+ PrintRequestedPages(bool silent);
// Print content of an out-of-process subframe.
// Tells the RenderFrame to switch the CSS to print media type, render every
// requested page using the print preview document's frame/node, and then
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a3444fa2d5f 100644
index 95bf92929983110de4489ee18f52783ddf178bcf..c82a3765fa2e0a45ed379e924f7546550644a1d0 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -38,6 +38,7 @@
@ -416,37 +415,34 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
if (weak_this)
web_frame->DispatchAfterPrintEvent();
}
@@ -1211,7 +1213,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
}
auto weak_this = weak_ptr_factory_.GetWeakPtr();
Print(frame, print_preview_context_.source_node(),
- PrintRequestType::kRegular);
+ PrintRequestType::kRegular, false, base::DictionaryValue());
if (weak_this)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1250,7 +1252,9 @@ void PrintRenderFrameHelper::OnPrintPreviewDialogClosed() {
@@ -1197,7 +1199,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
-void PrintRenderFrameHelper::OnPrintPages() {
+void PrintRenderFrameHelper::OnPrintPages(
+ bool silent,
+ const base::DictionaryValue& settings) {
-void PrintRenderFrameHelper::PrintRequestedPages() {
+void PrintRenderFrameHelper::PrintRequestedPages(bool silent) {
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > 1)
return;
@@ -1263,7 +1267,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
@@ -1211,7 +1213,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// If we are printing a PDF extension frame, find the plugin node and print
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
- Print(frame, plugin, PrintRequestType::kRegular);
+ Print(frame, plugin, PrintRequestType::kRegular,
+ silent, settings);
if (weak_this)
+ Print(frame, plugin, PrintRequestType::kRegular, silent, base::DictionaryValue());
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1298,6 +1303,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
@@ -1228,7 +1230,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
return;
}
Print(frame, print_preview_context_.source_node(),
- PrintRequestType::kRegular);
+ PrintRequestType::kRegular, false, base::DictionaryValue());
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1308,6 +1310,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
if (ipc_nesting_level_ > 1)
return;
@ -455,7 +451,7 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
print_preview_context_.OnPrintPreview();
UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
@@ -1665,7 +1672,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1662,7 +1666,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
auto self = weak_ptr_factory_.GetWeakPtr();
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@ -466,7 +462,7 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
// Check if |this| is still valid.
if (!self)
return;
@@ -1676,7 +1685,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1673,7 +1679,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@ -477,7 +473,7 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
// If still not finished with earlier print request simply ignore.
if (prep_frame_view_)
return;
@@ -1684,7 +1695,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1681,7 +1689,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
FrameReference frame_ref(frame);
int expected_page_count = 0;
@ -486,7 +482,7 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
DidFinishPrinting(FAIL_PRINT_INIT);
return; // Failed to init print page settings.
}
@@ -1704,8 +1715,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1701,8 +1709,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
PrintMsg_PrintPages_Params print_settings;
auto self = weak_ptr_factory_.GetWeakPtr();
@ -500,7 +496,7 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
// Check if |this| is still valid.
if (!self)
return;
@@ -1929,10 +1943,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -1926,10 +1937,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
@ -527,7 +523,7 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
// Check if the printer returned any settings, if the settings is empty, we
// can safely assume there are no printer drivers configured. So we safely
// terminate.
@@ -1952,12 +1979,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
@@ -1949,12 +1973,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
return result;
}
@ -547,20 +543,19 @@ index ae46a9385e057392af816f794dfa4c758309b0d5..b9fc071b813b4eb5e660d5f8cb7c3a34
Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
return false;
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
index 1c3ce368765e78df98470d1dc6b42613dddb9999..cea062a2e6db6d820826a8bc6db93d854dd2b897 100644
index dcb0da469d5aab19bc568deb07d3619f8defa76e..9d5049cc42a8a13055fadc94e02c9feca7fe8955 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -220,7 +220,8 @@ class PrintRenderFrameHelper
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -212,7 +212,7 @@ class PrintRenderFrameHelper
mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
// Message handlers ---------------------------------------------------------
- void OnPrintPages();
+ void OnPrintPages(bool silent,
+ const base::DictionaryValue& settings);
// printing::mojom::PrintRenderFrame:
- void PrintRequestedPages() override;
+ void PrintRequestedPages(bool silent) override;
void PrintForSystemDialog() override;
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void OnPrintPreview(const base::DictionaryValue& settings);
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -267,7 +268,9 @@ class PrintRenderFrameHelper
void InitiatePrintPreview(
@@ -266,7 +266,9 @@ class PrintRenderFrameHelper
// WARNING: |this| may be gone after this method returns.
void Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@ -571,7 +566,7 @@ index 1c3ce368765e78df98470d1dc6b42613dddb9999..cea062a2e6db6d820826a8bc6db93d85
// Notification when printing is done - signal tear-down/free resources.
void DidFinishPrinting(PrintingResult result);
@@ -276,12 +279,14 @@ class PrintRenderFrameHelper
@@ -275,12 +277,14 @@ class PrintRenderFrameHelper
// Initialize print page settings with default settings.
// Used only for native printing workflow.

Просмотреть файл

@ -6,10 +6,10 @@ Subject: Revert "Remove ContentRendererClient::ShouldFork."
This reverts commit 6b068eb8ca4a3c7350bdafa22fc0cf0636ef8b74.
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 5a7ec36dea7b63ea4e93911bd7685e2ca02d6800..97f64db04fb7dcd29ac9b1310e41c2b6ebd8b0c4 100644
index feea878036d61c2ed128b8e0397cfd6979eed04a..e53f7ea3d5d0fb0e02ca526042d7937a3b627936 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1227,6 +1227,25 @@ bool ChromeContentRendererClient::AllowPopup() {
@@ -1225,6 +1225,25 @@ bool ChromeContentRendererClient::AllowPopup() {
#endif
}
@ -36,10 +36,10 @@ index 5a7ec36dea7b63ea4e93911bd7685e2ca02d6800..97f64db04fb7dcd29ac9b1310e41c2b6
WebLocalFrame* frame,
ui::PageTransition transition_type,
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
index 63be9235f7f6c66f49698ec05fed8581caaddac5..d306846f872ee27a07a67f80fc4dd8740458e47c 100644
index 43000eb90bab005dcc058f38a5d791a3eee1cef2..de98288514c95f703d6ab3a70c6daad9943cf4f8 100644
--- a/chrome/renderer/chrome_content_renderer_client.h
+++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -137,6 +137,11 @@ class ChromeContentRendererClient
@@ -136,6 +136,11 @@ class ChromeContentRendererClient
base::SingleThreadTaskRunner* compositor_thread_task_runner) override;
bool RunIdleHandlerWhenWidgetsHidden() override;
bool AllowPopup() override;
@ -89,10 +89,10 @@ index a05cef66facd477057fedb388e4000475bc76830..906920393c34043d19183064a2a4506c
// |url|. If the function returns a valid |new_url|, the request must be
// updated to use it. The |attach_same_site_cookies| output parameter
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index cbfec3c07d6e6bab8b77f9e6f9f9baf1e6ae4072..e93de34708dea401c6154282a410adc0abab46e4 100644
index 303365d0a682e548325da470eadc2ffefe954945..48cde344844d2792612d4a7b2c797d9ef6fec9f7 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6236,6 +6236,15 @@ void RenderFrameImpl::BeginNavigation(
@@ -6184,6 +6184,15 @@ void RenderFrameImpl::BeginNavigation(
int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
(cumulative_bindings & kWebUIBindingsPolicyMask);

Просмотреть файл

@ -6,7 +6,7 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 75812063a43e8342a88a2f0a83b54688e63540b7..29fa45aa60811785c753bb4b552fe4dffd6f93b5 100644
index 9387fb21f08f9beb3c529216a879291785eb5aaf..4319f7fe502eb07c6258eb0284d63ba9be441115 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1539,7 +1539,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {

Просмотреть файл

@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds,
which include extra deps that Electron needs (e.g. libnotify)
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index 165551a2948b74c024459be42d1a9a3d96878a10..5c9272a512e22dfe2e90f6665083f53f0fa8979e 100755
index 165551a2948b74c024459be42d1a9a3d96878a10..45be431c4f36d6068148646a8cf8cb8f0aecc605 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -37,9 +37,11 @@ except ImportError:

Просмотреть файл

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Deepak Mohan <hop2deep@gmail.com>
Date: Wed, 11 Sep 2019 16:09:34 -0700
Subject: ui/views: fix namespace qualification with jumbo_build
In file included from gen/ui/views/views_jumbo_4.cc:45:
.\../../ui/views/widget/widget_hwnd_utils.cc(112,11): error: no member named 'IsFormControlsRefreshEnabled'
in namespace 'views::features'; did you mean '::features::IsFormControlsRefreshEnabled'?
if (features::IsFormControlsRefreshEnabled() &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::features::IsFormControlsRefreshEnabled
../..\ui/base/ui_base_features.h(72,41): note: '::features::IsFormControlsRefreshEnabled' declared here
COMPONENT_EXPORT(UI_BASE_FEATURES) bool IsFormControlsRefreshEnabled();
^
1 error generated.
ninja: build stopped: subcommand failed.
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 4e5403b55344fcd96789a8558a7f3a6979fc4249..b3b2f31573a85116c3a5b9c810a66bdf9705700b 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -591,6 +591,7 @@ jumbo_component("views") {
"win/scoped_enable_unadjusted_mouse_events_win.cc",
"win/scoped_fullscreen_visibility.cc",
]
+ jumbo_excluded_sources = [ "widget/widget_hwnd_utils.cc" ]
libs = [
"dwmapi.lib",
"imm32.lib",

Просмотреть файл

@ -5,10 +5,10 @@ Subject: web_contents.patch
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index f82a5fd1362ff9ca7d44e5a5366cb8e5be61d674..03ae4f288371d85493561f22e2429ade5de32339 100644
index 5a0b39b50481123fb6b37043a2bb8f002bc754ca..c13511e26189e68376e29f38c4ae2e1cc8fd3c57 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2120,6 +2120,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2124,6 +2124,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -21,7 +21,7 @@ index f82a5fd1362ff9ca7d44e5a5366cb8e5be61d674..03ae4f288371d85493561f22e2429ade
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2135,6 +2141,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2139,6 +2145,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
&render_view_host_delegate_view_);
}
}

Просмотреть файл

@ -21,10 +21,10 @@ index c1ed9f008b495d4afe05c21a81639383758b36d1..a05cef66facd477057fedb388e400047
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 27ff9ff28296c90c30438f0989747ccecc78d2ac..8373789b06fcde59b0ac8a8b7db5042ac0922845 100644
index 9898cea44081bf3f0fac5065caebdfe8a9a1b0c3..f023a33bc08597d98996af81b448d09bf776876b 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -932,6 +932,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -945,6 +945,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -38,10 +38,10 @@ index 27ff9ff28296c90c30438f0989747ccecc78d2ac..8373789b06fcde59b0ac8a8b7db5042a
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 291f7a06f99e2eba08d66ff01bcc2bda62c8c1fd..bd031bda8b45fc36302b1fcbbfa2c27c9e8e34e6 100644
index 583616a1277b42f342451653f1f52f16ecb746a2..51064da95f5b3e40d848b90ebe273008bda444cf 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -189,6 +189,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -190,6 +190,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -50,10 +50,10 @@ index 291f7a06f99e2eba08d66ff01bcc2bda62c8c1fd..bd031bda8b45fc36302b1fcbbfa2c27c
const blink::WebString& header_name) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 69576ff04e09e8217a9cc4059be4ddfab8d91ffb..144dc70a4c9581f17c7b9c8c4186c215fcce7ddb 100644
index 7dd43714c3bf844c9b376e480d092f97431a9b7c..af1e2ede99d1c8e8abc1cc9a8229c4be3f513320 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -649,6 +649,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -654,6 +654,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

Просмотреть файл

@ -77,6 +77,23 @@
using content::BrowserThread;
using content::StoragePartition;
namespace predictors {
// NOTE(nornagon): this is copied from
// //chrome/browser/predictors/resource_prefetch_predictor.cc we don't need
// anything in that file other than this constructor. Without it we get a link
// error. Probably upstream the constructor should be moved to
// preconnect_manager.cc.
PreconnectRequest::PreconnectRequest(
const GURL& origin,
int num_sockets,
const net::NetworkIsolationKey& network_isolation_key)
: origin(origin),
num_sockets(num_sockets),
network_isolation_key(network_isolation_key) {
DCHECK_GE(num_sockets, 0);
}
} // namespace predictors
namespace {
struct ClearStorageDataOptions {

Просмотреть файл

@ -1845,10 +1845,7 @@ void WebContents::Print(gin_helper::Arguments* args) {
auto* rfh = focused_frame && focused_frame->HasSelection()
? focused_frame
: web_contents()->GetMainFrame();
print_view_manager->PrintNow(rfh,
std::make_unique<PrintMsg_PrintPages>(
rfh->GetRoutingID(), silent, settings),
std::move(callback));
print_view_manager->PrintNow(rfh, std::move(callback));
}
std::vector<printing::PrinterBasicInfo> WebContents::GetPrinterList() {

Просмотреть файл

@ -26,6 +26,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_version.h"
#include "components/net_log/chrome_net_log.h"
#include "components/network_hints/common/network_hints.mojom.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/client_certificate_delegate.h"
@ -69,9 +70,9 @@
#include "shell/browser/net/network_context_service_factory.h"
#include "shell/browser/net/proxying_url_loader_factory.h"
#include "shell/browser/net/system_network_context_manager.h"
#include "shell/browser/network_hints_handler_impl.h"
#include "shell/browser/notifications/notification_presenter.h"
#include "shell/browser/notifications/platform_notification_service.h"
#include "shell/browser/renderer_host/electron_render_message_filter.h"
#include "shell/browser/session_preferences.h"
#include "shell/browser/ui/devtools_manager_delegate.h"
#include "shell/browser/web_contents_permission_helper.h"
@ -368,8 +369,6 @@ void AtomBrowserClient::RenderProcessWillLaunch(
true /* default value */);
}
host->AddFilter(new ElectronRenderMessageFilter(host->GetBrowserContext()));
AddProcessPreferences(host->GetID(), prefs);
// ensure the ProcessPreferences is removed later
host->AddObserver(this);
@ -763,18 +762,6 @@ network::mojom::NetworkContext* AtomBrowserClient::GetSystemNetworkContext() {
return g_browser_process->system_network_context_manager()->GetContext();
}
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
void AtomBrowserClient::BindHostReceiverForRenderer(
content::RenderProcessHost* render_process_host,
mojo::GenericPendingReceiver receiver) {
if (auto host_receiver = receiver.As<spellcheck::mojom::SpellCheckHost>()) {
SpellCheckHostChromeImpl::Create(render_process_host->GetID(),
std::move(host_receiver));
return;
}
}
#endif
base::Optional<service_manager::Manifest>
AtomBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
if (name == content::mojom::kBrowserServiceName)
@ -1098,4 +1085,23 @@ bool AtomBrowserClient::ShouldEnableStrictSiteIsolation() {
return true;
}
void AtomBrowserClient::BindHostReceiverForRenderer(
content::RenderProcessHost* render_process_host,
mojo::GenericPendingReceiver receiver) {
if (auto host_receiver =
receiver.As<network_hints::mojom::NetworkHintsHandler>()) {
NetworkHintsHandlerImpl::Create(render_process_host->GetID(),
std::move(host_receiver));
return;
}
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
if (auto host_receiver = receiver.As<spellcheck::mojom::SpellCheckHost>()) {
SpellCheckHostChromeImpl::Create(render_process_host->GetID(),
std::move(host_receiver));
return;
}
#endif
}
} // namespace electron

Просмотреть файл

@ -63,9 +63,10 @@ class AtomBrowserClient : public content::ContentBrowserClient,
// content::ContentBrowserClient:
std::string GetApplicationLocale() override;
base::FilePath GetFontLookupTableCacheDir() override;
// content::ContentBrowserClient:
bool ShouldEnableStrictSiteIsolation() override;
void BindHostReceiverForRenderer(
content::RenderProcessHost* render_process_host,
mojo::GenericPendingReceiver receiver) override;
std::string GetUserAgent() override;
void SetUserAgent(const std::string& user_agent);
@ -149,11 +150,6 @@ class AtomBrowserClient : public content::ContentBrowserClient,
bool in_memory,
const base::FilePath& relative_partition_path) override;
network::mojom::NetworkContext* GetSystemNetworkContext() override;
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
void BindHostReceiverForRenderer(
content::RenderProcessHost* render_process_host,
mojo::GenericPendingReceiver receiver) override;
#endif
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
base::StringPiece name) override;
content::MediaObserver* GetMediaObserver() override;

Просмотреть файл

@ -12,6 +12,7 @@
#include "base/strings/stringprintf.h"
#include "base/task/post_task.h"
#include "content/public/browser/file_url_loader.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/system/data_pipe_producer.h"
#include "mojo/public/cpp/system/file_data_source.h"
@ -79,20 +80,17 @@ class AsarURLLoader : public network::mojom::URLLoader {
void ResumeReadingBodyFromNet() override {}
private:
AsarURLLoader() : binding_(this) {}
AsarURLLoader() {}
~AsarURLLoader() override = default;
void Start(const network::ResourceRequest& request,
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
network::mojom::URLLoaderClientPtrInfo client_info,
scoped_refptr<net::HttpResponseHeaders> extra_response_headers) {
network::ResourceResponseHead head;
head.request_start = base::TimeTicks::Now();
head.response_start = base::TimeTicks::Now();
head.headers = extra_response_headers;
binding_.Bind(std::move(loader));
binding_.set_connection_error_handler(base::BindOnce(
&AsarURLLoader::OnConnectionError, base::Unretained(this)));
client_.Bind(std::move(client_info));
@ -112,6 +110,10 @@ class AsarURLLoader : public network::mojom::URLLoader {
return;
}
receiver_.Bind(std::move(loader));
receiver_.set_disconnect_handler(base::BindOnce(
&AsarURLLoader::OnConnectionError, base::Unretained(this)));
// Parse asar archive.
std::shared_ptr<Archive> archive = GetOrCreateAsarArchive(asar_path);
Archive::FileInfo info;
@ -245,7 +247,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
}
void OnConnectionError() {
binding_.Close();
receiver_.reset();
MaybeDeleteSelf();
}
@ -256,7 +258,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
}
void MaybeDeleteSelf() {
if (!binding_.is_bound() && !client_.is_bound())
if (!receiver_.is_bound() && !client_.is_bound())
delete this;
}
@ -279,7 +281,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
}
std::unique_ptr<mojo::DataPipeProducer> data_producer_;
mojo::Binding<network::mojom::URLLoader> binding_;
mojo::Receiver<network::mojom::URLLoader> receiver_{this};
network::mojom::URLLoaderClientPtr client_;
// In case of successful loads, this holds the total number of bytes written

Просмотреть файл

@ -168,7 +168,7 @@ AtomURLLoaderFactory::AtomURLLoaderFactory(ProtocolType type,
AtomURLLoaderFactory::~AtomURLLoaderFactory() = default;
void AtomURLLoaderFactory::CreateLoaderAndStart(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
@ -190,7 +190,7 @@ void AtomURLLoaderFactory::Clone(
// static
void AtomURLLoaderFactory::StartLoading(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
@ -337,7 +337,7 @@ void AtomURLLoaderFactory::StartLoadingString(
// static
void AtomURLLoaderFactory::StartLoadingFile(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
network::ResourceRequest request,
network::mojom::URLLoaderClientPtr client,
network::ResourceResponseHead head,
@ -364,7 +364,7 @@ void AtomURLLoaderFactory::StartLoadingFile(
// static
void AtomURLLoaderFactory::StartLoadingHttp(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
const network::ResourceRequest& original_request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
@ -406,7 +406,7 @@ void AtomURLLoaderFactory::StartLoadingHttp(
// static
void AtomURLLoaderFactory::StartLoadingStream(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
network::mojom::URLLoaderClientPtr client,
network::ResourceResponseHead head,
const gin_helper::Dictionary& dict) {

Просмотреть файл

@ -43,19 +43,20 @@ class AtomURLLoaderFactory : public network::mojom::URLLoaderFactory {
~AtomURLLoaderFactory() override;
// network::mojom::URLLoaderFactory:
void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag&
traffic_annotation) override;
void CreateLoaderAndStart(
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation)
override;
void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver)
override;
static void StartLoading(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
@ -75,23 +76,25 @@ class AtomURLLoaderFactory : public network::mojom::URLLoaderFactory {
const gin_helper::Dictionary& dict,
v8::Isolate* isolate,
v8::Local<v8::Value> response);
static void StartLoadingFile(network::mojom::URLLoaderRequest loader,
network::ResourceRequest request,
network::mojom::URLLoaderClientPtr client,
network::ResourceResponseHead head,
const gin_helper::Dictionary& dict,
v8::Isolate* isolate,
v8::Local<v8::Value> response);
static void StartLoadingFile(
mojo::PendingReceiver<network::mojom::URLLoader> loader,
network::ResourceRequest request,
network::mojom::URLLoaderClientPtr client,
network::ResourceResponseHead head,
const gin_helper::Dictionary& dict,
v8::Isolate* isolate,
v8::Local<v8::Value> response);
static void StartLoadingHttp(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
const network::ResourceRequest& original_request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
const gin_helper::Dictionary& dict);
static void StartLoadingStream(network::mojom::URLLoaderRequest loader,
network::mojom::URLLoaderClientPtr client,
network::ResourceResponseHead head,
const gin_helper::Dictionary& dict);
static void StartLoadingStream(
mojo::PendingReceiver<network::mojom::URLLoader> loader,
network::mojom::URLLoaderClientPtr client,
network::ResourceResponseHead head,
const gin_helper::Dictionary& dict);
// Helper to send string as response.
static void SendContents(network::mojom::URLLoaderClientPtr client,

Просмотреть файл

@ -682,7 +682,7 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory(
ProxyingURLLoaderFactory::~ProxyingURLLoaderFactory() = default;
void ProxyingURLLoaderFactory::CreateLoaderAndStart(
network::mojom::URLLoaderRequest loader,
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,

Просмотреть файл

@ -217,14 +217,15 @@ class ProxyingURLLoaderFactory
~ProxyingURLLoaderFactory() override;
// network::mojom::URLLoaderFactory:
void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag&
traffic_annotation) override;
void CreateLoaderAndStart(
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation)
override;
void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory>
loader_receiver) override;

Просмотреть файл

@ -69,14 +69,15 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem
}
// mojom::URLLoaderFactory implementation:
void CreateLoaderAndStart(network::mojom::URLLoaderRequest request,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& url_request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag&
traffic_annotation) override {
void CreateLoaderAndStart(
mojo::PendingReceiver<network::mojom::URLLoader> request,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& url_request,
network::mojom::URLLoaderClientPtr client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation)
override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!manager_)
return;

Просмотреть файл

@ -0,0 +1,48 @@
// Copyright (c) 2019 Slack Technologies, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/network_hints_handler_impl.h"
#include <utility>
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "shell/browser/api/atom_api_session.h"
#include "shell/browser/atom_browser_context.h"
#include "shell/common/gin_converters/gurl_converter.h"
#include "v8/include/v8.h"
NetworkHintsHandlerImpl::NetworkHintsHandlerImpl(int32_t render_process_id)
: network_hints::SimpleNetworkHintsHandlerImpl(render_process_id),
render_process_id_(render_process_id) {}
NetworkHintsHandlerImpl::~NetworkHintsHandlerImpl() = default;
void NetworkHintsHandlerImpl::Preconnect(int32_t render_frame_id,
const GURL& url,
bool allow_credentials) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::RenderFrameHost* render_frame_host =
content::RenderFrameHost::FromID(render_process_id_, render_frame_id);
content::BrowserContext* browser_context =
render_frame_host->GetProcess()->GetBrowserContext();
auto* session = electron::api::Session::FromWrappedClass(
v8::Isolate::GetCurrent(),
static_cast<electron::AtomBrowserContext*>(browser_context));
if (session) {
session->Emit("preconnect", url, allow_credentials);
}
}
void NetworkHintsHandlerImpl::Create(
int32_t render_process_id,
mojo::PendingReceiver<network_hints::mojom::NetworkHintsHandler> receiver) {
mojo::MakeSelfOwnedReceiver(
base::WrapUnique(new NetworkHintsHandlerImpl(render_process_id)),
std::move(receiver));
}

Просмотреть файл

@ -0,0 +1,31 @@
// Copyright (c) 2019 Slack Technologies, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
#define SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
#include "components/network_hints/browser/simple_network_hints_handler_impl.h"
class NetworkHintsHandlerImpl
: public network_hints::SimpleNetworkHintsHandlerImpl {
public:
~NetworkHintsHandlerImpl() override;
static void Create(
int32_t render_process_id,
mojo::PendingReceiver<network_hints::mojom::NetworkHintsHandler>
receiver);
// network_hints::mojom::NetworkHintsHandler:
void Preconnect(int32_t render_frame_id,
const GURL& url,
bool allow_credentials) override;
private:
explicit NetworkHintsHandlerImpl(int32_t render_process_id);
int32_t render_process_id_;
};
#endif // SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_

Просмотреть файл

@ -1,94 +0,0 @@
// Copyright (c) 2019 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 "shell/browser/renderer_host/electron_render_message_filter.h"
#include <stdint.h>
#include <memory>
#include <string>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "chrome/browser/predictors/preconnect_manager.h"
#include "components/network_hints/common/network_hints_common.h"
#include "components/network_hints/common/network_hints_messages.h"
#include "content/public/browser/browser_context.h"
#include "shell/browser/api/atom_api_session.h"
#include "shell/browser/atom_browser_context.h"
#include "shell/common/gin_converters/gurl_converter.h"
using content::BrowserThread;
namespace {
const uint32_t kRenderFilteredMessageClasses[] = {
NetworkHintsMsgStart,
};
void EmitPreconnect(content::BrowserContext* browser_context,
const GURL& url,
bool allow_credentials) {
auto* session = electron::api::Session::FromWrappedClass(
v8::Isolate::GetCurrent(),
static_cast<electron::AtomBrowserContext*>(browser_context));
if (session) {
session->Emit("preconnect", url, allow_credentials);
}
}
} // namespace
ElectronRenderMessageFilter::ElectronRenderMessageFilter(
content::BrowserContext* browser_context)
: BrowserMessageFilter(kRenderFilteredMessageClasses,
base::size(kRenderFilteredMessageClasses)),
browser_context_(browser_context) {}
ElectronRenderMessageFilter::~ElectronRenderMessageFilter() = default;
bool ElectronRenderMessageFilter::OnMessageReceived(
const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ElectronRenderMessageFilter, message)
IPC_MESSAGE_HANDLER(NetworkHintsMsg_Preconnect, OnPreconnect)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
void ElectronRenderMessageFilter::OnPreconnect(int render_frame_id,
const GURL& url,
bool allow_credentials,
int count) {
if (count < 1) {
LOG(WARNING) << "NetworkHintsMsg_Preconnect IPC with invalid count: "
<< count;
return;
}
if (!url.is_valid() || !url.has_host() || !url.has_scheme() ||
!url.SchemeIsHTTPOrHTTPS()) {
return;
}
base::PostTask(FROM_HERE, {BrowserThread::UI},
base::BindOnce(&EmitPreconnect, browser_context_, url,
allow_credentials));
}
namespace predictors {
PreconnectRequest::PreconnectRequest(
const GURL& origin,
int num_sockets,
const net::NetworkIsolationKey& network_isolation_key)
: origin(origin), num_sockets(num_sockets) {
DCHECK_GE(num_sockets, 0);
}
} // namespace predictors

Просмотреть файл

@ -1,46 +0,0 @@
// Copyright (c) 2019 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.
#ifndef SHELL_BROWSER_RENDERER_HOST_ELECTRON_RENDER_MESSAGE_FILTER_H_
#define SHELL_BROWSER_RENDERER_HOST_ELECTRON_RENDER_MESSAGE_FILTER_H_
#include <string>
#include <vector>
#include "content/public/browser/browser_message_filter.h"
class GURL;
namespace content {
class BrowserContext;
}
namespace predictors {
class PreconnectManager;
}
// This class filters out incoming Chrome-specific IPC messages for the renderer
// process on the IPC thread.
class ElectronRenderMessageFilter : public content::BrowserMessageFilter {
public:
explicit ElectronRenderMessageFilter(
content::BrowserContext* browser_context);
// content::BrowserMessageFilter methods:
bool OnMessageReceived(const IPC::Message& message) override;
private:
~ElectronRenderMessageFilter() override;
void OnPreconnect(int render_frame_id,
const GURL& url,
bool allow_credentials,
int count);
content::BrowserContext* browser_context_;
DISALLOW_COPY_AND_ASSIGN(ElectronRenderMessageFilter);
};
#endif // SHELL_BROWSER_RENDERER_HOST_ELECTRON_RENDER_MESSAGE_FILTER_H_

Просмотреть файл

@ -11,6 +11,7 @@
#include "base/i18n/rtl.h"
#include "cc/paint/skia_paint_canvas.h"
#include "content/public/browser/render_view_host.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/point.h"

Просмотреть файл

@ -9,6 +9,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/text_utils.h"

Просмотреть файл

@ -18,6 +18,7 @@
#include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/keyboard_util.h"
#include "third_party/blink/public/common/context_menu_data/edit_flags.h"
#include "third_party/blink/public/platform/web_input_event.h"
#include "third_party/blink/public/platform/web_keyboard_event.h"
#include "third_party/blink/public/platform/web_mouse_event.h"
@ -345,21 +346,21 @@ bool Converter<blink::WebDeviceEmulationParams>::FromV8(
}
// static
v8::Local<v8::Value> Converter<blink::WebContextMenuData::MediaType>::ToV8(
v8::Local<v8::Value> Converter<blink::ContextMenuDataMediaType>::ToV8(
v8::Isolate* isolate,
const blink::WebContextMenuData::MediaType& in) {
const blink::ContextMenuDataMediaType& in) {
switch (in) {
case blink::WebContextMenuData::kMediaTypeImage:
case blink::ContextMenuDataMediaType::kImage:
return StringToV8(isolate, "image");
case blink::WebContextMenuData::kMediaTypeVideo:
case blink::ContextMenuDataMediaType::kVideo:
return StringToV8(isolate, "video");
case blink::WebContextMenuData::kMediaTypeAudio:
case blink::ContextMenuDataMediaType::kAudio:
return StringToV8(isolate, "audio");
case blink::WebContextMenuData::kMediaTypeCanvas:
case blink::ContextMenuDataMediaType::kCanvas:
return StringToV8(isolate, "canvas");
case blink::WebContextMenuData::kMediaTypeFile:
case blink::ContextMenuDataMediaType::kFile:
return StringToV8(isolate, "file");
case blink::WebContextMenuData::kMediaTypePlugin:
case blink::ContextMenuDataMediaType::kPlugin:
return StringToV8(isolate, "plugin");
default:
return StringToV8(isolate, "none");
@ -367,15 +368,15 @@ v8::Local<v8::Value> Converter<blink::WebContextMenuData::MediaType>::ToV8(
}
// static
v8::Local<v8::Value> Converter<blink::WebContextMenuData::InputFieldType>::ToV8(
v8::Local<v8::Value> Converter<blink::ContextMenuDataInputFieldType>::ToV8(
v8::Isolate* isolate,
const blink::WebContextMenuData::InputFieldType& in) {
const blink::ContextMenuDataInputFieldType& in) {
switch (in) {
case blink::WebContextMenuData::kInputFieldTypePlainText:
case blink::ContextMenuDataInputFieldType::kPlainText:
return StringToV8(isolate, "plainText");
case blink::WebContextMenuData::kInputFieldTypePassword:
case blink::ContextMenuDataInputFieldType::kPassword:
return StringToV8(isolate, "password");
case blink::WebContextMenuData::kInputFieldTypeOther:
case blink::ContextMenuDataInputFieldType::kOther:
return StringToV8(isolate, "other");
default:
return StringToV8(isolate, "none");
@ -384,13 +385,16 @@ v8::Local<v8::Value> Converter<blink::WebContextMenuData::InputFieldType>::ToV8(
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(isolate);
dict.Set("canUndo", !!(editFlags & blink::WebContextMenuData::kCanUndo));
dict.Set("canRedo", !!(editFlags & blink::WebContextMenuData::kCanRedo));
dict.Set("canCut", !!(editFlags & blink::WebContextMenuData::kCanCut));
dict.Set("canCopy", !!(editFlags & blink::WebContextMenuData::kCanCopy));
dict.Set("canUndo",
!!(editFlags & blink::ContextMenuDataEditFlags::kCanUndo));
dict.Set("canRedo",
!!(editFlags & blink::ContextMenuDataEditFlags::kCanRedo));
dict.Set("canCut", !!(editFlags & blink::ContextMenuDataEditFlags::kCanCut));
dict.Set("canCopy",
!!(editFlags & blink::ContextMenuDataEditFlags::kCanCopy));
bool pasteFlag = false;
if (editFlags & blink::WebContextMenuData::kCanPaste) {
if (editFlags & blink::ContextMenuDataEditFlags::kCanPaste) {
std::vector<base::string16> types;
bool ignore;
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes(
@ -399,9 +403,10 @@ v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
}
dict.Set("canPaste", pasteFlag);
dict.Set("canDelete", !!(editFlags & blink::WebContextMenuData::kCanDelete));
dict.Set("canDelete",
!!(editFlags & blink::ContextMenuDataEditFlags::kCanDelete));
dict.Set("canSelectAll",
!!(editFlags & blink::WebContextMenuData::kCanSelectAll));
!!(editFlags & blink::ContextMenuDataEditFlags::kCanSelectAll));
return ConvertToV8(isolate, dict);
}

Просмотреть файл

@ -83,17 +83,16 @@ struct Converter<blink::WebDeviceEmulationParams> {
};
template <>
struct Converter<blink::WebContextMenuData::MediaType> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const blink::WebContextMenuData::MediaType& in);
struct Converter<blink::ContextMenuDataMediaType> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const blink::ContextMenuDataMediaType& in);
};
template <>
struct Converter<blink::WebContextMenuData::InputFieldType> {
struct Converter<blink::ContextMenuDataInputFieldType> {
static v8::Local<v8::Value> ToV8(
v8::Isolate* isolate,
const blink::WebContextMenuData::InputFieldType& in);
const blink::ContextMenuDataInputFieldType& in);
};
template <>

Просмотреть файл

@ -130,7 +130,7 @@ v8::Local<v8::Value> Converter<ContextMenuParamsWithWebContents>::ToV8(
dict.Set("mediaType", params.media_type);
dict.Set("mediaFlags", MediaFlagsToV8(isolate, params.media_flags));
bool has_image_contents =
(params.media_type == blink::WebContextMenuData::kMediaTypeImage) &&
(params.media_type == blink::ContextMenuDataMediaType::kImage) &&
params.has_image_contents;
dict.Set("hasImageContents", has_image_contents);
dict.Set("isEditable", params.is_editable);

Просмотреть файл

@ -12,7 +12,7 @@
#include "base/command_line.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
#include "components/network_hints/renderer/web_prescient_networking_impl.h"
#include "content/common/buildflags.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
@ -208,9 +208,6 @@ void RendererClientBase::RenderThreadStarted() {
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file");
blink::SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI("file");
prescient_networking_dispatcher_ =
std::make_unique<network_hints::PrescientNetworkingDispatcher>();
#if defined(OS_WIN)
// Set ApplicationUserModelID in renderer process.
base::string16 app_id =
@ -342,7 +339,11 @@ void RendererClientBase::DidSetUserAgent(const std::string& user_agent) {
}
blink::WebPrescientNetworking* RendererClientBase::GetPrescientNetworking() {
return prescient_networking_dispatcher_.get();
if (!web_prescient_networking_impl_) {
web_prescient_networking_impl_ =
std::make_unique<network_hints::WebPrescientNetworkingImpl>();
}
return web_prescient_networking_impl_.get();
}
void RendererClientBase::RunScriptsAtDocumentStart(

Просмотреть файл

@ -27,7 +27,7 @@ class SpellCheck;
#endif
namespace network_hints {
class PrescientNetworkingDispatcher;
class WebPrescientNetworkingImpl;
}
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
@ -113,8 +113,8 @@ class RendererClientBase : public content::ContentRendererClient
#endif
private:
std::unique_ptr<network_hints::PrescientNetworkingDispatcher>
prescient_networking_dispatcher_;
std::unique_ptr<network_hints::WebPrescientNetworkingImpl>
web_prescient_networking_impl_;
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
std::unique_ptr<extensions::ExtensionsClient> extensions_client_;