diff --git a/BUILD.gn b/BUILD.gn index 5f417c7e4..141f860ab 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1462,9 +1462,9 @@ make_pack_header("strings") { "$root_gen_dir/chrome/grit/locale_settings.h", "$root_gen_dir/chrome/grit/platform_locale_settings.h", "$root_gen_dir/components/strings/grit/components_strings.h", - "$root_gen_dir/content/app/strings/grit/content_strings.h", "$root_gen_dir/extensions/strings/grit/extensions_strings.h", "$root_gen_dir/services/strings/grit/services_strings.h", + "$root_gen_dir/third_party/blink/public/strings/grit/blink_strings.h", "$root_gen_dir/ui/strings/grit/ui_strings.h", ] } diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 101567440..e13d3ee98 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/78.0.3904.0' + 'chromium_checkout': 'refs/tags/79.0.3945.1' } diff --git a/CHROMIUM_UPDATE.txt b/CHROMIUM_UPDATE.txt index d1eb19622..88ca82bd7 100644 --- a/CHROMIUM_UPDATE.txt +++ b/CHROMIUM_UPDATE.txt @@ -58,6 +58,7 @@ 'content/shell/utility/shell_*', 'extensions/shell/*', 'net/cookies/cookie_store.h', + 'ui/base/ui_base_features.cc', ], # Patterns that should not be found in the chromium/src directory after # applying patch files. diff --git a/cef_repack_locales.gni b/cef_repack_locales.gni index 0493497ed..51e918948 100644 --- a/cef_repack_locales.gni +++ b/cef_repack_locales.gni @@ -36,9 +36,9 @@ template("_repack_one_locale") { "${root_gen_dir}/chrome/platform_locale_settings_${locale}.pak", "${root_gen_dir}/components/strings/components_locale_settings_${locale}.pak", "${root_gen_dir}/components/strings/components_strings_${locale}.pak", - "${root_gen_dir}/content/app/strings/content_strings_${locale}.pak", "${root_gen_dir}/extensions/strings/extensions_strings_${locale}.pak", "${root_gen_dir}/services/strings/services_strings_${locale}.pak", + "${root_gen_dir}/third_party/blink/public/strings/blink_strings_${locale}.pak", "${root_gen_dir}/ui/strings/app_locale_settings_${locale}.pak", "${root_gen_dir}/ui/strings/ui_strings_${locale}.pak", ] @@ -54,9 +54,9 @@ template("_repack_one_locale") { "//chrome/app/resources:platform_locale_settings", "//components/strings:components_locale_settings", "//components/strings:components_strings", - "//content/app/strings", "//extensions/strings", "//services/strings", + "//third_party/blink/public/strings", "//ui/strings:app_locale_settings", "//ui/strings:ui_strings", ] diff --git a/libcef/browser/browser_context.cc b/libcef/browser/browser_context.cc index 71ca3a063..2e096f180 100644 --- a/libcef/browser/browser_context.cc +++ b/libcef/browser/browser_context.cc @@ -25,6 +25,7 @@ #include "base/strings/string_util.h" #include "chrome/browser/font_family_cache.h" #include "chrome/browser/plugins/chrome_plugin_service_filter.h" +#include "chrome/browser/profiles/profile_key.h" #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" #include "chrome/common/pref_names.h" #include "components/content_settings/core/browser/host_content_settings_map.h" @@ -47,6 +48,7 @@ #include "extensions/common/constants.h" #include "net/proxy_resolution/proxy_config_service.h" #include "net/proxy_resolution/proxy_resolution_service.h" +#include "services/network/public/mojom/cors_origin_pattern.mojom.h" using content::BrowserThread; @@ -485,6 +487,11 @@ content::PushMessagingService* CefBrowserContext::GetPushMessagingService() { return nullptr; } +content::StorageNotificationService* +CefBrowserContext::GetStorageNotificationService() { + return nullptr; +} + content::SSLHostStateDelegate* CefBrowserContext::GetSSLHostStateDelegate() { if (!ssl_host_state_delegate_.get()) ssl_host_state_delegate_.reset(new CefSSLHostStateDelegate()); diff --git a/libcef/browser/browser_context.h b/libcef/browser/browser_context.h index 2c5238025..2250d47f7 100644 --- a/libcef/browser/browser_context.h +++ b/libcef/browser/browser_context.h @@ -149,6 +149,7 @@ class CefBrowserContext : public ChromeProfileStub, content::BrowserPluginGuestManager* GetGuestManager() override; storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override; + content::StorageNotificationService* GetStorageNotificationService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; content::PermissionControllerDelegate* GetPermissionControllerDelegate() override; diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 9d6ebc948..9011cd0c9 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -1755,7 +1755,7 @@ bool CefBrowserHostImpl::EmbedsFullscreenWidget() { void CefBrowserHostImpl::EnterFullscreenModeForTab( content::WebContents* web_contents, const GURL& origin, - const blink::WebFullscreenOptions& options) { + const blink::mojom::FullscreenOptions& options) { OnFullscreenModeChange(true); } @@ -1769,10 +1769,10 @@ bool CefBrowserHostImpl::IsFullscreenForTabOrPending( return is_fullscreen_; } -blink::WebDisplayMode CefBrowserHostImpl::GetDisplayMode( +blink::mojom::DisplayMode CefBrowserHostImpl::GetDisplayMode( const content::WebContents* web_contents) { - return is_fullscreen_ ? blink::kWebDisplayModeFullscreen - : blink::kWebDisplayModeBrowser; + return is_fullscreen_ ? blink::mojom::DisplayMode::kFullscreen + : blink::mojom::DisplayMode::kBrowser; } void CefBrowserHostImpl::FindReply(content::WebContents* web_contents, diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index d4cdffc99..6c1c79525 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -437,11 +437,11 @@ class CefBrowserHostImpl : public CefBrowserHost, void EnterFullscreenModeForTab( content::WebContents* web_contents, const GURL& origin, - const blink::WebFullscreenOptions& options) override; + const blink::mojom::FullscreenOptions& options) override; void ExitFullscreenModeForTab(content::WebContents* web_contents) override; bool IsFullscreenForTabOrPending( const content::WebContents* web_contents) override; - blink::WebDisplayMode GetDisplayMode( + blink::mojom::DisplayMode GetDisplayMode( const content::WebContents* web_contents) override; void FindReply(content::WebContents* web_contents, int request_id, diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index d869af031..443c4b812 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -360,12 +360,6 @@ gcm::GCMDriver* ChromeBrowserProcessStub::gcm_driver() { return NULL; } -shell_integration::DefaultWebClientState -ChromeBrowserProcessStub::CachedDefaultWebClientState() { - NOTREACHED(); - return shell_integration::UNKNOWN_DEFAULT; -} - resource_coordinator::TabManager* ChromeBrowserProcessStub::GetTabManager() { NOTREACHED(); return NULL; diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index 60908d3de..9c41a0271 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -95,8 +95,6 @@ class ChromeBrowserProcessStub : public BrowserProcess { WebRtcLogUploader* webrtc_log_uploader() override; network_time::NetworkTimeTracker* network_time_tracker() override; gcm::GCMDriver* gcm_driver() override; - shell_integration::DefaultWebClientState CachedDefaultWebClientState() - override; resource_coordinator::TabManager* GetTabManager() override; resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts() override; diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 2ee088960..2e36af867 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -73,7 +73,6 @@ #include "components/spellcheck/common/spellcheck.mojom.h" #include "components/variations/variations_http_header_provider.h" #include "components/version_info/version_info.h" -#include "content/browser/frame_host/navigation_handle_impl.h" #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/plugin_service_impl.h" #include "content/public/browser/browser_context.h" @@ -82,6 +81,7 @@ #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/client_certificate_delegate.h" #include "content/public/browser/navigation_handle.h" +#include "content/public/browser/overlay_window.h" #include "content/public/browser/page_navigator.h" #include "content/public/browser/quota_permission_context.h" #include "content/public/browser/render_frame_host.h" @@ -107,7 +107,7 @@ #include "extensions/common/constants.h" #include "extensions/common/switches.h" #include "mojo/public/cpp/bindings/remote.h" -#include "mojo/public/cpp/bindings/strong_associated_binding.h" +#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h" #include "net/base/auth.h" #include "net/ssl/ssl_cert_request_info.h" #include "ppapi/host/ppapi_host.h" @@ -486,7 +486,7 @@ bool NavigationOnUIThread( // From chrome/browser/plugins/chrome_content_browser_client_plugins_part.cc. void BindPluginInfoHost( int render_process_id, - chrome::mojom::PluginInfoHostAssociatedRequest request) { + mojo::PendingAssociatedReceiver receiver) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); content::RenderProcessHost* host = content::RenderProcessHost::FromID(render_process_id); @@ -494,9 +494,9 @@ void BindPluginInfoHost( return; Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); - mojo::MakeStrongAssociatedBinding( + mojo::MakeSelfOwnedAssociatedReceiver( std::make_unique(render_process_id, profile), - std::move(request)); + std::move(receiver)); } } // namespace @@ -884,7 +884,7 @@ CefContentBrowserClient::CreateQuotaPermissionContext() { void CefContentBrowserClient::GetQuotaSettings( content::BrowserContext* context, content::StoragePartition* partition, - storage::OptionalQuotaSettingsCallback callback) { + base::OnceCallback)> callback) { const base::FilePath& cache_path = partition->GetPath(); storage::GetNominalDynamicSettings( cache_path, cache_path.empty() /* is_incognito */, @@ -1283,7 +1283,8 @@ void CefContentBrowserClient::OnNetworkServiceCreated( network_service); } -network::mojom::NetworkContextPtr CefContentBrowserClient::CreateNetworkContext( +mojo::Remote +CefContentBrowserClient::CreateNetworkContext( content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path) { @@ -1315,12 +1316,13 @@ CefContentBrowserClient::GetNetworkContextsParentDirectory() { bool CefContentBrowserClient::HandleExternalProtocol( const GURL& url, - content::WebContents::Getter web_contents_getter, + base::Callback web_contents_getter, int child_id, content::NavigationUIData* navigation_data, bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture, + const base::Optional& initiating_origin, network::mojom::URLLoaderFactoryPtr* out_factory) { // Call the other HandleExternalProtocol variant. return false; @@ -1331,7 +1333,6 @@ bool CefContentBrowserClient::HandleExternalProtocol( int frame_tree_node_id, content::NavigationUIData* navigation_data, const network::ResourceRequest& resource_request, - network::mojom::URLLoaderFactoryRequest* factory_request, network::mojom::URLLoaderFactoryPtr* out_factory) { auto request = mojo::MakeRequest(out_factory); // CefBrowserPlatformDelegate::HandleExternalProtocol may be called if diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 0354def87..411564fbd 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -75,7 +75,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient { void GetQuotaSettings( content::BrowserContext* context, content::StoragePartition* partition, - storage::OptionalQuotaSettingsCallback callback) override; + base::OnceCallback)> callback) + override; content::MediaObserver* GetMediaObserver() override; content::SpeechRecognitionManagerDelegate* CreateSpeechRecognitionManagerDelegate() override; @@ -172,26 +173,26 @@ class CefContentBrowserClient : public content::ContentBrowserClient { bool* bypass_redirect_checks) override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; - network::mojom::NetworkContextPtr CreateNetworkContext( + mojo::Remote CreateNetworkContext( content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path) override; std::vector GetNetworkContextsParentDirectory() override; bool HandleExternalProtocol( const GURL& url, - content::WebContents::Getter web_contents_getter, + base::Callback web_contents_getter, int child_id, content::NavigationUIData* navigation_data, bool is_main_frame, ui::PageTransition page_transition, bool has_user_gesture, + const base::Optional& initiating_origin, network::mojom::URLLoaderFactoryPtr* out_factory) override; bool HandleExternalProtocol( content::WebContents::Getter web_contents_getter, int frame_tree_node_id, content::NavigationUIData* navigation_data, const network::ResourceRequest& request, - network::mojom::URLLoaderFactoryRequest* factory_request, network::mojom::URLLoaderFactoryPtr* out_factory) override; std::unique_ptr CreateWindowForPictureInPicture( content::PictureInPictureWindowController* controller) override; diff --git a/libcef/browser/devtools/devtools_frontend.cc b/libcef/browser/devtools/devtools_frontend.cc index 401d97098..514ceb47e 100644 --- a/libcef/browser/devtools/devtools_frontend.cc +++ b/libcef/browser/devtools/devtools_frontend.cc @@ -45,8 +45,10 @@ #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" #include "net/traffic_annotation/network_traffic_annotation.h" +#include "services/network/public/cpp/resource_response.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/cpp/simple_url_loader_stream_consumer.h" +#include "services/network/public/mojom/url_response_head.mojom.h" namespace { @@ -95,7 +97,7 @@ class CefDevToolsFrontend::NetworkResourceLoader private: void OnResponseStarted(const GURL& final_url, - const network::ResourceResponseHead& response_head) { + const network::mojom::URLResponseHead& response_head) { response_headers_ = response_head.headers; } diff --git a/libcef/browser/extensions/api/tabs/tabs_api.cc b/libcef/browser/extensions/api/tabs/tabs_api.cc index e08c52c35..5dab509ad 100644 --- a/libcef/browser/extensions/api/tabs/tabs_api.cc +++ b/libcef/browser/extensions/api/tabs/tabs_api.cc @@ -10,12 +10,12 @@ #include "chrome/browser/extensions/api/tabs/tabs_constants.h" #include "components/zoom/zoom_controller.h" #include "content/public/browser/render_frame_host.h" -#include "content/public/common/page_zoom.h" #include "extensions/browser/extension_api_frame_id_map.h" #include "extensions/browser/extension_zoom_request_client.h" #include "extensions/common/error_utils.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/permissions_data.h" +#include "third_party/blink/public/common/page/page_zoom.h" namespace extensions { namespace cef { @@ -283,7 +283,7 @@ bool TabsSetZoomFunction::RunAsync() { zoom::ZoomController* zoom_controller = zoom::ZoomController::FromWebContents(web_contents); double zoom_level = params->zoom_factor > 0 - ? content::ZoomFactorToZoomLevel(params->zoom_factor) + ? blink::PageZoomFactorToZoomLevel(params->zoom_factor) : zoom_controller->GetDefaultZoomLevel(); scoped_refptr client( @@ -310,7 +310,7 @@ bool TabsGetZoomFunction::RunAsync() { double zoom_level = zoom::ZoomController::FromWebContents(web_contents)->GetZoomLevel(); - double zoom_factor = content::ZoomLevelToZoomFactor(zoom_level); + double zoom_factor = blink::PageZoomLevelToZoomFactor(zoom_level); results_ = tabs::GetZoom::Results::Create(zoom_factor); SendResponse(true); return true; @@ -385,7 +385,7 @@ bool TabsGetZoomSettingsFunction::RunAsync() { api::tabs::ZoomSettings zoom_settings; ZoomModeToZoomSettings(zoom_mode, &zoom_settings); zoom_settings.default_zoom_factor.reset(new double( - content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); + blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); SendResponse(true); diff --git a/libcef/browser/extensions/extension_function_details.cc b/libcef/browser/extensions/extension_function_details.cc index 73f77d048..113181ec3 100644 --- a/libcef/browser/extensions/extension_function_details.cc +++ b/libcef/browser/extensions/extension_function_details.cc @@ -408,11 +408,8 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( auto scrub_tab_behavior = ExtensionTabUtil::GetScrubTabBehavior( extension, extensions::Feature::Context::UNSPECIFIED_CONTEXT, web_contents); - if (scrub_tab_behavior != ExtensionTabUtil::kDontScrubTab) { - ExtensionTabUtil::ScrubTabForExtension(extension, web_contents, - result.get(), scrub_tab_behavior); - } - + ExtensionTabUtil::ScrubTabForExtension(extension, web_contents, result.get(), + scrub_tab_behavior); return result->ToValue().release(); } diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index 5327acc46..650ff4f64 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -121,7 +121,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() { prefs->use_bitmaps = params->use_bitmaps; prefs->subpixel_rendering = params->subpixel_rendering; - browser_->web_contents()->GetRenderViewHost()->SyncRendererPrefs(); + browser_->web_contents()->SyncRendererPrefs(); return true; } @@ -366,7 +366,8 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateWheelEvent( result.delta_y = deltaY; result.wheel_ticks_x = deltaX / scrollbarPixelsPerGtkTick; result.wheel_ticks_y = deltaY / scrollbarPixelsPerGtkTick; - result.has_precise_scrolling_deltas = true; + result.delta_units = + ui::input_types::ScrollGranularity::kScrollByPrecisePixel; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) result.button = blink::WebMouseEvent::Button::kLeft; @@ -421,4 +422,4 @@ gfx::Point CefBrowserPlatformDelegateNativeLinux::GetDialogPosition( gfx::Size CefBrowserPlatformDelegateNativeLinux::GetMaximumDialogSize() { return GetWindowWidget()->GetWindowBoundsInScreen().size(); -} \ No newline at end of file +} diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index 4fcb82aa6..d754c9cfc 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -429,7 +429,7 @@ void CefBrowserPlatformDelegateNativeMac::TranslateWheelEvent( result.delta_y = deltaY; result.wheel_ticks_x = deltaX / scrollbarPixelsPerCocoaTick; result.wheel_ticks_y = deltaY / scrollbarPixelsPerCocoaTick; - result.has_precise_scrolling_deltas = true; + result.delta_units = ui::input_types::ScrollGranularity::kScrollByPrecisePixel; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) result.button = blink::WebMouseEvent::Button::kLeft; diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index 2cf423233..dcd953f88 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -535,8 +535,8 @@ void CefBrowserPlatformDelegateNativeWin::TranslateWheelEvent( ULONG scrollLines = defaultScrollLinesPerWheelDelta; SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &scrollLines, 0); if (scrollLines == WHEEL_PAGESCROLL) - result.scroll_by_page = true; - if (!result.scroll_by_page) + result.delta_units = ui::input_types::ScrollGranularity::kScrollByPage; + if (result.delta_units != ui::input_types::ScrollGranularity::kScrollByPage) scrollDelta *= static_cast(scrollLines) * scrollbarPixelsPerLine; } diff --git a/libcef/browser/native/window_x11.cc b/libcef/browser/native/window_x11.cc index 6a2a57384..80153332d 100644 --- a/libcef/browser/native/window_x11.cc +++ b/libcef/browser/native/window_x11.cc @@ -275,8 +275,10 @@ gfx::Rect CefWindowX11::GetBoundsInScreen() { views::DesktopWindowTreeHostX11* CefWindowX11::GetHost() { if (browser_.get()) { ::Window child = FindChild(xdisplay_, xwindow_); - if (child) - return views::DesktopWindowTreeHostX11::GetHostForXID(child); + if (child) { + return static_cast( + views::DesktopWindowTreeHostLinux::GetHostForWidget(child)); + } } return NULL; } diff --git a/libcef/browser/net_service/browser_urlrequest_impl.cc b/libcef/browser/net_service/browser_urlrequest_impl.cc index 2bb50310e..2096e75a1 100644 --- a/libcef/browser/net_service/browser_urlrequest_impl.cc +++ b/libcef/browser/net_service/browser_urlrequest_impl.cc @@ -18,12 +18,14 @@ #include "libcef/common/response_impl.h" #include "libcef/common/task_runner_impl.h" +#include "base/lazy_instance.h" #include "base/logging.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" #include "content/public/browser/global_request_id.h" #include "content/public/browser/render_frame_host.h" +#include "net/base/mime_util.h" #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" #include "services/network/public/cpp/shared_url_loader_factory.h" @@ -379,7 +381,7 @@ class CefBrowserURLRequest::Context } void OnRedirect(const net::RedirectInfo& redirect_info, - const network::ResourceResponseHead& response_head, + const network::mojom::URLResponseHead& response_head, std::vector* removed_headers) { DCHECK(CalledOnValidThread()); DCHECK_EQ(status_, UR_IO_PENDING); @@ -396,7 +398,7 @@ class CefBrowserURLRequest::Context } void OnResponseStarted(const GURL& final_url, - const network::ResourceResponseHead& response_head) { + const network::mojom::URLResponseHead& response_head) { DCHECK(CalledOnValidThread()); DCHECK_EQ(status_, UR_IO_PENDING); diff --git a/libcef/browser/net_service/cookie_manager_impl.cc b/libcef/browser/net_service/cookie_manager_impl.cc index 00c960394..bdd71b915 100644 --- a/libcef/browser/net_service/cookie_manager_impl.cc +++ b/libcef/browser/net_service/cookie_manager_impl.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/storage_partition.h" +#include "services/network/public/mojom/cookie_manager.mojom.h" #include "url/gurl.h" using network::mojom::CookieManager; diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index 7fe56e50b..ce49136d9 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -141,6 +141,7 @@ class InterceptedRequest : public network::mojom::URLLoader, void OnBeforeSendHeaders(const net::HttpRequestHeaders& headers, OnBeforeSendHeadersCallback callback) override; void OnHeadersReceived(const std::string& headers, + const net::IPEndPoint& remote_endpoint, OnHeadersReceivedCallback callback) override; // mojom::URLLoaderClient methods: @@ -416,8 +417,10 @@ void InterceptedRequest::OnBeforeSendHeaders( proxied_client_binding_.ResumeIncomingMethodCallProcessing(); } -void InterceptedRequest::OnHeadersReceived(const std::string& headers, - OnHeadersReceivedCallback callback) { +void InterceptedRequest::OnHeadersReceived( + const std::string& headers, + const net::IPEndPoint& remote_endpoint, + OnHeadersReceivedCallback callback) { if (!current_request_uses_header_client_) { std::move(callback).Run(net::OK, base::nullopt, GURL()); return; @@ -1165,9 +1168,9 @@ void ProxyURLLoaderFactory::CreateLoaderAndStart( } void ProxyURLLoaderFactory::Clone( - network::mojom::URLLoaderFactoryRequest loader_request) { + mojo::PendingReceiver factory) { CEF_REQUIRE_IOT(); - proxy_bindings_.AddBinding(this, std::move(loader_request)); + proxy_bindings_.AddBinding(this, std::move(factory)); } void ProxyURLLoaderFactory::OnLoaderCreated( @@ -1179,6 +1182,13 @@ void ProxyURLLoaderFactory::OnLoaderCreated( request_it->second->OnLoaderCreated(std::move(receiver)); } +void ProxyURLLoaderFactory::OnLoaderForCorsPreflightCreated( + const ::network::ResourceRequest& request, + mojo::PendingReceiver header_client) { + CEF_REQUIRE_IOT(); + // TODO(cef): Should we do something here? +} + void ProxyURLLoaderFactory::OnTargetFactoryError() { // Stop calls to CreateLoaderAndStart() when |target_factory_| is invalid. target_factory_.reset(); diff --git a/libcef/browser/net_service/proxy_url_loader_factory.h b/libcef/browser/net_service/proxy_url_loader_factory.h index e063c80e4..265856292 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.h +++ b/libcef/browser/net_service/proxy_url_loader_factory.h @@ -160,13 +160,18 @@ class ProxyURLLoaderFactory network::mojom::URLLoaderClientPtr client, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) override; - void Clone(network::mojom::URLLoaderFactoryRequest loader_request) override; + void Clone( + mojo::PendingReceiver factory) override; // network::mojom::TrustedURLLoaderHeaderClient: void OnLoaderCreated( int32_t request_id, mojo::PendingReceiver receiver) override; + void OnLoaderForCorsPreflightCreated( + const ::network::ResourceRequest& request, + mojo::PendingReceiver header_client) + override; private: friend class InterceptedRequest; diff --git a/libcef/browser/net_service/stream_reader_url_loader.cc b/libcef/browser/net_service/stream_reader_url_loader.cc index dce8c45b7..09f985a6d 100644 --- a/libcef/browser/net_service/stream_reader_url_loader.cc +++ b/libcef/browser/net_service/stream_reader_url_loader.cc @@ -632,7 +632,7 @@ void StreamReaderURLLoader::HeadersComplete(int orig_status_code, if (header_client_.is_bound()) { header_client_->OnHeadersReceived( - pending_response_.headers->raw_headers(), + pending_response_.headers->raw_headers(), net::IPEndPoint(), base::BindOnce(&StreamReaderURLLoader::ContinueWithResponseHeaders, weak_factory_.GetWeakPtr())); } else { diff --git a/libcef/browser/osr/host_display_client_osr.cc b/libcef/browser/osr/host_display_client_osr.cc index fa4c82f43..b003ff705 100644 --- a/libcef/browser/osr/host_display_client_osr.cc +++ b/libcef/browser/osr/host_display_client_osr.cc @@ -26,8 +26,9 @@ class CefLayeredWindowUpdaterOSR : public viz::mojom::LayeredWindowUpdater { public: - CefLayeredWindowUpdaterOSR(CefRenderWidgetHostViewOSR* const view, - viz::mojom::LayeredWindowUpdaterRequest request); + CefLayeredWindowUpdaterOSR( + CefRenderWidgetHostViewOSR* const view, + mojo::PendingReceiver receiver); ~CefLayeredWindowUpdaterOSR() override; void SetActive(bool active); @@ -41,7 +42,7 @@ class CefLayeredWindowUpdaterOSR : public viz::mojom::LayeredWindowUpdater { private: CefRenderWidgetHostViewOSR* const view_; - mojo::Binding binding_; + mojo::Receiver receiver_; bool active_ = false; base::WritableSharedMemoryMapping shared_memory_; gfx::Size pixel_size_; @@ -51,8 +52,8 @@ class CefLayeredWindowUpdaterOSR : public viz::mojom::LayeredWindowUpdater { CefLayeredWindowUpdaterOSR::CefLayeredWindowUpdaterOSR( CefRenderWidgetHostViewOSR* const view, - viz::mojom::LayeredWindowUpdaterRequest request) - : view_(view), binding_(this, std::move(request)) {} + mojo::PendingReceiver receiver) + : view_(view), receiver_(this, std::move(receiver)) {} CefLayeredWindowUpdaterOSR::~CefLayeredWindowUpdaterOSR() = default; @@ -127,8 +128,13 @@ void CefHostDisplayClientOSR::UseProxyOutputDevice( } void CefHostDisplayClientOSR::CreateLayeredWindowUpdater( - viz::mojom::LayeredWindowUpdaterRequest request) { + mojo::PendingReceiver receiver) { layered_window_updater_ = - std::make_unique(view_, std::move(request)); + std::make_unique(view_, std::move(receiver)); layered_window_updater_->SetActive(active_); } + +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +void CefHostDisplayClientOSR::DidCompleteSwapWithNewSize( + const gfx::Size& size) {} +#endif diff --git a/libcef/browser/osr/host_display_client_osr.h b/libcef/browser/osr/host_display_client_osr.h index 68103fe00..4b7bf41b6 100644 --- a/libcef/browser/osr/host_display_client_osr.h +++ b/libcef/browser/osr/host_display_client_osr.h @@ -30,7 +30,12 @@ class CefHostDisplayClientOSR : public viz::HostDisplayClient { void UseProxyOutputDevice(UseProxyOutputDeviceCallback callback) override; void CreateLayeredWindowUpdater( - viz::mojom::LayeredWindowUpdaterRequest request) override; + mojo::PendingReceiver receiver) + override; + +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) + void DidCompleteSwapWithNewSize(const gfx::Size& size) override; +#endif CefRenderWidgetHostViewOSR* const view_; std::unique_ptr layered_window_updater_; diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index f1a1601c4..580036182 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -22,6 +22,7 @@ #include "base/task/post_task.h" #include "cc/base/switches.h" #include "components/viz/common/features.h" +#include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/frame_sinks/copy_output_request.h" #include "components/viz/common/frame_sinks/delay_based_time_source.h" #include "components/viz/common/gl_helper.h" @@ -220,7 +221,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( context_factory_private->AllocateFrameSinkId(), content::GetContextFactory(), context_factory_private, base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */, - use_external_begin_frame ? this : nullptr)); + use_external_begin_frame)); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); compositor_->SetDelegate(this); @@ -842,17 +843,11 @@ void CefRenderWidgetHostViewOSR::DidNavigate() { delegated_frame_host_->DidNavigate(); } -void CefRenderWidgetHostViewOSR::OnDisplayDidFinishFrame( - const viz::BeginFrameAck& /*ack*/) { +void CefRenderWidgetHostViewOSR::OnFrameComplete( + const viz::BeginFrameAck& ack) { // TODO(cef): is there something we need to track with this notification? } -void CefRenderWidgetHostViewOSR::OnNeedsExternalBeginFrames( - bool needs_begin_frames) { - SetFrameRate(); - needs_external_begin_frames_ = needs_begin_frames; -} - std::unique_ptr CefRenderWidgetHostViewOSR::CreateHostDisplayClient() { host_display_client_ = @@ -937,7 +932,9 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() { render_widget_host_->ProgressFlingIfNeeded(frame_time); compositor_->context_factory_private()->IssueExternalBeginFrame( - compositor_.get(), begin_frame_args); + compositor_.get(), begin_frame_args, /* force= */ true, + base::BindOnce(&CefRenderWidgetHostViewOSR::OnFrameComplete, + weak_ptr_factory_.GetWeakPtr())); if (!IsPopupWidget() && popup_host_view_) { popup_host_view_->SendExternalBeginFrame(); diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 1f9ae5eb1..32a3e3c96 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -29,7 +29,6 @@ #include "content/public/common/widget_type.h" #include "ui/base/cursor/types/cursor_types.h" #include "ui/compositor/compositor.h" -#include "ui/compositor/external_begin_frame_client.h" #include "ui/events/base_event_utils.h" #include "ui/events/gesture_detection/filtered_gesture_provider.h" #include "ui/events/gesture_detection/gesture_configuration.h" @@ -95,7 +94,6 @@ class MacHelper; #endif class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, - public ui::ExternalBeginFrameClient, public ui::CompositorDelegate, public content::TextInputManager::Observer, public ui::GestureProviderClient { @@ -189,9 +187,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, const viz::FrameSinkId& GetFrameSinkId() const override; viz::FrameSinkId GetRootFrameSinkId() override; - // ui::ExternalBeginFrameClient implementation. - void OnDisplayDidFinishFrame(const viz::BeginFrameAck& ack) override; - void OnNeedsExternalBeginFrames(bool needs_begin_frames) override; + void OnFrameComplete(const viz::BeginFrameAck& ack); // ui::CompositorDelegate implementation. std::unique_ptr CreateHostDisplayClient() override; diff --git a/libcef/browser/osr/software_output_device_proxy.cc b/libcef/browser/osr/software_output_device_proxy.cc index d56c2cdeb..5aa522f55 100644 --- a/libcef/browser/osr/software_output_device_proxy.cc +++ b/libcef/browser/osr/software_output_device_proxy.cc @@ -5,6 +5,7 @@ #include "cef/libcef/browser/osr/software_output_device_proxy.h" #include "base/memory/shared_memory.h" +#include "base/trace_event/trace_event.h" #include "components/viz/common/resources/resource_sizes.h" #include "mojo/public/cpp/base/shared_memory_utils.h" #include "mojo/public/cpp/system/platform_handle.h" diff --git a/libcef/browser/osr/video_consumer_osr.cc b/libcef/browser/osr/video_consumer_osr.cc index ea7961516..8b80e530e 100644 --- a/libcef/browser/osr/video_consumer_osr.cc +++ b/libcef/browser/osr/video_consumer_osr.cc @@ -79,7 +79,8 @@ void CefVideoConsumerOSR::OnFrameCaptured( gfx::Rect damage_rect; if (!metadata.GetRect(media::VideoFrameMetadata::CAPTURE_UPDATE_RECT, - &damage_rect)) { + &damage_rect) || + damage_rect.IsEmpty()) { damage_rect = content_rect; } diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index 39b77cf57..fd610f4ae 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -96,8 +96,7 @@ gfx::Rect CefWebContentsViewOSR::GetViewBounds() const { return view ? view->GetViewBounds() : gfx::Rect(); } -void CefWebContentsViewOSR::CreateView(const gfx::Size& initial_size, - gfx::NativeView context) {} +void CefWebContentsViewOSR::CreateView(gfx::NativeView context) {} content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget( content::RenderWidgetHost* render_widget_host, diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index 12afac981..615f6e93d 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -44,8 +44,7 @@ class CefWebContentsViewOSR : public content::WebContentsView, void FocusThroughTabTraversal(bool reverse) override; content::DropData* GetDropData() const override; gfx::Rect GetViewBounds() const override; - void CreateView(const gfx::Size& initial_size, - gfx::NativeView context) override; + void CreateView(gfx::NativeView context) override; content::RenderWidgetHostViewBase* CreateViewForWidget( content::RenderWidgetHost* render_widget_host, content::RenderWidgetHost* embedder_render_widget_host) override; diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index 0fd506a46..3f17159bb 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -179,6 +179,7 @@ std::unique_ptr CreatePrefService(Profile* profile, flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry.get()); PluginInfoHostImpl::RegisterUserPrefs(registry.get()); PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get()); + ProfileNetworkContextService::RegisterLocalStatePrefs(registry.get()); SSLConfigServiceManager::RegisterPrefs(registry.get()); update_client::RegisterPrefs(registry.get()); diff --git a/libcef/browser/prefs/renderer_prefs.cc b/libcef/browser/prefs/renderer_prefs.cc index 2fbb7d0e8..2b7c0a315 100644 --- a/libcef/browser/prefs/renderer_prefs.cc +++ b/libcef/browser/prefs/renderer_prefs.cc @@ -32,11 +32,11 @@ #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/common/web_preferences.h" -#include "content/public/common/webrtc_ip_handling_policy.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/constants.h" #include "media/media_buildflags.h" +#include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h" namespace renderer_prefs { @@ -308,7 +308,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true); registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true); registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy, - content::kWebRTCIPHandlingDefault); + blink::kWebRTCIPHandlingDefault); registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string()); #if !defined(OS_MACOSX) diff --git a/libcef/browser/printing/print_view_manager.cc b/libcef/browser/printing/print_view_manager.cc index af374ffb7..3726b1e1c 100644 --- a/libcef/browser/printing/print_view_manager.cc +++ b/libcef/browser/printing/print_view_manager.cc @@ -26,6 +26,7 @@ #include "chrome/browser/printing/printer_query.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" +#include "components/printing/common/print.mojom.h" #include "components/printing/common/print_messages.h" #include "content/browser/download/download_manager_impl.h" #include "content/public/browser/browser_context.h" @@ -37,7 +38,9 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" +#include "mojo/public/cpp/bindings/associated_remote.h" #include "printing/metafile_skia.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "libcef/browser/thread_util.h" @@ -55,10 +58,7 @@ void FillInDictionaryFromPdfPrintSettings( int request_id, base::DictionaryValue& print_settings) { // Fixed settings. - print_settings.SetBoolean(kSettingPrintToPDF, true); - print_settings.SetBoolean(kSettingCloudPrintDialog, false); - print_settings.SetBoolean(kSettingPrintWithPrivet, false); - print_settings.SetBoolean(kSettingPrintWithExtension, false); + print_settings.SetIntKey(kSettingPrinterType, kPdfPrinter); print_settings.SetInteger(kSettingColor, GRAY); print_settings.SetInteger(kSettingDuplexMode, SIMPLEX); print_settings.SetInteger(kSettingCopies, 1); @@ -205,8 +205,12 @@ bool CefPrintViewManager::PrintToPDF(content::RenderFrameHost* rfh, FillInDictionaryFromPdfPrintSettings(settings, ++next_pdf_request_id_, pdf_print_state_->settings_); - rfh->Send(new PrintMsg_InitiatePrintPreview(rfh->GetRoutingID(), - !!settings.selection_only)); + mojo::AssociatedRemote + print_render_frame_remote; + rfh->GetRemoteAssociatedInterfaces()->GetInterface( + &print_render_frame_remote); + print_render_frame_remote->InitiatePrintPreview(nullptr, + !!settings.selection_only); return true; } @@ -302,7 +306,11 @@ void CefPrintViewManager::OnMetafileReadyForPrinting_PrintToPdf( DCHECK_EQ(pdf_print_state_->printing_rfh_, rfh); - rfh->Send(new PrintMsg_ClosePrintPreviewDialog(rfh->GetRoutingID())); + mojo::AssociatedRemote + print_render_frame_remote; + rfh->GetRemoteAssociatedInterfaces()->GetInterface( + &print_render_frame_remote); + print_render_frame_remote->OnPrintPreviewDialogClosed(); auto shared_buf = base::RefCountedSharedMemoryMapping::CreateFromWholeRegion( params.content.metafile_data_region); diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index 3e449b090..0c4e97447 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -21,7 +21,10 @@ #include "content/public/browser/plugin_service.h" #include "content/public/browser/ssl_host_state_delegate.h" #include "mojo/public/cpp/bindings/binding.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/remote.h" #include "services/network/public/cpp/resolve_host_client_base.h" +#include "services/network/public/mojom/network_context.mojom.h" using content::BrowserThread; @@ -84,25 +87,21 @@ struct ResolveHostHelperOld { class ResolveHostHelper : public network::ResolveHostClientBase { public: explicit ResolveHostHelper(CefRefPtr callback) - : callback_(callback), binding_(this) {} + : callback_(callback), receiver_(this) {} void Start(CefBrowserContext* browser_context, const CefString& origin) { CEF_REQUIRE_UIT(); - network::mojom::HostResolverPtrInfo host_resolver_info; browser_context->GetNetworkContext()->CreateHostResolver( - base::nullopt, mojo::MakeRequest(&host_resolver_info)); + base::nullopt, host_resolver_.BindNewPipeAndPassReceiver()); - network::mojom::ResolveHostClientPtr client_ptr; - binding_.Bind(mojo::MakeRequest(&client_ptr)); - binding_.set_connection_error_handler( + host_resolver_.set_disconnect_handler( base::BindOnce(&ResolveHostHelper::OnComplete, base::Unretained(this), net::ERR_FAILED, base::nullopt)); - host_resolver_ = - network::mojom::HostResolverPtr(std::move(host_resolver_info)); + host_resolver_->ResolveHost( net::HostPortPair::FromURL(GURL(origin.ToString())), nullptr, - std::move(client_ptr)); + receiver_.BindNewPipeAndPassRemote()); } private: @@ -112,7 +111,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase { CEF_REQUIRE_UIT(); host_resolver_.reset(); - binding_.Close(); + receiver_.reset(); std::vector resolved_ips; @@ -130,8 +129,8 @@ class ResolveHostHelper : public network::ResolveHostClientBase { CefRefPtr callback_; - network::mojom::HostResolverPtr host_resolver_; - mojo::Binding binding_; + mojo::Remote host_resolver_; + mojo::Receiver receiver_; DISALLOW_COPY_AND_ASSIGN(ResolveHostHelper); }; diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index aa0cf85e5..95f8e1e64 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -51,6 +51,7 @@ #include "services/service_manager/sandbox/switches.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/base/ui_base_features.h" #include "ui/base/ui_base_paths.h" #include "ui/base/ui_base_switches.h" @@ -599,6 +600,15 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { features::kMimeHandlerViewInCrossProcessFrame.name); } +#if defined(OS_WIN) + if (features::kCalculateNativeWinOcclusion.default_state == + base::FEATURE_ENABLED_BY_DEFAULT) { + // TODO: Add support for occlusion detection in combination with native + // parent windows (see issue #2805). + disable_features.push_back(features::kCalculateNativeWinOcclusion.name); + } +#endif // defined(OS_WIN) + if (!disable_features.empty()) { DCHECK(!base::FeatureList::GetInstance()); std::string disable_features_str = diff --git a/libcef/common/net/net_resource_provider.cc b/libcef/common/net/net_resource_provider.cc index d40e77da3..229439d4c 100644 --- a/libcef/common/net/net_resource_provider.cc +++ b/libcef/common/net/net_resource_provider.cc @@ -6,10 +6,10 @@ #include "chrome/common/net/net_resource_provider.h" -base::StringPiece NetResourceProvider(int key) { +scoped_refptr NetResourceProvider(int key) { // Chrome performs substitution of localized strings for directory listings. - base::StringPiece value = chrome_common_net::NetResourceProvider(key); - if (value.empty()) + scoped_refptr value = ChromeNetResourceProvider(key); + if (!value) LOG(ERROR) << "No data resource available for id " << key; return value; } diff --git a/libcef/common/net/net_resource_provider.h b/libcef/common/net/net_resource_provider.h index 73e5ad75e..8f6f6ed44 100644 --- a/libcef/common/net/net_resource_provider.h +++ b/libcef/common/net/net_resource_provider.h @@ -6,9 +6,9 @@ #define CEF_LIBCEF_COMMON_NET_RESOURCE_PROVIDER_H_ #pragma once -#include "base/strings/string_piece.h" +#include "base/memory/ref_counted_memory.h" // This is called indirectly by the network layer to access resources. -base::StringPiece NetResourceProvider(int key); +scoped_refptr NetResourceProvider(int key); #endif // CEF_LIBCEF_COMMON_NET_RESOURCE_PROVIDER_H_ diff --git a/libcef/common/net_service/net_service_util.cc b/libcef/common/net_service/net_service_util.cc index a25c46f7f..756823293 100644 --- a/libcef/common/net_service/net_service_util.cc +++ b/libcef/common/net_service/net_service_util.cc @@ -171,7 +171,7 @@ net::RedirectInfo MakeRedirectInfo(const network::ResourceRequest& request, : net::URLRequest::NEVER_CHANGE_FIRST_PARTY_URL; return net::RedirectInfo::ComputeRedirectInfo( request.method, request.url, request.site_for_cookies, - request.top_frame_origin, first_party_url_policy, request.referrer_policy, + first_party_url_policy, request.referrer_policy, request.referrer.spec(), status_code, location, net::RedirectUtil::GetReferrerPolicyHeader(headers), insecure_scheme_was_upgraded); diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index ab4aba494..b9c269fc4 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -37,6 +37,7 @@ #include "services/network/public/cpp/network_switches.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/resource_request_body.h" +#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h" #include "third_party/blink/public/platform/web_security_origin.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url.h" diff --git a/libcef/common/widevine_loader.cc b/libcef/common/widevine_loader.cc index bbed84367..af8351c0d 100644 --- a/libcef/common/widevine_loader.cc +++ b/libcef/common/widevine_loader.cc @@ -271,7 +271,7 @@ bool GetEncryptionSchemes( return false; } - const base::Value::ListStorage& list = value->GetList(); + const base::span list = value->GetList(); base::flat_set result; for (const auto& item : list) { if (!item.is_string()) { diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 69559b471..f8a464734 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -61,7 +61,7 @@ void GoBack(blink::WebView* view) { blink::WebViewImpl* view_impl = reinterpret_cast(view); if (view_impl->Client()->HistoryBackListCount() > 0) { main_frame->ToWebLocalFrame()->Client()->NavigateBackForwardSoon( - -1, true /* has_user_gesture */, false /* from_script */); + -1, true /* has_user_gesture */); } } } @@ -75,7 +75,7 @@ void GoForward(blink::WebView* view) { blink::WebViewImpl* view_impl = reinterpret_cast(view); if (view_impl->Client()->HistoryForwardListCount() > 0) { main_frame->ToWebLocalFrame()->Client()->NavigateBackForwardSoon( - 1, true /* has_user_gesture */, false /* from_script */); + 1, true /* has_user_gesture */); } } } diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index fa90eedbc..aaea25b11 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -576,28 +576,6 @@ bool CefContentRendererClient::OverrideCreatePlugin( return true; } -bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect) { - DCHECK(!frame->Parent()); - - // For now, we skip the rest for POST submissions. This is because - // http://crbug.com/101395 is more likely to cause compatibility issues - // with hosted apps and extensions than WebUI pages. We will remove this - // check when cross-process POST submissions are supported. - if (http_method != "GET") - return false; - - if (extensions::ExtensionsEnabled()) { - return extensions::CefExtensionsRendererClient::ShouldFork( - frame, url, is_initial_navigation, is_server_redirect); - } - - return false; -} - void CefContentRendererClient::WillSendRequest( blink::WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/libcef/renderer/content_renderer_client.h b/libcef/renderer/content_renderer_client.h index 769f4bad5..e4e9b7b22 100644 --- a/libcef/renderer/content_renderer_client.h +++ b/libcef/renderer/content_renderer_client.h @@ -111,11 +111,6 @@ class CefContentRendererClient bool OverrideCreatePlugin(content::RenderFrame* render_frame, const blink::WebPluginParams& params, blink::WebPlugin** plugin) override; - bool ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect) override; void WillSendRequest(blink::WebLocalFrame* frame, ui::PageTransition transition_type, const blink::WebURL& url, diff --git a/libcef/renderer/extensions/extensions_renderer_client.cc b/libcef/renderer/extensions/extensions_renderer_client.cc index 8f2f926f3..387e3100a 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.cc +++ b/libcef/renderer/extensions/extensions_renderer_client.cc @@ -43,54 +43,6 @@ void IsGuestViewApiAvailableToScriptContext( } } -// Returns true if the frame is navigating to an URL either into or out of an -// extension app's extent. -bool CrossesExtensionExtents(blink::WebLocalFrame* frame, - const GURL& new_url, - bool is_extension_url, - bool is_initial_navigation) { - DCHECK(!frame->Parent()); - GURL old_url(frame->GetDocument().Url()); - - extensions::RendererExtensionRegistry* extension_registry = - extensions::RendererExtensionRegistry::Get(); - - // If old_url is still empty and this is an initial navigation, then this is - // a window.open operation. We should look at the opener URL. Note that the - // opener is a local frame in this case. - if (is_initial_navigation && old_url.is_empty() && frame->Opener()) { - blink::WebLocalFrame* opener_frame = frame->Opener()->ToWebLocalFrame(); - - // We want to compare against the URL that determines the type of - // process. Use the URL of the opener's local frame root, which will - // correctly handle any site isolation modes (e.g. --site-per-process). - blink::WebLocalFrame* local_root = opener_frame->LocalRoot(); - old_url = local_root->GetDocument().Url(); - - // If we're about to open a normal web page from a same-origin opener stuck - // in an extension process (other than the Chrome Web Store), we want to - // keep it in process to allow the opener to script it. - blink::WebDocument opener_document = opener_frame->GetDocument(); - blink::WebSecurityOrigin opener_origin = - opener_document.GetSecurityOrigin(); - bool opener_is_extension_url = - !opener_origin.IsUnique() && extension_registry->GetExtensionOrAppByURL( - opener_document.Url()) != nullptr; - const Extension* opener_top_extension = - extension_registry->GetExtensionOrAppByURL(old_url); - bool opener_is_web_store = - opener_top_extension && - opener_top_extension->id() == extensions::kWebStoreAppId; - if (!is_extension_url && !opener_is_extension_url && !opener_is_web_store && - CefExtensionsRendererClient::IsStandaloneExtensionProcess() && - opener_origin.CanRequest(blink::WebURL(new_url))) - return false; - } - - return extensions::CrossesExtensionProcessBoundary( - *extension_registry->GetMainThreadExtensionSet(), old_url, new_url); -} - } // namespace CefExtensionsRendererClient::CefExtensionsRendererClient() {} @@ -225,35 +177,6 @@ bool CefExtensionsRendererClient::IsStandaloneExtensionProcess() { extensions::switches::kExtensionProcess); } -// static -bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - bool is_initial_navigation, - bool is_server_redirect) { - const extensions::RendererExtensionRegistry* extension_registry = - extensions::RendererExtensionRegistry::Get(); - - // Determine if the new URL is an extension (excluding bookmark apps). - const extensions::Extension* new_url_extension = - extensions::GetNonBookmarkAppExtension( - *extension_registry->GetMainThreadExtensionSet(), url); - bool is_extension_url = !!new_url_extension; - - // If the navigation would cross an app extent boundary, we also need - // to defer to the browser to ensure process isolation. This is not - // necessary for server redirects, which will be transferred to a new - // process by the browser process when they are ready to commit. It is - // necessary for client redirects, which won't be transferred in the same - // way. - if (!is_server_redirect && - CrossesExtensionExtents(frame, url, is_extension_url, - is_initial_navigation)) { - return true; - } - - return false; -} - // static content::BrowserPluginDelegate* CefExtensionsRendererClient::CreateBrowserPluginDelegate( diff --git a/libcef/renderer/extensions/extensions_renderer_client.h b/libcef/renderer/extensions/extensions_renderer_client.h index c2f95763a..520f46f95 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.h +++ b/libcef/renderer/extensions/extensions_renderer_client.h @@ -72,10 +72,6 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient { void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame); static bool IsStandaloneExtensionProcess(); - static bool ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - bool is_initial_navigation, - bool is_server_redirect); static content::BrowserPluginDelegate* CreateBrowserPluginDelegate( content::RenderFrame* render_frame, const content::WebPluginInfo& info, diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index e6d769864..4e49edbdc 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -342,8 +342,8 @@ void CefFrameImpl::OnDraggableRegionsChanged() { std::vector regions; for (size_t i = 0; i < webregions.size(); ++i) { Cef_DraggableRegion_Params region; - browser_->render_view()->ConvertViewportToWindowViaWidget( - &webregions[i].bounds); + auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_); + render_frame->ConvertViewportToWindow(&webregions[i].bounds); region.bounds = webregions[i].bounds; region.draggable = webregions[i].draggable; regions.push_back(region); diff --git a/libcef/renderer/render_frame_observer.cc b/libcef/renderer/render_frame_observer.cc index be663ed3c..ec1b48789 100644 --- a/libcef/renderer/render_frame_observer.cc +++ b/libcef/renderer/render_frame_observer.cc @@ -57,10 +57,9 @@ void CefRenderFrameObserver::DidCommitProvisionalLoad( OnLoadStart(); } -void CefRenderFrameObserver::DidFailProvisionalLoad( - const blink::WebURLError& error) { +void CefRenderFrameObserver::DidFailProvisionalLoad() { if (frame_) { - OnLoadError(error); + OnLoadError(); } } @@ -224,17 +223,19 @@ void CefRenderFrameObserver::OnLoadStart() { } } -void CefRenderFrameObserver::OnLoadError(const blink::WebURLError& error) { +void CefRenderFrameObserver::OnLoadError() { CefRefPtr app = CefContentClient::Get()->application(); if (app.get()) { CefRefPtr handler = app->GetRenderProcessHandler(); if (handler.get()) { CefRefPtr load_handler = handler->GetLoadHandler(); + // Error codes were removed from DidFailProvisionalLoad() so we now always + // pass the same value. if (load_handler.get()) { const cef_errorcode_t errorCode = - static_cast(error.reason()); - const std::string& errorText = net::ErrorToString(error.reason()); - const GURL& failedUrl = error.url(); + static_cast(net::ERR_ABORTED); + const std::string& errorText = net::ErrorToString(errorCode); + const GURL failedUrl(frame_->GetURL().c_str()); blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); CefRefPtr browserPtr = CefBrowserImpl::GetBrowserForMainFrame(frame->Top()); diff --git a/libcef/renderer/render_frame_observer.h b/libcef/renderer/render_frame_observer.h index 5d681b960..d03319ad4 100644 --- a/libcef/renderer/render_frame_observer.h +++ b/libcef/renderer/render_frame_observer.h @@ -26,7 +26,7 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { mojo::ScopedMessagePipeHandle* interface_pipe) override; void DidCommitProvisionalLoad(bool is_same_document_navigation, ui::PageTransition transition) override; - void DidFailProvisionalLoad(const blink::WebURLError& error) override; + void DidFailProvisionalLoad() override; void DidFinishLoad() override; void FrameDetached() override; void FrameFocused() override; @@ -45,7 +45,7 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { private: void OnLoadStart(); - void OnLoadError(const blink::WebURLError& error); + void OnLoadError(); service_manager::BinderRegistry registry_; CefFrameImpl* frame_ = nullptr; diff --git a/libcef/renderer/render_thread_observer.cc b/libcef/renderer/render_thread_observer.cc index cffada21b..59f107a0f 100644 --- a/libcef/renderer/render_thread_observer.cc +++ b/libcef/renderer/render_thread_observer.cc @@ -86,7 +86,7 @@ void CefRenderThreadObserver::UnregisterMojoInterfaces( void CefRenderThreadObserver::SetInitialConfiguration( bool is_incognito_process, - chrome::mojom::ChromeOSListenerRequest chromeos_listener_request) { + mojo::PendingReceiver chromeos_listener) { is_incognito_process_ = is_incognito_process; } @@ -105,8 +105,9 @@ void CefRenderThreadObserver::SetFieldTrialGroup( } void CefRenderThreadObserver::OnRendererConfigurationAssociatedRequest( - chrome::mojom::RendererConfigurationAssociatedRequest request) { - renderer_configuration_bindings_.AddBinding(this, std::move(request)); + mojo::PendingAssociatedReceiver + receiver) { + renderer_configuration_receivers_.Add(this, std::move(receiver)); } void CefRenderThreadObserver::OnModifyCrossOriginWhitelistEntry( diff --git a/libcef/renderer/render_thread_observer.h b/libcef/renderer/render_thread_observer.h index 68a252089..b099fb1a9 100644 --- a/libcef/renderer/render_thread_observer.h +++ b/libcef/renderer/render_thread_observer.h @@ -13,6 +13,7 @@ #include "components/content_settings/core/common/content_settings.h" #include "content/public/renderer/render_thread_observer.h" #include "mojo/public/cpp/bindings/associated_binding_set.h" +#include "mojo/public/cpp/bindings/associated_receiver_set.h" namespace visitedlink { class VisitedLinkSlave; @@ -46,9 +47,10 @@ class CefRenderThreadObserver : public content::RenderThreadObserver, blink::AssociatedInterfaceRegistry* associated_interfaces) override; // chrome::mojom::RendererConfiguration: - void SetInitialConfiguration(bool is_incognito_process, - chrome::mojom::ChromeOSListenerRequest - chromeos_listener_request) override; + void SetInitialConfiguration( + bool is_incognito_process, + mojo::PendingReceiver chromeos_listener) + override; void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override; void SetContentSettingRules( const RendererContentSettingRules& rules) override; @@ -56,7 +58,8 @@ class CefRenderThreadObserver : public content::RenderThreadObserver, const std::string& group_name) override; void OnRendererConfigurationAssociatedRequest( - chrome::mojom::RendererConfigurationAssociatedRequest request); + mojo::PendingAssociatedReceiver + receiver); // Message handlers called on the render thread. void OnModifyCrossOriginWhitelistEntry( @@ -68,8 +71,8 @@ class CefRenderThreadObserver : public content::RenderThreadObserver, std::unique_ptr visited_link_slave_; - mojo::AssociatedBindingSet - renderer_configuration_bindings_; + mojo::AssociatedReceiverSet + renderer_configuration_receivers_; DISALLOW_COPY_AND_ASSIGN(CefRenderThreadObserver); }; diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index 1055043af..014be0a86 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -55,15 +55,13 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient { int64_t total_decoded_body_length) override; void DidStartLoadingResponseBody( mojo::ScopedDataPipeConsumerHandle response_body) override; - bool WillFollowRedirect( - const WebURL& new_url, - const WebURL& new_site_for_cookies, - const base::Optional& new_top_frame_origin, - const WebString& new_referrer, - network::mojom::ReferrerPolicy new_referrer_policy, - const WebString& new_method, - const WebURLResponse& passed_redirect_response, - bool& report_raw_headers) override; + bool WillFollowRedirect(const WebURL& new_url, + const WebURL& new_site_for_cookies, + const WebString& new_referrer, + network::mojom::ReferrerPolicy new_referrer_policy, + const WebString& new_method, + const WebURLResponse& passed_redirect_response, + bool& report_raw_headers) override; protected: // The context_ pointer will outlive this object. @@ -395,7 +393,6 @@ void CefWebURLLoaderClient::DidStartLoadingResponseBody( bool CefWebURLLoaderClient::WillFollowRedirect( const WebURL& new_url, const WebURL& new_site_for_cookies, - const base::Optional& new_top_frame_origin, const WebString& new_referrer, network::mojom::ReferrerPolicy new_referrer_policy, const WebString& new_method, diff --git a/patch/patch.cfg b/patch/patch.cfg index e543a073e..d09986723 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -212,6 +212,10 @@ patches = [ { # Show the CEF Save As dialog. # https://bitbucket.org/chromiumembedded/cef/issues/2613 + # + # Fix fatal error: 'components/printing/common/print.mojom.h' file not found + # From chrome/browser/ui/browser_commands.cc via + # chrome/browser/printing/print_view_manager_common.h 'name': 'chrome_browser_net_export', }, { diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 32e0062ab..65baff7b9 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 2a50cd207695..b0e64eef29a5 100644 +index 200b8daecfbe..2e9d3b35325a 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -32,6 +32,7 @@ import("//build/config/sysroot.gni") @@ -9,8 +9,8 @@ index 2a50cd207695..b0e64eef29a5 100644 +import("//cef/libcef/features/features.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") - -@@ -1604,7 +1605,11 @@ jumbo_component("base") { + import("//third_party/icu/config.gni") +@@ -1612,7 +1613,11 @@ jumbo_component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] diff --git a/patch/patches/base_value_646113.patch b/patch/patches/base_value_646113.patch index a9828e0e3..5b3be8e28 100644 --- a/patch/patches/base_value_646113.patch +++ b/patch/patches/base_value_646113.patch @@ -1,5 +1,5 @@ diff --git base/values.cc base/values.cc -index 02e92b7e082b..b227923a6220 100644 +index 6886b846e8d5..2bc969fb173a 100644 --- base/values.cc +++ base/values.cc @@ -23,20 +23,6 @@ diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index 0809b3e6c..1bccb150c 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -37,10 +37,10 @@ index 6eb21be63dec..87ccc46f4d43 100644 attached_ = true; diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc -index be1334c46132..60abcebf7422 100644 +index 7bb71f92bb0a..a6b89a831044 100644 --- content/browser/frame_host/interstitial_page_impl.cc +++ content/browser/frame_host/interstitial_page_impl.cc -@@ -622,7 +622,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { +@@ -619,7 +619,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { WebContentsView* wcv = static_cast(web_contents())->GetView(); RenderWidgetHostViewBase* view = @@ -50,7 +50,7 @@ index be1334c46132..60abcebf7422 100644 render_view_host_->GetMainFrame()->AllowBindings( BINDINGS_POLICY_DOM_AUTOMATION); diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index bfb918a2cba3..a193b5a0fed8 100644 +index bff5b42b166c..4e21a23e364b 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -23,7 +23,7 @@ struct DropData; @@ -62,7 +62,7 @@ index bfb918a2cba3..a193b5a0fed8 100644 public: virtual ~WebContentsView() {} -@@ -84,13 +84,9 @@ class WebContentsView { +@@ -83,13 +83,9 @@ class WebContentsView { // Sets up the View that holds the rendered web page, receives messages for // it and contains page plugins. The host view should be sized to the current // size of the WebContents. @@ -79,10 +79,10 @@ index bfb918a2cba3..a193b5a0fed8 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 dda92e4006db..23f86f9f1564 100644 +index fbefaf207527..093c9cfa2bd1 100644 --- content/browser/web_contents/web_contents_view_aura.cc +++ content/browser/web_contents/web_contents_view_aura.cc -@@ -948,7 +948,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, +@@ -966,7 +966,8 @@ void WebContentsViewAura::CreateView(gfx::NativeView context) { } RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( @@ -92,7 +92,7 @@ index dda92e4006db..23f86f9f1564 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 -@@ -960,6 +961,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( +@@ -978,6 +979,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( render_widget_host->GetView()); } @@ -101,11 +101,11 @@ index dda92e4006db..23f86f9f1564 100644 g_create_render_widget_host_view ? g_create_render_widget_host_view(render_widget_host, diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h -index ed3c8d86cacc..70f869da762f 100644 +index 180f4fa00e46..05ec3dec8331 100644 --- content/browser/web_contents/web_contents_view_aura.h +++ content/browser/web_contents/web_contents_view_aura.h -@@ -122,7 +122,7 @@ class CONTENT_EXPORT WebContentsViewAura - gfx::NativeView context) override; +@@ -148,7 +148,7 @@ class CONTENT_EXPORT WebContentsViewAura + void CreateView(gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, - bool is_guest_view_hack) override; @@ -114,10 +114,10 @@ index ed3c8d86cacc..70f869da762f 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc -index 1a68298648a2..a54af8a7f735 100644 +index a766385cf589..fa6832be0759 100644 --- content/browser/web_contents/web_contents_view_child_frame.cc +++ content/browser/web_contents/web_contents_view_child_frame.cc -@@ -84,7 +84,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size, +@@ -83,7 +83,7 @@ void WebContentsViewChildFrame::CreateView(gfx::NativeView context) { RenderWidgetHostViewBase* WebContentsViewChildFrame::CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -127,11 +127,11 @@ index 1a68298648a2..a54af8a7f735 100644 } diff --git content/browser/web_contents/web_contents_view_child_frame.h content/browser/web_contents/web_contents_view_child_frame.h -index 8aaa80183dd1..b9df8a87be07 100644 +index 412bb35e4b69..2f5f7ac02b20 100644 --- content/browser/web_contents/web_contents_view_child_frame.h +++ content/browser/web_contents/web_contents_view_child_frame.h -@@ -40,7 +40,7 @@ class WebContentsViewChildFrame : public WebContentsView, - gfx::NativeView context) override; +@@ -39,7 +39,7 @@ class WebContentsViewChildFrame : public WebContentsView, + void CreateView(gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, - bool is_guest_view_hack) override; @@ -140,7 +140,7 @@ index 8aaa80183dd1..b9df8a87be07 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc -index ecaf30bcb7b9..7c65a61fe158 100644 +index c45581fd22b7..f9507a4e7db5 100644 --- content/browser/web_contents/web_contents_view_guest.cc +++ content/browser/web_contents/web_contents_view_guest.cc @@ -68,6 +68,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const { @@ -161,7 +161,7 @@ index ecaf30bcb7b9..7c65a61fe158 100644 #if defined(USE_AURA) old_parent_view->GetNativeView()->RemoveChild( platform_view_->GetNativeView()); -@@ -120,7 +124,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size, +@@ -118,7 +122,8 @@ void WebContentsViewGuest::CreateView(gfx::NativeView context) { } RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget( @@ -171,7 +171,7 @@ index ecaf30bcb7b9..7c65a61fe158 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 -@@ -132,11 +137,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget( +@@ -130,11 +135,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget( render_widget_host->GetView()); } @@ -195,11 +195,11 @@ index ecaf30bcb7b9..7c65a61fe158 100644 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget( diff --git content/browser/web_contents/web_contents_view_guest.h content/browser/web_contents/web_contents_view_guest.h -index 913fbc4bb00e..731a81c72803 100644 +index 12aa7cd4799d..bcd4e242c2f7 100644 --- content/browser/web_contents/web_contents_view_guest.h +++ content/browser/web_contents/web_contents_view_guest.h -@@ -58,7 +58,7 @@ class WebContentsViewGuest : public WebContentsView, - gfx::NativeView context) override; +@@ -57,7 +57,7 @@ class WebContentsViewGuest : public WebContentsView, + void CreateView(gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, - bool is_guest_view_hack) override; @@ -208,11 +208,11 @@ index 913fbc4bb00e..731a81c72803 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 35da7e53b6a6..df938f455be2 100644 +index 6fdec8c0a5e2..f57dc03069a5 100644 --- content/browser/web_contents/web_contents_view_mac.h +++ content/browser/web_contents/web_contents_view_mac.h -@@ -77,7 +77,7 @@ class WebContentsViewMac : public WebContentsView, - gfx::NativeView context) override; +@@ -76,7 +76,7 @@ class WebContentsViewMac : public WebContentsView, + void CreateView(gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, - bool is_guest_view_hack) override; @@ -221,10 +221,10 @@ index 35da7e53b6a6..df938f455be2 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 b35b9b48b53c..bfa5f5409d5d 100644 +index 4721a9b3f511..dfdd46d0c5d2 100644 --- content/browser/web_contents/web_contents_view_mac.mm +++ content/browser/web_contents/web_contents_view_mac.mm -@@ -327,7 +327,8 @@ void WebContentsViewMac::CreateView( +@@ -326,7 +326,8 @@ void WebContentsViewMac::CreateView(gfx::NativeView context) { } RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( @@ -234,7 +234,7 @@ index b35b9b48b53c..bfa5f5409d5d 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 -@@ -339,6 +340,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( +@@ -338,6 +339,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( render_widget_host->GetView()); } @@ -266,10 +266,10 @@ index ea12af6b86b8..f1211f374328 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 1578ad4f86bd..a07ed1044d60 100644 +index fa13ab856de9..ddc70aedbab2 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 -@@ -212,6 +212,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -215,6 +215,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -278,7 +278,7 @@ index 1578ad4f86bd..a07ed1044d60 100644 // TODO(erikchen): Fix ownership semantics for guest views. // https://crbug.com/832879. std::move(callback).Run( -@@ -256,6 +258,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { +@@ -259,6 +261,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { return true; } @@ -298,10 +298,10 @@ index 1578ad4f86bd..a07ed1044d60 100644 WebContents* source, const content::OpenURLParams& params) { diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index a608b0f31be0..025e4ed3af85 100644 +index 3d0b70d06fe7..a33da99391f6 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -125,6 +125,10 @@ class MimeHandlerViewGuest +@@ -128,6 +128,10 @@ class MimeHandlerViewGuest bool ZoomPropagatesFromEmbedderToGuest() const final; bool ShouldDestroyOnDetach() const final; diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index d4a13eff1..b45f43151 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,18 +1,13 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index f2ddb987a4de..a309caf4c670 100644 +index 4f786a1c21c7..2bbd7b0caf19 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc -@@ -136,10 +136,11 @@ void BrowserTaskExecutor::PostFeatureListSetup() { +@@ -249,7 +249,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() { // static void BrowserTaskExecutor::Shutdown() { - if (!g_browser_task_executor) -+ if (!g_browser_task_executor || -+ !g_browser_task_executor->browser_ui_thread_scheduler_) { ++ if (!g_browser_task_executor || !g_browser_task_executor->ui_thread_executor_) return; -+ } -- DCHECK(g_browser_task_executor->browser_ui_thread_scheduler_); - // We don't delete |g_browser_task_executor| because other threads may - // PostTask or call BrowserTaskExecutor::GetTaskRunner while we're tearing - // things down. We don't want to add locks so we just leak instead of dealing + DCHECK(g_browser_task_executor->ui_thread_executor_); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index fb3d1616a..61b5d13a3 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 d1a9bfa30cb2..3c74d4acdda2 100644 +index 93ad68a613b3..19b82a3a6389 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -152,7 +152,7 @@ declare_args() { +@@ -167,7 +167,7 @@ declare_args() { !use_clang_coverage && !(is_android && use_order_profiling) && (use_lld || (use_gold && @@ -11,7 +11,7 @@ index d1a9bfa30cb2..3c74d4acdda2 100644 !(current_cpu == "x86" || current_cpu == "x64")))) } -@@ -1728,8 +1728,6 @@ config("thin_archive") { +@@ -1740,8 +1740,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 6b6e78916..90be75ace 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 0bc6da647d95..aa57c4d046d5 100644 +index 5f4cb5b1c4fe..a082ec93ffe4 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn -@@ -10,6 +10,7 @@ import("//build/config/jumbo.gni") +@@ -9,6 +9,7 @@ import("//build/config/features.gni") + import("//build/config/jumbo.gni") import("//build/config/linux/gtk/gtk.gni") import("//build/config/ui.gni") - import("//build/split_static_library.gni") +import("//cef/libcef/features/features.gni") import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1938,6 +1939,7 @@ jumbo_split_static_library("browser") { +@@ -1881,6 +1882,7 @@ jumbo_static_library("browser") { "//base/util/values:values_util", "//build:branding_buildflags", "//cc", @@ -18,7 +18,7 @@ index 0bc6da647d95..aa57c4d046d5 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2238,6 +2240,10 @@ jumbo_split_static_library("browser") { +@@ -2183,6 +2185,10 @@ jumbo_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 1ca139579..6f13dde94 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index a3797e6705b8..6b7fe2e20a3f 100644 +index ac6b3488a4d8..82edf3f9eeec 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -7,6 +7,7 @@ @@ -21,7 +21,7 @@ index a3797e6705b8..6b7fe2e20a3f 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_service.h" #include "extensions/browser/extension_system.h" -@@ -44,8 +49,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() +@@ -45,8 +50,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -36,7 +36,7 @@ index a3797e6705b8..6b7fe2e20a3f 100644 #endif } -@@ -85,10 +96,16 @@ scoped_refptr +@@ -86,10 +97,16 @@ scoped_refptr base::FeatureList::IsEnabled(features::kPermissionDelegation))); #if BUILDFLAG(ENABLE_EXTENSIONS) diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index c21107935..329a7da3b 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 3b387d754736..2c537f9c15c1 100644 +index 99b66171cd0f..46239384714e 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -10,6 +10,7 @@ import("//build/config/jumbo.gni") +@@ -9,6 +9,7 @@ import("//build/config/features.gni") + import("//build/config/jumbo.gni") import("//build/config/linux/gtk/gtk.gni") import("//build/config/ui.gni") - import("//build/split_static_library.gni") +import("//cef/libcef/features/features.gni") import("//chrome/common/features.gni") import("//chromeos/assistant/assistant.gni") import("//components/feature_engagement/features.gni") -@@ -370,6 +371,10 @@ jumbo_split_static_library("ui") { +@@ -358,6 +359,10 @@ jumbo_static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -21,16 +21,24 @@ index 3b387d754736..2c537f9c15c1 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -388,6 +393,7 @@ jumbo_split_static_library("ui") { - "//base:i18n", +@@ -378,6 +383,7 @@ jumbo_static_library("ui") { "//base/allocator:buildflags", + "//build:branding_buildflags", "//cc/paint", + "//cef/libcef/features", "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", +@@ -1372,6 +1378,7 @@ jumbo_static_library("ui") { + "//components/keep_alive_registry", + "//components/network_session_configurator/common", + "//components/page_load_metrics/browser", ++ "//components/printing/common:mojo_interfaces", + "//components/profile_metrics", + "//components/ui_metrics", + "//components/url_formatter", diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc -index 081ef17bf0d9..46b1d1af2baa 100644 +index 7b7cf106ad3d..b9fdb831737d 100644 --- chrome/browser/ui/webui/net_export_ui.cc +++ chrome/browser/ui/webui/net_export_ui.cc @@ -20,13 +20,12 @@ diff --git a/patch/patches/chrome_browser_product_override.patch b/patch/patches/chrome_browser_product_override.patch index 8119f22b4..3fd1e5099 100644 --- a/patch/patches/chrome_browser_product_override.patch +++ b/patch/patches/chrome_browser_product_override.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index b1d5ac049933..cfb78bb97597 100644 +index 8171dbb425b9..908e745c7285 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -1013,10 +1013,6 @@ void LaunchURL(const GURL& url, +@@ -992,10 +992,6 @@ void LaunchURL(const GURL& url, } } @@ -13,7 +13,7 @@ index b1d5ac049933..cfb78bb97597 100644 void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) { // |allowlist| combines pref/policy + cmdline switch in the browser process. // For renderer and utility (e.g. NetworkService) processes the switch is the -@@ -1059,6 +1055,14 @@ base::FilePath GetModulePath(base::StringPiece16 module_name) { +@@ -1045,6 +1041,14 @@ void MaybeAddThrottle( } // namespace @@ -29,10 +29,10 @@ index b1d5ac049933..cfb78bb97597 100644 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kUserAgent)) { diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index 6bb50192ce17..6cb6a28d3114 100644 +index b80edc76b14f..20ba68634bbc 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -85,7 +85,8 @@ enum class Channel; +@@ -86,7 +86,8 @@ enum class Channel; class ChromeHidDelegate; class ChromeSerialDelegate; diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index b7adb1dc4..068cb220b 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 5fb5b84258a8..e28db2e984f6 100644 +index 4e44716a40f3..1eb4731da1cf 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc @@ -359,7 +359,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) @@ -12,7 +12,7 @@ index 5fb5b84258a8..e28db2e984f6 100644 } diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index 87ecf1fc998b..924c24fa42a2 100644 +index 7d02af7f8f60..eb70e533dbfb 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h @@ -99,7 +99,7 @@ class ProfileManager : public content::NotificationObserver, @@ -43,7 +43,7 @@ index 87ecf1fc998b..924c24fa42a2 100644 // Get the path of the last used profile, or if that's undefined, the default // profile. diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc -index 9dd42523f970..b8f5ae89ae3d 100644 +index 07e6f8d726df..9a3c6b38b8eb 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc @@ -7,6 +7,7 @@ @@ -54,7 +54,7 @@ index 9dd42523f970..b8f5ae89ae3d 100644 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/identity_manager_factory.h" -@@ -60,8 +61,12 @@ void GetGuestViewDefaultContentSettingRules( +@@ -67,8 +68,12 @@ void GetGuestViewDefaultContentSettingRules( RendererUpdater::RendererUpdater(Profile* profile) : profile_(profile), identity_manager_observer_(this) { @@ -67,7 +67,7 @@ index 9dd42523f970..b8f5ae89ae3d 100644 #if defined(OS_CHROMEOS) oauth2_login_manager_ = chromeos::OAuth2LoginManagerFactory::GetForProfile(profile_); -@@ -228,7 +233,7 @@ void RendererUpdater::UpdateRenderer( +@@ -238,7 +243,7 @@ void RendererUpdater::UpdateRenderer( force_google_safesearch_.GetValue(), force_youtube_restrict_.GetValue(), allowed_domains_for_apps_.GetValue(), diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index f51f6b3b2..6dae8bce7 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 3599895eb5c5..971ae4d3c1b6 100644 +index 8d5bdf428063..0aff2229bfa8 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -229,6 +229,7 @@ jumbo_static_library("safe_browsing") { +@@ -233,6 +233,7 @@ jumbo_static_library("safe_browsing") { "//chrome/common/safe_browsing:download_type_util", "//chrome/services/file_util/public/cpp", "//components/content_settings/core/browser", diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 7148131f4..2edb9ff78 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -165,10 +165,10 @@ index 56f147d2fc56..9f5687d9a5b9 100644 Profile* profile = Profile::FromBrowserContext(browser_context); std::vector whitelist = MimeTypesHandler::GetMIMETypeWhitelist(); diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc -index 3ce38cb1ee3a..44e93a0b5035 100644 +index 0a565575f36c..06dfa59d1a75 100644 --- chrome/common/google_url_loader_throttle.cc +++ chrome/common/google_url_loader_throttle.cc -@@ -4,10 +4,15 @@ +@@ -4,11 +4,16 @@ #include "chrome/common/google_url_loader_throttle.h" @@ -176,6 +176,7 @@ index 3ce38cb1ee3a..44e93a0b5035 100644 #include "chrome/common/net/safe_search_util.h" #include "components/variations/net/variations_http_headers.h" #include "services/network/public/cpp/resource_response.h" + #include "services/network/public/mojom/url_response_head.mojom.h" +#if BUILDFLAG(ENABLE_CEF) +#include "cef/libcef/common/extensions/extensions_util.h" @@ -184,7 +185,7 @@ index 3ce38cb1ee3a..44e93a0b5035 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/common/extension_urls.h" #endif -@@ -96,6 +101,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( +@@ -98,6 +103,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( const GURL& response_url, network::ResourceResponseHead* response_head, bool* defer) { @@ -197,7 +198,7 @@ index 3ce38cb1ee3a..44e93a0b5035 100644 GURL webstore_url(extension_urls::GetWebstoreLaunchURL()); if (response_url.SchemeIsHTTPOrHTTPS() && diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 03781c0b08e0..37dc3e93c7d9 100644 +index 4d3cfef5b28a..bbcaceebfda2 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc @@ -794,6 +794,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -210,7 +211,7 @@ index 03781c0b08e0..37dc3e93c7d9 100644 } @@ -994,7 +995,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( - &plugin_auth_host); + plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); - observer->DidBlockContentType(content_type, group_name); + if (observer) @@ -249,10 +250,10 @@ index 03781c0b08e0..37dc3e93c7d9 100644 } case chrome::mojom::PluginStatus::kComponentUpdateRequired: { diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc -index fe074e5b99ac..5d19f37db3d0 100644 +index 205c7398f827..8fcb6e5ae7ad 100644 --- chrome/renderer/plugins/chrome_plugin_placeholder.cc +++ chrome/renderer/plugins/chrome_plugin_placeholder.cc -@@ -357,8 +357,11 @@ void ChromePluginPlaceholder::OnBlockedContent( +@@ -358,8 +358,11 @@ void ChromePluginPlaceholder::OnBlockedContent( if (status == content::RenderFrame::PeripheralContentStatus::CONTENT_STATUS_TINY) { diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 3a0e8fb38..35711c9f3 100644 --- a/patch/patches/chrome_renderer.patch +++ b/patch/patches/chrome_renderer.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn -index a008c196d020..bf91ed98b864 100644 +index 5c4d8b63894d..996e15be52b9 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -4,6 +4,7 @@ @@ -10,7 +10,7 @@ index a008c196d020..bf91ed98b864 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -118,6 +119,7 @@ jumbo_static_library("renderer") { +@@ -129,6 +130,7 @@ jumbo_static_library("renderer") { defines = [] deps = [ @@ -18,7 +18,7 @@ index a008c196d020..bf91ed98b864 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -185,6 +187,10 @@ jumbo_static_library("renderer") { +@@ -196,6 +198,10 @@ jumbo_static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/chrome_widevine.patch b/patch/patches/chrome_widevine.patch index 9ecf30b0d..0ffd09df8 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,19 +1,5 @@ -diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc -index fb0059b3e652..452f58ab4a0a 100644 ---- chrome/common/chrome_content_client.cc -+++ chrome/common/chrome_content_client.cc -@@ -93,7 +93,8 @@ - // Registers Widevine CDM if Widevine is enabled, the Widevine CDM is - // bundled and not a component. When the Widevine CDM is a component, it is - // registered in widevine_cdm_component_installer.cc. --#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) -+#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ -+ defined(WIDEVINE_CDM_VERSION_STRING) - #define REGISTER_BUNDLED_WIDEVINE_CDM - #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 18177ec2e536..dca927a726b9 100644 +index ed0e2f5208b0..dca927a726b9 100644 --- third_party/widevine/cdm/BUILD.gn +++ third_party/widevine/cdm/BUILD.gn @@ -5,6 +5,7 @@ @@ -24,12 +10,3 @@ index 18177ec2e536..dca927a726b9 100644 import("//media/cdm/library_cdm/cdm_paths.gni") import("//media/media_options.gni") import("//third_party/widevine/cdm/widevine.gni") -@@ -106,8 +107,6 @@ if (widevine_cdm_manifest_and_license_files != []) { - ] - } - } else { -- assert(!enable_widevine_cdm_component, -- "Widevine as a component requires a manifest.") - group("widevine_cdm_manifest_and_license") { - # NOP - } diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 8bf5195ac..ae2d27f1f 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index 2207045d28b6..b87d28e8e618 100644 +index 0825bf79f7d5..5bbb5b3ea05f 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -12,6 +12,7 @@ diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index ef48841b7..c48a8e20c 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -36,7 +36,7 @@ index 937d3d5bc84f..ac327392dcf3 100644 content::WebPluginInfo* plugin) override; diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc -index 2c66cd46d84b..f81854a7b25f 100644 +index 8d7b5276955d..787f338e7ca6 100644 --- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc @@ -68,7 +68,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle, @@ -64,7 +64,7 @@ index e7f241e8db68..fe0b6e546b86 100644 bool GetURLForDrop(const ui::DropTargetEvent& event, GURL* url) { diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 569503d5f870..26e8b0c207c6 100644 +index 367855448a71..c9e0ecffe5f6 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -570,7 +570,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -77,10 +77,10 @@ index 569503d5f870..26e8b0c207c6 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index 1202e49da23f..a829f2f6b1ad 100644 +index e4972dba25a6..1f39e4d115c6 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc -@@ -468,6 +468,7 @@ void RenderFrameMessageFilter::OnAre3DAPIsBlocked(int render_frame_id, +@@ -328,6 +328,7 @@ void RenderFrameMessageFilter::OnAre3DAPIsBlocked(int render_frame_id, void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -88,7 +88,7 @@ index 1202e49da23f..a829f2f6b1ad 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -475,8 +476,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -335,8 +336,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( std::string* actual_mime_type) { bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( @@ -101,10 +101,10 @@ index 1202e49da23f..a829f2f6b1ad 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 d3510133b2dc..ebcfb56a6034 100644 +index 307a119bb9d8..c522bfcf3298 100644 --- content/browser/frame_host/render_frame_message_filter.h +++ content/browser/frame_host/render_frame_message_filter.h -@@ -111,6 +111,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter { +@@ -90,6 +90,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter { #if BUILDFLAG(ENABLE_PLUGINS) void OnGetPluginInfo(int render_frame_id, const GURL& url, @@ -113,24 +113,24 @@ index d3510133b2dc..ebcfb56a6034 100644 const std::string& mime_type, bool* found, diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index c82860885d1b..db78f147b39a 100644 +index 874fb88cb970..bc6cfa7aab2e 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -661,6 +661,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController - static_cast(resource_request_->transition_type), - resource_request_->has_user_gesture, &loader_factory); +@@ -666,6 +666,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController + resource_request_->has_user_gesture, + resource_request_->request_initiator, &loader_factory); + if (!handled) { + handled = GetContentClient()->browser()->HandleExternalProtocol( + web_contents_getter_, frame_tree_node_id_, + navigation_ui_data_.get(), *resource_request_, -+ &proxied_factory_request_, &loader_factory); ++ &loader_factory); + } + if (loader_factory) { factory = base::MakeRefCounted( -@@ -874,8 +881,9 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -880,8 +887,9 @@ class NavigationURLLoaderImpl::URLLoaderRequestController frame_tree_node->current_frame_host()->GetProcess()->GetID(); int routing_id = frame_tree_node->current_frame_host()->GetRoutingID(); bool has_plugin = PluginService::GetInstance()->GetPluginInfo( @@ -143,10 +143,10 @@ index c82860885d1b..db78f147b39a 100644 if (stale) { // Refresh the plugins asynchronously. diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index 06bd3e74a1cb..a6d3a0956c7e 100644 +index 4461a489227e..fea615b44abe 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc -@@ -301,6 +301,7 @@ bool PluginServiceImpl::GetPluginInfoArray( +@@ -302,6 +302,7 @@ bool PluginServiceImpl::GetPluginInfoArray( bool PluginServiceImpl::GetPluginInfo(int render_process_id, int render_frame_id, const GURL& url, @@ -154,7 +154,7 @@ index 06bd3e74a1cb..a6d3a0956c7e 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool allow_wildcard, -@@ -318,7 +319,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, +@@ -319,7 +320,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, for (size_t i = 0; i < plugins.size(); ++i) { if (!filter_ || filter_->IsPluginAvailable(render_process_id, render_frame_id, url, @@ -229,10 +229,10 @@ index 632ae86c6fd6..55b749ec1242 100644 const std::vector& all_plugins); diff --git content/common/frame_messages.h content/common/frame_messages.h -index 318e199de304..2baed51cc931 100644 +index 24decdbf52a6..6438c92db226 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1146,9 +1146,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1134,9 +1134,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. @@ -245,11 +245,19 @@ index 318e199de304..2baed51cc931 100644 std::string /* mime_type */, bool /* found */, diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index dcb77c781146..50d54464e790 100644 +index 7a02c260cc99..333f3e32824b 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -1512,6 +1512,15 @@ class CONTENT_EXPORT ContentBrowserClient { - bool has_user_gesture, +@@ -25,6 +25,7 @@ + #include "content/public/browser/certificate_request_result_type.h" + #include "content/public/browser/generated_code_cache_settings.h" + #include "content/public/browser/page_visibility_state.h" ++#include "content/public/browser/web_contents.h" + #include "content/public/common/previews_state.h" + #include "content/public/common/window_container_type.mojom-forward.h" + #include "media/base/video_codecs.h" +@@ -1570,6 +1571,14 @@ class CONTENT_EXPORT ContentBrowserClient { + const base::Optional& initiating_origin, network::mojom::URLLoaderFactoryPtr* out_factory); + // Same as above, but exposing the whole ResourceRequest object. @@ -258,13 +266,12 @@ index dcb77c781146..50d54464e790 100644 + int frame_tree_node_id, + NavigationUIData* navigation_data, + const network::ResourceRequest& request, -+ network::mojom::URLLoaderFactoryRequest* factory_request, + network::mojom::URLLoaderFactoryPtr* out_factory) { return false; } + // Creates an OverlayWindow to be used for Picture-in-Picture. This window // will house the content shown when in Picture-in-Picture mode. This will // return a new OverlayWindow. -@@ -1579,6 +1588,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1633,6 +1642,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -300,7 +307,7 @@ index 98c59005599e..69752184745d 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 7d53414dfbe7..fdbe566ee2bb 100644 +index c1ed9f008b49..d055159b66f9 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -72,6 +72,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -313,7 +320,7 @@ index 7d53414dfbe7..fdbe566ee2bb 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -318,6 +321,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -308,6 +311,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -325,10 +332,10 @@ index 7d53414dfbe7..fdbe566ee2bb 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h -index 1f4868132226..96a0fbfd8188 100644 +index f764efa250cc..9b2e8c053367 100644 --- content/public/renderer/render_frame_observer.h +++ content/public/renderer/render_frame_observer.h -@@ -216,6 +216,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -215,6 +215,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidReceiveTransferSizeUpdate(int resource_id, int received_data_length) {} @@ -339,10 +346,10 @@ index 1f4868132226..96a0fbfd8188 100644 virtual void FocusedElementChanged(const blink::WebElement& element) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index f8f8209786ff..c181986c246a 100644 +index 8163ba87762e..54978cfe503a 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -4166,7 +4166,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -4149,7 +4149,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -352,7 +359,7 @@ index f8f8209786ff..c181986c246a 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -4586,6 +4587,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { +@@ -4562,6 +4563,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { GetFrameHost()->FrameFocused(); @@ -362,23 +369,23 @@ index f8f8209786ff..c181986c246a 100644 void RenderFrameImpl::DidChangeName(const blink::WebString& name) { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index f133e1651a27..1785e961f089 100644 +index e2cb076d3a69..939cc09915c2 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -790,6 +790,8 @@ void RenderThreadImpl::Init() { +@@ -810,6 +810,8 @@ void RenderThreadImpl::Init() { StartServiceManagerConnection(); + GetContentClient()->renderer()->RenderThreadConnected(); + GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating( - &RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this))); + &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 6a81c4a2a94e..2c52d6085df9 100644 +index 541268de0cc0..4572feb2e954 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -959,6 +959,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { +@@ -981,6 +981,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { //------------------------------------------------------------------------------ @@ -395,10 +402,10 @@ index 6a81c4a2a94e..2c52d6085df9 100644 if (!code_cache_host_) { code_cache_host_ = mojo::SharedRemote( diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 0db3cf9498a1..a13458688a08 100644 +index 68be1b765491..8468b1b42b79 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -205,6 +205,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -209,6 +209,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { media::GpuVideoAcceleratorFactories* GetGpuFactories() override; diff --git a/patch/patches/content_app_shutdown_2798.patch b/patch/patches/content_app_shutdown_2798.patch index d23889952..1ef267e46 100644 --- a/patch/patches/content_app_shutdown_2798.patch +++ b/patch/patches/content_app_shutdown_2798.patch @@ -1,16 +1,16 @@ diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 85f0a07c9733..e25cd242078d 100644 +index 998ef8659928..b3594db3de1f 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc -@@ -42,6 +42,7 @@ - #include "base/strings/string_util.h" +@@ -43,6 +43,7 @@ #include "base/strings/stringprintf.h" #include "base/task/post_task.h" + #include "base/task/thread_pool/thread_pool_instance.h" +#include "base/threading/thread_restrictions.h" #include "base/trace_event/trace_event.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h" #include "components/download/public/common/download_task_runner.h" -@@ -983,6 +984,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1015,6 +1016,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index a49eeed23..9ac962587 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -81,7 +81,7 @@ index 381322aca895..a5622ddfe66d 100644 g_crash_helper_enabled = true; return true; diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index 8072b8aa696e..e15894ca788f 100644 +index 4b9d1c365376..6529583db11b 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -4,6 +4,8 @@ @@ -93,7 +93,7 @@ index 8072b8aa696e..e15894ca788f 100644 #include "base/base_switches.h" #include "base/command_line.h" #include "base/logging.h" -@@ -27,7 +29,7 @@ +@@ -28,7 +30,7 @@ namespace crash_keys { // Return true if we DON'T want to upload this flag to the crash server. @@ -102,7 +102,7 @@ index 8072b8aa696e..e15894ca788f 100644 static const char* const kIgnoreSwitches[] = { switches::kEnableLogging, switches::kFlagSwitchesBegin, -@@ -82,7 +84,7 @@ static bool IsBoringSwitch(const std::string& flag) { +@@ -83,7 +85,7 @@ static bool IsBoringSwitch(const std::string& flag) { } void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { @@ -127,7 +127,7 @@ index bcf172e645a2..f879aa745adf 100644 // on the given |command_line|. void SetCrashKeysFromCommandLine(const base::CommandLine& command_line); diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc -index 505156ada2d8..34ad815d20c6 100644 +index 7e561db0dd60..4b97ba370377 100644 --- components/crash/content/app/breakpad_linux.cc +++ components/crash/content/app/breakpad_linux.cc @@ -28,6 +28,7 @@ diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 010d43528..76ebdb462 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -1,8 +1,8 @@ diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc -index c6fa389ba88f..8912e2169972 100644 +index 8eed18d4944c..3e1fb7ac3ba5 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.cc +++ third_party/crashpad/crashpad/client/prune_crash_reports.cc -@@ -66,13 +66,19 @@ void PruneCrashReportDatabase(CrashReportDatabase* database, +@@ -72,13 +72,19 @@ size_t PruneCrashReportDatabase(CrashReportDatabase* database, } // static @@ -26,10 +26,10 @@ index c6fa389ba88f..8912e2169972 100644 static const time_t kSecondsInDay = 60 * 60 * 24; diff --git third_party/crashpad/crashpad/client/prune_crash_reports.h third_party/crashpad/crashpad/client/prune_crash_reports.h -index 6dac5f3002b3..34f5ee111d3d 100644 +index 07a70980f12a..ddf7f17325fe 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.h +++ third_party/crashpad/crashpad/client/prune_crash_reports.h -@@ -57,7 +57,8 @@ class PruneCondition { +@@ -59,7 +59,8 @@ class PruneCondition { //! of 128 MB. //! //! \return A PruneCondition for use with PruneCrashReportDatabase(). @@ -248,7 +248,7 @@ index 2ec1147d2620..8ff9a72e0bd7 100644 //! \brief Calls ProcessPendingReports() in response to ReportPending() having //! been called on any thread, as well as periodically on a timer. diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc -index 7b69e8481ffa..2cee1da0dc4b 100644 +index 7d9701c0bf08..767a3c23fb4f 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc @@ -36,8 +36,10 @@ @@ -273,7 +273,7 @@ index 7b69e8481ffa..2cee1da0dc4b 100644 namespace crashpad { namespace { -@@ -195,6 +201,9 @@ struct Options { +@@ -200,6 +206,9 @@ struct Options { bool periodic_tasks; bool rate_limit; bool upload_gzip; @@ -282,8 +282,8 @@ index 7b69e8481ffa..2cee1da0dc4b 100644 + int max_database_age; #if defined(OS_CHROMEOS) bool use_cros_crash_reporter; - #endif // OS_CHROMEOS -@@ -569,6 +578,9 @@ int HandlerMain(int argc, + base::FilePath minidump_dir_for_tests; +@@ -558,6 +567,9 @@ int HandlerMain(int argc, kOptionTraceParentWithException, #endif kOptionURL, @@ -292,8 +292,8 @@ index 7b69e8481ffa..2cee1da0dc4b 100644 + kOptionMaxDatabaseAge, #if defined(OS_CHROMEOS) kOptionUseCrosCrashReporter, - #endif // OS_CHROMEOS -@@ -645,6 +657,9 @@ int HandlerMain(int argc, + kOptionMinidumpDirForTests, +@@ -639,6 +651,9 @@ int HandlerMain(int argc, #endif // OS_CHROMEOS {"help", no_argument, nullptr, kOptionHelp}, {"version", no_argument, nullptr, kOptionVersion}, @@ -303,7 +303,7 @@ index 7b69e8481ffa..2cee1da0dc4b 100644 {nullptr, 0, nullptr, 0}, }; -@@ -784,6 +799,27 @@ int HandlerMain(int argc, +@@ -778,6 +793,27 @@ int HandlerMain(int argc, options.url = optarg; break; } @@ -331,7 +331,7 @@ index 7b69e8481ffa..2cee1da0dc4b 100644 #if defined(OS_CHROMEOS) case kOptionUseCrosCrashReporter: { options.use_cros_crash_reporter = true; -@@ -910,8 +946,14 @@ int HandlerMain(int argc, +@@ -909,8 +945,14 @@ int HandlerMain(int argc, upload_thread_options.upload_gzip = options.upload_gzip; upload_thread_options.watch_pending_reports = options.periodic_tasks; @@ -346,7 +346,7 @@ index 7b69e8481ffa..2cee1da0dc4b 100644 upload_thread.Get()->Start(); } -@@ -961,7 +1003,8 @@ int HandlerMain(int argc, +@@ -966,7 +1008,8 @@ int HandlerMain(int argc, ScopedStoppable prune_thread; if (options.periodic_tasks) { prune_thread.Reset(new PruneCrashReportThread( diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 36b69e315..0e6e92af7 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -132,7 +132,7 @@ index c0f80fd848d6..75b0e53ae68e 100644 // A weak pointer to the current or pending RenderViewHost. We don't access // this through the host_contents because we want to deal with the pending diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index ed47ee5227ac..6b9e93784eaf 100644 +index 6d8ee7b85467..706a06d4a83c 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h @@ -54,6 +54,7 @@ class ComponentExtensionResourceManager; @@ -159,10 +159,10 @@ index ed47ee5227ac..6b9e93784eaf 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 55dcd62be9fc..c19fa68da048 100644 +index e3220c480f15..e014b6bb618c 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -380,9 +380,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -381,9 +381,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/font_family_cache_1501.patch b/patch/patches/font_family_cache_1501.patch index c23529870..ba0ff0397 100644 --- a/patch/patches/font_family_cache_1501.patch +++ b/patch/patches/font_family_cache_1501.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/font_family_cache.h chrome/browser/font_family_cache.h -index 36577f32fba3..a45e9230e6e5 100644 +index a99372e6744c..ce40a8448868 100644 --- chrome/browser/font_family_cache.h +++ chrome/browser/font_family_cache.h -@@ -21,6 +21,8 @@ class Profile; +@@ -19,6 +19,8 @@ class Profile; FORWARD_DECLARE_TEST(FontFamilyCacheTest, Caching); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 45eda4fce..effa68d83 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index b66e15317bb2..79f09da67517 100644 +index 20f2aad03c82..8cc64748b027 100644 --- .gn +++ .gn -@@ -667,6 +667,8 @@ exec_script_whitelist = +@@ -654,6 +654,8 @@ exec_script_whitelist = "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", @@ -12,10 +12,10 @@ index b66e15317bb2..79f09da67517 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 5e2f6b9b0f41..8ce1c0d77f76 100644 +index b2d4f2f591e9..a19e53cfd6a9 100644 --- BUILD.gn +++ BUILD.gn -@@ -209,6 +209,7 @@ group("gn_all") { +@@ -211,6 +211,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -56,10 +56,10 @@ index 982fbe8d3f0d..e757be4688f1 100644 + "studio path") } diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index ef8aeda56458..5b7f057311b9 100644 +index 9ee69df7d210..00ad4b3be81a 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py -@@ -136,22 +136,25 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): +@@ -142,22 +142,25 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): # variable. if 'VSINSTALLDIR' in os.environ: del os.environ['VSINSTALLDIR'] @@ -100,10 +100,10 @@ index ef8aeda56458..5b7f057311b9 100644 diff --git build/vs_toolchain.py build/vs_toolchain.py -index 3f2506128643..bf3a34778458 100755 +index c3503cc47630..cdf5ec0dc95b 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py -@@ -81,11 +81,18 @@ def SetEnvironmentAndGetRuntimeDllDirs(): +@@ -86,11 +86,18 @@ def SetEnvironmentAndGetRuntimeDllDirs(): runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs) os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH'] elif sys.platform == 'win32' and not depot_tools_win_toolchain: @@ -123,10 +123,10 @@ index 3f2506128643..bf3a34778458 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 5b58ed59878e..2e45266d21db 100644 +index f4faf8c2eeb3..687c50622259 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni -@@ -277,7 +277,7 @@ template("chrome_paks") { +@@ -275,7 +275,7 @@ template("chrome_paks") { } input_locales = locales @@ -136,7 +136,7 @@ index 5b58ed59878e..2e45266d21db 100644 if (is_mac) { output_locales = locales_as_mac_outputs diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index cc2bfe0642d1..688ae4d8be2c 100644 +index 99a1bc7cb24f..32ca34ac39b7 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -138,7 +138,7 @@ template("generate_mini_installer") { diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index c8223dd16..83c91625a 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 a4c39b1f6b14..5706254c1ec4 100644 +index 60aa21e9e270..261b5dc02037 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids -@@ -472,4 +472,11 @@ +@@ -467,4 +467,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 44171a82c..8dc1a4056 100644 --- a/patch/patches/linux_gtk_2014.patch +++ b/patch/patches/linux_gtk_2014.patch @@ -39,10 +39,10 @@ index 07f06ac694f5..831fd9f82dbe 100644 void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn -index 9e12dd26146d..4748af4b1cc8 100644 +index dde2eafb88f0..2594b51f35b1 100644 --- chrome/test/BUILD.gn +++ chrome/test/BUILD.gn -@@ -4545,7 +4545,7 @@ test("unit_tests") { +@@ -4609,7 +4609,7 @@ test("unit_tests") { if (use_gio) { configs += [ "//build/linux:gio_config" ] } @@ -51,7 +51,7 @@ index 9e12dd26146d..4748af4b1cc8 100644 deps += [ "//chrome/browser/ui/libgtkui" ] } -@@ -5599,7 +5599,7 @@ if (!is_android) { +@@ -5666,7 +5666,7 @@ if (!is_android) { # suites, it seems like one or another starts timing out too. "../browser/ui/views/keyboard_access_browsertest.cc", ] diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 7d64ecb44..a7289b952 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,29 +1,3 @@ -diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc -index a8a66308a1c5..65ff368c5a72 100644 ---- base/message_loop/message_loop.cc -+++ base/message_loop/message_loop.cc -@@ -174,6 +174,9 @@ MessageLoopForUI::MessageLoopForUI(MessagePumpType type) : MessageLoop(type) { - #endif - } - -+MessageLoopForUI::MessageLoopForUI(std::unique_ptr pump) -+ : MessageLoop(MessagePumpType::UI, std::move(pump)) {} -+ - #if defined(OS_IOS) - void MessageLoopForUI::Attach() { - sequence_manager_->AttachToMessagePump(); -diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h -index cc760ffab174..131ccbb6520d 100644 ---- base/message_loop/message_loop.h -+++ base/message_loop/message_loop.h -@@ -217,6 +217,7 @@ class BASE_EXPORT MessageLoop { - class BASE_EXPORT MessageLoopForUI : public MessageLoop { - public: - explicit MessageLoopForUI(MessagePumpType type = MessagePumpType::UI); -+ explicit MessageLoopForUI(std::unique_ptr pump); - - #if defined(OS_IOS) - // On iOS, the main message loop cannot be Run(). Instead call Attach(), diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc index 7688ba3d7b0d..9acaaa0d5c7f 100644 --- base/message_loop/message_loop_current.cc diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 05a97a0f7..67608abbd 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 dd1363a6b295..b69c7895c0e3 100644 +index 5411d32dbfd1..faf738b6b827 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h -@@ -189,6 +189,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -191,6 +191,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) @@ -11,7 +11,7 @@ index dd1363a6b295..b69c7895c0e3 100644 IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc -index 114b0f7d04cd..adce9ab8c3b5 100644 +index 4b765944962d..7fe6d042bd53 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc @@ -167,6 +167,7 @@ WebPreferences::WebPreferences() @@ -23,10 +23,10 @@ index 114b0f7d04cd..adce9ab8c3b5 100644 record_whole_document(false), cookie_enabled(true), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index e47b250f52bd..dfa18577d402 100644 +index 700cba9043f0..6e0b11c28d89 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h -@@ -184,6 +184,7 @@ struct CONTENT_EXPORT WebPreferences { +@@ -183,6 +183,7 @@ struct CONTENT_EXPORT WebPreferences { bool caret_browsing_enabled; bool use_solid_color_scrollbars; bool navigate_on_drag_drop; @@ -35,10 +35,10 @@ index e47b250f52bd..dfa18577d402 100644 bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index f780c653d6e5..4b07220bac8c 100644 +index 16b6279b2228..f6c6af2559da 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -998,6 +998,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -1020,6 +1020,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #endif WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index 6363bef35..bc841d720 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 323534a720c1..72b232f0ed85 100644 +index 207cce649db5..5dadc32eea18 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -22,6 +22,7 @@ @@ -10,7 +10,7 @@ index 323534a720c1..72b232f0ed85 100644 #include "chrome/browser/download/chrome_download_manager_delegate.h" #include "chrome/browser/download/download_core_service_factory.h" #include "chrome/browser/download/download_core_service_impl.h" -@@ -52,6 +53,10 @@ +@@ -53,6 +54,10 @@ #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" #endif @@ -21,7 +21,7 @@ index 323534a720c1..72b232f0ed85 100644 using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -303,7 +308,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( +@@ -307,7 +312,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( // static DownloadPrefs* DownloadPrefs::FromBrowserContext( content::BrowserContext* context) { @@ -58,10 +58,10 @@ index 3dcc3aa7bea2..637661e9d0b9 100644 // Add an entry to the map. preview_dialog_map_[preview_dialog] = initiator; diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html -index a941dae7276b..73e875985b8e 100644 +index a9f917682680..6209adcb2323 100644 --- chrome/browser/resources/print_preview/ui/destination_dialog.html +++ chrome/browser/resources/print_preview/ui/destination_dialog.html -@@ -182,9 +182,7 @@ +@@ -183,9 +183,7 @@
@@ -73,7 +73,7 @@ index a941dae7276b..73e875985b8e 100644 $i18n{cancel} diff --git chrome/browser/resources/print_preview/ui/destination_select.html chrome/browser/resources/print_preview/ui/destination_select.html -index 2b7cb3cec173..af79ac632cb4 100644 +index 2438ba0e47b1..8669dd740aa5 100644 --- chrome/browser/resources/print_preview/ui/destination_select.html +++ chrome/browser/resources/print_preview/ui/destination_select.html @@ -47,10 +47,6 @@ @@ -112,10 +112,10 @@ index 12f77178ea92..470b13bd7879 100644 ConstrainedWebDialogUI::~ConstrainedWebDialogUI() { diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc -index 00cf10991ede..8087cb6aab05 100644 +index f0033a7e67bd..c093e4bdb1bb 100644 --- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc +++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc -@@ -143,8 +143,10 @@ PdfPrinterHandler::PdfPrinterHandler(Profile* profile, +@@ -146,8 +146,10 @@ PdfPrinterHandler::PdfPrinterHandler(Profile* profile, sticky_settings_(sticky_settings) {} PdfPrinterHandler::~PdfPrinterHandler() { @@ -126,7 +126,7 @@ index 00cf10991ede..8087cb6aab05 100644 } void PdfPrinterHandler::Reset() { -@@ -179,12 +181,14 @@ void PdfPrinterHandler::StartPrint( +@@ -182,12 +184,14 @@ void PdfPrinterHandler::StartPrint( return; } @@ -141,7 +141,7 @@ index 00cf10991ede..8087cb6aab05 100644 DCHECK(!print_callback_); print_callback_ = std::move(callback); -@@ -324,7 +328,11 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, +@@ -327,7 +331,11 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, // If the directory is empty there is no reason to create it or use the // default location. if (path.empty()) { @@ -153,7 +153,7 @@ index 00cf10991ede..8087cb6aab05 100644 return; } -@@ -335,8 +343,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, +@@ -338,8 +346,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename, FROM_HERE, {base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT}, base::BindOnce(&SelectSaveDirectory, path, default_path), @@ -168,7 +168,7 @@ index 00cf10991ede..8087cb6aab05 100644 } void PdfPrinterHandler::PostPrintToPdfTask() { -@@ -353,6 +367,7 @@ void PdfPrinterHandler::OnGotUniqueFileName(const base::FilePath& path) { +@@ -356,6 +370,7 @@ void PdfPrinterHandler::OnGotUniqueFileName(const base::FilePath& path) { FileSelected(path, 0, nullptr); } @@ -176,7 +176,7 @@ index 00cf10991ede..8087cb6aab05 100644 void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, const base::FilePath& directory) { base::FilePath path = directory.Append(filename); -@@ -377,5 +392,36 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, +@@ -380,5 +395,36 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename, &file_type_info, 0, base::FilePath::StringType(), platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL); } @@ -262,7 +262,7 @@ index 06f5799efbb9..6119691b2700 100644 Profile* const profile_; StickySettings* const sticky_settings_; diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc -index 0a6c4d4de3aa..a22377a02343 100644 +index 2ecb8cdde5a8..3ff362c64a52 100644 --- chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -26,6 +26,7 @@ @@ -273,7 +273,7 @@ index 0a6c4d4de3aa..a22377a02343 100644 #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/bad_message.h" #include "chrome/browser/browser_process.h" -@@ -1253,6 +1254,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( +@@ -1277,6 +1278,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( } return privet_printer_handler_.get(); } @@ -283,7 +283,7 @@ index 0a6c4d4de3aa..a22377a02343 100644 #endif if (printer_type == PrinterType::kPdfPrinter) { if (!pdf_printer_handler_) { -@@ -1335,6 +1339,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, +@@ -1359,6 +1363,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, } void PrintPreviewHandler::RegisterForGaiaCookieChanges() { @@ -291,7 +291,7 @@ index 0a6c4d4de3aa..a22377a02343 100644 DCHECK(!identity_manager_); cloud_print_enabled_ = GetPrefs()->GetBoolean(prefs::kCloudPrintSubmitEnabled); -@@ -1350,6 +1355,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { +@@ -1374,6 +1379,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { identity_manager_ = IdentityManagerFactory::GetForProfile(profile); identity_manager_->AddObserver(this); @@ -300,7 +300,7 @@ index 0a6c4d4de3aa..a22377a02343 100644 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index a855e2f1d974..755f386deebf 100644 +index 820820687a59..5c4aa8385f05 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -25,6 +25,7 @@ @@ -309,9 +309,9 @@ index a855e2f1d974..755f386deebf 100644 #include "build/build_config.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/browser_process.h" + #include "chrome/browser/browser_process_platform_part.h" #include "chrome/browser/printing/background_printing_manager.h" - #include "chrome/browser/printing/print_preview_data_service.h" -@@ -72,12 +73,16 @@ namespace printing { +@@ -77,12 +78,16 @@ namespace printing { namespace { diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index 9a48c5e39..a3241d153 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index 13f9d7af3ae7..22d991fc1c14 100644 +index ab32d5475a0e..8e7aee00e765 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc -@@ -130,6 +130,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) +@@ -133,6 +133,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) PrintingContext::Create(printing_context_delegate_.get())), thread_("Printing_Worker") { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index 4d69b634a..b911a03d2 100644 --- a/patch/patches/renderer_preferences_util_545103.patch +++ b/patch/patches/renderer_preferences_util_545103.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc -index 9008f3e280f2..71e21c813637 100644 +index f96841de67db..df4ebb707bdb 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc @@ -30,7 +30,8 @@ diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index 24b900d9a..cef5b06a2 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 5b2f19834d43..db733ea25bdc 100644 +index 222ac2fb6d15..c8466b47242a 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -817,6 +817,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -842,6 +842,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 5b2f19834d43..db733ea25bdc 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -826,6 +832,11 @@ ResourceBundle::~ResourceBundle() { +@@ -851,6 +857,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } @@ -28,7 +28,7 @@ index 5b2f19834d43..db733ea25bdc 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 a342b41335a6..67bbffb9bbda 100644 +index e987fcae7dbf..4be280ae91e4 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h @@ -155,6 +155,11 @@ class UI_BASE_EXPORT ResourceBundle { diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 5fe4ff1be..df476f73d 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 09e58950d351..54bbb72e2a38 100644 +index 448db2a403a6..d7fe170c9dcc 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -711,10 +711,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -713,10 +713,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index 09e58950d351..54bbb72e2a38 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -2037,6 +2039,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2040,6 +2042,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // Init(), because it needs to have the layer. if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 92cd1e6bb..c61b9d9f4 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 35302d90a73f..73424c925e13 100644 +index 2788029519d2..205d29075ff8 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc -@@ -14,6 +14,7 @@ - #include "base/logging.h" +@@ -16,6 +16,7 @@ #include "base/metrics/histogram_macros.h" + #include "base/strings/string_split.h" #include "base/task/post_task.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -463,9 +464,22 @@ ProfileNetworkContextService::CreateNetworkContextParams( +@@ -484,9 +485,22 @@ ProfileNetworkContextService::CreateNetworkContextParams( network_context_params->cookie_manager_params = CreateCookieManagerParams(profile_, *cookie_settings_); @@ -33,7 +33,7 @@ index 35302d90a73f..73424c925e13 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -478,6 +492,7 @@ ProfileNetworkContextService::CreateNetworkContextParams( +@@ -499,6 +513,7 @@ ProfileNetworkContextService::CreateNetworkContextParams( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -42,10 +42,10 @@ index 35302d90a73f..73424c925e13 100644 // Currently this just contains HttpServerProperties, but that will likely // change. diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index 6a7b2e1c9c99..d119da2910fe 100644 +index 756fa14db62a..4fb52050f8a5 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h -@@ -373,6 +373,11 @@ class Profile : public content::BrowserContext { +@@ -378,6 +378,11 @@ class Profile : public content::BrowserContext { virtual bool ShouldRestoreOldSessionCookies(); virtual bool ShouldPersistSessionCookies(); @@ -56,12 +56,12 @@ index 6a7b2e1c9c99..d119da2910fe 100644 + // Creates NetworkContext for the specified isolated app (or for the profile // itself, if |relative_path| is empty). - virtual network::mojom::NetworkContextPtr CreateNetworkContext( + virtual mojo::Remote CreateNetworkContext( diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index d522c4d82094..f4979561fdf0 100644 +index adbda8bdf2c5..779e9e9764cb 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -493,6 +493,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -504,6 +504,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -88,10 +88,10 @@ index d522c4d82094..f4979561fdf0 100644 void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { DCHECK(thread_checker_.CalledOnValidThread()); diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h -index a0bd017e9c18..87f8ed8989d4 100644 +index 66ad270bb07e..ca9d9e073edf 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h -@@ -177,6 +177,8 @@ class NET_EXPORT CookieMonster : public CookieStore { +@@ -180,6 +180,8 @@ class NET_EXPORT CookieMonster : public CookieStore { CookieChangeDispatcher& GetChangeDispatcher() override; void SetCookieableSchemes(const std::vector& schemes, SetCookieableSchemesCallback callback) override; @@ -101,12 +101,12 @@ index a0bd017e9c18..87f8ed8989d4 100644 // Enables writing session cookies into the cookie database. If this this // method is called, it must be called before first use of the instance diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h -index bcd72c1b56f7..67ff2c0edb32 100644 +index ebec5df3a7ed..718cf4bc7362 100644 --- net/cookies/cookie_store.h +++ net/cookies/cookie_store.h -@@ -127,6 +127,11 @@ class NET_EXPORT CookieStore { - virtual void SetCookieableSchemes(const std::vector& schemes, - SetCookieableSchemesCallback callback) = 0; +@@ -148,6 +148,11 @@ class NET_EXPORT CookieStore { + // Transfer ownership of a CookieAccessDelegate. + void SetCookieAccessDelegate(std::unique_ptr delegate); + // Adds to the list of cookieable schemes. Does nothing if called after first + // use of the instance (i.e. after the instance initialization process). @@ -117,10 +117,10 @@ index bcd72c1b56f7..67ff2c0edb32 100644 virtual void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, const std::string& parent_absolute_name) const; diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index c0f105aec142..6afd5f9e25fc 100644 +index 5a087228a2f1..1f46f8de2ee8 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc -@@ -214,14 +214,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { +@@ -219,14 +219,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { void CookieManager::AllowFileSchemeCookies( bool allow, AllowFileSchemeCookiesCallback callback) { @@ -139,10 +139,10 @@ index c0f105aec142..6afd5f9e25fc 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 8e848688225a..cbbf5de461d6 100644 +index 8489c08f3b5f..e2c22ea79382 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -1762,6 +1762,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1627,6 +1627,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { } scoped_refptr session_cleanup_cookie_store; @@ -150,7 +150,7 @@ index 8e848688225a..cbbf5de461d6 100644 if (params_->cookie_path) { scoped_refptr client_task_runner = base::ThreadTaskRunnerHandle::Get(); -@@ -1789,18 +1790,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1654,18 +1655,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { session_cleanup_cookie_store = base::MakeRefCounted(sqlite_store); @@ -182,10 +182,10 @@ index 8e848688225a..cbbf5de461d6 100644 std::make_unique( params_->accept_language, params_->user_agent); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index 873bce449b63..3189e268d950 100644 +index 086f4b96cdd9..1fe8d2ccae88 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -210,6 +210,9 @@ struct NetworkContextParams { +@@ -225,6 +225,9 @@ struct NetworkContextParams { // cookies. Otherwise it should be false. bool persist_session_cookies = false; diff --git a/patch/patches/services_network_request_id_2718.patch b/patch/patches/services_network_request_id_2718.patch index 2c5b1249c..be4d3a7b2 100644 --- a/patch/patches/services_network_request_id_2718.patch +++ b/patch/patches/services_network_request_id_2718.patch @@ -1,8 +1,8 @@ diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc -index c626801963af..9d05b869101b 100644 +index 818a6370957a..64ab8e2462b5 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -583,10 +583,6 @@ class LoginHandlerDelegate { +@@ -577,10 +577,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index c626801963af..9d05b869101b 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -643,12 +639,6 @@ void OnAuthRequiredContinuation( +@@ -637,12 +633,6 @@ void OnAuthRequiredContinuation( web_contents_getter = base::BindRepeating(GetWebContents, process_id, routing_id); } @@ -27,18 +27,18 @@ index c626801963af..9d05b869101b 100644 std::move(web_contents_getter), auth_info, is_request_for_main_frame, process_id, routing_id, diff --git services/network/public/cpp/simple_url_loader.cc services/network/public/cpp/simple_url_loader.cc -index 1ab5688d10d6..7e8d8242a06f 100644 +index 1cc4198e6057..0fae6dbe25a2 100644 --- services/network/public/cpp/simple_url_loader.cc +++ services/network/public/cpp/simple_url_loader.cc -@@ -227,6 +227,7 @@ class SimpleURLLoaderImpl : public SimpleURLLoader, - uint64_t length = std::numeric_limits::max()) override; +@@ -230,6 +230,7 @@ class SimpleURLLoaderImpl : public SimpleURLLoader, void SetRetryOptions(int max_retries, int retry_mode) override; + void SetURLLoaderFactoryOptions(uint32_t options) override; void SetTimeoutDuration(base::TimeDelta timeout_duration) override; + void SetRequestId(int32_t request_id) override; int NetError() const override; - const ResourceResponseHead* ResponseInfo() const override; -@@ -344,6 +345,8 @@ class SimpleURLLoaderImpl : public SimpleURLLoader, + const mojom::URLResponseHead* ResponseInfo() const override; +@@ -348,6 +349,8 @@ class SimpleURLLoaderImpl : public SimpleURLLoader, // The next values contain all the information required to restart the // request. @@ -47,7 +47,7 @@ index 1ab5688d10d6..7e8d8242a06f 100644 // Populated in the constructor, and cleared once no longer needed, when no // more retries are possible. std::unique_ptr resource_request_; -@@ -1363,6 +1366,12 @@ void SimpleURLLoaderImpl::SetTimeoutDuration(base::TimeDelta timeout_duration) { +@@ -1373,6 +1376,12 @@ void SimpleURLLoaderImpl::SetTimeoutDuration(base::TimeDelta timeout_duration) { timeout_duration_ = timeout_duration; } @@ -60,20 +60,20 @@ index 1ab5688d10d6..7e8d8242a06f 100644 int SimpleURLLoaderImpl::NetError() const { // Should only be called once the request is compelete. DCHECK(request_state_->finished); -@@ -1511,7 +1520,7 @@ void SimpleURLLoaderImpl::StartRequest( - string_upload_data_pipe_getter_->GetPtrForNewUpload()); +@@ -1521,7 +1530,7 @@ void SimpleURLLoaderImpl::StartRequest( + string_upload_data_pipe_getter_->GetRemoteForNewUpload()); } url_loader_factory->CreateLoaderAndStart( - mojo::MakeRequest(&url_loader_), 0 /* routing_id */, 0 /* request_id */, + mojo::MakeRequest(&url_loader_), 0 /* routing_id */, request_id_, - 0 /* options */, *resource_request_, std::move(client_ptr), + url_loader_factory_options_, *resource_request_, std::move(client_ptr), net::MutableNetworkTrafficAnnotationTag(annotation_tag_)); diff --git services/network/public/cpp/simple_url_loader.h services/network/public/cpp/simple_url_loader.h -index 255cb1830c5c..bd89d66d2520 100644 +index 88d602b0915c..ffe9b5adcebf 100644 --- services/network/public/cpp/simple_url_loader.h +++ services/network/public/cpp/simple_url_loader.h -@@ -327,6 +327,9 @@ class COMPONENT_EXPORT(NETWORK_CPP) SimpleURLLoader { +@@ -332,6 +332,9 @@ class COMPONENT_EXPORT(NETWORK_CPP) SimpleURLLoader { // as much time as it wants. virtual void SetTimeoutDuration(base::TimeDelta timeout_duration) = 0; diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 9e96c78bf..27cd0372a 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -1,8 +1,8 @@ diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 0d5a04d7af76..b4610f07b0c2 100644 +index c1bc20a5feab..7969c6e7e991 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc -@@ -117,7 +117,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( +@@ -118,7 +118,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( // If we're not incognito mode, schedule all of our file tasks to enable // disk on the storage context. @@ -13,7 +13,7 @@ index 0d5a04d7af76..b4610f07b0c2 100644 {base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE, diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 9e5b73896b85..153c089421f9 100644 +index 99b29aa36717..6ac73053cd36 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -57,6 +57,7 @@ @@ -24,7 +24,7 @@ index 9e5b73896b85..153c089421f9 100644 #include "media/base/media_switches.h" #include "media/capabilities/in_memory_video_decode_stats_db_impl.h" #include "media/capabilities/video_decode_stats_db_impl.h" -@@ -214,7 +215,7 @@ StoragePartition* GetStoragePartitionFromConfig( +@@ -165,7 +166,7 @@ StoragePartition* GetStoragePartitionFromConfig( StoragePartitionImplMap* partition_map = GetStoragePartitionMap(browser_context); @@ -33,7 +33,7 @@ index 9e5b73896b85..153c089421f9 100644 in_memory = true; return partition_map->Get(partition_domain, partition_name, in_memory, -@@ -792,7 +793,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { +@@ -719,7 +720,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { kUseInMemoryDBDefault); std::unique_ptr stats_db; diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index afbb8d68c..0b5375667 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,8 +1,8 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 6717a2bd93b7..25136f5e99ba 100644 +index 14fd70d103a7..2f1ab56307f8 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h -@@ -48,6 +48,8 @@ +@@ -51,6 +51,8 @@ X("cc") \ X("cc.debug") \ X("cdp.perf") \ diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index 20e7cb631..1dc7a4a04 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -1,8 +1,8 @@ diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h -index e0324ff11fb8..6a2455caaab8 100644 +index b0ae539ba1dc..3fd16cbe7e7a 100644 --- ui/base/models/menu_model.h +++ ui/base/models/menu_model.h -@@ -15,6 +15,7 @@ +@@ -16,6 +16,7 @@ namespace gfx { class FontList; class Image; @@ -10,7 +10,7 @@ index e0324ff11fb8..6a2455caaab8 100644 struct VectorIcon; } -@@ -122,6 +123,27 @@ class UI_BASE_EXPORT MenuModel { +@@ -123,6 +124,27 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr { // |event_flags| is a bit mask of ui::EventFlags. virtual void ActivatedAt(int index, int event_flags); @@ -39,7 +39,7 @@ index e0324ff11fb8..6a2455caaab8 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 8aedc0ecc317..2d9c6cd5452a 100644 +index bd8491add744..92d33c554ca6 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -539,6 +539,14 @@ void RenderText::SetWhitespaceElision(base::Optional whitespace_elision) { @@ -102,7 +102,7 @@ index d0dc1d08c912..7496b2620bd3 100644 }; diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index c410d9fb249e..3b84416e3e6d 100644 +index 3b5bc508a0fd..262da51d50ac 100644 --- ui/views/animation/ink_drop_host_view.h +++ ui/views/animation/ink_drop_host_view.h @@ -132,6 +132,8 @@ class VIEWS_EXPORT InkDropHostView : public View { @@ -113,12 +113,12 @@ index c410d9fb249e..3b84416e3e6d 100644 + protected: // Size used for the default SquareInkDropRipple. - static constexpr int kDefaultInkDropSize = 24; + static constexpr gfx::Size kDefaultInkDropSize = gfx::Size(24, 24); diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index 214b1a74c5b2..fd15c4dfcb50 100644 +index 1e66f0d7ec02..e978979e07a2 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -462,6 +462,12 @@ void LabelButton::OnThemeChanged() { +@@ -482,6 +482,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -132,10 +132,10 @@ index 214b1a74c5b2..fd15c4dfcb50 100644 const gfx::Size previous_image_size(image_->GetPreferredSize()); UpdateImage(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 2162f9ef52b1..10b1f9120aa3 100644 +index 1358e05eefd5..5dad3a3e37fb 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -107,6 +107,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { +@@ -117,6 +117,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { ui::NativeTheme::State GetForegroundThemeState( ui::NativeTheme::ExtraParams* params) const override; @@ -146,10 +146,10 @@ index 2162f9ef52b1..10b1f9120aa3 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index a4f20420e9ee..ae38c737d8c2 100644 +index 1837167589a6..a4df42465b74 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -52,6 +52,20 @@ bool IsOpaque(SkColor color) { +@@ -53,6 +53,20 @@ bool IsOpaque(SkColor color) { return SkColorGetA(color) == SK_AlphaOPAQUE; } @@ -170,7 +170,7 @@ index a4f20420e9ee..ae38c737d8c2 100644 } // namespace namespace views { -@@ -309,6 +323,14 @@ base::string16 Label::GetTooltipText() const { +@@ -310,6 +324,14 @@ base::string16 Label::GetTooltipText() const { return tooltip_text_; } @@ -185,7 +185,7 @@ index a4f20420e9ee..ae38c737d8c2 100644 void Label::SetTooltipText(const base::string16& tooltip_text) { DCHECK(handles_tooltips_); if (tooltip_text_ == tooltip_text) -@@ -578,7 +600,19 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -575,7 +597,19 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SetFontList(font_list()); render_text->set_shadows(GetShadows()); render_text->SetCursorEnabled(false); @@ -207,7 +207,7 @@ index a4f20420e9ee..ae38c737d8c2 100644 render_text->SetMultiline(multiline); render_text->SetMaxLines(multiline ? GetMaxLines() : 0); diff --git ui/views/controls/label.h ui/views/controls/label.h -index bc90b6fbf5bd..596c21476e2f 100644 +index aea6bb5b7b13..9ce9947174d4 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h @@ -176,6 +176,10 @@ class VIEWS_EXPORT Label : public View, @@ -221,7 +221,7 @@ index bc90b6fbf5bd..596c21476e2f 100644 // Gets/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 -@@ -409,6 +413,7 @@ class VIEWS_EXPORT Label : public View, +@@ -408,6 +412,7 @@ class VIEWS_EXPORT Label : public View, bool collapse_when_hidden_; int fixed_width_; int max_width_; @@ -230,10 +230,10 @@ index bc90b6fbf5bd..596c21476e2f 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index ee4fbf418def..12bd665da4ce 100644 +index 276db1fb2017..dc873a80cd7a 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2614,8 +2614,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2643,8 +2643,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -248,7 +248,7 @@ index ee4fbf418def..12bd665da4ce 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2634,8 +2639,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2663,8 +2668,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -300,10 +300,10 @@ index bdbd9c7e37b8..86138fd1d21c 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 a37e13686535..cb0d3fb5ef45 100644 +index 0fcca1e59688..73fcd369ecb8 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1065,6 +1065,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1067,6 +1067,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); @@ -319,7 +319,7 @@ index a37e13686535..cb0d3fb5ef45 100644 } else if (render_selection) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == ACTIONABLE_SUBMENU) { -@@ -1131,6 +1140,13 @@ void MenuItemView::PaintMinorIconAndText( +@@ -1133,6 +1142,13 @@ void MenuItemView::PaintMinorIconAndText( } SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { @@ -330,9 +330,9 @@ index a37e13686535..cb0d3fb5ef45 100644 + return text_color; + } + - ui::NativeTheme::ColorId color_id = - minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor - : ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor; + style::TextContext context = + GetMenuController() && GetMenuController()->use_touchable_layout() + ? style::CONTEXT_TOUCH_MENU diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc index 09b72733e66d..4bcee9da5b8a 100644 --- ui/views/controls/menu/menu_model_adapter.cc @@ -441,12 +441,12 @@ index 78f832fd3acf..cb030c991614 100644 void WillHideMenu(MenuItemView* menu) override; void OnMenuClosed(MenuItemView* menu) override; diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 3e7c6460bc16..84b1aa48d96f 100644 +index 1b084be1b7b7..80568aa44580 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -179,6 +179,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) - scroll_view_ = new MenuScrollView(content_view); - AddChildView(scroll_view_); +@@ -189,6 +189,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) + scroll_down_button_ = + AddChildView(std::make_unique(content_view, false)); + SkColor override_color; + MenuDelegate* delegate = content_view_->GetMenuItem()->GetDelegate(); @@ -457,10 +457,10 @@ index 3e7c6460bc16..84b1aa48d96f 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc -index 4f865802a6e9..42d047bd68ad 100644 +index 6e69e4018a3b..f44fadcbb4c1 100644 --- ui/views/test/ui_controls_factory_desktop_aurax11.cc +++ ui/views/test/ui_controls_factory_desktop_aurax11.cc -@@ -143,10 +143,6 @@ class UIControlsDesktopX11 : public UIControlsAura { +@@ -144,10 +144,6 @@ class UIControlsDesktopX11 : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -472,7 +472,7 @@ index 4f865802a6e9..42d047bd68ad 100644 // Move the cursor because EnterNotify/LeaveNotify are generated with the // current mouse position as a result of XGrabPointer() diff --git ui/views/view.h ui/views/view.h -index 722b98d676ed..3c7e27cf6eb0 100644 +index 918a39060710..21670bb50f9f 100644 --- ui/views/view.h +++ ui/views/view.h @@ -22,6 +22,7 @@ @@ -483,7 +483,7 @@ index 722b98d676ed..3c7e27cf6eb0 100644 #include "build/build_config.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/accessibility/ax_enums.mojom-forward.h" -@@ -274,7 +275,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -270,7 +271,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, public ui::EventTarget, public ui::EventHandler, public ui::PropertyHandler, 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 85a483e47..45834287c 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index dbfcd1da5c85..5b3f20f18ea5 100644 +index 50aad3c8d627..12be71c34f27 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -581,6 +581,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() { @@ -18,10 +18,10 @@ index dbfcd1da5c85..5b3f20f18ea5 100644 return renderer_frame_number_; } diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 2bd5d56bc37d..c14d9a858796 100644 +index add7df1a4432..25caac12acbe 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -71,6 +71,7 @@ class CursorManager; +@@ -72,6 +72,7 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -29,7 +29,7 @@ index 2bd5d56bc37d..c14d9a858796 100644 class SyntheticGestureTarget; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -91,6 +92,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -92,6 +93,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase float current_device_scale_factor() const { return current_device_scale_factor_; } @@ -39,7 +39,7 @@ index 2bd5d56bc37d..c14d9a858796 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -126,6 +130,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -127,6 +131,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void DisableAutoResize(const gfx::Size& new_size) override; bool IsScrollOffsetAtTop() override; float GetDeviceScaleFactor() final; @@ -48,7 +48,7 @@ index 2bd5d56bc37d..c14d9a858796 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; void SetRecordTabSwitchTimeRequest(base::TimeTicks start_time, -@@ -475,6 +481,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -482,6 +488,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // helps to position the full screen widget on the correct monitor. virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0; @@ -61,7 +61,7 @@ index 2bd5d56bc37d..c14d9a858796 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -639,6 +651,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -646,6 +658,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool is_currently_scrolling_viewport_ = false; @@ -73,10 +73,10 @@ index 2bd5d56bc37d..c14d9a858796 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 caaec4aabb93..42067642c699 100644 +index 7f5763a4022b..f86a084e6ef3 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 @@ +@@ -33,6 +33,10 @@ #include "ui/events/keycodes/dom/dom_code.h" #include "ui/touch_selection/touch_selection_controller.h" @@ -87,7 +87,7 @@ index caaec4aabb93..42067642c699 100644 #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/public/common/context_menu_params.h" -@@ -903,6 +907,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { +@@ -910,6 +914,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { ::SetFocus(hwnd); } } @@ -122,10 +122,10 @@ index 78e055820447..9f8a6fd1cd65 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/base/x/x11_window.cc ui/base/x/x11_window.cc -index 1bb97da34481..f56a74312d67 100644 +index a98dc5678ad0..8302238f6ea6 100644 --- ui/base/x/x11_window.cc +++ ui/base/x/x11_window.cc -@@ -205,8 +205,12 @@ void XWindow::Init(const Configuration& config) { +@@ -228,8 +228,12 @@ void XWindow::Init(const Configuration& config) { attribute_mask |= CWBorderPixel; swa.border_pixel = 0; @@ -140,7 +140,7 @@ index 1bb97da34481..f56a74312d67 100644 bounds_in_pixels_.height(), 0, // border width diff --git ui/base/x/x11_window.h ui/base/x/x11_window.h -index 9db97d2f5214..4eb41eaf12aa 100644 +index 505db626f2ec..8ba8d7306714 100644 --- ui/base/x/x11_window.h +++ ui/base/x/x11_window.h @@ -20,6 +20,7 @@ @@ -151,22 +151,22 @@ index 9db97d2f5214..4eb41eaf12aa 100644 #include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11_types.h" -@@ -83,6 +84,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { - std::string wm_class_name; +@@ -89,6 +90,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { std::string wm_class_class; std::string wm_role_name; + base::Optional visual_id; + gfx::AcceleratedWidget parent_widget = gfx::kNullAcceleratedWidget; }; XWindow(); diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc -index c181b69f49ac..9bb225975488 100644 +index e5c489eb1512..87841b48c032 100644 --- ui/platform_window/x11/x11_window.cc +++ ui/platform_window/x11/x11_window.cc -@@ -66,6 +66,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( - config.wm_class_class = properties.wm_class_class; +@@ -75,6 +75,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( config.wm_role_name = properties.wm_role_name; config.activatable = properties.activatable; + config.visual_id = properties.x_visual_id; + config.parent_widget = properties.parent_widget; return config; } @@ -185,22 +185,23 @@ index 70553b153c44..ecd99bc78373 100644 return host ? host->GetAcceleratedWidget() : nullptr; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -index da401532ffbe..e878204e71db 100644 +index 4f888a102b03..08c111d1a386 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -@@ -78,6 +78,7 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( - properties->wm_class_name = params.wm_class_name; - properties->wm_class_class = params.wm_class_class; +@@ -335,6 +335,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( properties->wm_role_name = params.wm_role_name; + + properties->x_visual_id = pending_x_visual_id_; ++ + properties->parent_widget = params.parent_widget; } - } // namespace views + void DesktopWindowTreeHostLinux::OnCompleteSwapWithNewSize( diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index 0eedc2665313..1bbc2abc7514 100644 +index 1860bd6f6a67..002887bcd5d5 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -128,8 +128,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { +@@ -129,8 +129,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { native_widget_delegate_); HWND parent_hwnd = nullptr; @@ -214,7 +215,7 @@ index 0eedc2665313..1bbc2abc7514 100644 remove_standard_frame_ = params.remove_standard_frame; has_non_client_view_ = Widget::RequiresNonClientView(params.type); -@@ -900,11 +904,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -905,11 +909,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -233,7 +234,7 @@ index 0eedc2665313..1bbc2abc7514 100644 bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 335db0db49bb..35c30789741a 100644 +index b195b582fe58..f189bd083982 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -288,6 +288,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -248,21 +249,21 @@ index 335db0db49bb..35c30789741a 100644 // a reference. corewm::TooltipWin* tooltip_; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -index 2b6a9d013039..023e12b3a2bb 100644 +index 3f3097b540d3..4d58aa52e5f0 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -@@ -247,6 +247,9 @@ void DesktopWindowTreeHostX11::Init(const Widget::InitParams& params) { - window_parent_->window_children_.insert(this); - } +@@ -110,6 +110,9 @@ void DesktopWindowTreeHostX11::RemoveObserver( + // DesktopWindowTreeHostX11, DesktopWindowTreeHost implementation: + void DesktopWindowTreeHostX11::Init(const Widget::InitParams& params) { + if (params.parent_widget != gfx::kNullAcceleratedWidget) + has_external_parent_ = true; + - DesktopWindowTreeHostPlatform::Init(params); + DesktopWindowTreeHostLinux::Init(params); // Set XEventDelegate to receive selection, drag&drop and raw key events. -@@ -435,6 +438,18 @@ void DesktopWindowTreeHostX11::StackAtTop() { - GetXWindow()->StackAtTop(); +@@ -175,6 +178,18 @@ void DesktopWindowTreeHostX11::OnXWindowUnmapped() { + observer.OnWindowUnmapped(GetXWindow()->window()); } +gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { @@ -277,16 +278,16 @@ index 2b6a9d013039..023e12b3a2bb 100644 + return DesktopWindowTreeHostLinux::GetLocationOnScreenInPixels(); +} + - void DesktopWindowTreeHostX11::GetWindowPlacement( - gfx::Rect* bounds, - ui::WindowShowState* show_state) const { + void DesktopWindowTreeHostX11::OnXWindowSelectionEvent(XEvent* xev) { + DCHECK(xev); + DCHECK(drag_drop_client_); diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h -index 09baef384772..8895a31c611b 100644 +index 4f4263c74437..620a3cdbda10 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h -@@ -98,6 +98,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, - // be changed after. - void SetVisualId(VisualID visual_id); +@@ -47,6 +47,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, + void AddObserver(DesktopWindowTreeHostObserverX11* observer); + void RemoveObserver(DesktopWindowTreeHostObserverX11* observer); + void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; } + @@ -297,18 +298,18 @@ index 09baef384772..8895a31c611b 100644 protected: // Overridden from DesktopWindowTreeHost: void Init(const Widget::InitParams& params) override; -@@ -112,6 +118,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, - void SetSize(const gfx::Size& requested_size) override; - void StackAbove(aura::Window* window) override; - void StackAtTop() override; +@@ -69,6 +75,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, + // from here as we progress in https://crbug.com/990756. + void OnXWindowMapped() override; + void OnXWindowUnmapped() override; + gfx::Rect GetWindowBoundsInScreen() const override; + gfx::Point GetLocationOnScreenInPixels() const override; - void GetWindowPlacement(gfx::Rect* bounds, - ui::WindowShowState* show_state) const override; - gfx::Rect GetRestoredBounds() const override; -@@ -255,6 +263,13 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, - // behavior if > 0. - ui::ZOrderLevel z_order_ = ui::ZOrderLevel::kNormal; + + // Overridden from ui::XEventDelegate. + void OnXWindowSelectionEvent(XEvent* xev) override; +@@ -81,6 +89,13 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, + // directly. See https://crbug.com/990756. + const ui::XWindow* GetXWindow() const; + // Override the screen bounds when the host is a child window. + gfx::Rect screen_bounds_; @@ -319,19 +320,19 @@ index 09baef384772..8895a31c611b 100644 + DesktopDragDropClientAuraX11* drag_drop_client_ = nullptr; - std::unique_ptr non_client_event_filter_; -@@ -285,6 +300,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, - - std::unique_ptr compositor_observer_; + std::unique_ptr x11_window_move_client_; +@@ -88,6 +103,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, + base::ObserverList::Unchecked + observer_list_; + // True if the xwindow has already been destroyed. + bool xwindow_destroyed_ = false; + // The display and the native X window hosting the root window. - base::WeakPtrFactory close_widget_factory_{this}; base::WeakPtrFactory weak_factory_{this}; + diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 3e4c62c49f07..778c984b59b3 100644 +index e9204b202508..d79d48f1834e 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -304,7 +304,8 @@ void Widget::Init(InitParams params) { @@ -358,7 +359,7 @@ index 3e4c62c49f07..778c984b59b3 100644 } // TODO(https://crbug.com/953978): Use GetNativeTheme() for all platforms. #if defined(OS_MACOSX) || defined(OS_WIN) -@@ -1174,10 +1180,16 @@ void Widget::OnNativeWidgetDestroyed() { +@@ -1177,10 +1183,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -376,7 +377,7 @@ index 3e4c62c49f07..778c984b59b3 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 4d622c392db3..a610bff37782 100644 +index 014cac16b0a8..53e5cc3242a6 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -284,6 +284,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -389,10 +390,10 @@ index 4d622c392db3..a610bff37782 100644 // the NativeWidget may specify a default size. If the parent is specified, // |bounds| is in the parent's coordinate system. If the parent is not diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h -index e71776db8db7..783bf1f45bdb 100644 +index 3388f25d16bd..5484e03183d0 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h -@@ -191,6 +191,10 @@ class VIEWS_EXPORT WidgetDelegate { +@@ -194,6 +194,10 @@ class VIEWS_EXPORT WidgetDelegate { // be cycled through with keyboard focus. virtual void GetAccessiblePanes(std::vector* panes) {} @@ -404,10 +405,10 @@ index e71776db8db7..783bf1f45bdb 100644 virtual ~WidgetDelegate(); diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc -index 9edfa2c00c4b..8a9217578609 100644 +index e26193bb021a..7eb823b92d7d 100644 --- ui/views/widget/widget_hwnd_utils.cc +++ ui/views/widget/widget_hwnd_utils.cc -@@ -66,7 +66,7 @@ void CalculateWindowStylesFromInitParams( +@@ -67,7 +67,7 @@ void CalculateWindowStylesFromInitParams( if (!widget_delegate->CanResize()) *style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX); if (params.remove_standard_frame) @@ -417,10 +418,10 @@ index 9edfa2c00c4b..8a9217578609 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 67202004ea3a..50e240bdb6c8 100644 +index a4649b867642..79b9873ef5b6 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -2972,10 +2972,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3053,10 +3053,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. @@ -437,4 +438,4 @@ index 67202004ea3a..50e240bdb6c8 100644 + } } - // There are cases where the code handling the message destroys the window, + // Suppress |ET_MOUSE_MOVED| and |ET_MOUSE_DRAGGED| events from WM_MOUSE* diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index 9e7508947..73d20970d 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -1,5 +1,5 @@ diff --git components/viz/host/host_display_client.cc components/viz/host/host_display_client.cc -index f5e18df4e06e..58a8e8ef125b 100644 +index 0108c8926630..dc2aff882c72 100644 --- components/viz/host/host_display_client.cc +++ components/viz/host/host_display_client.cc @@ -46,9 +46,14 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( @@ -13,23 +13,23 @@ index f5e18df4e06e..58a8e8ef125b 100644 +} + void HostDisplayClient::CreateLayeredWindowUpdater( - mojom::LayeredWindowUpdaterRequest request) { -+#if OS_WIN + mojo::PendingReceiver receiver) { ++#if defined(OS_WIN) if (!NeedsToUseLayerWindow(widget_)) { DLOG(ERROR) << "HWND shouldn't be using a layered window"; return; @@ -56,8 +61,8 @@ void HostDisplayClient::CreateLayeredWindowUpdater( layered_window_updater_ = - std::make_unique(widget_, std::move(request)); + std::make_unique(widget_, std::move(receiver)); -} #endif +} - #if defined(USE_X11) + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) { diff --git components/viz/host/host_display_client.h components/viz/host/host_display_client.h -index b8177277ebca..955e5a146be5 100644 +index af01fab0ac13..b1ed612ddb0f 100644 --- components/viz/host/host_display_client.h +++ components/viz/host/host_display_client.h @@ -30,17 +30,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { @@ -48,16 +48,16 @@ index b8177277ebca..955e5a146be5 100644 -#if defined(OS_WIN) void CreateLayeredWindowUpdater( - mojom::LayeredWindowUpdaterRequest request) override; + mojo::PendingReceiver receiver) override; -#endif - #if defined(USE_X11) + #if defined(OS_LINUX) && !defined(OS_CHROMEOS) void DidCompleteSwapWithNewSize(const gfx::Size& size) override; diff --git components/viz/host/layered_window_updater_impl.cc components/viz/host/layered_window_updater_impl.cc -index 65c26e2f7ae8..e0f60e2ac25e 100644 +index b04f654fe820..131977a36591 100644 --- components/viz/host/layered_window_updater_impl.cc +++ components/viz/host/layered_window_updater_impl.cc -@@ -43,7 +43,7 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory( +@@ -44,7 +44,7 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory( // |region|'s handle will close when it goes out of scope. } @@ -67,10 +67,10 @@ index 65c26e2f7ae8..e0f60e2ac25e 100644 if (!canvas_) { diff --git components/viz/host/layered_window_updater_impl.h components/viz/host/layered_window_updater_impl.h -index ced30727ab67..f422786fe6cd 100644 +index 1026b739d283..fe562ab60ce9 100644 --- components/viz/host/layered_window_updater_impl.h +++ components/viz/host/layered_window_updater_impl.h -@@ -33,7 +33,7 @@ class VIZ_HOST_EXPORT LayeredWindowUpdaterImpl +@@ -35,7 +35,7 @@ class VIZ_HOST_EXPORT LayeredWindowUpdaterImpl // mojom::LayeredWindowUpdater implementation. void OnAllocatedSharedMemory(const gfx::Size& pixel_size, base::UnsafeSharedMemoryRegion region) override; @@ -80,7 +80,7 @@ index ced30727ab67..f422786fe6cd 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index a3fc1b3bdc9c..33f2b5206ca2 100644 +index be420915d729..4bb7456d0279 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -13,6 +13,8 @@ config("viz_service_implementation") { @@ -93,7 +93,7 @@ index a3fc1b3bdc9c..33f2b5206ca2 100644 "display/bsp_tree.h", "display/bsp_walk_action.cc", diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index e3c8e9dbca69..5ee6f60584d1 100644 +index e17b24a8b87b..b408b6a262a5 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -12,6 +12,7 @@ @@ -126,10 +126,10 @@ index e3c8e9dbca69..5ee6f60584d1 100644 return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); diff --git components/viz/service/display_embedder/software_output_device_win.cc components/viz/service/display_embedder/software_output_device_win.cc -index 74316edc0e0b..14c9339027a2 100644 +index bb07c338fac5..60441480f981 100644 --- components/viz/service/display_embedder/software_output_device_win.cc +++ components/viz/service/display_embedder/software_output_device_win.cc -@@ -265,8 +265,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( +@@ -268,8 +268,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( if (!canvas_) return; @@ -142,10 +142,10 @@ index 74316edc0e0b..14c9339027a2 100644 TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h -index f273901017ad..c04e4bcea80f 100644 +index ac94eab98fd0..b89d52a0c869 100644 --- mojo/public/cpp/bindings/sync_call_restrictions.h +++ mojo/public/cpp/bindings/sync_call_restrictions.h -@@ -33,6 +33,7 @@ class HostContextFactoryPrivate; +@@ -29,6 +29,7 @@ class HostContextFactoryPrivate; namespace viz { class HostFrameSinkManager; @@ -153,7 +153,7 @@ index f273901017ad..c04e4bcea80f 100644 } namespace mojo { -@@ -88,6 +89,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { +@@ -82,6 +83,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { // For preventing frame swaps of wrong size during resize on Windows. // (https://crbug.com/811945) friend class ui::HostContextFactoryPrivate; @@ -163,7 +163,7 @@ index f273901017ad..c04e4bcea80f 100644 #if ENABLE_SYNC_CALL_RESTRICTIONS diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom -index 5c6292cfb3b8..c85a4c8991de 100644 +index 1e456c111b83..d345914271f9 100644 --- services/viz/privileged/mojom/compositing/display_private.mojom +++ services/viz/privileged/mojom/compositing/display_private.mojom @@ -79,12 +79,14 @@ interface DisplayPrivate { @@ -179,7 +179,7 @@ index 5c6292cfb3b8..c85a4c8991de 100644 // Creates a LayeredWindowUpdater implementation to draw into a layered // window. - [EnableIf=is_win] - CreateLayeredWindowUpdater(LayeredWindowUpdater& layered_window_updater); + CreateLayeredWindowUpdater(pending_receiver receiver); // Notifies that a swap has occurred and provides information about the pixel diff --git services/viz/privileged/mojom/compositing/layered_window_updater.mojom services/viz/privileged/mojom/compositing/layered_window_updater.mojom @@ -194,7 +194,7 @@ index 6b7fbb6cf13d..e2af75168cb9 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index ff4562c024be..9e964381f904 100644 +index 17b9c783da91..5fbd9766a348 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -23,7 +23,9 @@ @@ -207,7 +207,7 @@ index ff4562c024be..9e964381f904 100644 #include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkMatrix44.h" -@@ -194,6 +196,14 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -196,6 +198,14 @@ class COMPOSITOR_EXPORT ContextFactory { virtual bool SyncTokensRequiredForDisplayCompositor() = 0; }; @@ -222,7 +222,7 @@ index ff4562c024be..9e964381f904 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 +243,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -235,6 +245,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -232,7 +232,7 @@ index ff4562c024be..9e964381f904 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 -@@ -450,6 +463,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -454,6 +467,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; @@ -242,11 +242,11 @@ index ff4562c024be..9e964381f904 100644 Layer* root_layer_ = nullptr; diff --git ui/compositor/host/host_context_factory_private.cc ui/compositor/host/host_context_factory_private.cc -index d32c154b965b..b5ba8426670f 100644 +index ce20a9bbd8f4..4cedc41cbe22 100644 --- ui/compositor/host/host_context_factory_private.cc +++ ui/compositor/host/host_context_factory_private.cc -@@ -98,8 +98,13 @@ void HostContextFactoryPrivate::ConfigureCompositor( - mojo::MakeRequest(&root_params->compositor_frame_sink_client); +@@ -113,8 +113,13 @@ void HostContextFactoryPrivate::ConfigureCompositor( + .InitWithNewPipeAndPassReceiver(); root_params->display_private = mojo::MakeRequest(&compositor_data.display_private); - compositor_data.display_client = diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index ae0b524c3..ca4a043cc 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 a4e4a612d82c..3bf880312d5e 100644 +index 812cfe34f691..308fde5e82d6 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2137,21 +2137,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2156,21 +2156,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -45,9 +45,9 @@ index a4e4a612d82c..3bf880312d5e 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2852,6 +2861,15 @@ void WebContentsImpl::CreateNewWindow( - create_params.renderer_initiated_creation = - main_frame_route_id != MSG_ROUTING_NONE; +@@ -2871,6 +2880,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( + // objects. + create_params.renderer_initiated_creation = !is_new_browsing_instance; + if (delegate_) { + delegate_->GetCustomWebContentsView(this, @@ -58,10 +58,10 @@ index a4e4a612d82c..3bf880312d5e 100644 + &create_params.delegate_view); + } + - std::unique_ptr new_contents; - if (!is_guest) { - create_params.context = view_->GetNativeView(); -@@ -2884,7 +2902,7 @@ void WebContentsImpl::CreateNewWindow( + // If |is_new_browsing_instance| is true, defer routing_id allocation + // to the WebContentsImpl::Create() call. This is required because with + // a new browsing instance, WebContentsImpl::Create() may elect a different +@@ -2916,7 +2934,7 @@ RenderFrameHostDelegate* 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. RenderWidgetHostView* widget_view = new_view->CreateViewForWidget( @@ -70,35 +70,33 @@ index a4e4a612d82c..3bf880312d5e 100644 if (!renderer_started_hidden) { // RenderWidgets for frames always initialize as hidden. If the renderer // created this window as visible, then we show it here. -@@ -6544,7 +6562,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -6599,7 +6617,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = - view_->CreateViewForWidget(render_view_host->GetWidget(), false); + view_->CreateViewForWidget(render_view_host->GetWidget(), nullptr); + rwh_view->SetSize(GetSizeForNewRenderView(true)); + } - // Now that the RenderView has been created, we need to tell it its size. - if (rwh_view) diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc -index df508da0aef2..f6f4bf42b108 100644 +index 2e133afb8da8..e9a88a6bb96b 100644 --- content/public/browser/web_contents.cc +++ content/public/browser/web_contents.cc -@@ -30,7 +30,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context, - context(nullptr), +@@ -31,6 +31,8 @@ WebContents::CreateParams::CreateParams(BrowserContext* context, renderer_initiated_creation(false), desired_renderer_state(kOkayToHaveRendererProcess), -- starting_sandbox_flags(blink::WebSandboxFlags::kNone) {} -+ starting_sandbox_flags(blink::WebSandboxFlags::kNone), + starting_sandbox_flags(blink::WebSandboxFlags::kNone), + view(nullptr), -+ delegate_view(nullptr) {} ++ delegate_view(nullptr), + is_never_visible(false) {} WebContents::CreateParams::CreateParams(const CreateParams& other) = default; - diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index b5ff1cc5d6f6..f1a2ba836ea1 100644 +index 075dd2545430..53b4cfb790c8 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -78,9 +78,11 @@ class BrowserPluginGuestDelegate; +@@ -79,9 +79,11 @@ class BrowserPluginGuestDelegate; class InterstitialPage; class RenderFrameHost; class RenderViewHost; @@ -110,7 +108,7 @@ index b5ff1cc5d6f6..f1a2ba836ea1 100644 struct CustomContextMenuContext; struct DropData; struct MHTMLGenerationParams; -@@ -219,6 +221,10 @@ class WebContents : public PageNavigator, +@@ -217,6 +219,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. blink::WebSandboxFlags starting_sandbox_flags; @@ -122,13 +120,13 @@ index b5ff1cc5d6f6..f1a2ba836ea1 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 70afb5357631..d78b15c3a83b 100644 +index dedaf25af5ba..4133b980bebb 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h -@@ -58,10 +58,12 @@ class FileSelectListener; +@@ -57,10 +57,12 @@ class ColorChooser; + class FileSelectListener; class JavaScriptDialogManager; class RenderFrameHost; - class RenderProcessHost; +class RenderViewHostDelegateView; class RenderWidgetHost; class SessionStorageNamespace; @@ -138,7 +136,7 @@ index 70afb5357631..d78b15c3a83b 100644 struct ContextMenuParams; struct DropData; struct NativeWebKeyboardEvent; -@@ -333,6 +335,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -327,6 +329,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); diff --git a/patch/patches/web_url_loader_cancel_1617042.patch b/patch/patches/web_url_loader_cancel_1617042.patch index d56554751..42c6bbde5 100644 --- a/patch/patches/web_url_loader_cancel_1617042.patch +++ b/patch/patches/web_url_loader_cancel_1617042.patch @@ -1,8 +1,8 @@ diff --git content/renderer/loader/web_url_loader_impl.h content/renderer/loader/web_url_loader_impl.h -index c5b971593d0d..760d5841434e 100644 +index 837447e61b87..3df0297ed7f8 100644 --- content/renderer/loader/web_url_loader_impl.h +++ content/renderer/loader/web_url_loader_impl.h -@@ -83,6 +83,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { +@@ -85,6 +85,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { blink::WebBlobInfo& downloaded_blob) override; void LoadAsynchronously(const blink::WebURLRequest& request, blink::WebURLLoaderClient* client) override; @@ -10,7 +10,7 @@ index c5b971593d0d..760d5841434e 100644 void SetDefersLoading(bool value) override; void DidChangePriority(blink::WebURLRequest::Priority new_priority, int intra_priority_value) override; -@@ -93,8 +94,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { +@@ -95,8 +96,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader { class RequestPeerImpl; class SinkPeer; @@ -20,10 +20,10 @@ index c5b971593d0d..760d5841434e 100644 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); diff --git third_party/blink/public/platform/web_url_loader.h third_party/blink/public/platform/web_url_loader.h -index 7bb0b6bf25dc..d0b6bf5a887b 100644 +index 17d09c8f7466..8fe463d0e977 100644 --- third_party/blink/public/platform/web_url_loader.h +++ third_party/blink/public/platform/web_url_loader.h -@@ -71,6 +71,10 @@ class WebURLLoader { +@@ -75,6 +75,10 @@ class WebURLLoader { virtual void LoadAsynchronously(const WebURLRequest&, WebURLLoaderClient*) = 0; diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 08bd6d333..5fdb95955 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,10 +10,10 @@ index ff7a8ed89e94..77f44956ff22 100644 + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array plugins); }; diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 68051e35252c..bda59d747a62 100644 +index e88219cb6640..05ae796f0c61 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -731,6 +731,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -722,6 +722,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -44,10 +44,10 @@ index 80a9ec9bc75b..13cbb056cdfa 100644 .Top() .GetSecurityContext() diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index 52f56794f2ed..9bbef168e262 100644 +index 04ff984896d9..d78549ad7a10 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1236,7 +1236,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -1173,7 +1173,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -57,7 +57,7 @@ index 52f56794f2ed..9bbef168e262 100644 } diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 3f0763384089..6919c6f0b2b8 100644 +index 8cf28b8645e3..080d23815225 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc @@ -9,6 +9,7 @@ @@ -68,7 +68,7 @@ index 3f0763384089..6919c6f0b2b8 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -188,6 +189,7 @@ DevToolsSession::DevToolsSession( +@@ -176,6 +177,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -76,7 +76,7 @@ index 3f0763384089..6919c6f0b2b8 100644 } DevToolsSession::~DevToolsSession() { -@@ -227,6 +229,7 @@ void DevToolsSession::Detach() { +@@ -216,6 +218,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); @@ -85,20 +85,20 @@ index 3f0763384089..6919c6f0b2b8 100644 void DevToolsSession::FlushProtocolNotifications() { diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index 5b2c09a61111..858725e57438 100644 +index c5a1faaedad1..571de019852f 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -183,7 +183,8 @@ Page::Page(PageClients& page_clients) +@@ -192,7 +192,8 @@ Page::Page(PageClients& page_clients) MakeGarbageCollected(GetVisualViewport(), GetChromeClient())), - link_highlights_(MakeGarbageCollected(*this)), + link_highlight_(MakeGarbageCollected(*this)), - plugin_data_(nullptr), + plugin_data_main_frame_(nullptr), + plugin_data_sub_frame_(nullptr), // TODO(pdr): Initialize |validation_message_client_| lazily. validation_message_client_( MakeGarbageCollected(*this)), -@@ -343,21 +344,40 @@ void Page::InitialStyleChanged() { +@@ -355,21 +356,40 @@ void Page::InitialStyleChanged() { } } @@ -148,21 +148,21 @@ index 5b2c09a61111..858725e57438 100644 page->NotifyPluginsChanged(); } } -@@ -830,7 +850,8 @@ void Page::Trace(blink::Visitor* visitor) { - visitor->Trace(link_highlights_); +@@ -835,7 +855,8 @@ void Page::Trace(blink::Visitor* visitor) { + visitor->Trace(link_highlight_); visitor->Trace(spatial_navigation_controller_); visitor->Trace(main_frame_); - visitor->Trace(plugin_data_); + visitor->Trace(plugin_data_main_frame_); + visitor->Trace(plugin_data_sub_frame_); visitor->Trace(validation_message_client_); + visitor->Trace(agent_metrics_collector_); 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 9f70ee045546..aad92d9e2e90 100644 +index e4a4c36701f8..ddbce3d9bc53 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h -@@ -140,7 +140,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, +@@ -142,7 +142,8 @@ class CORE_EXPORT Page final : public GarbageCollected, ViewportDescription GetViewportDescription() const; // Returns the plugin data associated with |main_frame_origin|. @@ -172,8 +172,8 @@ index 9f70ee045546..aad92d9e2e90 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -371,7 +372,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, - const Member link_highlights_; +@@ -383,7 +384,8 @@ class CORE_EXPORT Page final : public GarbageCollected, + const Member link_highlight_; Member spatial_navigation_controller_; - Member plugin_data_; @@ -211,10 +211,10 @@ index 7ea0e09e47a0..69a5c8f8e3d5 100644 auto* plugin_info = MakeGarbageCollected( plugin->name, FilePathToWebString(plugin->filename), diff --git third_party/blink/renderer/core/page/plugin_data.h third_party/blink/renderer/core/page/plugin_data.h -index 7ca6da99d9a3..2f0dedba19ff 100644 +index efd11fb5b5e3..5b985cea38fe 100644 --- third_party/blink/renderer/core/page/plugin_data.h +++ third_party/blink/renderer/core/page/plugin_data.h -@@ -100,7 +100,8 @@ class CORE_EXPORT PluginData final +@@ -97,7 +97,8 @@ class CORE_EXPORT PluginData final : public GarbageCollected { const HeapVector>& Plugins() const { return plugins_; } const HeapVector>& Mimes() const { return mimes_; } const SecurityOrigin* Origin() const { return main_frame_origin_.get(); } diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index 4c9e782d5..b2605bf74 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 152866713e16..89bca464b90b 100644 +index 6baf318132e5..e53333d7c407 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc @@ -312,7 +312,7 @@ void PointerEventManager::HandlePointerInterruption( diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index b3dc8efe6..4e0a9493a 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 db7d7c87686a..a7c6beb6a6f1 100644 +index bd279e31c8bb..b0c12e6abf04 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -366,6 +366,7 @@ class WebView { +@@ -362,6 +362,7 @@ class WebView { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -11,10 +11,10 @@ index db7d7c87686a..a7c6beb6a6f1 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 58e4fbcf6ee2..51f2645e6154 100644 +index 16a8951a293c..22e858c80b21 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -219,8 +219,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -218,8 +218,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -30,19 +30,19 @@ index 58e4fbcf6ee2..51f2645e6154 100644 } namespace { -@@ -278,6 +283,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -277,6 +282,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, chrome_client_(MakeGarbageCollected(this)), - minimum_zoom_level_(ZoomFactorToZoomLevel(kMinTextSizeMultiplier)), - maximum_zoom_level_(ZoomFactorToZoomLevel(kMaxTextSizeMultiplier)), + minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), + maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), + should_use_external_popup_menus_(g_should_use_external_popup_menus), does_composite_(does_composite), fullscreen_controller_(std::make_unique(this)) { if (!AsView().client) { diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 61d54c30b50c..d08ad65454ac 100644 +index e3f37ec7c3d3..4cf94b0b6d80 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -115,7 +115,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -116,7 +116,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). @@ -62,10 +62,10 @@ index 61d54c30b50c..d08ad65454ac 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 6d90e9c8e0be..b9e56a2f48e5 100644 +index ce971d889321..09af3385174f 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -856,7 +856,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -868,7 +868,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index 3dad061ac..f90c9cfc5 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index ab59df1d9b16..d8a853bd110c 100644 +index 2d4001283821..2daa4dfae045 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -@@ -21,6 +21,7 @@ +@@ -27,6 +27,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/common/channel_info.h" @@ -10,7 +10,7 @@ index ab59df1d9b16..d8a853bd110c 100644 #include "components/prefs/pref_service.h" #include "components/sync/driver/about_sync_util.h" #include "components/sync/driver/sync_service.h" -@@ -269,6 +270,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { +@@ -318,6 +319,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { } void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) { @@ -21,7 +21,7 @@ index ab59df1d9b16..d8a853bd110c 100644 // We are only interested in sync logs for the primary user profile. Profile* profile = ProfileManager::GetPrimaryUserProfile(); if (!profile || !ProfileSyncServiceFactory::HasSyncService(profile)) -@@ -311,6 +316,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( +@@ -360,6 +365,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; @@ -34,7 +34,7 @@ index ab59df1d9b16..d8a853bd110c 100644 extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry::Get(profile); std::string extensions_list; -@@ -389,6 +400,8 @@ void ChromeInternalLogSource::PopulateLocalStateSettings( +@@ -438,6 +449,8 @@ void ChromeInternalLogSource::PopulateLocalStateSettings( #if defined(OS_WIN) void ChromeInternalLogSource::PopulateUsbKeyboardDetected( SystemLogsResponse* response) { @@ -42,7 +42,7 @@ index ab59df1d9b16..d8a853bd110c 100644 + base::ScopedAllowBlockingForTesting allow_blocking; std::string reason; bool result = - base::win::IsKeyboardPresentOnSlate(&reason, ui::GetHiddenWindow()); + base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc index 8a32ddd423c1..34abc57cc3a2 100644 --- chrome/browser/memory_details.cc diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index 5a9940a13..c34e17a38 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 7ba7a4d37f83..b2ca5edc150c 100644 +index fbbadfa2ff7a..c62913a5cf07 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4732,7 +4732,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4775,7 +4775,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/patch/patches/win_rt_2274.patch b/patch/patches/win_rt_2274.patch index f28694691..aa648d034 100644 --- a/patch/patches/win_rt_2274.patch +++ b/patch/patches/win_rt_2274.patch @@ -1,8 +1,8 @@ diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc -index 5c915f75f985..f8ec8a81ce44 100644 +index 7fca3e218b4e..fc1b03056caa 100644 --- services/service_manager/sandbox/win/sandbox_win.cc +++ services/service_manager/sandbox/win/sandbox_win.cc -@@ -927,8 +927,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( +@@ -929,8 +929,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( } // TODO(wfh): Relax strict handle checks for network process until root cause // for this crash can be resolved. See https://crbug.com/939590. diff --git a/tests/ceftests/message_router_unittest.cc b/tests/ceftests/message_router_unittest.cc index f51950d4e..a46e0a697 100644 --- a/tests/ceftests/message_router_unittest.cc +++ b/tests/ceftests/message_router_unittest.cc @@ -196,7 +196,7 @@ class MRTestHandler : public TestHandler { RunMRTest(); // Time out the test after a reasonable period of time. - SetTestTimeout(); + SetTestTimeout(10000); } void OnAfterCreated(CefRefPtr browser) override { diff --git a/tests/ceftests/os_rendering_unittest.cc b/tests/ceftests/os_rendering_unittest.cc index cae194386..87383ecbd 100644 --- a/tests/ceftests/os_rendering_unittest.cc +++ b/tests/ceftests/os_rendering_unittest.cc @@ -785,13 +785,13 @@ class OSRTestHandler : public RoutingTestHandler, EXPECT_GT(dirtyRects[0].height, kExpandedSelectRect.height); } - // first pixel of border + // Unselected option background color is cyan. + // Go down 100 pixels to skip the selected option and over 5 pixels to + // avoid hitting the border. + const uint32 offset = dirtyRects[0].width * 100 + 5; + EXPECT_EQ(0xff00ffff, + *(reinterpret_cast(buffer) + offset)); -#if defined(OS_MACOSX) - EXPECT_EQ(0xff3979d1U, *(reinterpret_cast(buffer))); -#else - EXPECT_EQ(0xff6497eaU, *(reinterpret_cast(buffer))); -#endif if (ExpectComputedPopupSize()) { EXPECT_EQ(expanded_select_rect.width, width); EXPECT_EQ(expanded_select_rect.height, height); diff --git a/tests/shared/resources/osr_test.html b/tests/shared/resources/osr_test.html index 2af4f4c78..a91c58506 100644 --- a/tests/shared/resources/osr_test.html +++ b/tests/shared/resources/osr_test.html @@ -6,6 +6,7 @@ body {background:rgba(255, 0, 0, 0.5); } input {-webkit-appearance: none; } #LI11select {width: 75px;} + #LI11select option { background-color: cyan; } .dropdiv { width:50px; height:50px;