diff --git a/BUILD.gn b/BUILD.gn index 609b724ba..cee5d46e0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -277,7 +277,7 @@ if (is_win) { "//chrome/common:buildflags", "//ppapi/buildflags:buildflags", "//printing/buildflags:buildflags", - "//ui/base:ui_features", + "//ui/base:buildflags", ] } } @@ -643,6 +643,7 @@ static_library("libcef_static") { deps = [ ":cef_make_headers", + ":cef_service_manifests", # Generate API bindings for extensions. # TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See @@ -1047,45 +1048,142 @@ if (is_mac) { } } - # # Service manifests. # -cef_packaged_services = [ - "//chrome/app:chrome_manifest", # For spell checking. - "//chrome/app:chrome_renderer_manifest", # For spell checking. - "//chrome/services/printing:manifest", - "//services/metrics:manifest", - "//services/proxy_resolver:proxy_resolver_manifest", -] +source_set("cef_content_browser_overlay_manifest") { + sources = [ + "libcef/common/service_manifests/cef_content_browser_overlay_manifest.cc", + "libcef/common/service_manifests/cef_content_browser_overlay_manifest.h", + ] -service_manifest("cef_packaged_services_manifest_overlay") { - source = "libcef/common/service_manifests/packaged_services_manifest_overlay.json" - packaged_services = cef_packaged_services -} + configs += [ + "libcef/features:config" + ] -service_manifest("cef_browser_manifest_overlay") { - source = "libcef/common/service_manifests/browser_manifest_overlay.json" -} - -service_manifest("cef_renderer_manifest_overlay") { - source = "libcef/common/service_manifests/renderer_manifest_overlay.json" -} - -service_manifest("cef_utility_manifest_overlay") { - source = "libcef/common/service_manifests/utility_manifest_overlay.json" -} - -group("cef_manifest_overlays") { deps = [ - ":cef_packaged_services_manifest_overlay", - ":cef_browser_manifest_overlay", - ":cef_renderer_manifest_overlay", - ":cef_utility_manifest_overlay", + "//base", + "//components/services/heap_profiling/public/mojom", + "//extensions/buildflags", + "//extensions/common:mojo", + "//extensions/common/api:mojom", + "//services/service_manager/public/cpp", + "//third_party/blink/public/common", ] } +source_set("cef_content_gpu_overlay_manifest") { + sources = [ + "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.cc", + "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h", + ] + + configs += [ + "libcef/features:config" + ] + + deps = [ + "//base", + "//components/services/heap_profiling/public/mojom", + "//services/service_manager/public/cpp", + ] +} + +source_set("cef_content_renderer_overlay_manifest") { + sources = [ + "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.cc", + "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h", + ] + + configs += [ + "libcef/features:config" + ] + + deps = [ + "//base", + "//components/services/heap_profiling/public/mojom", + "//components/subresource_filter/content/mojom", + "//extensions/buildflags", + "//extensions/common:mojo", + "//services/service_manager/public/cpp", + "//third_party/blink/public/common", + ] + + if (is_mac) { + deps += [ "//components/spellcheck/common:interfaces" ] + } +} + +source_set("cef_content_utility_overlay_manifest") { + sources = [ + "libcef/common/service_manifests/cef_content_utility_overlay_manifest.cc", + "libcef/common/service_manifests/cef_content_utility_overlay_manifest.h", + ] + + configs += [ + "libcef/features:config" + ] + + deps = [ + "//base", + "//components/services/heap_profiling/public/mojom", + "//services/service_manager/public/cpp", + ] +} + +source_set("cef_packaged_service_manifests") { + sources = [ + "libcef/common/service_manifests/cef_packaged_service_manifests.cc", + "libcef/common/service_manifests/cef_packaged_service_manifests.h", + ] + + configs += [ + "libcef/features:config" + ] + + deps = [ + "//base", + "//chrome/common:mojo_bindings", + "//chrome/services/printing:manifest", + "//components/services/pdf_compositor:pdf_compositor_manifest", + "//components/spellcheck/common:interfaces", + "//components/startup_metric_utils/common:interfaces", + "//extensions/buildflags", + "//printing/buildflags", + "//services/proxy_resolver:proxy_resolver_manifest", + "//services/service_manager/public/cpp", + ] +} + +source_set("cef_renderer_manifest") { + sources = [ + "libcef/common/service_manifests/cef_renderer_manifest.cc", + "libcef/common/service_manifests/cef_renderer_manifest.h", + ] + + configs += [ + "libcef/features:config" + ] + + deps = [ + "//base", + "//chrome/common:mojo_bindings", + "//components/spellcheck/common:interfaces", + "//services/service_manager/public/cpp", + ] +} + +source_set("cef_service_manifests") { + public_deps = [ + ":cef_content_browser_overlay_manifest", + ":cef_content_gpu_overlay_manifest", + ":cef_content_renderer_overlay_manifest", + ":cef_content_utility_overlay_manifest", + ":cef_packaged_service_manifests", + ":cef_renderer_manifest", + ] +} # # Resource grit/pack targets. @@ -1231,7 +1329,6 @@ grit("cef_resources") { "-E", "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] - deps = [ ":cef_manifest_overlays" ] } # Generate cef.pak. diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 53c79898f..4184efa32 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/73.0.3665.0' + 'chromium_checkout': 'refs/tags/73.0.3679.0' } diff --git a/CHROMIUM_UPDATE.txt b/CHROMIUM_UPDATE.txt index 812386a91..746f8fe99 100644 --- a/CHROMIUM_UPDATE.txt +++ b/CHROMIUM_UPDATE.txt @@ -27,6 +27,8 @@ # Files in the chromium/src directory that should be evaluated for changes. # Similar changes may need to be applied to the CEF source code. 'files': [ + 'chrome/app/chrome_*_manifest.*', + 'chrome/app/chrome_*_manifests.*', 'chrome/browser/browser_process.h', 'chrome/browser/extensions/api/tabs/tabs_api.*', 'chrome/browser/extensions/chrome_component_extension_resource_manager.*', diff --git a/libcef/browser/browser_context.cc b/libcef/browser/browser_context.cc index 2234cca4b..be22745f5 100644 --- a/libcef/browser/browser_context.cc +++ b/libcef/browser/browser_context.cc @@ -109,6 +109,11 @@ content::ResourceContext* CefBrowserContext::GetResourceContext() { return resource_context_.get(); } +content::ClientHintsControllerDelegate* +CefBrowserContext::GetClientHintsControllerDelegate() { + return nullptr; +} + net::URLRequestContextGetter* CefBrowserContext::GetRequestContext() { CEF_REQUIRE_UIT(); return GetDefaultStoragePartition(this)->GetURLRequestContext(); diff --git a/libcef/browser/browser_context.h b/libcef/browser/browser_context.h index 0678ef31c..b3180f252 100644 --- a/libcef/browser/browser_context.h +++ b/libcef/browser/browser_context.h @@ -138,6 +138,8 @@ class CefBrowserContext : public ChromeProfileStub { // BrowserContext methods. content::ResourceContext* GetResourceContext() override; + content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate() + override; net::URLRequestContextGetter* GetRequestContext() override; net::URLRequestContextGetter* CreateMediaRequestContext() override; net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition( diff --git a/libcef/browser/browser_context_proxy.cc b/libcef/browser/browser_context_proxy.cc index a42ad2be5..c81be9ba6 100644 --- a/libcef/browser/browser_context_proxy.cc +++ b/libcef/browser/browser_context_proxy.cc @@ -154,6 +154,11 @@ CefBrowserContextProxy::GetSSLHostStateDelegate() { return parent_->GetSSLHostStateDelegate(); } +content::ClientHintsControllerDelegate* +CefBrowserContextProxy::GetClientHintsControllerDelegate() { + return parent_->GetClientHintsControllerDelegate(); +} + content::PermissionControllerDelegate* CefBrowserContextProxy::GetPermissionControllerDelegate() { return parent_->GetPermissionControllerDelegate(); diff --git a/libcef/browser/browser_context_proxy.h b/libcef/browser/browser_context_proxy.h index cab9628fb..c2914fbe7 100644 --- a/libcef/browser/browser_context_proxy.h +++ b/libcef/browser/browser_context_proxy.h @@ -42,6 +42,8 @@ class CefBrowserContextProxy : public CefBrowserContext { storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; + content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate() + override; content::PermissionControllerDelegate* GetPermissionControllerDelegate() override; content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override; diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 1a87b9c70..92c99d180 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -939,8 +939,7 @@ void CefBrowserHostImpl::GetNavigationEntries( if (!web_contents()) return; - const content::NavigationController& controller = - web_contents()->GetController(); + content::NavigationController& controller = web_contents()->GetController(); const int total = controller.GetEntryCount(); const int current = controller.GetCurrentEntryIndex(); @@ -2615,24 +2614,24 @@ void CefBrowserHostImpl::RequestMediaAccessPermission( content::MediaResponseCallback callback) { CEF_REQUIRE_UIT(); - content::MediaStreamDevices devices; + blink::MediaStreamDevices devices; const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (!command_line->HasSwitch(switches::kEnableMediaStream)) { // Cancel the request. - std::move(callback).Run(devices, content::MEDIA_DEVICE_PERMISSION_DENIED, + std::move(callback).Run(devices, blink::MEDIA_DEVICE_PERMISSION_DENIED, std::unique_ptr()); return; } // Based on chrome/browser/media/media_stream_devices_controller.cc bool microphone_requested = - (request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE); + (request.audio_type == blink::MEDIA_DEVICE_AUDIO_CAPTURE); bool webcam_requested = - (request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE); + (request.video_type == blink::MEDIA_DEVICE_VIDEO_CAPTURE); bool screen_requested = - (request.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE); + (request.video_type == blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE); if (microphone_requested || webcam_requested || screen_requested) { // Pick the desired device or fall back to the first available of the // given type. @@ -2655,19 +2654,19 @@ void CefBrowserHostImpl::RequestMediaAccessPermission( content::DesktopMediaID::Parse(request.requested_video_device_id); } devices.push_back( - content::MediaStreamDevice(content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, - media_id.ToString(), "Screen")); + blink::MediaStreamDevice(blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, + media_id.ToString(), "Screen")); } } - std::move(callback).Run(devices, content::MEDIA_DEVICE_OK, + std::move(callback).Run(devices, blink::MEDIA_DEVICE_OK, std::unique_ptr()); } bool CefBrowserHostImpl::CheckMediaAccessPermission( content::RenderFrameHost* render_frame_host, const GURL& security_origin, - content::MediaStreamType type) { + blink::MediaStreamType type) { // Check media access permission without prompting the user. This is called // when loading the Pepper Flash plugin. const base::CommandLine* command_line = diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 3cebd28ee..7acd8df2c 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -479,7 +479,7 @@ class CefBrowserHostImpl : public CefBrowserHost, content::MediaResponseCallback callback) override; bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host, const GURL& security_origin, - content::MediaStreamType type) override; + blink::MediaStreamType type) override; bool IsNeverVisible(content::WebContents* web_contents) override; // content::WebContentsObserver methods. diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index b84dcce96..a190ecb0f 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -35,12 +35,19 @@ #include "libcef/common/extensions/extensions_util.h" #include "libcef/common/net/scheme_registration.h" #include "libcef/common/request_impl.h" +#include "libcef/common/service_manifests/cef_content_browser_overlay_manifest.h" +#include "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h" +#include "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h" +#include "libcef/common/service_manifests/cef_content_utility_overlay_manifest.h" +#include "libcef/common/service_manifests/cef_packaged_service_manifests.h" +#include "libcef/common/service_manifests/cef_renderer_manifest.h" #include "base/base_switches.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/json/json_reader.h" #include "base/path_service.h" +#include "base/stl_util.h" #include "cef/grit/cef_resources.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_service.h" @@ -634,31 +641,27 @@ void CefContentBrowserClient::RegisterOutOfProcessServices( base::Optional CefContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { - int id = -1; - if (name == content::mojom::kBrowserServiceName) - id = IDR_CEF_BROWSER_MANIFEST_OVERLAY; - else if (name == content::mojom::kPackagedServicesServiceName) - id = IDR_CEF_PACKAGED_SERVICES_MANIFEST_OVERLAY; - else if (name == content::mojom::kRendererServiceName) - id = IDR_CEF_RENDERER_MANIFEST_OVERLAY; - else if (name == content::mojom::kUtilityServiceName) - id = IDR_CEF_UTILITY_MANIFEST_OVERLAY; - if (id == -1) - return {}; + if (name == content::mojom::kBrowserServiceName) { + return GetCefContentBrowserOverlayManifest(); + } else if (name == content::mojom::kGpuServiceName) { + return GetCefContentGpuOverlayManifest(); + } else if (name == content::mojom::kPackagedServicesServiceName) { + service_manager::Manifest overlay; + overlay.packaged_services = GetCefPackagedServiceManifests(); + return overlay; + } else if (name == content::mojom::kRendererServiceName) { + return GetCefContentRendererOverlayManifest(); + } else if (name == content::mojom::kUtilityServiceName) { + return GetCefContentUtilityOverlayManifest(); + } - base::StringPiece manifest_contents = - ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( - id, ui::ScaleFactor::SCALE_FACTOR_NONE); - return service_manager::Manifest::FromValueDeprecated( - base::JSONReader::Read(manifest_contents)); + return base::nullopt; } std::vector CefContentBrowserClient::GetExtraServiceManifests() { return std::vector({ - {printing::mojom::kServiceName, IDR_PDF_COMPOSITOR_MANIFEST}, - {chrome::mojom::kRendererServiceName, - IDR_CHROME_RENDERER_SERVICE_MANIFEST}, + {chrome::mojom::kRendererServiceName, -1, GetCefRendererManifest()}, }); } @@ -690,7 +693,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( switches::kUserAgent, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - arraysize(kSwitchNames)); + base::size(kSwitchNames)); } const std::string& process_type = @@ -713,7 +716,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( switches::kUnsafelyTreatInsecureOriginAsSecure, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - arraysize(kSwitchNames)); + base::size(kSwitchNames)); if (extensions::ExtensionsEnabled()) { // Based on ChromeContentBrowserClientExtensionsPart:: @@ -734,7 +737,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( switches::kLang, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - arraysize(kSwitchNames)); + base::size(kSwitchNames)); } #if defined(OS_LINUX) @@ -746,7 +749,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( switches::kPpapiFlashVersion, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - arraysize(kSwitchNames)); + base::size(kSwitchNames)); #if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) if (!browser_cmd->HasSwitch(service_manager::switches::kNoSandbox)) { diff --git a/libcef/browser/devtools_frontend.cc b/libcef/browser/devtools_frontend.cc index 6ce7d1441..955328013 100644 --- a/libcef/browser/devtools_frontend.cc +++ b/libcef/browser/devtools_frontend.cc @@ -201,10 +201,10 @@ void CefDevToolsFrontend::ReadyToCommitNavigation( content::NavigationHandle* navigation_handle) { content::RenderFrameHost* frame = navigation_handle->GetRenderFrameHost(); if (navigation_handle->IsInMainFrame()) { - frontend_host_.reset(content::DevToolsFrontendHost::Create( + frontend_host_ = content::DevToolsFrontendHost::Create( frame, base::Bind(&CefDevToolsFrontend::HandleMessageFromDevToolsFrontend, - base::Unretained(this)))); + base::Unretained(this))); return; } diff --git a/libcef/browser/extensions/extension_host_delegate.cc b/libcef/browser/extensions/extension_host_delegate.cc index 2d16f13a2..b0552784c 100644 --- a/libcef/browser/extensions/extension_host_delegate.cc +++ b/libcef/browser/extensions/extension_host_delegate.cc @@ -51,7 +51,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest( bool CefExtensionHostDelegate::CheckMediaAccessPermission( content::RenderFrameHost* render_frame_host, const GURL& security_origin, - content::MediaStreamType type, + blink::MediaStreamType type, const Extension* extension) { // Never routed here from CefBrowserHostImpl. NOTREACHED(); diff --git a/libcef/browser/extensions/extension_host_delegate.h b/libcef/browser/extensions/extension_host_delegate.h index 0d4f2ec1e..ac3e36bc4 100644 --- a/libcef/browser/extensions/extension_host_delegate.h +++ b/libcef/browser/extensions/extension_host_delegate.h @@ -32,7 +32,7 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate { const Extension* extension) override; bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host, const GURL& security_origin, - content::MediaStreamType type, + blink::MediaStreamType type, const Extension* extension) override; ExtensionHostQueue* GetExtensionHostQueue() const override; gfx::Size EnterPictureInPicture(content::WebContents* web_contents, diff --git a/libcef/browser/media_capture_devices_dispatcher.cc b/libcef/browser/media_capture_devices_dispatcher.cc index bc2ba4391..bdd627559 100644 --- a/libcef/browser/media_capture_devices_dispatcher.cc +++ b/libcef/browser/media_capture_devices_dispatcher.cc @@ -10,18 +10,18 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/media_capture_devices.h" +using blink::MediaStreamDevices; using content::BrowserThread; -using content::MediaStreamDevices; namespace { -const content::MediaStreamDevice* FindDefaultDeviceWithId( - const content::MediaStreamDevices& devices, +const blink::MediaStreamDevice* FindDefaultDeviceWithId( + const blink::MediaStreamDevices& devices, const std::string& device_id) { if (devices.empty()) return NULL; - content::MediaStreamDevices::const_iterator iter = devices.begin(); + blink::MediaStreamDevices::const_iterator iter = devices.begin(); for (; iter != devices.end(); ++iter) { if (iter->id == device_id) { return &(*iter); @@ -54,7 +54,7 @@ void CefMediaCaptureDevicesDispatcher::GetDefaultDevices( PrefService* prefs, bool audio, bool video, - content::MediaStreamDevices* devices) { + blink::MediaStreamDevices* devices) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(audio || video); @@ -74,20 +74,20 @@ void CefMediaCaptureDevicesDispatcher::GetRequestedDevice( const std::string& requested_device_id, bool audio, bool video, - content::MediaStreamDevices* devices) { + blink::MediaStreamDevices* devices) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(audio || video); if (audio) { - const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); - const content::MediaStreamDevice* const device = + const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); + const blink::MediaStreamDevice* const device = FindDefaultDeviceWithId(audio_devices, requested_device_id); if (device) devices->push_back(*device); } if (video) { - const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); - const content::MediaStreamDevice* const device = + const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); + const blink::MediaStreamDevice* const device = FindDefaultDeviceWithId(video_devices, requested_device_id); if (device) devices->push_back(*device); @@ -103,7 +103,7 @@ void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged( int render_frame_id, int page_request_id, const GURL& security_origin, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, content::MediaRequestState state) {} void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream( @@ -114,7 +114,7 @@ void CefMediaCaptureDevicesDispatcher::OnSetCapturingLinkSecured( int render_process_id, int render_frame_id, int page_request_id, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, bool is_secure) {} const MediaStreamDevices& diff --git a/libcef/browser/media_capture_devices_dispatcher.h b/libcef/browser/media_capture_devices_dispatcher.h index 3abaffea9..6b4ff4f3a 100644 --- a/libcef/browser/media_capture_devices_dispatcher.h +++ b/libcef/browser/media_capture_devices_dispatcher.h @@ -9,7 +9,7 @@ #include "base/memory/singleton.h" #include "base/observer_list.h" #include "content/public/browser/media_observer.h" -#include "content/public/common/media_stream_request.h" +#include "content/public/browser/media_stream_request.h" class PrefRegistrySimple; class PrefService; @@ -29,7 +29,7 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { void GetDefaultDevices(PrefService* prefs, bool audio, bool video, - content::MediaStreamDevices* devices); + blink::MediaStreamDevices* devices); // Helper for picking the device that was requested for an OpenDevice request. // If the device requested is not available it will revert to using the first @@ -38,7 +38,7 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { void GetRequestedDevice(const std::string& requested_device_id, bool audio, bool video, - content::MediaStreamDevices* devices); + blink::MediaStreamDevices* devices); // Overridden from content::MediaObserver: void OnAudioCaptureDevicesChanged() override; @@ -47,14 +47,14 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { int render_frame_id, int page_request_id, const GURL& security_origin, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, content::MediaRequestState state) override; void OnCreatingAudioStream(int render_process_id, int render_view_id) override; void OnSetCapturingLinkSecured(int render_process_id, int render_frame_id, int page_request_id, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, bool is_secure) override; private: @@ -63,8 +63,8 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { CefMediaCaptureDevicesDispatcher(); ~CefMediaCaptureDevicesDispatcher() override; - const content::MediaStreamDevices& GetAudioCaptureDevices(); - const content::MediaStreamDevices& GetVideoCaptureDevices(); + const blink::MediaStreamDevices& GetAudioCaptureDevices(); + const blink::MediaStreamDevices& GetVideoCaptureDevices(); }; #endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ diff --git a/libcef/browser/menu_model_impl.cc b/libcef/browser/menu_model_impl.cc index 66b11c148..80fe2ad7c 100644 --- a/libcef/browser/menu_model_impl.cc +++ b/libcef/browser/menu_model_impl.cc @@ -119,8 +119,6 @@ class CefSimpleMenuModel : public ui::MenuModel { return impl_->IsVisibleAt(index); } - void HighlightChangedTo(int index) override {} - void ActivatedAt(int index) override { ActivatedAt(index, 0); } void ActivatedAt(int index, int event_flags) override { diff --git a/libcef/browser/native/file_dialog_runner_mac.mm b/libcef/browser/native/file_dialog_runner_mac.mm index fd6f47bf2..0a21fa8e9 100644 --- a/libcef/browser/native/file_dialog_runner_mac.mm +++ b/libcef/browser/native/file_dialog_runner_mac.mm @@ -11,6 +11,7 @@ #include "libcef/browser/browser_host_impl.h" #include "base/mac/mac_util.h" +#include "base/stl_util.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/sys_string_conversions.h" @@ -36,7 +37,7 @@ base::string16 GetDescriptionFromMimeType(const std::string& mime_type) { {"video", IDS_VIDEO_FILES}, }; - for (size_t i = 0; i < arraysize(kWildCardMimeTypes); ++i) { + for (size_t i = 0; i < base::size(kWildCardMimeTypes); ++i) { if (mime_type == std::string(kWildCardMimeTypes[i].mime_type) + "/*") return l10n_util::GetStringUTF16(kWildCardMimeTypes[i].string_id); } diff --git a/libcef/browser/native/file_dialog_runner_win.cc b/libcef/browser/native/file_dialog_runner_win.cc index 463d98955..8c295a83f 100644 --- a/libcef/browser/native/file_dialog_runner_win.cc +++ b/libcef/browser/native/file_dialog_runner_win.cc @@ -14,6 +14,7 @@ #include "libcef/browser/browser_host_impl.h" #include "base/files/file_util.h" +#include "base/stl_util.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -140,7 +141,7 @@ std::wstring GetDescriptionFromMimeType(const std::string& mime_type) { {"video", IDS_VIDEO_FILES}, }; - for (size_t i = 0; i < arraysize(kWildCardMimeTypes); ++i) { + for (size_t i = 0; i < base::size(kWildCardMimeTypes); ++i) { if (mime_type == std::string(kWildCardMimeTypes[i].mime_type) + "/*") return l10n_util::GetStringUTF16(kWildCardMimeTypes[i].string_id); } @@ -230,7 +231,7 @@ bool RunOpenFileDialog(const CefFileDialogRunner::FileChooserParams& params, } else { // The value is a file name and possibly a directory. base::wcslcpy(filename, params.default_file_name.value().c_str(), - arraysize(filename)); + base::size(filename)); directory = params.default_file_name.DirName().value(); } } @@ -445,7 +446,7 @@ bool RunSaveFileDialog(const CefFileDialogRunner::FileChooserParams& params, } else { // The value is a file name and possibly a directory. base::wcslcpy(filename, params.default_file_name.value().c_str(), - arraysize(filename)); + base::size(filename)); directory = params.default_file_name.DirName().value(); } } diff --git a/libcef/browser/native/native_menu_win.cc b/libcef/browser/native/native_menu_win.cc index 7dc81d6aa..e3d41fafa 100644 --- a/libcef/browser/native/native_menu_win.cc +++ b/libcef/browser/native/native_menu_win.cc @@ -179,17 +179,6 @@ class CefNativeMenuWin::MenuHostWindow { model->ActivatedAt(position); } - // Called as the user moves their mouse or arrows through the contents of the - // menu. - void OnMenuSelect(WPARAM w_param, HMENU menu) { - if (!menu) - return; // menu is null when closing on XP. - - int position = GetMenuItemIndexFromWPARAM(menu, w_param); - if (position >= 0) - GetCefNativeMenuWinFromHMENU(menu)->model_->HighlightChangedTo(position); - } - // Called by Windows to measure the size of an owner-drawn menu item. void OnMeasureItem(WPARAM w_param, MEASUREITEMSTRUCT* measure_item_struct) { CefNativeMenuWin::ItemData* data = @@ -357,7 +346,6 @@ class CefNativeMenuWin::MenuHostWindow { *l_result = 0; return true; case WM_MENUSELECT: - OnMenuSelect(LOWORD(w_param), reinterpret_cast(l_param)); *l_result = 0; return true; case WM_MEASUREITEM: diff --git a/libcef/browser/navigation_entry_impl.cc b/libcef/browser/navigation_entry_impl.cc index 8fb7a169a..cceac95b9 100644 --- a/libcef/browser/navigation_entry_impl.cc +++ b/libcef/browser/navigation_entry_impl.cc @@ -15,7 +15,7 @@ CefNavigationEntryImpl::CefNavigationEntryImpl(content::NavigationEntry* value) value, NULL, kOwnerNoDelete, - true, + false, new CefValueControllerNonThreadSafe()) { // Indicate that this object owns the controller. SetOwnsController(); @@ -27,47 +27,47 @@ bool CefNavigationEntryImpl::IsValid() { CefString CefNavigationEntryImpl::GetURL() { CEF_VALUE_VERIFY_RETURN(false, CefString()); - return const_value().GetURL().spec(); + return mutable_value()->GetURL().spec(); } CefString CefNavigationEntryImpl::GetDisplayURL() { CEF_VALUE_VERIFY_RETURN(false, CefString()); - return const_value().GetVirtualURL().spec(); + return mutable_value()->GetVirtualURL().spec(); } CefString CefNavigationEntryImpl::GetOriginalURL() { CEF_VALUE_VERIFY_RETURN(false, CefString()); - return const_value().GetUserTypedURL().spec(); + return mutable_value()->GetUserTypedURL().spec(); } CefString CefNavigationEntryImpl::GetTitle() { CEF_VALUE_VERIFY_RETURN(false, CefString()); - return const_value().GetTitle(); + return mutable_value()->GetTitle(); } CefNavigationEntry::TransitionType CefNavigationEntryImpl::GetTransitionType() { CEF_VALUE_VERIFY_RETURN(false, TT_EXPLICIT); - return static_cast(const_value().GetTransitionType()); + return static_cast(mutable_value()->GetTransitionType()); } bool CefNavigationEntryImpl::HasPostData() { CEF_VALUE_VERIFY_RETURN(false, false); - return const_value().GetHasPostData(); + return mutable_value()->GetHasPostData(); } CefTime CefNavigationEntryImpl::GetCompletionTime() { CefTime time; CEF_VALUE_VERIFY_RETURN(false, time); - cef_time_from_basetime(const_value().GetTimestamp(), time); + cef_time_from_basetime(mutable_value()->GetTimestamp(), time); return time; } int CefNavigationEntryImpl::GetHttpStatusCode() { CEF_VALUE_VERIFY_RETURN(false, 0); - return const_value().GetHttpStatusCode(); + return mutable_value()->GetHttpStatusCode(); } CefRefPtr CefNavigationEntryImpl::GetSSLStatus() { CEF_VALUE_VERIFY_RETURN(false, nullptr); - return new CefSSLStatusImpl(const_value().GetSSL()); + return new CefSSLStatusImpl(mutable_value()->GetSSL()); } diff --git a/libcef/browser/net/url_request_manager.cc b/libcef/browser/net/url_request_manager.cc index 4a76d1540..10c9d1ece 100644 --- a/libcef/browser/net/url_request_manager.cc +++ b/libcef/browser/net/url_request_manager.cc @@ -17,6 +17,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "base/stl_util.h" #include "base/strings/string_util.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_context.h" @@ -47,7 +48,7 @@ static const SchemeToFactory kBuiltinFactories[] = { }; bool IsBuiltinScheme(const std::string& scheme) { - for (size_t i = 0; i < arraysize(kBuiltinFactories); ++i) + for (size_t i = 0; i < base::size(kBuiltinFactories); ++i) if (base::LowerCaseEqualsASCII(scheme, kBuiltinFactories[i].scheme)) return true; return false; @@ -58,7 +59,7 @@ net::URLRequestJob* GetBuiltinSchemeRequestJob( net::NetworkDelegate* network_delegate, const std::string& scheme) { // See if the request should be handled by a built-in protocol factory. - for (size_t i = 0; i < arraysize(kBuiltinFactories); ++i) { + for (size_t i = 0; i < base::size(kBuiltinFactories); ++i) { if (scheme == kBuiltinFactories[i].scheme) { net::URLRequestJob* job = (kBuiltinFactories[i].factory)(request, network_delegate, scheme); diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 5b6e0c5dc..291a50230 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -9,6 +9,7 @@ #include #include "base/json/string_escape.h" +#include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "content/public/browser/ax_event_notification_details.h" @@ -184,7 +185,7 @@ struct PopulateAxNodeAttributes { CefRefPtr list = CefListValue::Create(); int index = 0; // Iterate and find which states are set. - for (unsigned i = 0; i < arraysize(textStyleArr); i++) { + for (unsigned i = 0; i < base::size(textStyleArr); i++) { if (attr.second & static_cast(textStyleArr[i])) list->SetString(index++, ToString(textStyleArr[i])); } @@ -230,7 +231,7 @@ struct PopulateAxNodeAttributes { ax::mojom::MarkerType::kTextMatch}; // Iterate and find which markers are set. - for (unsigned j = 0; j < arraysize(marktypeArr); j++) { + for (unsigned j = 0; j < base::size(marktypeArr); j++) { if (attr.second[i] & static_cast(marktypeArr[j])) list->SetString(index++, ToString(marktypeArr[j])); } diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 2557dec49..b0c8cf1db 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -154,6 +154,8 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient { void InvalidateLocalSurfaceIdOnEviction() override {} + bool ShouldShowStaleContentOnEviction() override { return false; }; + private: CefRenderWidgetHostViewOSR* const view_; @@ -1330,7 +1332,7 @@ void CefRenderWidgetHostViewOSR::SendMouseWheelEvent( blink::WebMouseWheelEvent mouse_wheel_event(event); - mouse_wheel_phase_handler_.SendWheelEndForTouchpadScrollingIfNeeded(); + mouse_wheel_phase_handler_.SendWheelEndForTouchpadScrollingIfNeeded(false); mouse_wheel_phase_handler_.AddPhaseIfNeededAndScheduleEndEvent( mouse_wheel_event, false); diff --git a/libcef/browser/printing/print_view_manager.cc b/libcef/browser/printing/print_view_manager.cc index ae2488988..1246570c7 100644 --- a/libcef/browser/printing/print_view_manager.cc +++ b/libcef/browser/printing/print_view_manager.cc @@ -253,6 +253,9 @@ void CefPrintViewManager::OnMetafileReadyForPrinting( if (!pdf_print_state_) return; + pdf_print_state_->printing_rfh_->Send(new PrintMsg_ClosePrintPreviewDialog( + pdf_print_state_->printing_rfh_->GetRoutingID())); + auto shared_buf = base::RefCountedSharedMemoryMapping::CreateFromWholeRegion( params.content.metafile_data_region); if (!shared_buf) { diff --git a/libcef/browser/printing/print_view_manager_base.cc b/libcef/browser/printing/print_view_manager_base.cc index 689cddd85..ad3323955 100644 --- a/libcef/browser/printing/print_view_manager_base.cc +++ b/libcef/browser/printing/print_view_manager_base.cc @@ -368,6 +368,7 @@ void CefPrintViewManagerBase::ShouldQuitFromInnerMessageLoop() { } bool CefPrintViewManagerBase::CreateNewPrintJob(PrinterQuery* query) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(!inside_inner_message_loop_); DCHECK(query); diff --git a/libcef/browser/printing/printing_message_filter.cc b/libcef/browser/printing/printing_message_filter.cc index 7404368bb..44770bd68 100644 --- a/libcef/browser/printing/printing_message_filter.cc +++ b/libcef/browser/printing/printing_message_filter.cc @@ -233,12 +233,9 @@ void CefPrintingMessageFilter::OnScriptedPrintReply( } } -void CefPrintingMessageFilter::OnUpdatePrintSettings( - int document_cookie, - const base::DictionaryValue& job_settings, - IPC::Message* reply_msg) { - std::unique_ptr new_settings(job_settings.DeepCopy()); - +void CefPrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, + base::Value job_settings, + IPC::Message* reply_msg) { scoped_refptr printer_query; if (!is_printing_enabled_.GetValue()) { // Reply with NULL query. @@ -251,7 +248,7 @@ void CefPrintingMessageFilter::OnUpdatePrintSettings( content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE); } printer_query->SetSettings( - std::move(new_settings), + std::move(job_settings), base::Bind(&CefPrintingMessageFilter::OnUpdatePrintSettingsReply, this, printer_query, reply_msg)); } diff --git a/libcef/browser/printing/printing_message_filter.h b/libcef/browser/printing/printing_message_filter.h index 84d9abb31..3dcb22a48 100644 --- a/libcef/browser/printing/printing_message_filter.h +++ b/libcef/browser/printing/printing_message_filter.h @@ -11,6 +11,7 @@ #include #include "base/macros.h" +#include "base/values.h" #include "build/build_config.h" #include "components/keyed_service/core/keyed_service_shutdown_notifier.h" #include "components/prefs/pref_member.h" @@ -21,10 +22,6 @@ struct PrintHostMsg_PreviewIds; struct PrintHostMsg_ScriptedPrint_Params; class Profile; -namespace base { -class DictionaryValue; -} - namespace printing { class PrintQueriesQueue; @@ -69,7 +66,7 @@ class CefPrintingMessageFilter : public content::BrowserMessageFilter { // handled by the print worker thread and the UI thread. The reply occurs on // the IO thread. void OnUpdatePrintSettings(int document_cookie, - const base::DictionaryValue& job_settings, + base::Value job_settings, IPC::Message* reply_msg); void OnUpdatePrintSettingsReply(scoped_refptr printer_query, IPC::Message* reply_msg); diff --git a/libcef/browser/storage_partition_proxy.cc b/libcef/browser/storage_partition_proxy.cc index 1c56f6946..16acaf8db 100644 --- a/libcef/browser/storage_partition_proxy.cc +++ b/libcef/browser/storage_partition_proxy.cc @@ -65,6 +65,10 @@ content::DOMStorageContext* CefStoragePartitionProxy::GetDOMStorageContext() { return parent_->GetDOMStorageContext(); } +content::IdleManager* CefStoragePartitionProxy::GetIdleManager() { + return parent_->GetIdleManager(); +} + content::LockManager* CefStoragePartitionProxy::GetLockManager() { return parent_->GetLockManager(); } @@ -229,6 +233,10 @@ mojo::BindingId CefStoragePartitionProxy::Bind( return parent_->Bind(process_id, std::move(request)); } +void CefStoragePartitionProxy::Unbind(mojo::BindingId binding_id) { + parent_->Unbind(binding_id); +} + void CefStoragePartitionProxy::set_site_for_service_worker( const GURL& site_for_service_worker) { parent_->set_site_for_service_worker(site_for_service_worker); diff --git a/libcef/browser/storage_partition_proxy.h b/libcef/browser/storage_partition_proxy.h index a884666c6..edf8ae379 100644 --- a/libcef/browser/storage_partition_proxy.h +++ b/libcef/browser/storage_partition_proxy.h @@ -35,6 +35,7 @@ class CefStoragePartitionProxy : public content::StoragePartition { storage::FileSystemContext* GetFileSystemContext() override; storage::DatabaseTracker* GetDatabaseTracker() override; content::DOMStorageContext* GetDOMStorageContext() override; + content::IdleManager* GetIdleManager() override; content::LockManager* GetLockManager() override; content::IndexedDBContext* GetIndexedDBContext() override; content::ServiceWorkerContext* GetServiceWorkerContext() override; @@ -88,6 +89,7 @@ class CefStoragePartitionProxy : public content::StoragePartition { int process_id, mojo::InterfaceRequest request) override; + void Unbind(mojo::BindingId binding_id) override; void set_site_for_service_worker( const GURL& site_for_service_worker) override; const GURL& site_for_service_worker() const override; diff --git a/libcef/browser/views/button_impl.h b/libcef/browser/views/button_impl.h index ace8f740b..76456a287 100644 --- a/libcef/browser/views/button_impl.h +++ b/libcef/browser/views/button_impl.h @@ -82,7 +82,7 @@ CEF_BUTTON_IMPL_T void CEF_BUTTON_IMPL_D::SetInkDropEnabled(bool enabled) { : views::InkDropHostView::InkDropMode::OFF); if (enabled) { ParentClass::root_view()->set_ink_drop_base_color( - color_utils::BlendTowardOppositeLuma( + color_utils::BlendTowardMaxContrast( ParentClass::root_view()->background()->get_color(), 0x61)); } } diff --git a/libcef/common/crash_reporter_client.cc b/libcef/common/crash_reporter_client.cc index 9dc1b4830..9d4e86b5e 100644 --- a/libcef/common/crash_reporter_client.cc +++ b/libcef/common/crash_reporter_client.cc @@ -12,6 +12,7 @@ #include "base/environment.h" #include "base/logging.h" +#include "base/stl_util.h" #include "base/strings/string16.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" @@ -494,14 +495,14 @@ bool CefCrashReporterClient::ReadCrashConfigFile() { }; // Make sure we can fit all possible name/value pairs. - static_assert(arraysize(ids) * crashpad::Annotation::kValueMaxSize >= + static_assert(base::size(ids) * crashpad::Annotation::kValueMaxSize >= 3 * 26 /* sizes (small, medium, large) * slots (A to Z) */ * (3 + 2 /* key size ("S-A") + delim size ("=,") */ + crashpad::Annotation::kNameMaxLength), "Not enough storage for key map"); size_t offset = 0; - for (size_t i = 0; i < arraysize(ids); ++i) { + for (size_t i = 0; i < base::size(ids); ++i) { size_t length = std::min(map_keys.size() - offset, crashpad::Annotation::kValueMaxSize); ids[i].Set(base::StringPiece(map_keys.data() + offset, length)); @@ -745,13 +746,13 @@ CefCrashReporterClient::ParameterMap CefCrashReporterClient::FilterParameters( IDKEY(n "-V"), IDKEY(n "-W"), IDKEY(n "-X"), IDKEY(n "-Y"), \ IDKEY(n "-Z") -#define IDKEY_FUNCTION(name, size) \ - static_assert(size <= crashpad::Annotation::kValueMaxSize, \ +#define IDKEY_FUNCTION(name, size_) \ + static_assert(size_ <= crashpad::Annotation::kValueMaxSize, \ "Annotation size is too large."); \ bool Set##name##Annotation(size_t index, const base::StringPiece& value) { \ - using IDKey = crash_reporter::CrashKeyString; \ + using IDKey = crash_reporter::CrashKeyString; \ static IDKey ids[] = {IDKEY_ENTRIES(#name)}; \ - if (index < arraysize(ids)) { \ + if (index < base::size(ids)) { \ if (value.empty()) { \ ids[index].Clear(); \ } else { \ diff --git a/libcef/common/crash_reporting.cc b/libcef/common/crash_reporting.cc index a5660b0a9..a75026445 100644 --- a/libcef/common/crash_reporting.cc +++ b/libcef/common/crash_reporting.cc @@ -10,6 +10,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/debug/crash_logging.h" +#include "base/stl_util.h" #include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "chrome/common/crash_keys.h" @@ -152,8 +153,10 @@ bool IsBoringCEFSwitch(const std::string& flag) { switches::kLogFile, // Chromium internals. - "content-image-texture-target", "mojo-platform-channel-handle", - "primordial-pipe-token", "service-pipe-token", + "content-image-texture-target", + "mojo-platform-channel-handle", + "primordial-pipe-token", + "service-pipe-token", "service-request-channel-token", }; @@ -162,7 +165,7 @@ bool IsBoringCEFSwitch(const std::string& flag) { size_t end = flag.find("="); size_t len = (end == std::string::npos) ? flag.length() - 2 : end - 2; - for (size_t i = 0; i < arraysize(kIgnoreSwitches); ++i) { + for (size_t i = 0; i < base::size(kIgnoreSwitches); ++i) { if (flag.compare(2, len, kIgnoreSwitches[i]) == 0) return true; } diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 348dc41cc..8a7416c4c 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -19,6 +19,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/path_service.h" +#include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/synchronization/waitable_event.h" @@ -75,7 +76,7 @@ namespace { const char* const kNonWildcardDomainNonPortSchemes[] = { extensions::kExtensionScheme}; const size_t kNonWildcardDomainNonPortSchemesSize = - arraysize(kNonWildcardDomainNonPortSchemes); + base::size(kNonWildcardDomainNonPortSchemes); #if defined(OS_MACOSX) @@ -273,7 +274,7 @@ class CefUIThread : public base::Thread { DCHECK(task_runner()->BelongsToCurrentThread()); // Use our own browser process runner. - browser_runner_.reset(content::BrowserMainRunner::Create()); + browser_runner_ = content::BrowserMainRunner::Create(); // Initialize browser process state. Uses the current thread's message loop. int exit_code = browser_runner_->Initialize(main_function_params); @@ -620,7 +621,7 @@ int CefMainDelegate::RunProcess( const CefSettings& settings = CefContext::Get()->settings(); if (!settings.multi_threaded_message_loop) { // Use our own browser process runner. - browser_runner_.reset(content::BrowserMainRunner::Create()); + browser_runner_ = content::BrowserMainRunner::Create(); // Initialize browser process state. Results in a call to // CefBrowserMain::PreMainMessageLoopStart() which creates the UI message diff --git a/libcef/common/service_manifests/browser_manifest_overlay.json b/libcef/common/service_manifests/browser_manifest_overlay.json deleted file mode 100644 index a733ccb0c..000000000 --- a/libcef/common/service_manifests/browser_manifest_overlay.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "content_browser", - "display_name": "CEF", - "interface_provider_specs": { - "service_manager:connector": { - "provides": { - "renderer": [ - "blink.mojom.BudgetService", - "metrics.mojom.LeakDetector", - "mojom.ModuleEventSink" - ] - }, - "requires": { - "chrome_printing": [ "converter" ], - "proxy_resolver": [ "factory" ] - } - }, - "navigation:frame": { - "provides": { - "renderer": [ - "blink.mojom.BudgetService", - "extensions.KeepAlive", - "extensions.mime_handler.BeforeUnloadControl", - "extensions.mime_handler.MimeHandlerService" - ] - } - } - } -} diff --git a/libcef/common/service_manifests/cef_content_browser_overlay_manifest.cc b/libcef/common/service_manifests/cef_content_browser_overlay_manifest.cc new file mode 100644 index 000000000..954839919 --- /dev/null +++ b/libcef/common/service_manifests/cef_content_browser_overlay_manifest.cc @@ -0,0 +1,51 @@ +// Copyright 2018 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 "libcef/common/service_manifests/cef_content_browser_overlay_manifest.h" + +#include "base/command_line.h" +#include "base/no_destructor.h" +#include "build/build_config.h" +#include "components/metrics/public/interfaces/call_stack_profile_collector.mojom.h" +#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h" +#include "extensions/buildflags/buildflags.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +#if defined(OS_WIN) +#include "chrome/common/conflicts/module_event_sink_win.mojom.h" +#endif + +#include "extensions/common/api/mime_handler.mojom.h" // nogncheck +#include "extensions/common/mojo/keep_alive.mojom.h" // nogncheck + +const service_manager::Manifest& GetCefContentBrowserOverlayManifest() { + static base::NoDestructor manifest { + service_manager::ManifestBuilder() + .ExposeCapability("gpu", + service_manager::Manifest::InterfaceList< + metrics::mojom::CallStackProfileCollector>()) + .ExposeCapability("profiling_client", + service_manager::Manifest::InterfaceList< + heap_profiling::mojom::ProfilingClient>()) + .ExposeCapability("renderer", + service_manager::Manifest::InterfaceList< +#if defined(OS_WIN) + mojom::ModuleEventSink, +#endif + metrics::mojom::CallStackProfileCollector>()) + .RequireCapability("chrome_printing", "converter") + .RequireCapability("heap_profiling", "heap_profiler") + .RequireCapability("heap_profiling", "profiling") + .RequireCapability("pdf_compositor", "compositor") + .RequireCapability("proxy_resolver", "factory") + .ExposeInterfaceFilterCapability_Deprecated( + "navigation:frame", "renderer", + service_manager::Manifest::InterfaceList< + extensions::KeepAlive, + extensions::mime_handler::BeforeUnloadControl, + extensions::mime_handler::MimeHandlerService>()) + .Build() + }; + return *manifest; +} diff --git a/libcef/common/service_manifests/cef_content_browser_overlay_manifest.h b/libcef/common/service_manifests/cef_content_browser_overlay_manifest.h new file mode 100644 index 000000000..844a5e84c --- /dev/null +++ b/libcef/common/service_manifests/cef_content_browser_overlay_manifest.h @@ -0,0 +1,16 @@ +// Copyright 2018 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 CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_BROWSER_OVERLAY_MANIFEST_H_ +#define CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_BROWSER_OVERLAY_MANIFEST_H_ + +#include "services/service_manager/public/cpp/manifest.h" + +// Returns the Manifest CEF amends to Content's content_browser service +// manifest. This allows CEF to extend the capabilities exposed and/or +// required by content_browser service instances, as well as declaring any +// additional in- and out-of-process per-profile packaged services. +const service_manager::Manifest& GetCefContentBrowserOverlayManifest(); + +#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_BROWSER_OVERLAY_MANIFEST_H_ diff --git a/libcef/common/service_manifests/cef_content_gpu_overlay_manifest.cc b/libcef/common/service_manifests/cef_content_gpu_overlay_manifest.cc new file mode 100644 index 000000000..af5989060 --- /dev/null +++ b/libcef/common/service_manifests/cef_content_gpu_overlay_manifest.cc @@ -0,0 +1,20 @@ +// Copyright 2018 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 "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h" + +#include "base/no_destructor.h" +#include "build/build_config.h" +#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +const service_manager::Manifest& GetCefContentGpuOverlayManifest() { + static base::NoDestructor manifest{ + service_manager::ManifestBuilder() + .ExposeCapability("browser", + service_manager::Manifest::InterfaceList< + heap_profiling::mojom::ProfilingClient>()) + .Build()}; + return *manifest; +} diff --git a/libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h b/libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h new file mode 100644 index 000000000..ec6a8a9ea --- /dev/null +++ b/libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h @@ -0,0 +1,15 @@ +// Copyright 2018 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 CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_GPU_OVERLAY_MANIFEST_H_ +#define CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_GPU_OVERLAY_MANIFEST_H_ + +#include "services/service_manager/public/cpp/manifest.h" + +// Returns the Manifest CEF amends to Contents's content_gpu service +// manifest. This allows CEF to extend the capabilities exposed and/or +// required by content_gpu service instances +const service_manager::Manifest& GetCefContentGpuOverlayManifest(); + +#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_GPU_OVERLAY_MANIFEST_H_ diff --git a/libcef/common/service_manifests/cef_content_renderer_overlay_manifest.cc b/libcef/common/service_manifests/cef_content_renderer_overlay_manifest.cc new file mode 100644 index 000000000..d6e8d7ee9 --- /dev/null +++ b/libcef/common/service_manifests/cef_content_renderer_overlay_manifest.cc @@ -0,0 +1,33 @@ +// Copyright 2018 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 "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h" + +#include "base/no_destructor.h" +#include "build/build_config.h" +#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h" +#include "components/subresource_filter/content/mojom/subresource_filter_agent.mojom.h" +#include "extensions/buildflags/buildflags.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +#if defined(OS_MACOSX) +#include "components/spellcheck/common/spellcheck_panel.mojom.h" +#endif + +const service_manager::Manifest& GetCefContentRendererOverlayManifest() { + static base::NoDestructor manifest { + service_manager::ManifestBuilder() + .ExposeCapability("browser", + service_manager::Manifest::InterfaceList< + heap_profiling::mojom::ProfilingClient>()) +#if defined(OS_MACOSX) + .ExposeInterfaceFilterCapability_Deprecated( + "navigation:frame", "browser", + service_manager::Manifest::InterfaceList< + spellcheck::mojom::SpellCheckPanel>()) +#endif + .Build() + }; + return *manifest; +} diff --git a/libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h b/libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h new file mode 100644 index 000000000..4906d7555 --- /dev/null +++ b/libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h @@ -0,0 +1,15 @@ +// Copyright 2018 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 CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_RENDERER_OVERLAY_MANIFEST_H_ +#define CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_RENDERER_OVERLAY_MANIFEST_H_ + +#include "services/service_manager/public/cpp/manifest.h" + +// Returns the Manifest CEF amends to Content's content_renderer service +// manifest. This allows CEF to extend the set of capabilities exposed and/or +// required by content_renderer service instances. +const service_manager::Manifest& GetCefContentRendererOverlayManifest(); + +#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_RENDERER_OVERLAY_MANIFEST_H_ diff --git a/libcef/common/service_manifests/cef_content_utility_overlay_manifest.cc b/libcef/common/service_manifests/cef_content_utility_overlay_manifest.cc new file mode 100644 index 000000000..925b35ce3 --- /dev/null +++ b/libcef/common/service_manifests/cef_content_utility_overlay_manifest.cc @@ -0,0 +1,19 @@ +// Copyright 2018 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 "libcef/common/service_manifests/cef_content_utility_overlay_manifest.h" + +#include "base/no_destructor.h" +#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +const service_manager::Manifest& GetCefContentUtilityOverlayManifest() { + static base::NoDestructor manifest{ + service_manager::ManifestBuilder() + .ExposeCapability("browser", + service_manager::Manifest::InterfaceList< + heap_profiling::mojom::ProfilingClient>()) + .Build()}; + return *manifest; +} diff --git a/libcef/common/service_manifests/cef_content_utility_overlay_manifest.h b/libcef/common/service_manifests/cef_content_utility_overlay_manifest.h new file mode 100644 index 000000000..563bbd3b1 --- /dev/null +++ b/libcef/common/service_manifests/cef_content_utility_overlay_manifest.h @@ -0,0 +1,15 @@ +// Copyright 2018 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 CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_UTILITY_OVERLAY_MANIFEST_H_ +#define CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_UTILITY_OVERLAY_MANIFEST_H_ + +#include "services/service_manager/public/cpp/manifest.h" + +// Returns the Manifest CEF amends to Contents's content_utility service +// manifest. This allows CEF to extend the capabilities exposed and/or +// required by content_utility service instances +const service_manager::Manifest& GetCefContentUtilityOverlayManifest(); + +#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_CONTENT_UTILITY_OVERLAY_MANIFEST_H_ diff --git a/libcef/common/service_manifests/cef_packaged_service_manifests.cc b/libcef/common/service_manifests/cef_packaged_service_manifests.cc new file mode 100644 index 000000000..b4899ceee --- /dev/null +++ b/libcef/common/service_manifests/cef_packaged_service_manifests.cc @@ -0,0 +1,62 @@ +// Copyright 2018 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 "libcef/common/service_manifests/cef_packaged_service_manifests.h" + +#include "base/no_destructor.h" +#include "build/build_config.h" +#include "chrome/common/buildflags.h" +#include "chrome/common/constants.mojom.h" +#include "components/spellcheck/common/spellcheck.mojom.h" +#include "components/startup_metric_utils/common/startup_metric.mojom.h" +#include "extensions/buildflags/buildflags.h" +#include "printing/buildflags/buildflags.h" +#include "services/proxy_resolver/proxy_resolver_manifest.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +#if defined(OS_MACOSX) +#include "components/spellcheck/common/spellcheck_panel.mojom.h" +#endif + +#include "chrome/services/printing/manifest.h" +#include "components/services/pdf_compositor/pdf_compositor_manifest.h" // nogncheck + +namespace { + +const service_manager::Manifest& GetCefManifest() { + static base::NoDestructor manifest { + service_manager::ManifestBuilder() + .WithServiceName(chrome::mojom::kServiceName) + .WithDisplayName("CEF") + .WithOptions(service_manager::ManifestOptionsBuilder() + .WithInstanceSharingPolicy( + service_manager::Manifest::InstanceSharingPolicy:: + kSharedAcrossGroups) + .CanConnectToInstancesWithAnyId(true) + .CanRegisterOtherServiceInstances(true) + .Build()) + .ExposeCapability("renderer", + service_manager::Manifest::InterfaceList< +#if defined(OS_MACOSX) + spellcheck::mojom::SpellCheckPanelHost, +#endif + spellcheck::mojom::SpellCheckHost, + startup_metric_utils::mojom::StartupMetricHost>()) + .RequireCapability(chrome::mojom::kRendererServiceName, "browser") + .Build() + }; + return *manifest; +} + +} // namespace + +const std::vector& GetCefPackagedServiceManifests() { + static base::NoDestructor> manifests{{ + GetCefManifest(), + proxy_resolver::GetManifest(), + pdf_compositor::GetManifest(), + chrome_printing::GetManifest(), + }}; + return *manifests; +} diff --git a/libcef/common/service_manifests/cef_packaged_service_manifests.h b/libcef/common/service_manifests/cef_packaged_service_manifests.h new file mode 100644 index 000000000..a1c7ce879 --- /dev/null +++ b/libcef/common/service_manifests/cef_packaged_service_manifests.h @@ -0,0 +1,17 @@ +// Copyright 2018 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 CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_PACKAGED_SERVICE_MANIFESTS_H_ +#define CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_PACKAGED_SERVICE_MANIFESTS_H_ + +#include + +#include "services/service_manager/public/cpp/manifest.h" + +// Returns manifests for all shared (i.e. cross-profile) services packaged by +// CEF but not packaged by Content. This includes both in- and out-of-process +// services. +const std::vector& GetCefPackagedServiceManifests(); + +#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_PACKAGED_SERVICE_MANIFESTS_H_ diff --git a/libcef/common/service_manifests/cef_renderer_manifest.cc b/libcef/common/service_manifests/cef_renderer_manifest.cc new file mode 100644 index 000000000..47ea31a6c --- /dev/null +++ b/libcef/common/service_manifests/cef_renderer_manifest.cc @@ -0,0 +1,21 @@ +// Copyright 2018 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 "libcef/common/service_manifests/cef_renderer_manifest.h" + +#include "base/no_destructor.h" +#include "chrome/common/constants.mojom.h" +#include "components/spellcheck/common/spellcheck.mojom.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +const service_manager::Manifest& GetCefRendererManifest() { + static base::NoDestructor manifest{ + service_manager::ManifestBuilder() + .WithServiceName(chrome::mojom::kRendererServiceName) + .ExposeCapability("browser", service_manager::Manifest::InterfaceList< + spellcheck::mojom::SpellChecker>()) + .RequireCapability(chrome::mojom::kServiceName, "renderer") + .Build()}; + return *manifest; +} diff --git a/libcef/common/service_manifests/cef_renderer_manifest.h b/libcef/common/service_manifests/cef_renderer_manifest.h new file mode 100644 index 000000000..8c65c8721 --- /dev/null +++ b/libcef/common/service_manifests/cef_renderer_manifest.h @@ -0,0 +1,16 @@ +// Copyright 2018 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 CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_RENDERER_MANIFEST_H_ +#define CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_RENDERER_MANIFEST_H_ + +#include "services/service_manager/public/cpp/manifest.h" + +// Returns the Manifest for the cef_renderer service. CEF registers an +// instance of this service for each renderer process started by Content, and +// that instance lives in the corresponding renderer process alongside the +// content_renderer instance. +const service_manager::Manifest& GetCefRendererManifest(); + +#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_RENDERER_MANIFEST_H_ diff --git a/libcef/common/service_manifests/packaged_services_manifest_overlay.json b/libcef/common/service_manifests/packaged_services_manifest_overlay.json deleted file mode 100644 index 33fc4cdfb..000000000 --- a/libcef/common/service_manifests/packaged_services_manifest_overlay.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "content_packaged_services", - "display_name": "CEF Packaged Services", - "interface_provider_specs": {} -} \ No newline at end of file diff --git a/libcef/common/service_manifests/renderer_manifest_overlay.json b/libcef/common/service_manifests/renderer_manifest_overlay.json deleted file mode 100644 index 9dccc37cb..000000000 --- a/libcef/common/service_manifests/renderer_manifest_overlay.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "content_renderer", - "interface_provider_specs": { - "service_manager:connector": { - "provides": { - "browser": [ - "spellcheck.mojom.SpellChecker" - ] - }, - "requires": { - "chrome": [ "renderer" ] - } - } - } -} diff --git a/libcef/common/service_manifests/utility_manifest_overlay.json b/libcef/common/service_manifests/utility_manifest_overlay.json deleted file mode 100644 index a364a3fee..000000000 --- a/libcef/common/service_manifests/utility_manifest_overlay.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "content_utility", - "interface_provider_specs": { - "service_manager:connector": { - "provides": { - "browser": [ - "net.interfaces.ProxyResolverFactory" - ] - } - } - } -} diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 8c4e4ea35..e703ec2d7 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -2102,8 +2102,9 @@ bool CefV8ValueImpl::GetKeys(std::vector& keys) { v8::Local value = handle_->GetNewV8Handle(false); v8::Local obj = value->ToObject(context).ToLocalChecked(); + v8::Local arr_keys = + obj->GetPropertyNames(context).ToLocalChecked(); - v8::Local arr_keys = obj->GetPropertyNames(); uint32_t len = arr_keys->Length(); for (uint32_t i = 0; i < len; ++i) { v8::Local value = arr_keys->Get(v8::Integer::New(isolate, i)); diff --git a/libcef/resources/cef_resources.grd b/libcef/resources/cef_resources.grd index b4dd992a4..39b102eb2 100644 --- a/libcef/resources/cef_resources.grd +++ b/libcef/resources/cef_resources.grd @@ -15,12 +15,6 @@ - - - - - - diff --git a/patch/patch.cfg b/patch/patch.cfg index ee134847f..87870787a 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -399,11 +399,6 @@ patches = [ # https://bitbucket.org/chromiumembedded/cef/issues/2398 'name': 'resource_bundle_2512', }, - { - # Fix VR target dependencies. - # https://bugs.chromium.org/p/chromium/issues/detail?id=873170 - 'name': 'vr_build_873170', - }, { # Fix redraw of OSR PDF viewer. # https://bitbucket.org/chromiumembedded/cef/issues/2507 @@ -414,5 +409,10 @@ patches = [ # macOS: Fix crash when showing a select popup with CefDoMessageLoopWork. # https://bitbucket.org/chromiumembedded/cef/issues/2495 'name': 'message_pump_mac_2495', + }, + { + # Windows: Fix DCHECK in PrinterQuery::DetachWorker. + # https://chromium-review.googlesource.com/c/chromium/src/+/1428087 + 'name': 'printer_query_924033', } ] diff --git a/patch/patches/browser_child_frame_2507.patch b/patch/patches/browser_child_frame_2507.patch index e1fea64fb..fa0736b85 100644 --- a/patch/patches/browser_child_frame_2507.patch +++ b/patch/patches/browser_child_frame_2507.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_child_frame.cc content/browser/renderer_host/render_widget_host_view_child_frame.cc -index 347321e9de71..9c7a6967e95d 100644 +index 5825f9515121..2d2faa456e66 100644 --- content/browser/renderer_host/render_widget_host_view_child_frame.cc +++ content/browser/renderer_host/render_widget_host_view_child_frame.cc @@ -641,6 +641,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame( diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index aca475669..a712f0b83 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h -index da7e3391774e..7ac32ff70a5a 100644 +index 454c4cfd5a73..2bc6f341b9f5 100644 --- content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h @@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, @@ -12,7 +12,7 @@ index da7e3391774e..7ac32ff70a5a 100644 // Force a new surface id to be allocated. Returns true if the // RenderWidgetHostImpl sent the resulting surface id to the renderer. diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index 21d3b34cc13f..0e281eaf06d9 100644 +index 0817b4eca4f4..ddc37768ff47 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm @@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index 9d74df7ba..13baa62c6 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -79,7 +79,7 @@ index 5426d600906c..4bf4537514eb 100644 // Creates a new View that holds a non-top-level widget and receives messages // for it. diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc -index 04cd7481f4e8..e80014d88d18 100644 +index 8e02ca39a947..b9ec33465141 100644 --- content/browser/web_contents/web_contents_view_aura.cc +++ content/browser/web_contents/web_contents_view_aura.cc @@ -867,7 +867,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, @@ -208,10 +208,10 @@ index 1f0e661628aa..f896c842ff0d 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h -index 64fa2bfc20b4..4e1f9627fee8 100644 +index 18fbea9e4446..cf6b26edfa4d 100644 --- content/browser/web_contents/web_contents_view_mac.h +++ content/browser/web_contents/web_contents_view_mac.h -@@ -72,7 +72,7 @@ class WebContentsViewMac : public WebContentsView, +@@ -74,7 +74,7 @@ class WebContentsViewMac : public WebContentsView, gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -221,10 +221,10 @@ index 64fa2bfc20b4..4e1f9627fee8 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm -index 47cd17207819..480f6309969c 100644 +index 699e8709c74d..9f94a4efd45d 100644 --- content/browser/web_contents/web_contents_view_mac.mm +++ content/browser/web_contents/web_contents_view_mac.mm -@@ -303,7 +303,8 @@ void WebContentsViewMac::CreateView( +@@ -315,7 +315,8 @@ void WebContentsViewMac::CreateView( } RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( @@ -234,7 +234,7 @@ index 47cd17207819..480f6309969c 100644 if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that -@@ -315,6 +316,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( +@@ -327,6 +328,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( render_widget_host->GetView()); } @@ -266,7 +266,7 @@ index bf2226b53dd7..782a320ab788 100644 // a BrowserPlugin even when we are using cross process frames for guests. It // should be removed after resolving https://crbug.com/642826). diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index ad0dae9b1494..80251026a27b 100644 +index a1c6f299d429..3d3c38d1d994 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc @@ -207,6 +207,8 @@ void MimeHandlerViewGuest::CreateWebContents( diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 7592063a9..062c29c8a 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 91e3033ec161..fe01d2192b2c 100644 +index 0e13a4f20aca..89df4a8eaf3e 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -163,7 +163,7 @@ declare_args() { +@@ -164,7 +164,7 @@ declare_args() { !use_clang_coverage && !(is_android && use_order_profiling) && (use_lld || (use_gold && @@ -11,7 +11,7 @@ index 91e3033ec161..fe01d2192b2c 100644 !(current_cpu == "x86" || current_cpu == "x64")))) } -@@ -1693,8 +1693,6 @@ config("thin_archive") { +@@ -1699,8 +1699,6 @@ config("thin_archive") { # archive names to 16 characters, which is not what we want). if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 709256cae..52ba4de82 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 27bdf8f10885..bd49260e4aec 100644 +index de1ef8abbca9..52ff84a4994d 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index 27bdf8f10885..bd49260e4aec 100644 import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1714,6 +1715,7 @@ jumbo_split_static_library("browser") { +@@ -1725,6 +1726,7 @@ jumbo_split_static_library("browser") { "//base:i18n", "//base/allocator:buildflags", "//cc", @@ -18,7 +18,7 @@ index 27bdf8f10885..bd49260e4aec 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1995,6 +1997,10 @@ jumbo_split_static_library("browser") { +@@ -2010,6 +2012,10 @@ jumbo_split_static_library("browser") { ] } @@ -29,7 +29,7 @@ index 27bdf8f10885..bd49260e4aec 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -3661,7 +3667,7 @@ jumbo_split_static_library("browser") { +@@ -3700,7 +3706,7 @@ jumbo_split_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index 07be26f23..f4055b3c5 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -24,10 +24,10 @@ index cac72c6a2fd1..2ed83a4af1b3 100644 // network quality change events. virtual network::NetworkQualityTracker* network_quality_tracker() = 0; diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 5d549f53cffc..6757890a4aa2 100644 +index 31234258792d..36ba13242a9c 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -667,6 +667,10 @@ BrowserProcessImpl::system_network_context_manager() { +@@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() { return SystemNetworkContextManager::GetInstance(); } @@ -39,7 +39,7 @@ index 5d549f53cffc..6757890a4aa2 100644 BrowserProcessImpl::shared_url_loader_factory() { return system_network_context_manager()->GetSharedURLLoaderFactory(); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index 20aa225b9e55..34dbfdebf26e 100644 +index d70dd33f4f41..3d4db9e49933 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h @@ -140,6 +140,7 @@ class BrowserProcessImpl : public BrowserProcess, diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index f90d8648d..711f8a02a 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -71,7 +71,7 @@ index e8e76ce5b954..1dd338dd0142 100644 content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* context); diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 5d692b8227f7..16ac9c07d546 100644 +index 16c500023e3f..e0bc6609c6ae 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc @@ -386,7 +386,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) @@ -80,14 +80,14 @@ index 5d692b8227f7..16ac9c07d546 100644 - if (ProfileShortcutManager::IsFeatureEnabled() && !user_data_dir_.empty()) + if (!user_data_dir_.empty() && ProfileShortcutManager::IsFeatureEnabled()) - profile_shortcut_manager_.reset(ProfileShortcutManager::Create( - this)); + profile_shortcut_manager_ = ProfileShortcutManager::Create(this); } + diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index 8a62433e9107..5ae35bc2d16a 100644 +index 49a5dc4bca1e..a256899483d3 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h -@@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -92,7 +92,7 @@ class ProfileManager : public content::NotificationObserver, // acceptable. Returns null if creation of the new profile fails. // TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then // make this method private. @@ -96,7 +96,7 @@ index 8a62433e9107..5ae35bc2d16a 100644 // Returns total number of profiles available on this machine. size_t GetNumberOfProfiles(); -@@ -123,7 +123,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -122,7 +122,7 @@ class ProfileManager : public content::NotificationObserver, // Returns true if the profile pointer is known to point to an existing // profile. @@ -105,7 +105,7 @@ index 8a62433e9107..5ae35bc2d16a 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. -@@ -132,7 +132,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -131,7 +131,7 @@ class ProfileManager : public content::NotificationObserver, // Get the Profile last used (the Profile to which owns the most recently // focused window) with this Chrome build. If no signed profile has been // stored in Local State, hand back the Default profile. diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 01a64852a..530fd6d27 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -125,10 +125,10 @@ index 989d5d02cedb..e05810db6824 100644 // If we broke out of the loop, we have found an enabled plugin. bool enabled = i < matching_plugins.size(); diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 73052b8be6cd..afe5c11f5550 100644 +index 5ed13cdbb5ae..595ceb48e4aa 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -789,6 +789,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -782,6 +782,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -136,7 +136,7 @@ index 73052b8be6cd..afe5c11f5550 100644 observer->IsPluginTemporarilyAllowed(identifier)) { status = chrome::mojom::PluginStatus::kAllowed; } -@@ -976,7 +977,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -969,7 +970,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( &plugin_auth_host); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -146,7 +146,7 @@ index 73052b8be6cd..afe5c11f5550 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -985,7 +987,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -978,7 +980,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -156,7 +156,7 @@ index 73052b8be6cd..afe5c11f5550 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -995,7 +998,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -988,7 +991,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -166,7 +166,7 @@ index 73052b8be6cd..afe5c11f5550 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -1003,7 +1007,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -996,7 +1000,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); diff --git a/patch/patches/chrome_widevine.patch b/patch/patches/chrome_widevine.patch index 4853a47b4..ccdcf93eb 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,5 +1,5 @@ diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc -index b22c1ffaa216..f9d154b57827 100644 +index 6f0e5c53c37a..63551a75cbf7 100644 --- chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc @@ -97,7 +97,8 @@ @@ -13,7 +13,7 @@ index b22c1ffaa216..f9d154b57827 100644 #include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck // TODO(crbug.com/663554): Needed for WIDEVINE_CDM_VERSION_STRING. Support diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn -index 4826777cffd2..a5835928dbad 100644 +index 27b3e9150832..bf5b96c5f69f 100644 --- third_party/widevine/cdm/BUILD.gn +++ third_party/widevine/cdm/BUILD.gn @@ -5,6 +5,7 @@ diff --git a/patch/patches/component_build_1617.patch b/patch/patches/component_build_1617.patch index f244c0475..f9f07dc0d 100644 --- a/patch/patches/component_build_1617.patch +++ b/patch/patches/component_build_1617.patch @@ -13,7 +13,7 @@ index 864f2a5a315a..78b71d523e86 100644 explicit ContentServiceManagerMainDelegate(const ContentMainParams& params); ~ContentServiceManagerMainDelegate() override; diff --git content/browser/renderer_host/input/mouse_wheel_phase_handler.h content/browser/renderer_host/input/mouse_wheel_phase_handler.h -index 305095fc420e..f5ca4eda4a66 100644 +index fc252b6ceffd..b0dfd847ec03 100644 --- content/browser/renderer_host/input/mouse_wheel_phase_handler.h +++ content/browser/renderer_host/input/mouse_wheel_phase_handler.h @@ -7,6 +7,7 @@ diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 415dfb660..a1a49edad 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -64,27 +64,27 @@ index 8b08e6168124..7ea95c421b91 100644 } diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc -index abbc4d829412..4aa18cbbd6db 100644 +index 8593b6ef033e..31d89020a659 100644 --- content/browser/frame_host/navigation_handle_impl.cc +++ content/browser/frame_host/navigation_handle_impl.cc -@@ -431,12 +431,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { +@@ -390,12 +390,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { } RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { - // Only allow the RenderFrameHost to be retrieved once it has been set for - // this navigation. This will happens either at WillProcessResponse time for - // regular navigations or at WillFailRequest time for error pages. -- CHECK_GE(state_, WILL_FAIL_REQUEST) +- CHECK_GE(state_, PROCESSING_WILL_FAIL_REQUEST) - << "This accessor should only be called after a RenderFrameHost has been " - "picked for this navigation."; static_assert(WILL_FAIL_REQUEST < WILL_PROCESS_RESPONSE, "WillFailRequest state should come before WillProcessResponse"); return render_frame_host_; diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc -index 5f4562c307b4..13daa725c7d3 100644 +index 1a023385a3d2..52af01625703 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -2131,6 +2131,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( +@@ -2140,6 +2140,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( if (GetNavigationHandle()) { GetNavigationHandle()->set_net_error_code( static_cast(params.error_code)); @@ -92,7 +92,7 @@ index 5f4562c307b4..13daa725c7d3 100644 } frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -4787,9 +4788,9 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -4808,9 +4809,9 @@ void RenderFrameHostImpl::CommitNavigation( DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService) || base::FeatureList::IsEnabled( blink::features::kServiceWorkerServicification)); @@ -105,10 +105,10 @@ index 5f4562c307b4..13daa725c7d3 100644 FROM_HERE, {BrowserThread::IO}, base::BindOnce(&PrefetchURLLoaderService::GetFactory, diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index 5ba72edd21cf..89a6dc5c1739 100644 +index 789c40612628..17c30e0b5d57 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc -@@ -701,6 +701,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, +@@ -699,6 +699,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -116,7 +116,7 @@ index 5ba72edd21cf..89a6dc5c1739 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -712,8 +713,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -710,8 +711,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo( bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( render_process_id_, render_frame_id, resource_context_, url, @@ -128,10 +128,10 @@ index 5ba72edd21cf..89a6dc5c1739 100644 void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin( diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h -index da3f345abfb1..e570f4aaf84c 100644 +index 5d68724cf488..d071548d130d 100644 --- content/browser/frame_host/render_frame_message_filter.h +++ content/browser/frame_host/render_frame_message_filter.h -@@ -148,6 +148,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter +@@ -145,6 +145,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter #if BUILDFLAG(ENABLE_PLUGINS) void OnGetPluginInfo(int render_frame_id, const GURL& url, @@ -261,10 +261,10 @@ index 3009401dac6b..b4c5a9e2db50 100644 }; diff --git content/common/frame_messages.h content/common/frame_messages.h -index 391aca4c487a..53c1a2854f7d 100644 +index 6ffaaf08ccc0..7e18a3cf2399 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1352,9 +1352,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1350,9 +1350,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, // type. If there is no matching plugin, |found| is false. // |actual_mime_type| is the actual mime type supported by the // found plugin. @@ -301,7 +301,7 @@ index 3b610b1f554e..7c439e060779 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index ab523326293b..9be2a229c0f4 100644 +index cfe87b6c3903..fcbd83a5db9b 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -73,6 +73,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -314,7 +314,7 @@ index ab523326293b..9be2a229c0f4 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -330,6 +333,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -327,6 +330,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -340,10 +340,10 @@ index 8136604d267a..be7fde2f1a38 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index f25ea89dd6a7..189875a1774d 100644 +index a716d1262cdf..9e6fb547f168 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3692,7 +3692,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3701,7 +3701,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -353,7 +353,7 @@ index f25ea89dd6a7..189875a1774d 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -4107,6 +4108,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { +@@ -4084,6 +4085,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { Send(new FrameHostMsg_FrameFocused(routing_id_)); @@ -363,10 +363,10 @@ index f25ea89dd6a7..189875a1774d 100644 void RenderFrameImpl::WillCommitProvisionalLoad() { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 2e17bf6f1522..477de7f3b9e6 100644 +index 44df5d5461c7..b3a7d92a547e 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -814,6 +814,8 @@ void RenderThreadImpl::Init() { +@@ -815,6 +815,8 @@ void RenderThreadImpl::Init() { StartServiceManagerConnection(); @@ -376,10 +376,10 @@ index 2e17bf6f1522..477de7f3b9e6 100644 base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index e035093938a7..705bf26e714d 100644 +index 704ee01d0a30..6ad832e8f492 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1046,6 +1046,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed( +@@ -1051,6 +1051,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed( base::MemoryPressureListener::SetNotificationsSuppressed(suppressed); } diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 2aa052ee3..f736868ae 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn -index 4bc8b7d54053..589ed4027224 100644 +index 7a91b1c38e99..19e7c2b71955 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ diff --git a/patch/patches/devtools_product_2300.patch b/patch/patches/devtools_product_2300.patch index d7b3c10ee..fa09b1b2d 100644 --- a/patch/patches/devtools_product_2300.patch +++ b/patch/patches/devtools_product_2300.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 2fab142b119d..14a851bb4f76 100644 +index 3a1bc8719732..129f178fd5a7 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc -@@ -571,7 +571,7 @@ void DevToolsHttpHandler::OnJsonRequest( +@@ -574,7 +574,7 @@ void DevToolsHttpHandler::OnJsonRequest( version.SetString("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); version.SetString("WebKit-Version", GetWebKitVersion()); diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 56508c2bb..507972c37 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -27,7 +27,7 @@ index 9e81f0a33ede..b796e79ae7ef 100644 auto* browser_context = web_contents->GetBrowserContext(); diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc -index 5a0b3cf31119..625a7d1f07ad 100644 +index 53586512b68f..3a7ba906571a 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc @@ -945,10 +945,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( @@ -57,7 +57,7 @@ index 5a0b3cf31119..625a7d1f07ad 100644 // If |new_instance| is a new SiteInstance for a subframe that requires a // dedicated process, set its process reuse policy so that such subframes are diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index cde35f745f61..7b2e477a6aae 100644 +index 92425b0bded1..3db10cbe9ea0 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -452,6 +452,13 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -74,7 +74,7 @@ index cde35f745f61..7b2e477a6aae 100644 // Returns true if the passed in URL should be assigned as the site of the // current SiteInstance, if it does not yet have a site. virtual bool ShouldAssignSiteForURL(const GURL& url); -@@ -1457,6 +1464,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1471,6 +1478,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct() const; @@ -84,9 +84,9 @@ index cde35f745f61..7b2e477a6aae 100644 + // Returns the user agent. Content may cache this value. virtual std::string GetUserAgent() const; - }; + diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc -index 6cf7f34bfbd7..a2dcdb88fbe3 100644 +index 0714c63350c8..c1acbd8bd531 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc @@ -67,11 +67,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -156,10 +156,10 @@ index 6cf7f34bfbd7..a2dcdb88fbe3 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index ad1ef1bd0b8f..8014a61c5083 100644 +index 4027505469b8..de8258562bb2 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h -@@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -52,13 +52,19 @@ class ExtensionHost : public DeferredStartRenderHost, ExtensionHost(const Extension* extension, content::SiteInstance* site_instance, const GURL& url, ViewType host_type); @@ -180,7 +180,7 @@ index ad1ef1bd0b8f..8014a61c5083 100644 content::RenderViewHost* render_view_host() const; content::RenderProcessHost* render_process_host() const; bool has_loaded_once() const { return has_loaded_once_; } -@@ -178,7 +184,8 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -180,7 +186,8 @@ class ExtensionHost : public DeferredStartRenderHost, content::BrowserContext* browser_context_; // The host for our HTML content. @@ -230,7 +230,7 @@ index 380b2d3326f6..733918754949 100644 // once each time the extensions system is loaded per browser_context. The // implementation may wish to use the BrowserContext to record the current diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc -index 67b3acf91900..e1200aa01778 100644 +index f9b216c59808..e36d9afc6cdf 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc @@ -359,9 +359,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, diff --git a/patch/patches/external_textures_1006.patch b/patch/patches/external_textures_1006.patch index 2ea4cf1f6..d28dce356 100644 --- a/patch/patches/external_textures_1006.patch +++ b/patch/patches/external_textures_1006.patch @@ -27,10 +27,10 @@ index 941d70bd2a7e..ef14a7dd7d4f 100644 virtual void OnReflectorChanged(); diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index 9d960547e17c..c5a24852224b 100644 +index 5aeda7bd9caf..1f18a5599bec 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc -@@ -215,6 +215,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { +@@ -216,6 +216,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { task_graph_runner_->Shutdown(); } @@ -49,7 +49,7 @@ index 9d960547e17c..c5a24852224b 100644 std::unique_ptr GpuProcessTransportFactory::CreateSoftwareOutputDevice( gfx::AcceleratedWidget widget, -@@ -482,11 +494,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -485,11 +497,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( // surfaces as they are not following the correct mode. DisableGpuCompositing(compositor.get()); } @@ -73,7 +73,7 @@ index 9d960547e17c..c5a24852224b 100644 } else { DCHECK(context_provider); const auto& capabilities = context_provider->ContextCapabilities(); -@@ -494,7 +515,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -497,7 +518,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( display_output_surface = std::make_unique( context_provider, std::move(vsync_callback), @@ -83,7 +83,7 @@ index 9d960547e17c..c5a24852224b 100644 } else if (capabilities.surfaceless) { #if defined(OS_MACOSX) const auto& gpu_feature_info = context_provider->GetGpuFeatureInfo(); -@@ -941,7 +963,8 @@ GpuProcessTransportFactory::CreatePerCompositorData( +@@ -944,7 +966,8 @@ GpuProcessTransportFactory::CreatePerCompositorData( gfx::AcceleratedWidget widget = compositor->widget(); auto data = std::make_unique(); @@ -498,10 +498,10 @@ index 4b936cbc4d26..d78b47046a8a 100644 GLint shm_id, GLuint shm_offset, diff --git gpu/command_buffer/client/gles2_implementation.cc gpu/command_buffer/client/gles2_implementation.cc -index e857907ab719..c2b3c35fd23c 100644 +index a5ca58fb6e5e..9d1d4a70070b 100644 --- gpu/command_buffer/client/gles2_implementation.cc +++ gpu/command_buffer/client/gles2_implementation.cc -@@ -7456,6 +7456,22 @@ void GLES2Implementation::Viewport(GLint x, +@@ -7429,6 +7429,22 @@ void GLES2Implementation::Viewport(GLint x, CheckGLError(); } @@ -986,7 +986,7 @@ index bd70014dabac..dd2b46994692 100644 "buffer_manager.cc", "buffer_manager.h", diff --git gpu/command_buffer/service/gles2_cmd_decoder.cc gpu/command_buffer/service/gles2_cmd_decoder.cc -index 164f32146e32..59f7e3136a52 100644 +index 97b7598ccc4f..fb3c20384c9c 100644 --- gpu/command_buffer/service/gles2_cmd_decoder.cc +++ gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -36,6 +36,7 @@ @@ -997,7 +997,7 @@ index 164f32146e32..59f7e3136a52 100644 #include "gpu/command_buffer/common/debug_marker_manager.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" -@@ -900,6 +901,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { +@@ -901,6 +902,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { return group_->mailbox_manager(); } @@ -1011,7 +1011,7 @@ index 164f32146e32..59f7e3136a52 100644 ImageManager* image_manager() { return group_->image_manager(); } VertexArrayManager* vertex_array_manager() { -@@ -2604,6 +2612,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { +@@ -2606,6 +2614,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { std::unique_ptr vertex_array_manager_; @@ -1020,7 +1020,7 @@ index 164f32146e32..59f7e3136a52 100644 base::flat_set> writes_submitted_but_not_completed_; // The format of the back buffer_ -@@ -5518,6 +5528,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM( +@@ -5522,6 +5532,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM( return error::kNoError; } @@ -1081,7 +1081,7 @@ index 164f32146e32..59f7e3136a52 100644 for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end(); ++it) { diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc -index 0a27c82ac77a..b9b52a766d51 100644 +index f2b5153e3a36..afe5c7621f51 100644 --- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc +++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc @@ -10,6 +10,7 @@ @@ -1092,7 +1092,7 @@ index 0a27c82ac77a..b9b52a766d51 100644 #include "gpu/command_buffer/service/command_buffer_service.h" #include "gpu/command_buffer/service/decoder_client.h" #include "gpu/command_buffer/service/feature_info.h" -@@ -2490,6 +2491,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult( +@@ -2499,6 +2500,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult( return error::kNoError; } @@ -1161,7 +1161,7 @@ index 0a27c82ac77a..b9b52a766d51 100644 GLES2DecoderPassthroughImpl::TextureTarget GLES2DecoderPassthroughImpl::GLenumToTextureTarget(GLenum target) { diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h -index c2d06e1300d8..0645f6ccd975 100644 +index ed682013976b..4bc28fe68a5d 100644 --- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h +++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h @@ -45,6 +45,7 @@ class SharedImageRepresentationGLTexturePassthrough; @@ -1172,7 +1172,7 @@ index c2d06e1300d8..0645f6ccd975 100644 class GPUTracer; class MultiDrawManager; class PassthroughAbstractTextureImpl; -@@ -375,6 +376,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder { +@@ -377,6 +378,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder { void SetOptionalExtensionsRequestedForTesting(bool request_extensions); @@ -1181,7 +1181,7 @@ index c2d06e1300d8..0645f6ccd975 100644 void* GetScratchMemory(size_t size); template -@@ -578,6 +581,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder { +@@ -580,6 +583,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder { std::unique_ptr multi_draw_manager_; @@ -1212,10 +1212,10 @@ index 5d3c2bf5cd8e..c6b20fa563ce 100644 observer_list_.AddObserver(observer); } diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 3c19916a9c40..88ea3a3e8ba2 100644 +index a445b569ede1..0d7cface5026 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h -@@ -26,6 +26,7 @@ +@@ -25,6 +25,7 @@ #include "components/viz/common/surfaces/frame_sink_id.h" #include "components/viz/common/surfaces/local_surface_id.h" #include "components/viz/host/host_frame_sink_client.h" @@ -1223,7 +1223,7 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkMatrix44.h" #include "ui/compositor/compositor_animation_observer.h" -@@ -159,6 +160,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate { +@@ -158,6 +159,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate { const viz::BeginFrameArgs& args) = 0; virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0; @@ -1232,7 +1232,7 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 }; // This class abstracts the creation of the 3D context for the compositor. It is -@@ -194,6 +197,17 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -193,6 +196,17 @@ class COMPOSITOR_EXPORT ContextFactory { virtual bool SyncTokensRequiredForDisplayCompositor() = 0; }; @@ -1250,7 +1250,7 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -233,6 +247,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -232,6 +246,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -1260,7 +1260,7 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -335,6 +352,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -334,6 +351,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, return task_runner_; } @@ -1271,7 +1271,7 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 // Compositor does not own observers. It is the responsibility of the // observer to remove itself when it is done observing. void AddObserver(CompositorObserver* observer); -@@ -436,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -440,6 +461,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; @@ -1280,7 +1280,7 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 // The root of the Layer tree drawn by this compositor. Layer* root_layer_ = nullptr; -@@ -470,6 +493,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -474,6 +497,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ExternalBeginFrameClient* const external_begin_frame_client_; @@ -1290,10 +1290,10 @@ index 3c19916a9c40..88ea3a3e8ba2 100644 // The device scale factor of the monitor that this compositor is compositing diff --git ui/compositor/host/host_context_factory_private.cc ui/compositor/host/host_context_factory_private.cc -index 40ec1e11cd9f..49ad034ebbf5 100644 +index 8297e1aabe3b..6acb9fa6cdfb 100644 --- ui/compositor/host/host_context_factory_private.cc +++ ui/compositor/host/host_context_factory_private.cc -@@ -257,6 +257,10 @@ void HostContextFactoryPrivate::SetOutputIsSecure(Compositor* compositor, +@@ -255,6 +255,10 @@ void HostContextFactoryPrivate::SetOutputIsSecure(Compositor* compositor, iter->second.display_private->SetOutputIsSecure(secure); } diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 190e24b0a..e418c5f1a 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,5 +1,5 @@ diff --git .gn .gn -index ea7a2f467dc8..42c3557ad301 100644 +index a0cba4a846c1..1196ae6ef30a 100644 --- .gn +++ .gn @@ -674,6 +674,8 @@ exec_script_whitelist = @@ -12,10 +12,10 @@ index ea7a2f467dc8..42c3557ad301 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 662dea503b3d..767805033c69 100644 +index ea376e895eb1..78569ded3e5e 100644 --- BUILD.gn +++ BUILD.gn -@@ -185,6 +185,7 @@ group("gn_all") { +@@ -184,6 +184,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -100,7 +100,7 @@ index 2c8675206f31..d3e419d8fe98 100644 diff --git build/vs_toolchain.py build/vs_toolchain.py -index eb47863e6b22..5b8bedb6ab45 100755 +index e088f609c6fe..09409c7cfb99 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -73,11 +73,18 @@ def SetEnvironmentAndGetRuntimeDllDirs(): @@ -123,10 +123,10 @@ index eb47863e6b22..5b8bedb6ab45 100755 # directory in order to run binaries locally, but they are needed in order # to create isolates or the mini_installer. Copying them to the output diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 8f2e40286155..42bb53db9aa8 100644 +index 4c790d3ee4e6..e9f3768c20d6 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni -@@ -263,7 +263,7 @@ template("chrome_paks") { +@@ -265,7 +265,7 @@ template("chrome_paks") { } input_locales = locales diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index d2d987508..c4dc0105c 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,8 +1,8 @@ diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids -index b41d8cbc5150..dbd98d1c4058 100644 +index bc56e877d3a8..905613a8c5dd 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids -@@ -432,4 +432,11 @@ +@@ -434,4 +434,11 @@ # Please read the header and find the right section above instead. # Resource ids starting at 31000 are reserved for projects built on Chromium. diff --git a/patch/patches/linux_gtk_2014.patch b/patch/patches/linux_gtk_2014.patch index 260c533a4..a039022df 100644 --- a/patch/patches/linux_gtk_2014.patch +++ b/patch/patches/linux_gtk_2014.patch @@ -1,5 +1,5 @@ diff --git build/config/linux/gtk/BUILD.gn build/config/linux/gtk/BUILD.gn -index a2b40d82674e..fac0c1900ce8 100644 +index fe2e10627f42..f984662f8318 100644 --- build/config/linux/gtk/BUILD.gn +++ build/config/linux/gtk/BUILD.gn @@ -4,8 +4,10 @@ @@ -68,10 +68,10 @@ index d44c7feaabec..5f1992335a38 100644 void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn -index 50f4a0790071..2bc23912feb3 100644 +index c1f62965b8ac..4ff9852be625 100644 --- chrome/test/BUILD.gn +++ chrome/test/BUILD.gn -@@ -3925,7 +3925,7 @@ test("unit_tests") { +@@ -3954,7 +3954,7 @@ test("unit_tests") { "../browser/ui/input_method/input_method_engine_unittest.cc", ] } @@ -80,7 +80,7 @@ index 50f4a0790071..2bc23912feb3 100644 sources += [ "../browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc" ] deps += [ "//build/config/linux/gtk" ] -@@ -3946,7 +3946,7 @@ test("unit_tests") { +@@ -3975,7 +3975,7 @@ test("unit_tests") { if (use_gio) { configs += [ "//build/linux:gio_config" ] } @@ -89,7 +89,7 @@ index 50f4a0790071..2bc23912feb3 100644 deps += [ "//chrome/browser/ui/libgtkui" ] } -@@ -4943,7 +4943,7 @@ if (!is_android) { +@@ -4975,7 +4975,7 @@ if (!is_android) { # suites, it seems like one or another starts timing out too. "../browser/ui/views/keyboard_access_browsertest.cc", ] @@ -99,10 +99,10 @@ index 50f4a0790071..2bc23912feb3 100644 "../browser/ui/libgtkui/select_file_dialog_interactive_uitest.cc", ] diff --git remoting/host/BUILD.gn remoting/host/BUILD.gn -index b6e72dd7b187..9d5cbf937225 100644 +index 8082ebcbeed7..b86278518197 100644 --- remoting/host/BUILD.gn +++ remoting/host/BUILD.gn -@@ -339,7 +339,7 @@ static_library("host") { +@@ -349,7 +349,7 @@ static_library("common") { "//build/config/linux:xrandr", ] deps += [ "//remoting/host/linux:x11" ] @@ -111,7 +111,7 @@ index b6e72dd7b187..9d5cbf937225 100644 deps += [ "//build/config/linux/gtk" ] } } else { -@@ -719,7 +719,7 @@ if (enable_me2me_host) { +@@ -731,7 +731,7 @@ if (enable_me2me_host) { deps += [ "//components/policy:generated" ] } @@ -121,7 +121,7 @@ index b6e72dd7b187..9d5cbf937225 100644 } if ((is_linux && !is_chromeos) || is_mac) { diff --git remoting/host/it2me/BUILD.gn remoting/host/it2me/BUILD.gn -index 1d8b50d2320e..f72d8a1f3ba3 100644 +index 39dc46737578..e5cb11d5ef04 100644 --- remoting/host/it2me/BUILD.gn +++ remoting/host/it2me/BUILD.gn @@ -53,7 +53,7 @@ source_set("common") { @@ -143,7 +143,7 @@ index 1d8b50d2320e..f72d8a1f3ba3 100644 } } diff --git remoting/host/linux/BUILD.gn remoting/host/linux/BUILD.gn -index fa24d0b9b4ab..3ca8743bb4c7 100644 +index a07f8b0254af..970c1a54b4d2 100644 --- remoting/host/linux/BUILD.gn +++ remoting/host/linux/BUILD.gn @@ -98,7 +98,7 @@ source_set("linux") { @@ -156,7 +156,7 @@ index fa24d0b9b4ab..3ca8743bb4c7 100644 } } diff --git remoting/test/BUILD.gn remoting/test/BUILD.gn -index 267049123534..3672603366df 100644 +index 0bb66b9b7e9b..bfffc92f452f 100644 --- remoting/test/BUILD.gn +++ remoting/test/BUILD.gn @@ -197,7 +197,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) { diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index 227b9dfb4..22c88075c 100644 --- a/patch/patches/mac_gpu.patch +++ b/patch/patches/mac_gpu.patch @@ -1,5 +1,5 @@ diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc -index a89aad20c34c..f3bfc3973a10 100644 +index 03ad2d5027bf..627cbdeba62b 100644 --- ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc @@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 6a91d370e..68cd1a2cd 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -174,10 +174,10 @@ index 1d6748e0e88a..1598fb65484e 100644 msg.hwnd != message_window_.hwnd()); diff --git base/task/sequence_manager/sequence_manager_impl.h base/task/sequence_manager/sequence_manager_impl.h -index 593a17981f0b..9af6995c4d51 100644 +index 8dafb175bb5e..291cdc9c1cd3 100644 --- base/task/sequence_manager/sequence_manager_impl.h +++ base/task/sequence_manager/sequence_manager_impl.h -@@ -163,6 +163,8 @@ class BASE_EXPORT SequenceManagerImpl +@@ -164,6 +164,8 @@ class BASE_EXPORT SequenceManagerImpl void BindToCurrentThread(std::unique_ptr pump) override; void DeletePendingTasks() override; bool HasTasks() override; diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index cd660b4f3..297413a79 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,5 +1,5 @@ diff --git BUILD.gn BUILD.gn -index 3a2cf0a8f..b5d691e7f 100644 +index 52c22d6a1..42888ca9f 100644 --- BUILD.gn +++ BUILD.gn @@ -209,6 +209,10 @@ jumbo_static_library("pdfium") { @@ -14,7 +14,7 @@ index 3a2cf0a8f..b5d691e7f 100644 # Targets below this are only visible within this file (and to the diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp -index eb61c3ed1..968cd1926 100644 +index e46c3dbe3..acb963c7b 100644 --- fpdfsdk/fpdf_view.cpp +++ fpdfsdk/fpdf_view.cpp @@ -38,6 +38,7 @@ diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 6f8bd78b1..54024690c 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index 28e95a27e6fa..b61f074c9222 100644 +index 848a7399cc3c..f622508f83d2 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h -@@ -185,6 +185,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -188,6 +188,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) @@ -35,10 +35,10 @@ index 1e9d3ec160ac..cbff1daf09a8 100644 bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index 14ee16470b6f..2dd37b26171f 100644 +index ad23a9040c21..7c98d0877863 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1006,6 +1006,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -1008,6 +1008,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #endif WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index 1cb9ea5fb..11e0a9f48 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 634443661e23..5a9130704d90 100644 +index 3c627ccaf41c..760b38dbf140 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -360,6 +360,7 @@ jumbo_split_static_library("ui") { +@@ -362,6 +362,7 @@ jumbo_split_static_library("ui") { "//base:i18n", "//base/allocator:buildflags", "//cc/paint", @@ -10,7 +10,7 @@ index 634443661e23..5a9130704d90 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2289,7 +2290,7 @@ jumbo_split_static_library("ui") { +@@ -2307,7 +2308,7 @@ jumbo_split_static_library("ui") { "views/frame/native_browser_frame_factory_ozone.cc", ] } else { @@ -142,7 +142,7 @@ index 528773d80a2f..3355de3884cd 100644 } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h -index 7dd892feb181..daa097e62ba2 100644 +index 7dd892feb181..0124465afc5f 100644 --- components/printing/common/print_messages.h +++ components/printing/common/print_messages.h @@ -85,7 +85,6 @@ struct PrintMsg_PrintFrame_Params { @@ -215,7 +215,7 @@ index 7dd892feb181..daa097e62ba2 100644 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) #endif -@@ -384,13 +376,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, +@@ -384,7 +376,6 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, // Tells the RenderFrame whether printing is enabled or not. IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) @@ -223,14 +223,15 @@ index 7dd892feb181..daa097e62ba2 100644 // Tells the RenderFrame to switch the CSS to print media type, renders every // requested pages for print preview using the given |settings|. This gets // called multiple times as the user updates settings. - IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, - base::DictionaryValue /* settings */) +@@ -393,7 +384,6 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintPreview, -+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Tells the RenderFrame that print preview dialog was closed. IPC_MESSAGE_ROUTED0(PrintMsg_ClosePrintPreviewDialog) - #endif -@@ -456,7 +448,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, +-#endif + + // Messages sent from the renderer to the browser. + +@@ -456,7 +446,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, int /* page count */) #endif // defined(OS_ANDROID) @@ -238,7 +239,7 @@ index 7dd892feb181..daa097e62ba2 100644 // Asks the browser to do print preview. IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, PrintHostMsg_RequestPrintPreview_Params /* params */) -@@ -493,7 +484,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_CheckForCancel, +@@ -493,7 +482,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_CheckForCancel, IPC_MESSAGE_ROUTED2(PrintHostMsg_MetafileReadyForPrinting, PrintHostMsg_DidPreviewDocument_Params /* params */, PrintHostMsg_PreviewIds /* ids */) @@ -246,7 +247,7 @@ index 7dd892feb181..daa097e62ba2 100644 // This is sent when there are invalid printer settings. IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) -@@ -502,7 +492,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) +@@ -502,7 +490,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, int /* document cookie */) @@ -254,7 +255,7 @@ index 7dd892feb181..daa097e62ba2 100644 // Tell the browser print preview failed. IPC_MESSAGE_ROUTED2(PrintHostMsg_PrintPreviewFailed, int /* document cookie */, -@@ -533,6 +522,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, +@@ -533,6 +520,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, IPC_MESSAGE_ROUTED2(PrintHostMsg_SetOptionsFromDocument, PrintHostMsg_SetOptionsFromDocument_Params /* params */, PrintHostMsg_PreviewIds /* ids */) @@ -262,18 +263,18 @@ index 7dd892feb181..daa097e62ba2 100644 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc -index 02d4b6fecf72..63b0ef046b15 100644 +index 0af11fbfa50e..efb4632489fe 100644 --- components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc -@@ -345,7 +345,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, - return plugin && plugin->SupportsPaginatedPrint(); +@@ -351,7 +351,6 @@ bool IsPrintingFrameset(const blink::WebLocalFrame* frame) { + frame->GetDocument().Body().TagName().Equals("FRAMESET"); } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Returns true if the current destination printer is PRINT_TO_PDF. bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool print_to_pdf = false; -@@ -367,7 +366,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, +@@ -373,7 +372,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, } return frame_has_custom_page_size_style; } @@ -281,7 +282,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -422,7 +420,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -428,7 +426,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, : PRINTABLE_AREA_MARGINS; } @@ -289,7 +290,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 gfx::Size GetPdfPageSize(const gfx::Size& page_size, int dpi) { return gfx::Size(ConvertUnit(page_size.width(), dpi, kPointsPerInch), ConvertUnit(page_size.height(), dpi, kPointsPerInch)); -@@ -469,7 +466,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( +@@ -475,7 +472,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( } return blink::kWebPrintScalingOptionFitToPrintableArea; } @@ -297,7 +298,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 // Helper function to scale and round an integer value with a double valued // scaling. -@@ -1100,10 +1096,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1106,10 +1102,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { return; if (g_is_preview_enabled) { @@ -308,7 +309,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 } else { auto weak_this = weak_ptr_factory_.GetWeakPtr(); web_frame->DispatchBeforePrintEvent(); -@@ -1131,10 +1125,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { +@@ -1137,13 +1131,11 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message) IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) @@ -316,11 +317,13 @@ index 02d4b6fecf72..63b0ef046b15 100644 IPC_MESSAGE_HANDLER(PrintMsg_InitiatePrintPreview, OnInitiatePrintPreview) IPC_MESSAGE_HANDLER(PrintMsg_PrintPreview, OnPrintPreview) IPC_MESSAGE_HANDLER(PrintMsg_PrintingDone, OnPrintingDone) -+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog, OnClosePrintPreviewDialog) - #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -1217,7 +1211,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( +-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) + IPC_MESSAGE_HANDLER(PrintMsg_PrintFrameContent, OnPrintFrameContent) + IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled) + IPC_MESSAGE_UNHANDLED(handled = false) +@@ -1223,7 +1215,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } @@ -328,7 +331,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 void PrintRenderFrameHelper::OnPrintPreview( const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) -@@ -1474,7 +1467,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( +@@ -1489,7 +1480,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( printable_height / static_cast(uniform_page_size.height); return static_cast(100.0f * std::min(scale_width, scale_height)); } @@ -336,7 +339,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 void PrintRenderFrameHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1489,7 +1481,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { +@@ -1504,7 +1494,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { is_printing_enabled_ = enabled; } @@ -344,7 +347,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { if (ipc_nesting_level_ > 1) return; -@@ -1500,7 +1491,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1515,7 +1504,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.IsNull()) { @@ -354,15 +357,15 @@ index 02d4b6fecf72..63b0ef046b15 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1509,6 +1502,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { - : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); - } - -+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) +@@ -1527,7 +1518,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { void PrintRenderFrameHelper::OnClosePrintPreviewDialog() { print_preview_context_.source_frame()->DispatchAfterPrintEvent(); } -@@ -1596,11 +1590,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +-#endif + + void PrintRenderFrameHelper::OnPrintFrameContent( + const PrintMsg_PrintFrame_Params& params) { +@@ -1611,11 +1601,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { print_node_in_progress_ = true; @@ -375,7 +378,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 } else { // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets // its |context_menu_node_|. -@@ -1676,13 +1668,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1696,13 +1684,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { int cookie = print_pages_params_ ? print_pages_params_->params.document_cookie : 0; @@ -389,7 +392,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 switch (result) { case OK: break; -@@ -1697,7 +1687,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1717,7 +1703,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -397,7 +400,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 case FAIL_PREVIEW: if (!is_print_ready_metafile_sent_) { if (notify_browser_of_print_failure_) { -@@ -1715,7 +1704,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1735,7 +1720,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { cookie, ids)); print_preview_context_.Failed(false); break; @@ -405,7 +408,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1890,7 +1878,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1910,7 +1894,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } @@ -413,7 +416,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -1983,7 +1970,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( +@@ -2003,7 +1986,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); return false; } @@ -421,7 +424,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 void PrintRenderFrameHelper::GetPrintSettingsFromUser( blink::WebLocalFrame* frame, -@@ -2135,7 +2121,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( +@@ -2155,7 +2137,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( return true; } @@ -429,7 +432,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 void PrintRenderFrameHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -2261,7 +2246,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( +@@ -2281,7 +2262,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids)); return true; } @@ -438,7 +441,7 @@ index 02d4b6fecf72..63b0ef046b15 100644 PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() = default; diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h -index 34690801675c..f2eed3ffbb24 100644 +index 34690801675c..bb503ad7f849 100644 --- components/printing/renderer/print_render_frame_helper.h +++ components/printing/renderer/print_render_frame_helper.h @@ -150,10 +150,8 @@ class PrintRenderFrameHelper @@ -452,18 +455,19 @@ index 34690801675c..f2eed3ffbb24 100644 }; // These values are persisted to logs. Entries should not be renumbered and -@@ -194,9 +192,9 @@ class PrintRenderFrameHelper +@@ -194,11 +192,9 @@ class PrintRenderFrameHelper // Message handlers --------------------------------------------------------- void OnPrintPages(); void OnPrintForSystemDialog(); -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) void OnInitiatePrintPreview(bool has_selection); void OnPrintPreview(const base::DictionaryValue& settings); -+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) void OnClosePrintPreviewDialog(); - #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) +-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) void OnPrintFrameContent(const PrintMsg_PrintFrame_Params& params); -@@ -212,7 +210,6 @@ class PrintRenderFrameHelper + void OnPrintingDone(bool success); + +@@ -212,7 +208,6 @@ class PrintRenderFrameHelper // Update |ignore_css_margins_| based on settings. void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); @@ -471,7 +475,7 @@ index 34690801675c..f2eed3ffbb24 100644 // Prepare frame for creating preview document. void PrepareFrameForPreviewDocument(); -@@ -232,7 +229,6 @@ class PrintRenderFrameHelper +@@ -232,7 +227,6 @@ class PrintRenderFrameHelper // Helper method to calculate the scale factor for fit-to-page. int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points); @@ -479,7 +483,7 @@ index 34690801675c..f2eed3ffbb24 100644 // Enable/Disable printing. void OnSetPrintingEnabled(bool enabled); -@@ -259,7 +255,6 @@ class PrintRenderFrameHelper +@@ -259,7 +253,6 @@ class PrintRenderFrameHelper const blink::WebNode& node, int* number_of_pages); @@ -487,7 +491,7 @@ index 34690801675c..f2eed3ffbb24 100644 // Set options for print preset from source PDF document. bool SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options); -@@ -270,7 +265,6 @@ class PrintRenderFrameHelper +@@ -270,7 +263,6 @@ class PrintRenderFrameHelper bool UpdatePrintSettings(blink::WebLocalFrame* frame, const blink::WebNode& node, const base::DictionaryValue& passed_job_settings); @@ -495,7 +499,7 @@ index 34690801675c..f2eed3ffbb24 100644 // Get final print settings from the user. // WARNING: |this| may be gone after this method returns. -@@ -352,7 +346,6 @@ class PrintRenderFrameHelper +@@ -352,7 +344,6 @@ class PrintRenderFrameHelper bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame, bool user_initiated); @@ -503,7 +507,7 @@ index 34690801675c..f2eed3ffbb24 100644 // Shows scripted print preview when options from plugin are available. void ShowScriptedPrintPreview(); -@@ -371,7 +364,6 @@ class PrintRenderFrameHelper +@@ -371,7 +362,6 @@ class PrintRenderFrameHelper // Returns true if print preview should continue, false on failure. bool PreviewPageRendered(int page_number, std::unique_ptr metafile); @@ -511,7 +515,7 @@ index 34690801675c..f2eed3ffbb24 100644 void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings); -@@ -526,6 +518,7 @@ class PrintRenderFrameHelper +@@ -526,6 +516,7 @@ class PrintRenderFrameHelper ScriptingThrottler scripting_throttler_; bool print_node_in_progress_ = false; diff --git a/patch/patches/printer_query_924033.patch b/patch/patches/printer_query_924033.patch new file mode 100644 index 000000000..6dbe8baf9 --- /dev/null +++ b/patch/patches/printer_query_924033.patch @@ -0,0 +1,75 @@ +diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc +index 5786a450fdb6..2abaa6e3168e 100644 +--- chrome/browser/printing/printer_query.cc ++++ chrome/browser/printing/printer_query.cc +@@ -12,6 +12,7 @@ + #include "base/location.h" + #include "base/task/post_task.h" + #include "base/threading/thread_restrictions.h" ++#include "base/threading/thread_task_runner_handle.h" + #include "base/values.h" + #include "chrome/browser/printing/print_job_worker.h" + #include "content/public/browser/browser_task_traits.h" +@@ -22,7 +23,9 @@ + namespace printing { + + PrinterQuery::PrinterQuery(int render_process_id, int render_frame_id) +- : cookie_(PrintSettings::NewCookie()), ++ : base::RefCountedDeleteOnSequence( ++ base::ThreadTaskRunnerHandle::Get()), ++ cookie_(PrintSettings::NewCookie()), + worker_(std::make_unique(render_process_id, + render_frame_id, + this)) { +@@ -57,7 +60,7 @@ void PrinterQuery::GetSettingsDone(const PrintSettings& new_settings, + } + + std::unique_ptr PrinterQuery::DetachWorker() { +- DCHECK_CURRENTLY_ON(content::BrowserThread::IO); ++ DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(!callback_); + DCHECK(worker_); + +diff --git chrome/browser/printing/printer_query.h chrome/browser/printing/printer_query.h +index 6d9b0e74196f..b6d8e2220d02 100644 +--- chrome/browser/printing/printer_query.h ++++ chrome/browser/printing/printer_query.h +@@ -9,7 +9,7 @@ + + #include "base/callback.h" + #include "base/macros.h" +-#include "base/memory/ref_counted.h" ++#include "base/memory/ref_counted_delete_on_sequence.h" + #include "base/values.h" + #include "printing/print_job_constants.h" + #include "printing/print_settings.h" +@@ -24,7 +24,7 @@ namespace printing { + class PrintJobWorker; + + // Query the printer for settings. +-class PrinterQuery : public base::RefCountedThreadSafe { ++class PrinterQuery : public base::RefCountedDeleteOnSequence { + public: + // GetSettings() UI parameter. + enum class GetSettingsAskParam { +@@ -41,6 +41,8 @@ class PrinterQuery : public base::RefCountedThreadSafe { + + // Detach the PrintJobWorker associated to this object. Virtual so that tests + // can override. ++ // Called on the UI thread. ++ // TODO(thestig): Do |worker_| and |callback_| need locks? + virtual std::unique_ptr DetachWorker(); + + // Virtual so that tests can override. +@@ -84,8 +86,9 @@ class PrinterQuery : public base::RefCountedThreadSafe { + bool PostTask(const base::Location& from_here, base::OnceClosure task); + + protected: +- // Refcounted class. +- friend class base::RefCountedThreadSafe; ++ // RefCountedDeleteOnSequence class. ++ friend class base::RefCountedDeleteOnSequence; ++ friend class base::DeleteHelper; + + virtual ~PrinterQuery(); + diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index 583d08f50..54d43fe00 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,20 +1,20 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index 1e2d43fb5625..08fa8eb809e0 100644 +index 961e1560aa91..e04639e54baa 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc -@@ -147,6 +147,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, +@@ -146,6 +146,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, + thread_("Printing_Worker"), weak_factory_(this) { - // The object is created in the IO thread. - DCHECK(query_->RunsTasksInCurrentSequence()); + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + printing_context_->set_render_ids(render_process_id, render_frame_id); } PrintJobWorker::~PrintJobWorker() { diff --git printing/printing_context.h printing/printing_context.h -index 885937908414..03f0f0837f80 100644 +index 1704d5aa9f00..1308f57915e4 100644 --- printing/printing_context.h +++ printing/printing_context.h -@@ -133,6 +133,13 @@ class PRINTING_EXPORT PrintingContext { +@@ -130,6 +130,13 @@ class PRINTING_EXPORT PrintingContext { int job_id() const { return job_id_; } @@ -28,7 +28,7 @@ index 885937908414..03f0f0837f80 100644 protected: explicit PrintingContext(Delegate* delegate); -@@ -157,6 +164,10 @@ class PRINTING_EXPORT PrintingContext { +@@ -154,6 +161,10 @@ class PRINTING_EXPORT PrintingContext { // The job id for the current job. The value is 0 if no jobs are active. int job_id_; diff --git a/patch/patches/render_frame_message_filter_626728.patch b/patch/patches/render_frame_message_filter_626728.patch deleted file mode 100644 index 6e54ac160..000000000 --- a/patch/patches/render_frame_message_filter_626728.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index 93a1da4..476d7cc 100644 ---- content/browser/frame_host/render_frame_message_filter.cc -+++ content/browser/frame_host/render_frame_message_filter.cc -@@ -491,7 +491,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( - PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter(); - std::vector plugins; - -- int child_process_id = -1; -+ int child_process_id = render_process_id_; - int routing_id = MSG_ROUTING_NONE; - // In this loop, copy the WebPluginInfo (and do not use a reference) because - // the filter might mutate it. diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index 60a627b81..42a7f7df0 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,8 +1,8 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index ffbb5fae5ecc..cc0e038ebad8 100644 +index 340291d8c8f3..34abefbd1c77 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -692,6 +692,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -716,6 +716,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(SCALE_FACTOR_100P) { @@ -15,7 +15,7 @@ index ffbb5fae5ecc..cc0e038ebad8 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -701,6 +707,11 @@ ResourceBundle::~ResourceBundle() { +@@ -725,6 +731,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } @@ -28,10 +28,10 @@ index ffbb5fae5ecc..cc0e038ebad8 100644 void ResourceBundle::InitSharedInstance(Delegate* delegate) { DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice"; diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h -index de3828434fd5..491d877dd3ab 100644 +index 1f0f0b575e44..b3f8d28b7a6e 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h -@@ -151,6 +151,11 @@ class UI_BASE_EXPORT ResourceBundle { +@@ -150,6 +150,11 @@ class UI_BASE_EXPORT ResourceBundle { // Return the global resource loader instance. static ResourceBundle& GetSharedInstance(); diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 6f24161c3..7c26b2fe5 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 3b67a5ba02e9..6c00ead42d26 100644 +index 5df169e8bcd9..0bd8180493e9 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -727,10 +727,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { +@@ -731,10 +731,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index 3b67a5ba02e9..6c00ead42d26 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -2011,6 +2013,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2027,6 +2029,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index c1223bb12..4c425515c 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -1,8 +1,8 @@ diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc -index 80198d013f0a..583edc8df4ed 100644 +index 6e0a207374fa..ea7bfcdbc378 100644 --- content/browser/appcache/appcache_internals_ui.cc +++ content/browser/appcache/appcache_internals_ui.cc -@@ -378,8 +378,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( +@@ -383,8 +383,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( StoragePartition* storage_partition) { scoped_refptr proxy = new Proxy(weak_ptr_factory_.GetWeakPtr(), storage_partition->GetPath()); @@ -38,7 +38,7 @@ index d56cc6909782..69c4e8c2877e 100644 render_frame_host->GetLastCommittedOrigin(), render_frame_host->GetFrameTreeNodeId(), std::move(wc_getter), diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 31bad2ca4cc8..1f8c2c00e427 100644 +index 944324e66cad..6d2ddc4d04be 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc @@ -88,6 +88,11 @@ class BlobHandleImpl : public BlobHandle { @@ -67,10 +67,10 @@ index 26cf1ebfdffc..f6de541d25d1 100644 static ChromeBlobStorageContext* GetFor( BrowserContext* browser_context); diff --git content/browser/bluetooth/web_bluetooth_service_impl.cc content/browser/bluetooth/web_bluetooth_service_impl.cc -index 771083c375b8..b04254cb727c 100644 +index 4728c4f008b5..07dc19b2240a 100644 --- content/browser/bluetooth/web_bluetooth_service_impl.cc +++ content/browser/bluetooth/web_bluetooth_service_impl.cc -@@ -1391,9 +1391,9 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() { +@@ -1553,9 +1553,9 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() { } BluetoothAllowedDevices& WebBluetoothServiceImpl::allowed_devices() { @@ -121,10 +121,10 @@ index 617683c9e47e..9ad01edc2ea7 100644 CHECK(GetUserData(kServiceInstanceGroup)) << "Attempting to destroy a BrowserContext that never called " diff --git content/browser/devtools/protocol/network_handler.cc content/browser/devtools/protocol/network_handler.cc -index 714a1b956c09..990f038d47d9 100644 +index d82370f5d7ff..a586244eaef0 100644 --- content/browser/devtools/protocol/network_handler.cc +++ content/browser/devtools/protocol/network_handler.cc -@@ -805,8 +805,7 @@ class BackgroundSyncRestorer { +@@ -804,8 +804,7 @@ class BackgroundSyncRestorer { scoped_refptr service_worker_host = static_cast(host.get()); scoped_refptr sync_context = @@ -171,7 +171,7 @@ index ec9ab86d0ca6..0fe5219f1e84 100644 base::WeakPtrFactory weak_factory_; diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc -index 644ddcb990e5..7cb7b03f1fcd 100644 +index 163932d9f686..8a2ecaa1c157 100644 --- content/browser/download/download_manager_impl.cc +++ content/browser/download/download_manager_impl.cc @@ -99,9 +99,9 @@ void DeleteDownloadedFileOnUIThread(const base::FilePath& file_path) { @@ -215,7 +215,7 @@ index 644ddcb990e5..7cb7b03f1fcd 100644 std::move(proxy_factory_ptr_info), std::move(proxy_factory_request)); } -@@ -1203,7 +1202,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( +@@ -1198,7 +1197,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( tab_referrer_url = entry->GetReferrer().url; } } @@ -224,7 +224,7 @@ index 644ddcb990e5..7cb7b03f1fcd 100644 GetStoragePartition(browser_context_, render_process_id, render_frame_id); in_progress_manager_->InterceptDownloadFromNavigation( std::move(resource_request), render_process_id, render_frame_id, site_url, -@@ -1254,10 +1253,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( +@@ -1249,10 +1248,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( base::MakeRefCounted( rfh, params->url()); } else if (rfh && params->url().SchemeIsFileSystem()) { @@ -237,7 +237,7 @@ index 644ddcb990e5..7cb7b03f1fcd 100644 std::string storage_domain; auto* site_instance = rfh->GetSiteInstance(); if (site_instance) { -@@ -1272,10 +1269,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( +@@ -1267,10 +1264,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( params->url(), rfh, /*is_navigation=*/false, storage_partition->GetFileSystemContext(), storage_domain); } else { @@ -328,7 +328,7 @@ index d821dc59609c..58ff1bc59fed 100644 partition->GetPaymentAppContext(); diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index aac3f0505472..0ffa78434737 100644 +index e27ad6494834..ee5d5c309d45 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc @@ -747,11 +747,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, @@ -347,7 +347,7 @@ index aac3f0505472..0ffa78434737 100644 // Is this the default storage partition? If it isn't, then just give it its // own non-shared process. -@@ -1505,7 +1504,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { +@@ -1523,7 +1522,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { // static RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( BrowserContext* browser_context, @@ -356,7 +356,7 @@ index aac3f0505472..0ffa78434737 100644 SiteInstance* site_instance, bool is_for_guests_only) { if (g_render_process_host_factory_) { -@@ -1514,8 +1513,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1532,8 +1531,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( } if (!storage_partition_impl) { @@ -367,7 +367,7 @@ index aac3f0505472..0ffa78434737 100644 } // If we've made a StoragePartition for guests (e.g., for the tag), // stash the Site URL on it. This way, when we start a service worker inside -@@ -1540,7 +1539,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = +@@ -1558,7 +1557,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = RenderProcessHostImpl::RenderProcessHostImpl( BrowserContext* browser_context, @@ -376,7 +376,7 @@ index aac3f0505472..0ffa78434737 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1591,10 +1590,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1609,10 +1608,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( permission_service_context_(new PermissionServiceContext(this)), indexed_db_factory_(new IndexedDBDispatcherHost( id_, @@ -391,7 +391,7 @@ index aac3f0505472..0ffa78434737 100644 id_)), channel_connected_(false), sent_render_process_ready_(false), -@@ -1628,7 +1629,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1646,7 +1647,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -401,7 +401,7 @@ index aac3f0505472..0ffa78434737 100644 AddObserver(indexed_db_factory_.get()); AddObserver(service_worker_dispatcher_host_.get()); -@@ -1953,6 +1955,15 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1976,6 +1978,15 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -417,7 +417,7 @@ index aac3f0505472..0ffa78434737 100644 MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // from guests. -@@ -1992,10 +2003,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -2015,10 +2026,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { media_request_context)); resource_message_filter_ = new ResourceMessageFilter( @@ -430,7 +430,7 @@ index aac3f0505472..0ffa78434737 100644 storage_partition_impl_->GetPrefetchURLLoaderService(), BrowserContext::GetSharedCorsOriginAccessList(browser_context), std::move(get_contexts_callback), -@@ -2004,8 +2015,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -2027,8 +2038,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(resource_message_filter_.get()); } @@ -440,7 +440,7 @@ index aac3f0505472..0ffa78434737 100644 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); AddFilter(peer_connection_tracker_host_.get()); -@@ -2022,10 +2032,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -2045,10 +2055,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(new TraceMessageFilter(GetID())); AddFilter(new ResolveProxyMsgHelper(GetID())); @@ -451,7 +451,7 @@ index aac3f0505472..0ffa78434737 100644 } void RenderProcessHostImpl::BindCacheStorage( -@@ -2037,7 +2043,8 @@ void RenderProcessHostImpl::BindCacheStorage( +@@ -2060,7 +2066,8 @@ void RenderProcessHostImpl::BindCacheStorage( cache_storage_dispatcher_host_ = base::MakeRefCounted(); cache_storage_dispatcher_host_->Init( @@ -461,7 +461,7 @@ index aac3f0505472..0ffa78434737 100644 } // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // thread entirely. -@@ -2231,7 +2238,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2268,7 +2275,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &CodeCacheHostImpl::Create, GetID(), @@ -471,7 +471,7 @@ index aac3f0505472..0ffa78434737 100644 base::RetainedRef( storage_partition_impl_->GetGeneratedCodeCacheContext()))); -@@ -2243,7 +2251,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2280,7 +2288,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &AppCacheDispatcherHost::Create, @@ -481,7 +481,7 @@ index aac3f0505472..0ffa78434737 100644 GetID())); AddUIThreadInterface( -@@ -2288,6 +2297,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2326,6 +2335,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { plugin_registry_.reset( new PluginRegistryImpl(GetBrowserContext()->GetResourceContext())); } @@ -492,10 +492,10 @@ index aac3f0505472..0ffa78434737 100644 &PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get()))); #endif diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h -index efaf56d47ec6..1be61f1467af 100644 +index 9cbb089496aa..9236e3833c39 100644 --- content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h -@@ -99,7 +99,6 @@ class ServiceWorkerDispatcherHost; +@@ -101,7 +101,6 @@ class ServiceWorkerDispatcherHost; class SiteInstance; class SiteInstanceImpl; class StoragePartition; @@ -503,7 +503,7 @@ index efaf56d47ec6..1be61f1467af 100644 struct ChildProcessTerminationInfo; typedef base::Thread* (*RendererMainThreadFactoryFunction)( -@@ -141,7 +140,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -143,7 +142,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // null. static RenderProcessHost* CreateRenderProcessHost( BrowserContext* browser_context, @@ -512,7 +512,7 @@ index efaf56d47ec6..1be61f1467af 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -495,7 +494,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -515,7 +514,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Use CreateRenderProcessHost() instead of calling this constructor // directly. RenderProcessHostImpl(BrowserContext* browser_context, @@ -521,7 +521,7 @@ index efaf56d47ec6..1be61f1467af 100644 bool is_for_guests_only); // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected -@@ -759,10 +758,10 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -781,10 +780,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // The globally-unique identifier for this RPH. const int id_; @@ -532,10 +532,10 @@ index efaf56d47ec6..1be61f1467af 100644 - StoragePartitionImpl* storage_partition_impl_; + StoragePartition* storage_partition_impl_; - // The observers watching our lifetime. - base::ObserverList::Unchecked observers_; + // Keeps track of the BindingIds returned by storage_partition_impl_->Bind() + // calls so we can Unbind() them on cleanup. diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc -index 87ecafbac4bd..ea76b7e8c6cb 100644 +index 8e4df0b15aeb..02bcdca69af9 100644 --- content/browser/renderer_interface_binders.cc +++ content/browser/renderer_interface_binders.cc @@ -140,7 +140,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { @@ -547,7 +547,7 @@ index 87ecafbac4bd..ea76b7e8c6cb 100644 ->GetPaymentAppContext() ->CreatePaymentManager(std::move(request)); })); -@@ -173,15 +173,16 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -173,23 +173,23 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface(base::BindRepeating( [](blink::mojom::LockManagerRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -556,18 +556,27 @@ index 87ecafbac4bd..ea76b7e8c6cb 100644 ->GetLockManager() ->CreateService(std::move(request), origin); })); + parameterized_binder_registry_.AddInterface(base::BindRepeating( + [](blink::mojom::IdleManagerRequest request, RenderProcessHost* host, + const url::Origin& origin) { +- static_cast(host->GetStoragePartition()) ++ host->GetStoragePartition() + ->GetIdleManager() + ->CreateService(std::move(request), origin); + })); parameterized_binder_registry_.AddInterface( base::Bind([](blink::mojom::NotificationServiceRequest request, RenderProcessHost* host, const url::Origin& origin) { - static_cast(host->GetStoragePartition()) - ->GetPlatformNotificationContext() +- ->CreateService(origin, std::move(request)); + static_cast( -+ host->GetStoragePartition() -+ ->GetPlatformNotificationContext()) - ->CreateService(origin, std::move(request)); ++ host->GetStoragePartition()->GetPlatformNotificationContext()) ++ ->CreateService(origin, std::move(request)); })); parameterized_binder_registry_.AddInterface( -@@ -193,7 +194,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { + base::BindRepeating(&BackgroundFetchServiceImpl::CreateForWorker)); +@@ -200,7 +200,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface(base::BindRepeating( [](blink::mojom::CookieStoreRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -577,19 +586,21 @@ index 87ecafbac4bd..ea76b7e8c6cb 100644 ->CreateService(std::move(request), origin); })); diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h -index c9fd76aed58c..aeb44ed86fdd 100644 +index e8a33dcd4b23..2435173b5c17 100644 --- content/browser/storage_partition_impl.h +++ content/browser/storage_partition_impl.h -@@ -96,7 +96,7 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -97,8 +97,8 @@ class CONTENT_EXPORT StoragePartitionImpl storage::FileSystemContext* GetFileSystemContext() override; storage::DatabaseTracker* GetDatabaseTracker() override; DOMStorageContextWrapper* GetDOMStorageContext() override; +- IdleManager* GetIdleManager(); - LockManager* GetLockManager(); // override; TODO: Add to interface ++ IdleManager* GetIdleManager() override; + LockManager* GetLockManager() override; IndexedDBContextImpl* GetIndexedDBContext() override; CacheStorageContextImpl* GetCacheStorageContext() override; ServiceWorkerContextWrapper* GetServiceWorkerContext() override; -@@ -137,14 +137,14 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -139,14 +139,14 @@ class CONTENT_EXPORT StoragePartitionImpl void FlushNetworkInterfaceForTesting() override; void WaitForDeletionTasksForTesting() override; @@ -612,7 +623,7 @@ index c9fd76aed58c..aeb44ed86fdd 100644 // blink::mojom::StoragePartitionService interface. void OpenLocalStorage(const url::Origin& origin, -@@ -161,18 +161,19 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -163,21 +163,22 @@ class CONTENT_EXPORT StoragePartitionImpl const GURL& origin, OnCanSendDomainReliabilityUploadCallback callback) override; @@ -626,17 +637,21 @@ index c9fd76aed58c..aeb44ed86fdd 100644 - BrowserContext* browser_context() const; + BrowserContext* browser_context() const override; - // Called by each renderer process once. Returns the id of the created - // binding. + // Called by each renderer process for each StoragePartitionService interface + // it binds in the renderer process. Returns the id of the created binding. mojo::BindingId Bind( int process_id, - mojo::InterfaceRequest request); + mojo::InterfaceRequest request) + override; + // Remove a binding created by a previous Bind() call. +- void Unbind(mojo::BindingId binding_id); ++ void Unbind(mojo::BindingId binding_id) override; + auto& bindings_for_testing() { return bindings_; } -@@ -183,10 +184,11 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -188,10 +189,11 @@ class CONTENT_EXPORT StoragePartitionImpl // one must use the "chrome-guest://blahblah" site URL to ensure that the // service worker stays in this StoragePartition. This is an empty GURL if // this StoragePartition is not for guests. @@ -726,7 +741,7 @@ index 9ec4836022bb..57a6480bfd95 100644 std::move(client), creation_context_type, blink::MessagePortChannel(std::move(message_port)), diff --git content/browser/worker_host/worker_script_fetch_initiator.cc content/browser/worker_host/worker_script_fetch_initiator.cc -index 2f4be80c04e8..6d77a31c4077 100644 +index 482499bdbb5e..c95d3c61847f 100644 --- content/browser/worker_host/worker_script_fetch_initiator.cc +++ content/browser/worker_host/worker_script_fetch_initiator.cc @@ -98,7 +98,7 @@ void WorkerScriptFetchInitiator::Start( @@ -739,7 +754,7 @@ index 2f4be80c04e8..6d77a31c4077 100644 std::move(subresource_loader_factories), std::move(service_worker_context), appcache_handle_core, diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h -index 9f562fd96d48..a97e9113c6c0 100644 +index 9df16c695fcf..599cc201d9d5 100644 --- content/public/browser/browser_context.h +++ content/public/browser/browser_context.h @@ -242,6 +242,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { @@ -751,7 +766,7 @@ index 9f562fd96d48..a97e9113c6c0 100644 ~BrowserContext() override; // Shuts down the storage partitions associated to this browser context. -@@ -362,6 +364,13 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { +@@ -366,6 +368,13 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { virtual download::InProgressDownloadManager* RetriveInProgressDownloadManager(); @@ -766,7 +781,7 @@ index 9f562fd96d48..a97e9113c6c0 100644 const std::string unique_id_; bool was_notify_will_be_destroyed_called_ = false; diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h -index 6fe4d0bd6cdd..a7ea20c6f12a 100644 +index 80083ad9ad16..d77e5999ba11 100644 --- content/public/browser/storage_partition.h +++ content/public/browser/storage_partition.h @@ -14,8 +14,10 @@ @@ -780,7 +795,7 @@ index 6fe4d0bd6cdd..a7ea20c6f12a 100644 class GURL; -@@ -59,12 +61,28 @@ class PlatformNotificationContext; +@@ -59,12 +61,29 @@ class PlatformNotificationContext; class ServiceWorkerContext; class SharedWorkerService; @@ -791,6 +806,7 @@ index 6fe4d0bd6cdd..a7ea20c6f12a 100644 +class BluetoothAllowedDevicesMap; +class BroadcastChannelProvider; +class CookieStoreContext; ++class IdleManager; +class LockManager; +class PaymentAppContextImpl; +class PrefetchURLLoaderService; @@ -809,15 +825,16 @@ index 6fe4d0bd6cdd..a7ea20c6f12a 100644 // Defines what persistent state a child process can access. // // The StoragePartition defines the view each child process has of the -@@ -104,6 +122,7 @@ class CONTENT_EXPORT StoragePartition { +@@ -104,6 +123,8 @@ class CONTENT_EXPORT StoragePartition { virtual storage::FileSystemContext* GetFileSystemContext() = 0; virtual storage::DatabaseTracker* GetDatabaseTracker() = 0; virtual DOMStorageContext* GetDOMStorageContext() = 0; ++ virtual IdleManager* GetIdleManager() = 0; + virtual LockManager* GetLockManager() = 0; virtual IndexedDBContext* GetIndexedDBContext() = 0; virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; virtual SharedWorkerService* GetSharedWorkerService() = 0; -@@ -234,6 +253,26 @@ class CONTENT_EXPORT StoragePartition { +@@ -234,6 +255,28 @@ class CONTENT_EXPORT StoragePartition { // Wait until all deletions tasks are finished. For test use only. virtual void WaitForDeletionTasksForTesting() = 0; @@ -836,7 +853,9 @@ index 6fe4d0bd6cdd..a7ea20c6f12a 100644 + virtual mojo::BindingId Bind( + int process_id, + mojo::InterfaceRequest request) = 0; -+ ++ ++ virtual void Unbind(mojo::BindingId binding_id) = 0; ++ + virtual void set_site_for_service_worker( + const GURL& site_for_service_worker) = 0; + virtual const GURL& site_for_service_worker() const = 0; diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 2ed455597..dba81cdc8 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,5 +1,5 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index fbe58b6830c4..1fe4a1dab356 100644 +index 24405a11a0e0..78f8cb5fc36d 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -47,6 +47,8 @@ diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index 9ec10cd42..610c9283f 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -1,5 +1,5 @@ diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h -index fb958b187f0b..131f2fe7490e 100644 +index bb53c043a8fe..e1427ac3a1ef 100644 --- ui/base/models/menu_model.h +++ ui/base/models/menu_model.h @@ -15,6 +15,7 @@ @@ -10,7 +10,7 @@ index fb958b187f0b..131f2fe7490e 100644 struct VectorIcon; } -@@ -124,6 +125,27 @@ class UI_BASE_EXPORT MenuModel { +@@ -120,6 +121,27 @@ class UI_BASE_EXPORT MenuModel { // |event_flags| is a bit mask of ui::EventFlags. virtual void ActivatedAt(int index, int event_flags); @@ -39,10 +39,10 @@ index fb958b187f0b..131f2fe7490e 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 974d8069e3a2..f3867546bb79 100644 +index 1b7f2cf2ad75..e22afc917f7a 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc -@@ -508,6 +508,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) { +@@ -514,6 +514,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) { } } @@ -57,7 +57,7 @@ index 974d8069e3a2..f3867546bb79 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -1504,6 +1512,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1512,6 +1520,19 @@ void RenderText::OnTextAttributeChanged() { if (!multiline_ && replace_newline_chars_with_symbols_) base::ReplaceChars(layout_text_, kNewline, kNewlineSymbol, &layout_text_); @@ -78,10 +78,10 @@ index 974d8069e3a2..f3867546bb79 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 6eaea6c52ccc..a3ddc5a441db 100644 +index 18e57f9823d0..4ec5cb20dabb 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h -@@ -307,6 +307,10 @@ class GFX_EXPORT RenderText { +@@ -309,6 +309,10 @@ class GFX_EXPORT RenderText { void SetElideBehavior(ElideBehavior elide_behavior); ElideBehavior elide_behavior() const { return elide_behavior_; } @@ -92,7 +92,7 @@ index 6eaea6c52ccc..a3ddc5a441db 100644 const Rect& display_rect() const { return display_rect_; } void SetDisplayRect(const Rect& r); -@@ -916,6 +920,8 @@ class GFX_EXPORT RenderText { +@@ -918,6 +922,8 @@ class GFX_EXPORT RenderText { // Extra spacing placed between glyphs; used for obscured text styling. int glyph_spacing_ = 0; @@ -154,10 +154,10 @@ index 0200201196b2..6e1617c927ba 100644 ImageView* image() const { return image_; } Label* label() const; diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index faa027d58c0f..d80e80830fd9 100644 +index ef1ed1092eb4..acd4f37446c6 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -35,6 +35,22 @@ +@@ -43,6 +43,22 @@ bool IsOpaque(SkColor color) { namespace views { @@ -180,7 +180,7 @@ index faa027d58c0f..d80e80830fd9 100644 const char Label::kViewClassName[] = "Label"; Label::Label() : Label(base::string16()) { -@@ -194,6 +210,14 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -202,6 +218,14 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { ResetLayout(); } @@ -195,7 +195,7 @@ index faa027d58c0f..d80e80830fd9 100644 void Label::SetTooltipText(const base::string16& tooltip_text) { DCHECK(handles_tooltips_); tooltip_text_ = tooltip_text; -@@ -422,7 +446,19 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -430,7 +454,19 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SetFontList(font_list()); render_text->set_shadows(shadows()); render_text->SetCursorEnabled(false); @@ -217,10 +217,10 @@ index faa027d58c0f..d80e80830fd9 100644 render_text->SetMaxLines(multi_line() ? max_lines() : 0); render_text->SetWordWrapBehavior(full_text_->word_wrap_behavior()); diff --git ui/views/controls/label.h ui/views/controls/label.h -index 1c88fb1930ae..0d53ec1236b0 100644 +index 771034ccebbe..79e3026f6870 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -153,6 +153,10 @@ class VIEWS_EXPORT Label : public View, +@@ -154,6 +154,10 @@ class VIEWS_EXPORT Label : public View, void SetElideBehavior(gfx::ElideBehavior elide_behavior); gfx::ElideBehavior elide_behavior() const { return elide_behavior_; } @@ -231,7 +231,7 @@ index 1c88fb1930ae..0d53ec1236b0 100644 // Sets the tooltip text. Default behavior for a label (single-line) is to // show the full text if it is wider than its bounds. Calling this overrides // the default behavior and lets you set a custom tooltip. To revert to -@@ -373,6 +377,7 @@ class VIEWS_EXPORT Label : public View, +@@ -378,6 +382,7 @@ class VIEWS_EXPORT Label : public View, bool collapse_when_hidden_; int fixed_width_; int max_width_; @@ -240,10 +240,10 @@ index 1c88fb1930ae..0d53ec1236b0 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index 237a19181f21..92b5c9e3e349 100644 +index d813c85b96d8..0fdaa9830c5f 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2501,8 +2501,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2508,8 +2508,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -258,7 +258,7 @@ index 237a19181f21..92b5c9e3e349 100644 MenuItemView* to_select = NULL; if (item->GetSubmenu()->GetMenuItemCount() > 0) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2517,8 +2522,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2524,8 +2529,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -271,7 +271,7 @@ index 237a19181f21..92b5c9e3e349 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h -index 69a8ed510b6e..3917e7e17fc7 100644 +index 234ef7e070c2..33e628613c5f 100644 --- ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h @@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate { @@ -297,7 +297,7 @@ index 69a8ed510b6e..3917e7e17fc7 100644 // The tooltip shown for the menu item. This is invoked when the user // hovers over the item, and no tooltip text has been set for that item. virtual base::string16 GetTooltipText(int id, -@@ -213,6 +229,11 @@ class VIEWS_EXPORT MenuDelegate { +@@ -209,6 +225,11 @@ class VIEWS_EXPORT MenuDelegate { bool* has_mnemonics, MenuButton** button); @@ -310,10 +310,10 @@ index 69a8ed510b6e..3917e7e17fc7 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index ebe01b0dc296..5aa42127583d 100644 +index 72346e78c5bd..5772433fd741 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1020,6 +1020,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1044,6 +1044,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); @@ -329,7 +329,7 @@ index ebe01b0dc296..5aa42127583d 100644 } else if (render_selection) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == ACTIONABLE_SUBMENU) { -@@ -1086,6 +1095,13 @@ void MenuItemView::PaintMinorIconAndText( +@@ -1110,6 +1119,13 @@ void MenuItemView::PaintMinorIconAndText( } SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { @@ -344,11 +344,11 @@ index ebe01b0dc296..5aa42127583d 100644 minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor : ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor; diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 08132c522c1a..a29813f08b69 100644 +index c91415cb1e92..4af5835550dd 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc -@@ -236,6 +236,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) { - NOTREACHED(); +@@ -220,6 +220,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const { + return false; } +MenuItemView* MenuModelAdapter::GetSiblingMenu(MenuItemView* menu, @@ -426,13 +426,13 @@ index 08132c522c1a..a29813f08b69 100644 // Look up the menu model for this menu. const std::map::const_iterator map_iterator = diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h -index e52edfe5edd7..ab23f3df914e 100644 +index a35987190633..c34c905b708b 100644 --- ui/views/controls/menu/menu_model_adapter.h +++ ui/views/controls/menu/menu_model_adapter.h -@@ -76,6 +76,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate { +@@ -75,6 +75,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate { + bool IsCommandEnabled(int id) const override; bool IsCommandVisible(int id) const override; bool IsItemChecked(int id) const override; - void SelectionChanged(MenuItemView* menu) override; + MenuItemView* GetSiblingMenu(MenuItemView* menu, + const gfx::Point& screen_point, + MenuAnchorPosition* anchor, diff --git a/patch/patches/views_widget_180_1481_1565_1677_1749.patch b/patch/patches/views_widget_180_1481_1565_1677_1749.patch index 3ecbbc61d..660d2824e 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -73,7 +73,7 @@ index b7febba61de2..ce9de3b369f9 100644 FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc -index 1191efc74c2b..d7b133791c97 100644 +index c362e6be4c35..a63527310e05 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -32,6 +32,10 @@ @@ -87,7 +87,7 @@ index 1191efc74c2b..d7b133791c97 100644 #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/public/common/context_menu_params.h" -@@ -877,6 +881,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { +@@ -878,6 +882,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { ::SetFocus(hwnd); } } @@ -335,7 +335,7 @@ index c547609abf03..5092e2a38b67 100644 base::WeakPtrFactory weak_factory_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 16d18d4bdbc6..ecd276fbeceb 100644 +index 496e7240e2c4..43b4053f11d6 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -138,6 +138,7 @@ Widget::InitParams::InitParams(Type type) @@ -369,7 +369,7 @@ index 16d18d4bdbc6..ecd276fbeceb 100644 } // This must come after SetContentsView() or it might not be able to find // the correct NativeTheme (on Linux). See http://crbug.com/384492 -@@ -1126,10 +1132,16 @@ void Widget::OnNativeWidgetDestroyed() { +@@ -1130,10 +1136,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -387,7 +387,7 @@ index 16d18d4bdbc6..ecd276fbeceb 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index b46f249e8027..9276f5bc9d1c 100644 +index 0323bbb17b19..5d2b6129c930 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -255,6 +255,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -427,10 +427,10 @@ index 5bcb8d8b9bae..020fa85573aa 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index a15550b204e8..dbf3d981cafd 100644 +index f3523d2a05c3..3c16a7fdd4a3 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -2904,10 +2904,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -2896,10 +2896,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/vr_build_873170.patch b/patch/patches/vr_build_873170.patch deleted file mode 100644 index 20b5227d7..000000000 --- a/patch/patches/vr_build_873170.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git chrome/browser/vr/BUILD.gn chrome/browser/vr/BUILD.gn -index 82b0a808ccea..1e849902a706 100644 ---- chrome/browser/vr/BUILD.gn -+++ chrome/browser/vr/BUILD.gn -@@ -411,6 +411,7 @@ component("vr_base") { - ] - - deps = [ -+ ":vr_build_features", - "//base", - "//chrome/app:generated_resources", - "//components/rappor:rappor", diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index f9631ff20..2b7fbbd8e 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 2b435929ac89..78418193cac8 100644 +index 9e41df626aa9..309dcbb9df52 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2026,21 +2026,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2033,21 +2033,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -45,7 +45,7 @@ index 2b435929ac89..78418193cac8 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2734,6 +2743,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2745,6 +2754,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -61,7 +61,7 @@ index 2b435929ac89..78418193cac8 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2766,7 +2784,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2777,7 +2795,7 @@ void WebContentsImpl::CreateNewWindow( // TODO(brettw): It seems bogus that we have to call this function on the // newly created object and give it one of its own member variables. new_view->CreateViewForWidget( @@ -70,7 +70,7 @@ index 2b435929ac89..78418193cac8 100644 } // Save the created window associated with the route so we can show it // later. -@@ -6259,7 +6277,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -6282,7 +6300,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -122,10 +122,10 @@ index e6b4cd044895..3d7e8bb57f45 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index 2c162df8ccea..5ea120f7e521 100644 +index 7e76c0e63532..41ebc1e283c7 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h -@@ -55,10 +55,12 @@ class FileSelectListener; +@@ -56,10 +56,12 @@ class FileSelectListener; class JavaScriptDialogManager; class RenderFrameHost; class RenderProcessHost; @@ -138,7 +138,7 @@ index 2c162df8ccea..5ea120f7e521 100644 struct ContextMenuParams; struct DropData; struct NativeWebKeyboardEvent; -@@ -319,6 +321,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -320,6 +322,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 4273e2ec6..e75845bd1 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -44,7 +44,7 @@ index 3dac1a5a6f61..4fff23e66f2c 100644 .Top() .GetSecurityContext() diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index 49b450b48616..712c619c566b 100644 +index e07ace500ef1..76683aefc31f 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc @@ -1322,7 +1322,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { @@ -85,10 +85,10 @@ index 347b9a74d341..aa71fb8de4a4 100644 void DevToolsSession::FlushProtocolNotifications() { diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index 20b9122919b3..54b35153c528 100644 +index ff579698b831..b42856d0d3c9 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -168,7 +168,8 @@ Page::Page(PageClients& page_clients) +@@ -170,7 +170,8 @@ Page::Page(PageClients& page_clients) overscroll_controller_( OverscrollController::Create(GetVisualViewport(), GetChromeClient())), link_highlights_(LinkHighlights::Create(*this)), @@ -98,7 +98,7 @@ index 20b9122919b3..54b35153c528 100644 // TODO(pdr): Initialize |validation_message_client_| lazily. validation_message_client_(ValidationMessageClientImpl::Create(*this)), opened_by_dom_(false), -@@ -316,21 +317,40 @@ void Page::InitialStyleChanged() { +@@ -325,21 +326,40 @@ void Page::InitialStyleChanged() { } } @@ -148,9 +148,9 @@ index 20b9122919b3..54b35153c528 100644 page->NotifyPluginsChanged(); } } -@@ -716,7 +736,8 @@ void Page::Trace(blink::Visitor* visitor) { - visitor->Trace(overscroll_controller_); +@@ -734,7 +754,8 @@ void Page::Trace(blink::Visitor* visitor) { visitor->Trace(link_highlights_); + visitor->Trace(spatial_navigation_controller_); visitor->Trace(main_frame_); - visitor->Trace(plugin_data_); + visitor->Trace(plugin_data_main_frame_); @@ -159,10 +159,10 @@ index 20b9122919b3..54b35153c528 100644 visitor->Trace(plugins_changed_observers_); visitor->Trace(next_related_page_); diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h -index f315b62643fd..69acf15ee1f9 100644 +index 616470be36dd..55e162ddf99f 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h -@@ -135,7 +135,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, +@@ -136,7 +136,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, ViewportDescription GetViewportDescription() const; // Returns the plugin data associated with |main_frame_origin|. @@ -172,9 +172,9 @@ index f315b62643fd..69acf15ee1f9 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -353,7 +354,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, - const Member overscroll_controller_; +@@ -356,7 +357,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, const Member link_highlights_; + Member spatial_navigation_controller_; - Member plugin_data_; + Member plugin_data_main_frame_; diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index 84199fa97..f401c3937 100644 --- a/patch/patches/webkit_pointer_event_781966.patch +++ b/patch/patches/webkit_pointer_event_781966.patch @@ -1,5 +1,5 @@ diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc -index d8aadfc7f5bf..d4f538172a1f 100644 +index 9c92b4269edc..112e194a4655 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc @@ -281,7 +281,7 @@ void PointerEventManager::HandlePointerInterruption( diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 1b266ed74..e48db9a85 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index 8d2733739f0e..3d82c096be58 100644 +index f7f0ae5b0c70..005b4c37fc7d 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -338,6 +338,7 @@ class WebView { +@@ -344,6 +344,7 @@ class WebView { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -11,7 +11,7 @@ index 8d2733739f0e..3d82c096be58 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 29cf8ebbb260..ce102fd3a9f4 100644 +index a8d8c5185990..897f6ce08235 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -235,8 +235,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -30,7 +30,7 @@ index 29cf8ebbb260..ce102fd3a9f4 100644 } namespace { -@@ -310,6 +315,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -307,6 +312,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, enable_fake_page_scale_animation_for_testing_(false), fake_page_scale_animation_page_scale_factor_(0), fake_page_scale_animation_use_anchor_(false), @@ -39,10 +39,10 @@ index 29cf8ebbb260..ce102fd3a9f4 100644 suppress_next_keypress_event_(false), ime_accept_events_(true), diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index c258d4b6a5c3..932ecbbccd9e 100644 +index efb4a7238d42..6409cfbd400e 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -108,7 +108,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -107,7 +107,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, static HashSet& AllInstances(); // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -51,8 +51,8 @@ index c258d4b6a5c3..932ecbbccd9e 100644 + bool UseExternalPopupMenus() const; // WebView methods: - void SetPrerendererClient(WebPrerendererClient*) override; -@@ -612,6 +613,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, + void SetWebWidgetClient(WebWidgetClient*) override; +@@ -607,6 +608,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_; bool fake_page_scale_animation_use_anchor_; @@ -62,7 +62,7 @@ index c258d4b6a5c3..932ecbbccd9e 100644 TransformationMatrix device_emulation_transform_; diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc -index 07371aae5776..a2a31493c10c 100644 +index 3c2fc7f4f2e8..84ce86d63bed 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc @@ -809,7 +809,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index e98126d86..5779c1426 100644 --- a/patch/patches/webview_plugin_2020.patch +++ b/patch/patches/webview_plugin_2020.patch @@ -1,8 +1,8 @@ diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd -index c57c1bfb287a..1df87e28acd4 100644 +index d0b19311470a..a9b047fbac52 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4535,7 +4535,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4560,7 +4560,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/tests/cefclient/browser/browser_window_osr_gtk.cc b/tests/cefclient/browser/browser_window_osr_gtk.cc index 0da1ff758..ba3cbd322 100644 --- a/tests/cefclient/browser/browser_window_osr_gtk.cc +++ b/tests/cefclient/browser/browser_window_osr_gtk.cc @@ -18,6 +18,7 @@ #include #include "include/base/cef_logging.h" +#include "include/cef_macros.h" #include "include/wrapper/cef_closure_task.h" #include "tests/cefclient/browser/util_gtk.h" #include "tests/shared/browser/geometry_util.h" diff --git a/tests/shared/browser/extension_util.cc b/tests/shared/browser/extension_util.cc index 9c5edde8d..dd29f389f 100644 --- a/tests/shared/browser/extension_util.cc +++ b/tests/shared/browser/extension_util.cc @@ -27,10 +27,21 @@ std::string GetResourcesPath() { // Internal extension paths may be prefixed with PK_DIR_RESOURCES and always // use forward slash as path separator. std::string GetInternalPath(const std::string& extension_path) { - const std::string& resources_path = GetResourcesPath(); + std::string resources_path_lower = GetResourcesPath(); + std::string extension_path_lower = extension_path; + +#if defined(OS_WIN) + // Convert to lower-case, since Windows paths are case-insensitive. + std::transform(resources_path_lower.begin(), resources_path_lower.end(), + resources_path_lower.begin(), ::tolower); + std::transform(extension_path_lower.begin(), extension_path_lower.end(), + extension_path_lower.begin(), ::tolower); +#endif + std::string internal_path; - if (!resources_path.empty() && extension_path.find(resources_path) == 0U) { - internal_path = extension_path.substr(resources_path.size()); + if (!resources_path_lower.empty() && + extension_path_lower.find(extension_path_lower) == 0U) { + internal_path = extension_path.substr(resources_path_lower.size()); } else { internal_path = extension_path; }