diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index b1780a257..cea83ebc5 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/71.0.3567.0', + 'chromium_checkout': 'refs/tags/71.0.3578.0', } diff --git a/libcef/browser/browser_context_keyed_service_factories.cc b/libcef/browser/browser_context_keyed_service_factories.cc index 6c9ff7dd4..e166113db 100644 --- a/libcef/browser/browser_context_keyed_service_factories.cc +++ b/libcef/browser/browser_context_keyed_service_factories.cc @@ -6,7 +6,6 @@ #include "libcef/common/extensions/extensions_util.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" -#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" #include "chrome/browser/plugins/plugin_prefs_factory.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/themes/theme_service_factory.h" @@ -28,7 +27,6 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() { extensions::AlarmManager::GetFactoryInstance(); extensions::RendererStartupHelperFactory::GetInstance(); extensions::StorageFrontend::GetFactoryInstance(); - extensions::StreamsPrivateAPI::GetFactoryInstance(); } } diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 016802e87..41edb0d89 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -54,6 +54,7 @@ #include "content/public/browser/desktop_media_id.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/download_request_utils.h" +#include "content/public/browser/file_select_listener.h" #include "content/public/browser/host_zoom_map.h" #include "content/public/browser/keyboard_event_processing_result.h" #include "content/public/browser/native_web_keyboard_event.h" @@ -2566,9 +2567,10 @@ CefBrowserHostImpl::GetJavaScriptDialogManager(content::WebContents* source) { void CefBrowserHostImpl::RunFileChooser( content::RenderFrameHost* render_frame_host, + std::unique_ptr listener, const blink::mojom::FileChooserParams& params) { EnsureFileDialogManager(); - file_dialog_manager_->RunFileChooser(render_frame_host, params); + file_dialog_manager_->RunFileChooser(std::move(listener), params); } bool CefBrowserHostImpl::HandleContextMenu( @@ -2869,6 +2871,17 @@ void CefBrowserHostImpl::DidFinishNavigation( } } +void CefBrowserHostImpl::DidStopLoading() { + // Notify the renderer that loading has stopped. We used to use + // RenderFrameObserver::DidStopLoading which was removed in + // https://crrev.com/3e37dd0ead. However, that callback wasn't necessarily + // accurate because it wasn't called in all of the cases where + // RenderFrameImpl sends the FrameHostMsg_DidStopLoading message. This adds + // an additional round trip but should provide the same or improved + // functionality. + Send(new CefMsg_DidStopLoading(MSG_ROUTING_NONE)); +} + void CefBrowserHostImpl::DocumentAvailableInMainFrame() { base::AutoLock lock_scope(state_lock_); has_document_ = true; diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index e0dc160fb..2c03f570f 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -451,6 +451,7 @@ class CefBrowserHostImpl : public CefBrowserHost, content::JavaScriptDialogManager* GetJavaScriptDialogManager( content::WebContents* source) override; void RunFileChooser(content::RenderFrameHost* render_frame_host, + std::unique_ptr listener, const blink::mojom::FileChooserParams& params) override; bool EmbedsFullscreenWidget() const override; void EnterFullscreenModeForTab( @@ -493,6 +494,7 @@ class CefBrowserHostImpl : public CefBrowserHost, void RenderProcessGone(base::TerminationStatus status) override; void DidFinishNavigation( content::NavigationHandle* navigation_handle) override; + void DidStopLoading() override; void DocumentAvailableInMainFrame() override; void DidFailLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url, diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 28061fe6a..483ce305f 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -14,6 +14,7 @@ #include "chrome/browser/net/chrome_net_log_helper.h" #include "chrome/browser/printing/print_job_manager.h" #include "components/net_log/chrome_net_log.h" +#include "components/net_log/net_export_file_writer.h" #include "content/public/common/content_switches.h" #include "services/network/public/cpp/network_switches.h" #include "services/network/public/cpp/shared_url_loader_factory.h" @@ -111,6 +112,14 @@ ChromeBrowserProcessStub::system_network_context_manager() { return NULL; } +net_log::NetExportFileWriter* +ChromeBrowserProcessStub::net_export_file_writer() { + if (!net_export_file_writer_) { + net_export_file_writer_ = std::make_unique(); + } + return net_export_file_writer_.get(); +} + network::NetworkQualityTracker* ChromeBrowserProcessStub::network_quality_tracker() { NOTREACHED(); diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index a7bb3272e..9d0b03a42 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -49,6 +49,7 @@ class ChromeBrowserProcessStub : public BrowserProcess, rappor::RapporServiceImpl* rappor_service() override; IOThread* io_thread() override; SystemNetworkContextManager* system_network_context_manager() override; + net_log::NetExportFileWriter* net_export_file_writer() override; network::NetworkQualityTracker* network_quality_tracker() override; WatchDogThread* watchdog_thread() override; ProfileManager* profile_manager() override; @@ -122,6 +123,7 @@ class ChromeBrowserProcessStub : public BrowserProcess, std::unique_ptr profile_manager_; scoped_refptr event_router_forwarder_; std::unique_ptr net_log_; + std::unique_ptr net_export_file_writer_; DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProcessStub); }; diff --git a/libcef/browser/extensions/chrome_api_registration.cc b/libcef/browser/extensions/chrome_api_registration.cc index fe48e529f..c08281804 100644 --- a/libcef/browser/extensions/chrome_api_registration.cc +++ b/libcef/browser/extensions/chrome_api_registration.cc @@ -13,7 +13,6 @@ #include "chrome/browser/extensions/api/content_settings/content_settings_api.h" #include "chrome/browser/extensions/api/resources_private/resources_private_api.h" -#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" #include "extensions/browser/api/alarms/alarms_api.h" #include "extensions/browser/api/storage/storage_api.h" #include "extensions/browser/extension_function_registry.h" @@ -31,8 +30,6 @@ namespace cefimpl = extensions::cef; const char* const kSupportedAPIs[] = { "resourcesPrivate", EXTENSION_FUNCTION_NAME(ResourcesPrivateGetStringsFunction), - "streamsPrivate", - EXTENSION_FUNCTION_NAME(StreamsPrivateAbortFunction), "alarms", EXTENSION_FUNCTION_NAME(AlarmsCreateFunction), EXTENSION_FUNCTION_NAME(AlarmsGetFunction), @@ -77,7 +74,6 @@ bool ChromeFunctionRegistry::IsSupported(const std::string& name) { // static void ChromeFunctionRegistry::RegisterAll(ExtensionFunctionRegistry* registry) { registry->RegisterFunction(); - registry->RegisterFunction(); registry->RegisterFunction(); registry->RegisterFunction(); registry->RegisterFunction(); diff --git a/libcef/browser/extensions/extension_web_contents_observer.cc b/libcef/browser/extensions/extension_web_contents_observer.cc index 5ccd3a6e9..215829b5c 100644 --- a/libcef/browser/extensions/extension_web_contents_observer.cc +++ b/libcef/browser/extensions/extension_web_contents_observer.cc @@ -14,8 +14,7 @@ namespace extensions { CefExtensionWebContentsObserver::CefExtensionWebContentsObserver( content::WebContents* web_contents) : ExtensionWebContentsObserver(web_contents), - script_executor_( - new ScriptExecutor(web_contents, &script_execution_observers_)) {} + script_executor_(new ScriptExecutor(web_contents)) {} CefExtensionWebContentsObserver::~CefExtensionWebContentsObserver() {} diff --git a/libcef/browser/extensions/extension_web_contents_observer.h b/libcef/browser/extensions/extension_web_contents_observer.h index 1f1d2046d..a77c57f4b 100644 --- a/libcef/browser/extensions/extension_web_contents_observer.h +++ b/libcef/browser/extensions/extension_web_contents_observer.h @@ -10,7 +10,6 @@ #include "base/observer_list.h" #include "content/public/browser/web_contents_user_data.h" #include "extensions/browser/extension_web_contents_observer.h" -#include "extensions/browser/script_execution_observer.h" #include "extensions/browser/script_executor.h" namespace extensions { @@ -36,11 +35,6 @@ class CefExtensionWebContentsObserver // content::WebContentsObserver overrides. void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; - // Our content script observers. Declare at top so that it will outlive all - // other members, since they might add themselves as observers. - base::ObserverList::Unchecked - script_execution_observers_; - std::unique_ptr script_executor_; DISALLOW_COPY_AND_ASSIGN(CefExtensionWebContentsObserver); diff --git a/libcef/browser/file_dialog_manager.cc b/libcef/browser/file_dialog_manager.cc index 6f283212a..076d1d14d 100644 --- a/libcef/browser/file_dialog_manager.cc +++ b/libcef/browser/file_dialog_manager.cc @@ -11,6 +11,7 @@ #include "libcef/browser/browser_host_impl.h" #include "libcef/browser/thread_util.h" +#include "content/public/browser/file_select_listener.h" #include "content/public/browser/render_frame_host.h" #include "content/public/common/file_chooser_file_info.h" #include "net/base/directory_lister.h" @@ -146,14 +147,10 @@ class UploadFolderHelper CefFileDialogManager::CefFileDialogManager( CefBrowserHostImpl* browser, std::unique_ptr runner) - : content::WebContentsObserver(browser->web_contents()), - browser_(browser), + : browser_(browser), runner_(std::move(runner)), file_chooser_pending_(false), - render_frame_host_(nullptr), - weak_ptr_factory_(this) { - DCHECK(web_contents()); -} + weak_ptr_factory_(this) {} CefFileDialogManager::~CefFileDialogManager() {} @@ -209,10 +206,9 @@ void CefFileDialogManager::RunFileDialog( } void CefFileDialogManager::RunFileChooser( - content::RenderFrameHost* render_frame_host, + std::unique_ptr listener, const blink::mojom::FileChooserParams& params) { CEF_REQUIRE_UIT(); - DCHECK(render_frame_host); CefFileDialogRunner::FileChooserParams cef_params; static_cast(cef_params) = params; @@ -221,14 +217,16 @@ void CefFileDialogManager::RunFileChooser( if (params.mode == blink::mojom::FileChooserParams::Mode::kUploadFolder) { callback = base::Bind( &CefFileDialogManager::OnRunFileChooserUploadFolderDelegateCallback, - weak_ptr_factory_.GetWeakPtr(), params.mode); + weak_ptr_factory_.GetWeakPtr(), params.mode, + base::Passed(std::move(listener))); } else { callback = base::Bind(&CefFileDialogManager::OnRunFileChooserDelegateCallback, - weak_ptr_factory_.GetWeakPtr(), params.mode); + weak_ptr_factory_.GetWeakPtr(), params.mode, + base::Passed(std::move(listener))); } - RunFileChooserInternal(render_frame_host, cef_params, callback); + RunFileChooserInternal(cef_params, callback); } void CefFileDialogManager::RunFileChooser( @@ -237,11 +235,10 @@ void CefFileDialogManager::RunFileChooser( const CefFileDialogRunner::RunFileChooserCallback& host_callback = base::Bind(&CefFileDialogManager::OnRunFileChooserCallback, weak_ptr_factory_.GetWeakPtr(), callback); - RunFileChooserInternal(nullptr, params, host_callback); + RunFileChooserInternal(params, host_callback); } void CefFileDialogManager::RunFileChooserInternal( - content::RenderFrameHost* render_frame_host, const CefFileDialogRunner::FileChooserParams& params, const CefFileDialogRunner::RunFileChooserCallback& callback) { CEF_REQUIRE_UIT(); @@ -253,7 +250,6 @@ void CefFileDialogManager::RunFileChooserInternal( } file_chooser_pending_ = true; - render_frame_host_ = render_frame_host; bool handled = false; @@ -335,6 +331,7 @@ void CefFileDialogManager::OnRunFileChooserCallback( void CefFileDialogManager::OnRunFileChooserUploadFolderDelegateCallback( const blink::mojom::FileChooserParams::Mode mode, + std::unique_ptr listener, int selected_accept_filter, const std::vector& file_paths) { CEF_REQUIRE_UIT(); @@ -342,19 +339,22 @@ void CefFileDialogManager::OnRunFileChooserUploadFolderDelegateCallback( if (file_paths.size() == 0) { // Client canceled the file chooser. - OnRunFileChooserDelegateCallback(mode, selected_accept_filter, file_paths); + OnRunFileChooserDelegateCallback(mode, std::move(listener), + selected_accept_filter, file_paths); } else { lister_.reset(new net::DirectoryLister( file_paths[0], net::DirectoryLister::NO_SORT_RECURSIVE, new UploadFolderHelper( base::Bind(&CefFileDialogManager::OnRunFileChooserDelegateCallback, - weak_ptr_factory_.GetWeakPtr(), mode)))); + weak_ptr_factory_.GetWeakPtr(), mode, + base::Passed(std::move(listener)))))); lister_->Start(); } } void CefFileDialogManager::OnRunFileChooserDelegateCallback( blink::mojom::FileChooserParams::Mode mode, + std::unique_ptr listener, int selected_accept_filter, const std::vector& file_paths) { CEF_REQUIRE_UIT(); @@ -367,9 +367,7 @@ void CefFileDialogManager::OnRunFileChooserDelegateCallback( selected_files.push_back(std::move(info)); } - // Notify our RenderViewHost in all cases. - if (render_frame_host_) - render_frame_host_->FilesSelectedInChooser(selected_files, mode); + listener->FileSelected(std::move(selected_files), mode); Cleanup(); } @@ -378,12 +376,5 @@ void CefFileDialogManager::Cleanup() { if (lister_) lister_.reset(); - render_frame_host_ = nullptr; file_chooser_pending_ = false; } - -void CefFileDialogManager::RenderFrameDeleted( - content::RenderFrameHost* render_frame_host) { - if (render_frame_host == render_frame_host_) - render_frame_host_ = nullptr; -} diff --git a/libcef/browser/file_dialog_manager.h b/libcef/browser/file_dialog_manager.h index 45ed16ffc..55737787f 100644 --- a/libcef/browser/file_dialog_manager.h +++ b/libcef/browser/file_dialog_manager.h @@ -15,8 +15,9 @@ #include "content/public/browser/web_contents_observer.h" namespace content { +class FileSelectListener; class WebContents; -} +} // namespace content namespace net { class DirectoryLister; @@ -24,12 +25,12 @@ class DirectoryLister; class CefBrowserHostImpl; -class CefFileDialogManager : public content::WebContentsObserver { +class CefFileDialogManager { public: // |runner| may be NULL if the platform doesn't implement dialogs. CefFileDialogManager(CefBrowserHostImpl* browser, std::unique_ptr runner); - ~CefFileDialogManager() override; + ~CefFileDialogManager(); // Delete the runner to free any platform constructs. void Destroy(); @@ -45,7 +46,7 @@ class CefFileDialogManager : public content::WebContentsObserver { // Called from CefBrowserHostImpl::RunFileChooser. // See WebContentsDelegate::RunFileChooser documentation. - void RunFileChooser(content::RenderFrameHost* render_frame_host, + void RunFileChooser(std::unique_ptr listener, const blink::mojom::FileChooserParams& params); // Run the file chooser dialog specified by |params|. Only a single dialog may @@ -57,7 +58,6 @@ class CefFileDialogManager : public content::WebContentsObserver { private: void RunFileChooserInternal( - content::RenderFrameHost* render_frame_host, const CefFileDialogRunner::FileChooserParams& params, const CefFileDialogRunner::RunFileChooserCallback& callback); @@ -72,6 +72,7 @@ class CefFileDialogManager : public content::WebContentsObserver { // blink::mojom::FileChooserParams::Mode::kUploadFolder. void OnRunFileChooserUploadFolderDelegateCallback( const blink::mojom::FileChooserParams::Mode mode, + std::unique_ptr listener, int selected_accept_filter, const std::vector& file_paths); @@ -79,15 +80,13 @@ class CefFileDialogManager : public content::WebContentsObserver { // RenderFrameHost. void OnRunFileChooserDelegateCallback( blink::mojom::FileChooserParams::Mode mode, + std::unique_ptr listener, int selected_accept_filter, const std::vector& file_paths); // Clean up state associated with the last run. void Cleanup(); - // WebContentsObserver methods: - void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; - // CefBrowserHostImpl pointer is guaranteed to outlive this object. CefBrowserHostImpl* browser_; @@ -96,9 +95,6 @@ class CefFileDialogManager : public content::WebContentsObserver { // True if a file chooser is currently pending. bool file_chooser_pending_; - // RenderFrameHost associated with the pending file chooser. May be nullptr. - content::RenderFrameHost* render_frame_host_; - // Used for asynchronously listing directory contents. std::unique_ptr lister_; diff --git a/libcef/browser/image_impl.cc b/libcef/browser/image_impl.cc index 391a2fdfb..ad3098a9e 100644 --- a/libcef/browser/image_impl.cc +++ b/libcef/browser/image_impl.cc @@ -200,8 +200,8 @@ bool CefImageImpl::GetRepresentationInfo(float scale_factor, return false; actual_scale_factor = rep.scale(); - pixel_width = rep.sk_bitmap().width(); - pixel_height = rep.sk_bitmap().height(); + pixel_width = rep.GetBitmap().width(); + pixel_height = rep.GetBitmap().height(); return true; } @@ -336,7 +336,7 @@ const SkBitmap* CefImageImpl::GetBitmap(float scale_factor) const { if (rep.is_null()) return nullptr; - return &rep.sk_bitmap(); + return &rep.GetBitmap(); } // static diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 945c0261e..d5949bccf 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -29,6 +29,7 @@ #include "content/browser/compositor/image_transport_factory.h" #include "content/browser/frame_host/render_widget_host_view_guest.h" #include "content/browser/renderer_host/cursor_manager.h" +#include "content/browser/renderer_host/delegated_frame_host.h" #include "content/browser/renderer_host/dip_util.h" #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" @@ -110,6 +111,58 @@ class CefCompositorFrameSinkClient CefRenderWidgetHostViewOSR* const render_widget_host_view_; }; +#if !defined(OS_MACOSX) + +class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient { + public: + explicit CefDelegatedFrameHostClient(CefRenderWidgetHostViewOSR* view) + : view_(view) {} + + ui::Layer* DelegatedFrameHostGetLayer() const override { + return view_->GetRootLayer(); + } + + bool DelegatedFrameHostIsVisible() const override { + // Called indirectly from DelegatedFrameHost::WasShown. + return view_->IsShowing(); + } + + SkColor DelegatedFrameHostGetGutterColor() const override { + // When making an element on the page fullscreen the element's background + // may not match the page's, so use black as the gutter color to avoid + // flashes of brighter colors during the transition. + if (view_->render_widget_host()->delegate() && + view_->render_widget_host()->delegate()->IsFullscreenForCurrentTab()) { + return SK_ColorBLACK; + } + return *view_->GetBackgroundColor(); + } + + void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override { + } + + void OnBeginFrame(base::TimeTicks frame_time) override { + // TODO(cef): Maybe we can use this method in combination with + // OnSetNeedsBeginFrames() instead of using CefBeginFrameTimer. + // See https://codereview.chromium.org/1841083007. + } + + void OnFrameTokenChanged(uint32_t frame_token) override { + view_->render_widget_host()->DidProcessFrame(frame_token); + } + + float GetDeviceScaleFactor() const override { + return view_->GetDeviceScaleFactor(); + } + + private: + CefRenderWidgetHostViewOSR* const view_; + + DISALLOW_COPY_AND_ASSIGN(CefDelegatedFrameHostClient); +}; + +#endif // !defined(OS_MACOSX) + } // namespace // Used for managing copy requests when GPU compositing is enabled. Based on @@ -203,7 +256,7 @@ class CefCopyFrameGenerator { bitmap->getPixels()); } - CefRenderWidgetHostViewOSR* view_; + CefRenderWidgetHostViewOSR* const view_; int frame_retry_count_; base::TimeTicks next_frame_time_; base::TimeDelta frame_duration_; @@ -291,10 +344,12 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( #if !defined(OS_MACOSX) local_surface_id_ = local_surface_id_allocator_.GenerateId(); + delegated_frame_host_client_.reset(new CefDelegatedFrameHostClient(this)); // Matching the attributes from BrowserCompositorMac. delegated_frame_host_ = std::make_unique( - AllocateFrameSinkId(is_guest_view_hack), this, + AllocateFrameSinkId(is_guest_view_hack), + delegated_frame_host_client_.get(), true /* should_register_frame_sink_id */); root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); @@ -1116,43 +1171,6 @@ CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice( return base::WrapUnique(software_output_device_); } -#if !defined(OS_MACOSX) - -ui::Layer* CefRenderWidgetHostViewOSR::DelegatedFrameHostGetLayer() const { - return GetRootLayer(); -} - -bool CefRenderWidgetHostViewOSR::DelegatedFrameHostIsVisible() const { - // Called indirectly from DelegatedFrameHost::WasShown. - return is_showing_; -} - -SkColor CefRenderWidgetHostViewOSR::DelegatedFrameHostGetGutterColor() const { - // When making an element on the page fullscreen the element's background - // may not match the page's, so use black as the gutter color to avoid - // flashes of brighter colors during the transition. - if (render_widget_host_->delegate() && - render_widget_host_->delegate()->IsFullscreenForCurrentTab()) { - return SK_ColorBLACK; - } - return background_color_; -} - -void CefRenderWidgetHostViewOSR::OnFirstSurfaceActivation( - const viz::SurfaceInfo& surface_info) {} - -void CefRenderWidgetHostViewOSR::OnBeginFrame(base::TimeTicks frame_time) { - // TODO(cef): Maybe we can use this method in combination with - // OnSetNeedsBeginFrames() instead of using CefBeginFrameTimer. - // See https://codereview.chromium.org/1841083007. -} - -void CefRenderWidgetHostViewOSR::OnFrameTokenChanged(uint32_t frame_token) { - render_widget_host_->DidProcessFrame(frame_token); -} - -#endif // !defined(OS_MACOSX) - bool CefRenderWidgetHostViewOSR::InstallTransparency() { if (background_color_ == SK_ColorTRANSPARENT) { SetBackgroundColor(background_color_); diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index eb22ca1ff..b6f343041 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -18,7 +18,6 @@ #include "build/build_config.h" #include "components/viz/common/frame_sinks/begin_frame_source.h" #include "components/viz/common/surfaces/parent_local_surface_id_allocator.h" -#include "content/browser/renderer_host/delegated_frame_host.h" #include "content/browser/renderer_host/input/mouse_wheel_phase_handler.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/public/common/widget_type.h" @@ -44,6 +43,8 @@ #endif namespace content { +class DelegatedFrameHost; +class DelegatedFrameHostClient; class RenderWidgetHost; class RenderWidgetHostImpl; class RenderWidgetHostViewGuest; @@ -95,12 +96,7 @@ class MacHelper; class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, public ui::ExternalBeginFrameClient, - public ui::CompositorDelegate -#if !defined(OS_MACOSX) - , - public content::DelegatedFrameHostClient -#endif -{ + public ui::CompositorDelegate { public: CefRenderWidgetHostViewOSR(SkColor background_color, bool use_shared_texture, @@ -213,16 +209,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, std::unique_ptr CreateSoftwareOutputDevice( ui::Compositor* compositor) override; -#if !defined(OS_MACOSX) - // DelegatedFrameHostClient implementation. - ui::Layer* DelegatedFrameHostGetLayer() const override; - bool DelegatedFrameHostIsVisible() const override; - SkColor DelegatedFrameHostGetGutterColor() const override; - void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override; - void OnBeginFrame(base::TimeTicks frame_time) override; - void OnFrameTokenChanged(uint32_t frame_token) override; -#endif // !defined(OS_MACOSX) - bool InstallTransparency(); void SynchronizeVisualProperties(); @@ -349,6 +335,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, std::unique_ptr compositor_; gfx::AcceleratedWidget compositor_widget_; std::unique_ptr delegated_frame_host_; + std::unique_ptr + delegated_frame_host_client_; std::unique_ptr root_layer_; viz::LocalSurfaceId local_surface_id_; viz::ParentLocalSurfaceIdAllocator local_surface_id_allocator_; diff --git a/libcef/browser/resource_dispatcher_host_delegate.cc b/libcef/browser/resource_dispatcher_host_delegate.cc index bba46d7db..46f7fdff9 100644 --- a/libcef/browser/resource_dispatcher_host_delegate.cc +++ b/libcef/browser/resource_dispatcher_host_delegate.cc @@ -101,9 +101,9 @@ void CefResourceDispatcherHostDelegate::OnStreamCreated( FROM_HERE, {content::BrowserThread::UI}, base::BindOnce( &extensions::StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent, - request->GetExpectedContentSize(), ix->second.extension_id, - ix->second.view_id, embedded, info->GetFrameTreeNodeId(), - info->GetChildID(), info->GetRenderFrameID(), std::move(stream), + ix->second.extension_id, ix->second.view_id, embedded, + info->GetFrameTreeNodeId(), info->GetChildID(), + info->GetRenderFrameID(), std::move(stream), nullptr /* transferrable_loader */, GURL())); stream_target_info_.erase(request); } diff --git a/libcef/common/cef_messages.h b/libcef/common/cef_messages.h index dfd11aaaf..f0516114c 100644 --- a/libcef/common/cef_messages.h +++ b/libcef/common/cef_messages.h @@ -147,6 +147,9 @@ IPC_MESSAGE_ROUTED1(CefMsg_Response, Cef_Response_Params) // has been processed. IPC_MESSAGE_ROUTED1(CefMsg_ResponseAck, int /* request_id */) +// Tells the renderer that loading has stopped. +IPC_MESSAGE_ROUTED0(CefMsg_DidStopLoading) + // Tells the render frame to load all blocked plugins with the given identifier. // Based on ChromeViewMsg_LoadBlockedPlugins. IPC_MESSAGE_ROUTED1(CefViewMsg_LoadBlockedPlugins, std::string /* identifier */) diff --git a/libcef/common/extensions/api/README.txt b/libcef/common/extensions/api/README.txt index 04773e532..0fbbc8d37 100644 --- a/libcef/common/extensions/api/README.txt +++ b/libcef/common/extensions/api/README.txt @@ -1,8 +1,8 @@ This directory provides API definitions for CEF. Some extensions are implemented using Mojo and others use an older JSON-based format. - is the name of the API definition (e.g. 'streams_private'). - is the name of the class implementation (e.g. 'StreamsPrivateAPI'). + is the name of the API definition (e.g. 'alarms'). + is the name of the class implementation (e.g. 'AlarmManager'). To add a new extension API implemented only in CEF ***: diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index 9f263b324..7778a7f5f 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -507,7 +507,7 @@ void CefRequestImpl::Get(blink::WebURLRequest& request, int64& upload_data_size) const { base::AutoLock lock_scope(lock_); - request.SetRequestContext(blink::WebURLRequest::kRequestContextInternal); + request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL); request.SetURL(url_); request.SetHTTPMethod(blink::WebString::FromUTF8(method_)); diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index 90f47ade8..2de60193c 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -429,10 +429,6 @@ void CefBrowserImpl::OnDestruct() { CefContentRendererClient::Get()->OnBrowserDestroyed(this); } -void CefBrowserImpl::DidStopLoading() { - OnLoadingStateChange(false); -} - void CefBrowserImpl::DidFinishLoad(blink::WebLocalFrame* frame) { blink::WebDocumentLoader* dl = frame->GetDocumentLoader(); Send(new CefHostMsg_DidFinishLoad(routing_id(), @@ -528,6 +524,7 @@ bool CefBrowserImpl::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(CefMsg_Response, OnResponse) IPC_MESSAGE_HANDLER(CefMsg_ResponseAck, OnResponseAck) IPC_MESSAGE_HANDLER(CefMsg_LoadRequest, LoadRequest) + IPC_MESSAGE_HANDLER(CefMsg_DidStopLoading, OnDidStopLoading) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -659,6 +656,10 @@ void CefBrowserImpl::OnResponseAck(int request_id) { response_manager_->RunAckHandler(request_id); } +void CefBrowserImpl::OnDidStopLoading() { + OnLoadingStateChange(false); +} + void CefBrowserImpl::OnLoadingStateChange(bool isLoading) { CefRefPtr app = CefContentClient::Get()->application(); if (app.get()) { diff --git a/libcef/renderer/browser_impl.h b/libcef/renderer/browser_impl.h index 4277b163e..b99f977c9 100644 --- a/libcef/renderer/browser_impl.h +++ b/libcef/renderer/browser_impl.h @@ -107,7 +107,6 @@ class CefBrowserImpl : public CefBrowser, public content::RenderViewObserver { // RenderViewObserver methods. void OnDestruct() override; - void DidStopLoading() override; void DidFailProvisionalLoad(blink::WebLocalFrame* frame, const blink::WebURLError& error) override; void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, @@ -126,6 +125,7 @@ class CefBrowserImpl : public CefBrowser, public content::RenderViewObserver { void OnRequest(const Cef_Request_Params& params); void OnResponse(const Cef_Response_Params& params); void OnResponseAck(int request_id); + void OnDidStopLoading(); void OnLoadingStateChange(bool isLoading); void OnLoadStart(blink::WebLocalFrame* frame); diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index 4d8688a31..7d27cf9cf 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -45,11 +45,13 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient { unsigned long long totalBytesToBeSent) override; void DidReceiveResponse(const WebURLResponse& response) override; void DidReceiveData(const char* data, int dataLength) override; - void DidFinishLoading(base::TimeTicks finish_time, - int64_t total_encoded_data_length, - int64_t total_encoded_body_length, - int64_t total_decoded_body_length, - bool blocked_cross_site_document) override; + void DidFinishLoading( + base::TimeTicks finish_time, + int64_t total_encoded_data_length, + int64_t total_encoded_body_length, + int64_t total_decoded_body_length, + bool should_report_corb_blocking, + const std::vector&) override; void DidFail(const WebURLError&, int64_t total_encoded_data_length, int64_t total_encoded_body_length, @@ -294,11 +296,13 @@ void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) { context_->OnDownloadData(data, dataLength); } -void CefWebURLLoaderClient::DidFinishLoading(base::TimeTicks finish_time, - int64_t total_encoded_data_length, - int64_t total_encoded_body_length, - int64_t total_decoded_body_length, - bool blocked_cross_site_document) { +void CefWebURLLoaderClient::DidFinishLoading( + base::TimeTicks finish_time, + int64_t total_encoded_data_length, + int64_t total_encoded_body_length, + int64_t total_decoded_body_length, + bool should_report_corb_blocking, + const std::vector&) { context_->OnComplete(); } diff --git a/patch/patch.cfg b/patch/patch.cfg index adfd9d62c..3e4b2abad 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -232,6 +232,13 @@ patches = [ # Allow CEF to intercept GetBrowserContext*InIncognito functions. 'name': 'chrome_browser_profiles', }, + { + # Support direct access to NetExportFileWriter via BrowserProcess instead + # of adding a dependency on SystemNetworkContextManager (see + # https://crrev.com/6ed14d99e9). + # TODO(cef): Consider removing this once we support NetworkService. + 'name': 'chrome_browser_net_export', + }, { # Allow CEF to share Chrome plugin loading code. 'name': 'chrome_plugins', diff --git a/patch/patches/browser_child_frame_2507.patch b/patch/patches/browser_child_frame_2507.patch index 5d9d736bf..e6ed7586e 100644 --- a/patch/patches/browser_child_frame_2507.patch +++ b/patch/patches/browser_child_frame_2507.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_child_frame.cc content/browser/renderer_host/render_widget_host_view_child_frame.cc -index df02235579a0..0b3de7a37ab4 100644 +index 0ba4a669381e..dac7ba25ac0d 100644 --- content/browser/renderer_host/render_widget_host_view_child_frame.cc +++ content/browser/renderer_host/render_widget_host_view_child_frame.cc -@@ -630,6 +630,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame( +@@ -652,6 +652,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame( "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame"); support_->SubmitCompositorFrame(local_surface_id, std::move(frame), std::move(hit_test_region_list)); @@ -10,7 +10,7 @@ index df02235579a0..0b3de7a37ab4 100644 } void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame( -@@ -913,7 +914,6 @@ void RenderWidgetHostViewChildFrame::OnFirstSurfaceActivation( +@@ -935,7 +936,6 @@ void RenderWidgetHostViewChildFrame::OnFirstSurfaceActivation( last_activated_surface_info_ = surface_info; has_frame_ = true; FirstSurfaceActivation(surface_info); diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index bfd482d8a..6dbbb05e5 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h -index 7dc490ea5607..f67c457385ab 100644 +index 71a9e1024b60..504c6b98bfa3 100644 --- content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h @@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, @@ -12,7 +12,7 @@ index 7dc490ea5607..f67c457385ab 100644 // Ensure that the currect compositor frame be cleared (even if it is // potentially visible). diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index fb23caccdd1d..f29b586631aa 100644 +index 65670cccb503..6dc30c945f1f 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm @@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index 16b4f5f23..a1d097741 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -37,10 +37,10 @@ index 2c585e36dff5..ee7234381aae 100644 attached_ = true; diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc -index f17c20da2d61..0a7f0a3a2478 100644 +index f206f1e547ab..97e18dc1a742 100644 --- content/browser/frame_host/interstitial_page_impl.cc +++ content/browser/frame_host/interstitial_page_impl.cc -@@ -634,7 +634,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { +@@ -633,7 +633,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { WebContentsView* wcv = static_cast(web_contents())->GetView(); RenderWidgetHostViewBase* view = @@ -79,10 +79,10 @@ index 5426d600906c..4bf4537514eb 100644 // Creates a new View that holds a non-top-level widget and receives messages // for it. diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc -index f201805c18b3..cf6a8424bec4 100644 +index ce5602b1cc38..b4189ae15ded 100644 --- content/browser/web_contents/web_contents_view_aura.cc +++ content/browser/web_contents/web_contents_view_aura.cc -@@ -811,7 +811,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, +@@ -809,7 +809,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, } RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( @@ -92,7 +92,7 @@ index f201805c18b3..cf6a8424bec4 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 -@@ -823,6 +824,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( +@@ -821,6 +822,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( render_widget_host->GetView()); } @@ -208,10 +208,10 @@ index 1f0e661628aa..f896c842ff0d 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h -index 0b37270ec020..9bd3b14efe5c 100644 +index d08876fc503a..bad24076b16f 100644 --- content/browser/web_contents/web_contents_view_mac.h +++ content/browser/web_contents/web_contents_view_mac.h -@@ -95,7 +95,7 @@ class WebContentsViewMac : public WebContentsView, +@@ -101,7 +101,7 @@ class WebContentsViewMac : public WebContentsView, gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -221,10 +221,10 @@ index 0b37270ec020..9bd3b14efe5c 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 325c9c85ef7f..b17a618a8715 100644 +index 3374d2b122d9..fa222a6ffb13 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( +@@ -336,7 +336,8 @@ void WebContentsViewMac::CreateView( } RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( @@ -234,7 +234,7 @@ index 325c9c85ef7f..b17a618a8715 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( +@@ -348,6 +349,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( render_widget_host->GetView()); } diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 9e0354c8d..c2bb795ec 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 4adc6a2f64cd..bba2ab9a8b0c 100644 +index 8e953590edd9..750a1bb85480 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index 4adc6a2f64cd..bba2ab9a8b0c 100644 import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1691,6 +1692,7 @@ jumbo_split_static_library("browser") { +@@ -1708,6 +1709,7 @@ jumbo_split_static_library("browser") { "//base:i18n", "//base/allocator:buildflags", "//cc", @@ -18,7 +18,7 @@ index 4adc6a2f64cd..bba2ab9a8b0c 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1966,6 +1968,10 @@ jumbo_split_static_library("browser") { +@@ -1983,6 +1985,10 @@ jumbo_split_static_library("browser") { ] } @@ -29,7 +29,7 @@ index 4adc6a2f64cd..bba2ab9a8b0c 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -3552,7 +3558,7 @@ jumbo_split_static_library("browser") { +@@ -3586,7 +3592,7 @@ jumbo_split_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch new file mode 100644 index 000000000..a3b3431d2 --- /dev/null +++ b/patch/patches/chrome_browser_net_export.patch @@ -0,0 +1,66 @@ +diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h +index 840e44398dc6..4835c5ddcd64 100644 +--- chrome/browser/browser_process.h ++++ chrome/browser/browser_process.h +@@ -39,6 +39,10 @@ class SystemNetworkContextManager; + class WatchDogThread; + class WebRtcLogUploader; + ++namespace net_log { ++class NetExportFileWriter; ++} ++ + namespace network { + class NetworkQualityTracker; + class SharedURLLoaderFactory; +@@ -182,6 +186,9 @@ class BrowserProcess { + // backed by the IOThread's URLRequestContext. + virtual SystemNetworkContextManager* system_network_context_manager() = 0; + ++ // Provide direct accessor for CEF. ++ virtual net_log::NetExportFileWriter* net_export_file_writer() = 0; ++ + // Returns a NetworkQualityTracker that can be used to subscribe for + // network quality change events. + virtual network::NetworkQualityTracker* network_quality_tracker() = 0; +diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc +index 827c58d28114..7a0a31aeb654 100644 +--- chrome/browser/browser_process_impl.cc ++++ chrome/browser/browser_process_impl.cc +@@ -662,6 +662,10 @@ BrowserProcessImpl::system_network_context_manager() { + return SystemNetworkContextManager::GetInstance(); + } + ++net_log::NetExportFileWriter* BrowserProcessImpl::net_export_file_writer() { ++ return system_network_context_manager()->GetNetExportFileWriter(); ++} ++ + scoped_refptr + BrowserProcessImpl::shared_url_loader_factory() { + return system_network_context_manager()->GetSharedURLLoaderFactory(); +diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h +index 8799ad360d51..1bac38e1929b 100644 +--- chrome/browser/browser_process_impl.h ++++ chrome/browser/browser_process_impl.h +@@ -143,6 +143,7 @@ class BrowserProcessImpl : public BrowserProcess, + // TODO(qinmin): Remove this method as callers can retrieve the global + // instance from SystemNetworkContextManager directly. + SystemNetworkContextManager* system_network_context_manager() override; ++ net_log::NetExportFileWriter* net_export_file_writer() override; + scoped_refptr shared_url_loader_factory() + override; + network::NetworkQualityTracker* network_quality_tracker() override; +diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc +index 38c8ac0ed0e1..e759d3ebebf2 100644 +--- chrome/browser/ui/webui/net_export_ui.cc ++++ chrome/browser/ui/webui/net_export_ui.cc +@@ -159,8 +159,7 @@ class NetExportMessageHandler + }; + + NetExportMessageHandler::NetExportMessageHandler() +- : file_writer_(g_browser_process->system_network_context_manager() +- ->GetNetExportFileWriter()), ++ : file_writer_(g_browser_process->net_export_file_writer()), + state_observer_manager_(this), + weak_ptr_factory_(this) { + file_writer_->Initialize(); diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 4b8fbd07d..8f7fd2acc 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -71,10 +71,10 @@ index e8e76ce5b954..1dd338dd0142 100644 content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* context); diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 9d1f4de484b5..6b209c24ccfd 100644 +index af01ba808a5a..ce2743af4de2 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -387,7 +387,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -388,7 +388,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 3ecd5fcf8..12dd3953b 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -125,7 +125,7 @@ index 989d5d02cedb..e05810db6824 100644 // If we broke out of the loop, we have found an enabled plugin. bool enabled = i < matching_plugins.size(); diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index ffa1d20bf490..ca6fd1e68164 100644 +index 2d9e1bbe419e..e297e3b9abe3 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc @@ -801,6 +801,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 56bc19a7e..429bf186d 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 5f1fed1ae35e..4411afbee4ec 100644 +index 45e6cbde8603..a49f2b2632b9 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -4,6 +4,7 @@ @@ -18,7 +18,7 @@ index 5f1fed1ae35e..4411afbee4ec 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -184,6 +186,10 @@ jumbo_static_library("renderer") { +@@ -185,6 +187,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 6db1c6947..023edf602 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,19 +1,19 @@ diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc -index d6cb69e4bc05..1f8e2c860c4f 100644 +index d93b738c2424..1e3d6d3eb4df 100644 --- chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc @@ -99,7 +99,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(SHOULD_BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) -+#if BUILDFLAG(SHOULD_BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ +-#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 aa21ecb8b018..40df6399891a 100644 +index 00d201e178c0..c37de789d5b2 100644 --- third_party/widevine/cdm/BUILD.gn +++ third_party/widevine/cdm/BUILD.gn @@ -5,6 +5,7 @@ diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 58724d251..2cfdc7bea 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -14,7 +14,7 @@ index 1c59cafd7a77..b42979fa9dec 100644 // The GetPlugins call causes the plugin list to be refreshed. Once that's // done we can retry the GetPluginInfo call. We break out of this cycle diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc -index 3c2de25de6df..5caf4a3aa510 100644 +index e16e00dc888b..5d102629a0d4 100644 --- chrome/browser/plugins/chrome_plugin_service_filter.cc +++ chrome/browser/plugins/chrome_plugin_service_filter.cc @@ -168,6 +168,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( @@ -38,7 +38,7 @@ index c707c8773a74..20bdf74abf01 100644 content::WebPluginInfo* plugin) override; diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc -index 1b4fd2b4149b..98498db23824 100644 +index b6da8e846a2a..dd7ec1be2556 100644 --- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc @@ -56,7 +56,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor( @@ -51,10 +51,10 @@ index 1b4fd2b4149b..98498db23824 100644 return nullptr; } diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm -index 569e6112d86b..41599944688a 100644 +index a132d1e4ff71..a328ee26f320 100644 --- chrome/browser/ui/cocoa/drag_util.mm +++ chrome/browser/ui/cocoa/drag_util.mm -@@ -51,7 +51,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) { +@@ -45,7 +45,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) { return PluginService::GetInstance()->GetPluginInfo( -1, // process ID MSG_ROUTING_NONE, // routing ID @@ -64,7 +64,7 @@ index 569e6112d86b..41599944688a 100644 } diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc -index 77738cb5bec9..a8fbabe4b10f 100644 +index 11db808fdefb..99cad779ec08 100644 --- chrome/browser/ui/views/frame/browser_root_view.cc +++ chrome/browser/ui/views/frame/browser_root_view.cc @@ -69,7 +69,7 @@ void OnFindURLMimeType(const GURL& url, @@ -94,10 +94,10 @@ index f8a86851d334..542f6eb61c53 100644 "WillFailRequest state should come before WillProcessResponse"); return render_frame_host_; diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc -index d700994f7603..ef0d07368f0f 100644 +index a17ae7ca0c07..c80e30494698 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -1680,6 +1680,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( +@@ -1863,6 +1863,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( if (GetNavigationHandle()) { GetNavigationHandle()->set_net_error_code( static_cast(params.error_code)); @@ -105,10 +105,10 @@ index d700994f7603..ef0d07368f0f 100644 } frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -4151,9 +4152,9 @@ void RenderFrameHostImpl::CommitNavigation( - // is used. Currently we have this here to make sure we have non-racy - // situation (https://crbug.com/849929). - DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService)); +@@ -4350,9 +4351,9 @@ void RenderFrameHostImpl::CommitNavigation( + DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService) || + base::FeatureList::IsEnabled( + blink::features::kServiceWorkerServicification)); - auto* storage_partition = static_cast( + auto* storage_partition = BrowserContext::GetStoragePartition( @@ -117,19 +117,8 @@ index d700994f7603..ef0d07368f0f 100644 base::PostTaskWithTraits( FROM_HERE, {BrowserThread::IO}, base::BindOnce(&PrefetchURLLoaderService::GetFactory, -@@ -4851,8 +4852,8 @@ bool RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryInternal( - RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory( - this, false /* is_navigation */, false /* is_download */, - &default_factory_request); -- StoragePartitionImpl* storage_partition = static_cast( -- BrowserContext::GetStoragePartition(context, GetSiteInstance())); -+ StoragePartition* storage_partition = -+ BrowserContext::GetStoragePartition(context, GetSiteInstance()); - if (g_create_network_factory_callback_for_test.Get().is_null()) { - storage_partition->GetNetworkContext()->CreateURLLoaderFactory( - std::move(default_factory_request), std::move(params)); diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index b657fa5160a9..ca76f5c5221f 100644 +index 3310e9b06232..7b6c6ad26c34 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc @@ -644,6 +644,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, @@ -179,7 +168,7 @@ index b228a7dd382f..7ac8b16deb9a 100644 if (stale) { // Refresh the plugins asynchronously. diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index 36fb2c8fad05..6619cd8d1418 100644 +index 7834d3d18430..b88ec0016d83 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc @@ -303,6 +303,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, @@ -285,10 +274,10 @@ index 3009401dac6b..b4c5a9e2db50 100644 }; diff --git content/common/frame_messages.h content/common/frame_messages.h -index 506bef7143b2..868440afd1c0 100644 +index eee8d28ea50f..d5c92ad27fd0 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1345,9 +1345,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1344,9 +1344,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. @@ -325,10 +314,10 @@ index 3b610b1f554e..7c439e060779 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 794ef35e6f98..4e27e5b06926 100644 +index 3166cbe259da..e4bb34de7350 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h -@@ -75,6 +75,9 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -76,6 +76,9 @@ class CONTENT_EXPORT ContentRendererClient { // Notifies us that the RenderThread has been created. virtual void RenderThreadStarted() {} @@ -338,7 +327,7 @@ index 794ef35e6f98..4e27e5b06926 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -340,6 +343,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -341,6 +344,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -350,10 +339,10 @@ index 794ef35e6f98..4e27e5b06926 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h -index cff1efb2da7a..22ff7eee9025 100644 +index ce1f26c0ab1d..d575eb38e116 100644 --- content/public/renderer/render_frame_observer.h +++ content/public/renderer/render_frame_observer.h -@@ -151,6 +151,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -152,6 +152,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidReceiveTransferSizeUpdate(int resource_id, int received_data_length) {} @@ -364,10 +353,10 @@ index cff1efb2da7a..22ff7eee9025 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index fcafcc92a690..f0c4780e1d0e 100644 +index cf3e520475a5..b21f22084186 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3668,7 +3668,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3664,7 +3664,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -377,7 +366,7 @@ index fcafcc92a690..f0c4780e1d0e 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -4041,6 +4042,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { +@@ -4032,6 +4033,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { Send(new FrameHostMsg_FrameFocused(routing_id_)); @@ -387,10 +376,10 @@ index fcafcc92a690..f0c4780e1d0e 100644 void RenderFrameImpl::WillCommitProvisionalLoad() { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index f6b7f9fe7da4..e213f2ed5558 100644 +index b82d9757e0ae..00f73388656e 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -825,6 +825,8 @@ void RenderThreadImpl::Init() { +@@ -821,6 +821,8 @@ void RenderThreadImpl::Init() { StartServiceManagerConnection(); @@ -400,10 +389,10 @@ index f6b7f9fe7da4..e213f2ed5558 100644 base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 7358f5e0a411..39f933c39ba4 100644 +index 907fd2f4f856..716d5fc06316 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1199,6 +1199,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed( +@@ -1191,6 +1191,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed( base::MemoryPressureListener::SetNotificationsSuppressed(suppressed); } @@ -419,10 +408,10 @@ index 7358f5e0a411..39f933c39ba4 100644 if (!web_database_host_) { web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create( diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 81e542ce105e..59b088dc7d2d 100644 +index 4ec814fd92c5..e1d21f399a30 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -235,6 +235,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -234,6 +234,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void RequestPurgeMemory() override; void SetMemoryPressureNotificationsSuppressed(bool suppressed) override; diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index ddf89c369..b586cc5ca 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -1,5 +1,5 @@ diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index 887e13776dd2..de30ebff25e4 100644 +index c54f40f27fbd..b96946a1ad96 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -4,6 +4,8 @@ @@ -597,10 +597,10 @@ index 4902d87bd171..a573e9557666 100644 if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc -index 0276f809ab6f..d2ee6cd38264 100644 +index 85db4c8396c0..717df9763c95 100644 --- content/browser/frame_host/debug_urls.cc +++ content/browser/frame_host/debug_urls.cc -@@ -135,7 +135,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { +@@ -134,7 +134,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { cc::switches::kEnableGpuBenchmarking) && (PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED)); diff --git a/patch/patches/devtools_product_2300.patch b/patch/patches/devtools_product_2300.patch index a26fac8df..6018cce38 100644 --- a/patch/patches/devtools_product_2300.patch +++ b/patch/patches/devtools_product_2300.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 7e237fd5dc30..b666eb19166f 100644 +index baa7d79aec2e..06bec45c6538 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -569,7 +569,7 @@ void DevToolsHttpHandler::OnJsonRequest( diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index fbc65649e..b3e1edd1c 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc -index 53c7404ef1f9..ac33df7cfe0e 100644 +index 9e81f0a33ede..b796e79ae7ef 100644 --- chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ chrome/browser/extensions/api/streams_private/streams_private_api.cc -@@ -9,6 +9,7 @@ +@@ -6,6 +6,7 @@ + + #include - #include "base/lazy_instance.h" - #include "base/values.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/prerender/prerender_contents.h" - #include "chrome/common/extensions/api/streams_private.h" -@@ -79,6 +80,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( + #include "content/public/browser/browser_thread.h" +@@ -42,6 +43,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( if (!web_contents) return; @@ -18,19 +18,19 @@ index 53c7404ef1f9..ac33df7cfe0e 100644 // If the request was for a prerender, abort the prerender and do not // continue. This is because plugins cancel prerender, see // http://crbug.com/343590. -@@ -88,6 +90,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( +@@ -51,6 +53,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD); return; } +#endif // !BUILDFLAG(ENABLE_CEF) auto* browser_context = web_contents->GetBrowserContext(); - StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context); + diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc -index 1281c89a231b..4826f71f72ef 100644 +index 5301d9c140d7..37117b8c0da0 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc -@@ -923,10 +923,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( +@@ -924,10 +924,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( // TODO(alexmos): This check should've been enforced earlier in the // navigation, in chrome::Navigate(). Verify this, and then convert this to // a CHECK and remove the fallback. @@ -46,7 +46,7 @@ index 1281c89a231b..4826f71f72ef 100644 return true; } -@@ -1065,7 +1066,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( +@@ -1066,7 +1067,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( // Double-check that the new SiteInstance is associated with the right // BrowserContext. @@ -57,10 +57,10 @@ index 1281c89a231b..4826f71f72ef 100644 // If |new_instance| is a new SiteInstance for a subframe that requires a // dedicated process, set its process reuse policy so that such subframes are diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 1342f701016f..d867ddf1145e 100644 +index 056852ce578d..02f80a8b6778 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -423,6 +423,13 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -437,6 +437,13 @@ class CONTENT_EXPORT ContentBrowserClient { // Returns true if error page should be isolated in its own process. virtual bool ShouldIsolateErrorPage(bool in_main_frame); @@ -219,10 +219,10 @@ index 5a2533dc788f..b21e25a9af25 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 6e97fdb3ee30..cd81ef1e67bc 100644 +index 5be5c1b09b6d..1222df412848 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -358,9 +358,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -357,9 +357,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/external_textures_1006.patch b/patch/patches/external_textures_1006.patch index 05feb715f..2269e850f 100644 --- a/patch/patches/external_textures_1006.patch +++ b/patch/patches/external_textures_1006.patch @@ -27,7 +27,7 @@ index 941d70bd2a7e..ef14a7dd7d4f 100644 virtual void OnReflectorChanged(); diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index 3ef8b77142d6..4be0bbaa28a8 100644 +index e8741caf69a8..1f82cc8c1f29 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc @@ -208,6 +208,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { @@ -49,7 +49,7 @@ index 3ef8b77142d6..4be0bbaa28a8 100644 std::unique_ptr GpuProcessTransportFactory::CreateSoftwareOutputDevice( gfx::AcceleratedWidget widget, -@@ -493,11 +505,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -492,11 +504,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( // surfaces as they are not following the correct mode. DisableGpuCompositing(compositor.get()); } @@ -73,7 +73,7 @@ index 3ef8b77142d6..4be0bbaa28a8 100644 } else { DCHECK(context_provider); const auto& capabilities = context_provider->ContextCapabilities(); -@@ -505,7 +526,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -504,7 +525,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( display_output_surface = std::make_unique( context_provider, std::move(vsync_callback), @@ -83,7 +83,7 @@ index 3ef8b77142d6..4be0bbaa28a8 100644 } else if (capabilities.surfaceless) { #if defined(OS_MACOSX) const auto& gpu_feature_info = context_provider->GetGpuFeatureInfo(); -@@ -947,7 +969,8 @@ GpuProcessTransportFactory::CreatePerCompositorData( +@@ -946,7 +968,8 @@ GpuProcessTransportFactory::CreatePerCompositorData( gfx::AcceleratedWidget widget = compositor->widget(); auto data = std::make_unique(); @@ -501,10 +501,10 @@ index b422c3075ae7..1c4b452d1df5 100644 GLint shm_id, GLuint shm_offset, diff --git gpu/command_buffer/client/gles2_implementation.cc gpu/command_buffer/client/gles2_implementation.cc -index 6a18c7919aa4..24d7c5e044b1 100644 +index 65f83c6f5a41..c1bd6e4e7676 100644 --- gpu/command_buffer/client/gles2_implementation.cc +++ gpu/command_buffer/client/gles2_implementation.cc -@@ -7257,6 +7257,22 @@ void GLES2Implementation::Viewport(GLint x, +@@ -7248,6 +7248,22 @@ void GLES2Implementation::Viewport(GLint x, CheckGLError(); } @@ -980,7 +980,7 @@ index fcac46f25274..cb39feed2c16 100644 GL_APICALL void GL_APIENTRY glInvalidateReadbackBufferShadowDataCHROMIUM (GLidBuffer buffer_id); // (used for CHROMIUM_nonblocking_readback implementation) diff --git gpu/command_buffer/service/BUILD.gn gpu/command_buffer/service/BUILD.gn -index e13eadabbe30..7dba39934e14 100644 +index 6e83a5675fc3..330107d93f03 100644 --- gpu/command_buffer/service/BUILD.gn +++ gpu/command_buffer/service/BUILD.gn @@ -105,6 +105,8 @@ target(link_target_type, "gles2_sources") { @@ -1088,7 +1088,7 @@ index 08706db01d3d..245b3d8db6ea 100644 for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end(); ++it) { diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc -index c21fd3c1c0a5..0c33d7632689 100644 +index e4b21a6a1388..c446c9ef3297 100644 --- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc +++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc @@ -9,6 +9,7 @@ @@ -1099,7 +1099,7 @@ index c21fd3c1c0a5..0c33d7632689 100644 #include "gpu/command_buffer/service/command_buffer_service.h" #include "gpu/command_buffer/service/decoder_client.h" #include "gpu/command_buffer/service/feature_info.h" -@@ -2284,6 +2285,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult( +@@ -2275,6 +2276,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult( return error::kNoError; } @@ -1219,7 +1219,7 @@ index 8ae7efefd62c..9b89edf36be5 100644 observer_list_.AddObserver(observer); } diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 92ed2ff0bbe5..060273efafaa 100644 +index b3905bdfa650..dc984321f2b8 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -26,6 +26,7 @@ @@ -1278,7 +1278,7 @@ index 92ed2ff0bbe5..060273efafaa 100644 // Compositor does not own observers. It is the responsibility of the // observer to remove itself when it is done observing. void AddObserver(CompositorObserver* observer); -@@ -451,6 +472,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -448,6 +469,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; @@ -1287,7 +1287,7 @@ index 92ed2ff0bbe5..060273efafaa 100644 // The root of the Layer tree drawn by this compositor. Layer* root_layer_ = nullptr; -@@ -489,6 +512,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -486,6 +509,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ExternalBeginFrameClient* external_begin_frame_client_ = nullptr; bool needs_external_begin_frames_ = false; @@ -1297,10 +1297,10 @@ index 92ed2ff0bbe5..060273efafaa 100644 // The device scale factor of the monitor that this compositor is compositing diff --git ui/compositor/host/host_context_factory_private.cc ui/compositor/host/host_context_factory_private.cc -index ce1385e951e6..01924e0bfb4f 100644 +index 9c73b44101df..94fe32c76046 100644 --- ui/compositor/host/host_context_factory_private.cc +++ ui/compositor/host/host_context_factory_private.cc -@@ -239,6 +239,10 @@ void HostContextFactoryPrivate::SetOutputIsSecure(Compositor* compositor, +@@ -244,6 +244,10 @@ void HostContextFactoryPrivate::SetOutputIsSecure(Compositor* compositor, iter->second.display_private->SetOutputIsSecure(secure); } diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index babf87666..41eaba0f4 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,7 +12,7 @@ index 2ae9ab394481..2ff59eb3a2ef 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 7f12f0ac4a22..2a83ba4f17fd 100644 +index 4283a4f9fce3..b74a2b78f282 100644 --- BUILD.gn +++ BUILD.gn @@ -186,6 +186,7 @@ group("gn_all") { diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index ceccc5bb5..c6a2de030 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 68b9c123c0bb..6a2fc60bb2c7 100644 +index 0d621a15e32b..e4174fbd0047 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids -@@ -427,4 +427,11 @@ +@@ -431,4 +431,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_build.patch b/patch/patches/linux_build.patch index 81de492ce..fc96bb2bb 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 1f582933a377..503e2b5bf58a 100644 +index 148e91397142..ea325faec030 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -162,7 +162,7 @@ declare_args() { +@@ -163,7 +163,7 @@ declare_args() { !use_clang_coverage && !(is_android && use_order_profiling) && (use_lld || (use_gold && diff --git a/patch/patches/linux_gtk_2014.patch b/patch/patches/linux_gtk_2014.patch index 5d76f30e7..450a50eab 100644 --- a/patch/patches/linux_gtk_2014.patch +++ b/patch/patches/linux_gtk_2014.patch @@ -68,10 +68,10 @@ index d44c7feaabec..5f1992335a38 100644 void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn -index b192d5e5b96b..80562f0af3e8 100644 +index bfe218062685..2b3d2a25605b 100644 --- chrome/test/BUILD.gn +++ chrome/test/BUILD.gn -@@ -3848,7 +3848,7 @@ test("unit_tests") { +@@ -3850,7 +3850,7 @@ test("unit_tests") { "../browser/ui/input_method/input_method_engine_unittest.cc", ] } @@ -80,7 +80,7 @@ index b192d5e5b96b..80562f0af3e8 100644 sources += [ "../browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc" ] deps += [ "//build/config/linux/gtk" ] -@@ -3869,7 +3869,7 @@ test("unit_tests") { +@@ -3871,7 +3871,7 @@ test("unit_tests") { if (use_gio) { configs += [ "//build/linux:gio_config" ] } @@ -89,7 +89,7 @@ index b192d5e5b96b..80562f0af3e8 100644 deps += [ "//chrome/browser/ui/libgtkui" ] } -@@ -4874,7 +4874,7 @@ if (!is_android) { +@@ -4850,7 +4850,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/linux_poll_2466.patch b/patch/patches/linux_poll_2466.patch index df7449ab1..a1b23e02e 100644 --- a/patch/patches/linux_poll_2466.patch +++ b/patch/patches/linux_poll_2466.patch @@ -1,5 +1,5 @@ diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc -index 182a762fec21..69ea94007332 100644 +index b22421d834c2..8fda7598ba4b 100644 --- base/files/file_path_watcher_linux.cc +++ base/files/file_path_watcher_linux.cc @@ -5,6 +5,7 @@ diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 0de43ad40..5db636b5a 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -48,7 +48,7 @@ index ece6b92ca3a3..3925cdd3ad7f 100644 current_->destruction_observers_.RemoveObserver(destruction_observer); } diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h -index d623cbc7f7b2..04d83792f98d 100644 +index 403d0dcc2ddb..5176aa0594a3 100644 --- base/message_loop/message_loop_current.h +++ base/message_loop/message_loop_current.h @@ -124,6 +124,16 @@ class BASE_EXPORT MessageLoopCurrent { diff --git a/patch/patches/net_cookies_729800.patch b/patch/patches/net_cookies_729800.patch index ef97d28de..8246c3e6f 100644 --- a/patch/patches/net_cookies_729800.patch +++ b/patch/patches/net_cookies_729800.patch @@ -1,5 +1,5 @@ diff --git net/cookies/cookie_monster_change_dispatcher.cc net/cookies/cookie_monster_change_dispatcher.cc -index 2eadab6ca652..79fd1f0b6f58 100644 +index a53b1edcaa40..5b663f605497 100644 --- net/cookies/cookie_monster_change_dispatcher.cc +++ net/cookies/cookie_monster_change_dispatcher.cc @@ -51,7 +51,8 @@ CookieMonsterChangeDispatcher::Subscription::Subscription( diff --git a/patch/patches/net_security_expiration_1994.patch b/patch/patches/net_security_expiration_1994.patch index 704dd283c..337e08d8a 100644 --- a/patch/patches/net_security_expiration_1994.patch +++ b/patch/patches/net_security_expiration_1994.patch @@ -58,10 +58,10 @@ index f61ff0d0564a..e6727c7b1cbc 100644 } // namespace certificate_transparency diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc -index 3f3db5c840eb..85553b65e966 100644 +index f1a5d1cec270..2a586caaf0c4 100644 --- net/http/transport_security_state.cc +++ net/http/transport_security_state.cc -@@ -1153,8 +1153,10 @@ void TransportSecurityState::ClearReportCachesForTesting() { +@@ -1151,8 +1151,10 @@ void TransportSecurityState::ClearReportCachesForTesting() { sent_expect_ct_reports_cache_.Clear(); } diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index cd95ad5b9..38c5bc517 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,8 +1,8 @@ diff --git BUILD.gn BUILD.gn -index d3ea24dc6..4ffb3aac1 100644 +index 8a65f06b2..04894604d 100644 --- BUILD.gn +++ BUILD.gn -@@ -240,6 +240,10 @@ jumbo_static_library("pdfium") { +@@ -238,6 +238,10 @@ jumbo_static_library("pdfium") { complete_static_lib = true configs -= [ "//build/config/compiler:thin_archive" ] } @@ -12,7 +12,7 @@ index d3ea24dc6..4ffb3aac1 100644 + ] } - jumbo_static_library("test_support") { + jumbo_source_set("test_support") { diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp index 247a90240..42c9c5ea8 100644 --- fpdfsdk/fpdf_view.cpp diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 98ea3043a..024d2fdae 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -35,10 +35,10 @@ index c1881cb04aec..34a64887af4c 100644 bool record_whole_document; SavePreviousDocumentResources save_previous_document_resources; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index 6d60eae14858..a1be903ea29a 100644 +index 5ff531dd9e35..34d699af2616 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1311,6 +1311,7 @@ void RenderViewImpl::SendFrameStateUpdates() { +@@ -1273,6 +1273,7 @@ void RenderViewImpl::SendFrameStateUpdates() { void RenderViewImpl::ApplyWebPreferencesInternal(const WebPreferences& prefs, blink::WebView* web_view) { ApplyWebPreferences(prefs, web_view); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index 80fcc8068..9671899e3 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 5566278794a0..7773800d5e63 100644 +index 108b54de5e75..8ebd76fc4584 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -480,6 +480,7 @@ jumbo_split_static_library("ui") { +@@ -368,6 +368,7 @@ jumbo_split_static_library("ui") { "//base:i18n", "//base/allocator:buildflags", "//cc/paint", @@ -10,7 +10,7 @@ index 5566278794a0..7773800d5e63 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2347,7 +2348,7 @@ jumbo_split_static_library("ui") { +@@ -2289,7 +2290,7 @@ jumbo_split_static_library("ui") { "views/frame/native_browser_frame_factory_ozone.cc", ] } else { @@ -262,10 +262,10 @@ index 7dd892feb181..daa097e62ba2 100644 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc -index 26b88c1d5849..e4fd177ef9f2 100644 +index 71731e98146e..10ce840c286a 100644 --- components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc -@@ -339,7 +339,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, +@@ -341,7 +341,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, return plugin && plugin->SupportsPaginatedPrint(); } @@ -273,7 +273,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 // Returns true if the current destination printer is PRINT_TO_PDF. bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool print_to_pdf = false; -@@ -361,7 +360,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, +@@ -363,7 +362,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, } return frame_has_custom_page_size_style; } @@ -281,7 +281,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -416,7 +414,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -418,7 +416,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, : PRINTABLE_AREA_MARGINS; } @@ -289,7 +289,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 gfx::Size GetPdfPageSize(const gfx::Size& page_size, int dpi) { return gfx::Size(ConvertUnit(page_size.width(), dpi, kPointsPerInch), ConvertUnit(page_size.height(), dpi, kPointsPerInch)); -@@ -463,7 +460,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( +@@ -465,7 +462,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( } return blink::kWebPrintScalingOptionFitToPrintableArea; } @@ -297,7 +297,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 // Helper function to scale and round an integer value with a double valued // scaling. -@@ -1043,10 +1039,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1045,10 +1041,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { return; if (g_is_preview_enabled) { @@ -308,7 +308,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 } else { auto weak_this = weak_ptr_factory_.GetWeakPtr(); web_frame->DispatchBeforePrintEvent(); -@@ -1074,10 +1068,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { +@@ -1076,10 +1070,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message) IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) @@ -320,7 +320,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog, OnClosePrintPreviewDialog) #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -1159,7 +1153,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( +@@ -1161,7 +1155,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } @@ -328,7 +328,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 void PrintRenderFrameHelper::OnPrintPreview( const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) -@@ -1416,7 +1409,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( +@@ -1418,7 +1411,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( printable_height / static_cast(uniform_page_size.height); return static_cast(100.0f * std::min(scale_width, scale_height)); } @@ -336,7 +336,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 void PrintRenderFrameHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1431,7 +1423,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { +@@ -1433,7 +1425,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { is_printing_enabled_ = enabled; } @@ -344,7 +344,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { if (ipc_nesting_level_ > 1) return; -@@ -1442,7 +1433,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1444,7 +1435,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.IsNull()) { @@ -354,7 +354,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1451,6 +1444,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1453,6 +1446,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); } @@ -362,7 +362,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 void PrintRenderFrameHelper::OnClosePrintPreviewDialog() { print_preview_context_.source_frame()->DispatchAfterPrintEvent(); } -@@ -1538,11 +1532,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1540,11 +1534,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { print_node_in_progress_ = true; @@ -375,7 +375,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 } else { // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets // its |context_menu_node_|. -@@ -1618,13 +1610,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1620,13 +1612,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { int cookie = print_pages_params_ ? print_pages_params_->params.document_cookie : 0; @@ -389,7 +389,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 switch (result) { case OK: break; -@@ -1639,7 +1629,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1641,7 +1631,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -397,7 +397,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 case FAIL_PREVIEW: if (!is_print_ready_metafile_sent_) { if (notify_browser_of_print_failure_) { -@@ -1657,7 +1646,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1659,7 +1648,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { cookie, ids)); print_preview_context_.Failed(false); break; @@ -405,7 +405,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1830,7 +1818,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1832,7 +1820,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } @@ -413,7 +413,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -1923,7 +1910,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( +@@ -1925,7 +1912,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); return false; } @@ -421,7 +421,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 void PrintRenderFrameHelper::GetPrintSettingsFromUser( blink::WebLocalFrame* frame, -@@ -2072,7 +2058,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( +@@ -2074,7 +2060,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( return true; } @@ -429,7 +429,7 @@ index 26b88c1d5849..e4fd177ef9f2 100644 void PrintRenderFrameHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -2198,7 +2183,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( +@@ -2200,7 +2185,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids)); return true; } diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index 9e3e2350f..8590217e2 100644 --- a/patch/patches/renderer_preferences_util_545103.patch +++ b/patch/patches/renderer_preferences_util_545103.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc -index 8c33905eda7d..0a128051f86c 100644 +index bfaec640fadb..2a9009bac996 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc -@@ -31,7 +31,8 @@ +@@ -32,7 +32,8 @@ #include "ui/base/cocoa/defaults_utils.h" #endif @@ -12,7 +12,7 @@ index 8c33905eda7d..0a128051f86c 100644 #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/views/linux_ui/linux_ui.h" -@@ -130,7 +131,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs, +@@ -131,7 +132,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs, prefs->caret_blink_interval = interval; #endif diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index 1e1effc0f..f709ac6c6 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,5 +1,5 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index 2a00d4e851ab..d2328b77b613 100644 +index 71a367e03489..c1ba46ce1340 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc @@ -737,6 +737,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 619bb2e26..7095e6b70 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 404a1e7d2731..27ed31cbe61c 100644 +index 7d4ada0eb032..94067acb8358 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -725,10 +725,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { +@@ -727,10 +727,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index 404a1e7d2731..27ed31cbe61c 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -1973,6 +1975,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -1995,6 +1997,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index d3a004061..93c207cd1 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -1,5 +1,5 @@ diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc -index cb4f88f4e9a3..b4afa66f973d 100644 +index 6256cd8b4f9b..99fc65826165 100644 --- content/browser/appcache/appcache_internals_ui.cc +++ content/browser/appcache/appcache_internals_ui.cc @@ -378,8 +378,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( @@ -121,7 +121,7 @@ index 9797767f88ea..3da2c6d57154 100644 CHECK(GetUserData(kMojoWasInitialized)) << "Attempting to destroy a BrowserContext that never called " diff --git content/browser/devtools/protocol/network_handler.cc content/browser/devtools/protocol/network_handler.cc -index df186ceb0b24..d4833710d0c7 100644 +index 1ba2c3016bf5..4f43c983e0bc 100644 --- content/browser/devtools/protocol/network_handler.cc +++ content/browser/devtools/protocol/network_handler.cc @@ -930,8 +930,7 @@ class BackgroundSyncRestorer { @@ -135,7 +135,7 @@ index df186ceb0b24..d4833710d0c7 100644 FROM_HERE, {BrowserThread::IO}, base::BindOnce( diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc -index 5bf1859267c7..741fafc394be 100644 +index 0164e28d6f4c..2dc27ceb93e1 100644 --- content/browser/devtools/protocol/service_worker_handler.cc +++ content/browser/devtools/protocol/service_worker_handler.cc @@ -172,8 +172,7 @@ void ServiceWorkerHandler::SetRenderer(int process_host_id, @@ -146,8 +146,8 @@ index 5bf1859267c7..741fafc394be 100644 - static_cast(process_host->GetStoragePartition()); + storage_partition_ = process_host->GetStoragePartition(); DCHECK(storage_partition_); + browser_context_ = process_host->GetBrowserContext(); context_ = static_cast( - storage_partition_->GetServiceWorkerContext()); diff --git content/browser/devtools/protocol/service_worker_handler.h content/browser/devtools/protocol/service_worker_handler.h index ec9ab86d0ca6..0fe5219f1e84 100644 --- content/browser/devtools/protocol/service_worker_handler.h @@ -171,7 +171,7 @@ index ec9ab86d0ca6..0fe5219f1e84 100644 base::WeakPtrFactory weak_factory_; diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc -index 4bed3550f84f..8625a8a5c8d0 100644 +index a0220133cd28..02b8726dfbc1 100644 --- content/browser/download/download_manager_impl.cc +++ content/browser/download/download_manager_impl.cc @@ -89,9 +89,9 @@ @@ -197,7 +197,7 @@ index 4bed3550f84f..8625a8a5c8d0 100644 } bool CanRequestURLFromRenderer(int render_process_id, GURL url) { -@@ -268,7 +267,7 @@ base::FilePath GetTemporaryDownloadDirectory() { +@@ -270,7 +269,7 @@ base::FilePath GetTemporaryDownloadDirectory() { #endif scoped_refptr @@ -206,7 +206,7 @@ index 4bed3550f84f..8625a8a5c8d0 100644 RenderFrameHost* rfh, bool is_download) { network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info; -@@ -285,7 +284,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition, +@@ -287,7 +286,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition, } } return base::MakeRefCounted( @@ -215,7 +215,7 @@ index 4bed3550f84f..8625a8a5c8d0 100644 std::move(proxy_factory_ptr_info), std::move(proxy_factory_request)); } -@@ -1129,7 +1128,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( +@@ -1131,7 +1130,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( tab_referrer_url = entry->GetReferrer().url; } } @@ -224,7 +224,7 @@ index 4bed3550f84f..8625a8a5c8d0 100644 GetStoragePartition(browser_context_, render_process_id, render_frame_id); in_progress_manager_->InterceptDownloadFromNavigation( std::move(resource_request), render_process_id, render_frame_id, site_url, -@@ -1179,10 +1178,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( +@@ -1181,10 +1180,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( base::MakeRefCounted( rfh, params->url()); } else if (rfh && params->url().SchemeIsFileSystem()) { @@ -237,7 +237,7 @@ index 4bed3550f84f..8625a8a5c8d0 100644 std::string storage_domain; auto* site_instance = rfh->GetSiteInstance(); if (site_instance) { -@@ -1197,10 +1194,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( +@@ -1199,10 +1196,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( params->url(), rfh, /*is_navigation=*/false, storage_partition->GetFileSystemContext(), storage_domain); } else { @@ -251,10 +251,10 @@ index 4bed3550f84f..8625a8a5c8d0 100644 CreateDownloadURLLoaderFactoryGetter(storage_partition, rfh, true); } diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 26f09ff67ffd..0393e389dc1e 100644 +index 54a2af4bb179..76f6a48bc046 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -1155,7 +1155,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -1226,7 +1226,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController // path does as well for navigations. bool has_plugin = PluginService::GetInstance()->GetPluginInfo( -1 /* render_process_id */, -1 /* render_frame_id */, resource_context_, @@ -263,15 +263,15 @@ index 26f09ff67ffd..0393e389dc1e 100644 false /* allow_wildcard */, &stale, &plugin, nullptr); if (stale) { -@@ -1553,7 +1553,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( - network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info; - network::mojom::URLLoaderFactoryRequest proxied_factory_request; - bool bypass_redirect_checks = false; +@@ -1585,7 +1585,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( + request_info.get(), frame_tree_node_id, allow_download_); + new_request->transition_type = request_info->common_params.transition; + - auto* partition = static_cast(storage_partition); + auto* partition = storage_partition; - if (frame_tree_node) { - // |frame_tree_node| may be null in some unit test environments. - GetContentClient() + scoped_refptr + signed_exchange_prefetch_metric_recorder = + partition->GetPrefetchURLLoaderService() diff --git content/browser/payments/payment_app_installer.cc content/browser/payments/payment_app_installer.cc index 9ec51d4332a2..589c4ef5cf8d 100644 --- content/browser/payments/payment_app_installer.cc @@ -319,10 +319,10 @@ index d3042e6a2fc7..07c8478b8ffb 100644 partition->GetPaymentAppContext(); diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index 96eb6578f347..3e7b0fc5d196 100644 +index 0a20b9c08fae..8e4e9121670d 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -754,11 +754,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, +@@ -752,11 +752,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, // Gets the correct render process to use for this SiteInstance. RenderProcessHost* GetProcessHost(SiteInstance* site_instance, bool is_for_guests_only) { @@ -338,7 +338,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 // Is this the default storage partition? If it isn't, then just give it its // own non-shared process. -@@ -1488,7 +1487,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { +@@ -1486,7 +1485,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { // static RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( BrowserContext* browser_context, @@ -347,7 +347,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 SiteInstance* site_instance, bool is_for_guests_only) { if (g_render_process_host_factory_) { -@@ -1497,8 +1496,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1495,8 +1494,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( } if (!storage_partition_impl) { @@ -358,7 +358,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 } // If we've made a StoragePartition for guests (e.g., for the tag), // stash the Site URL on it. This way, when we start a service worker inside -@@ -1523,7 +1522,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = +@@ -1521,7 +1520,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = RenderProcessHostImpl::RenderProcessHostImpl( BrowserContext* browser_context, @@ -367,10 +367,10 @@ index 96eb6578f347..3e7b0fc5d196 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1576,10 +1575,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1573,10 +1572,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( + permission_service_context_(new PermissionServiceContext(this)), indexed_db_factory_(new IndexedDBDispatcherHost( id_, - storage_partition_impl_->GetURLRequestContext(), - storage_partition_impl_->GetIndexedDBContext(), + static_cast( + storage_partition_impl_->GetIndexedDBContext()), @@ -382,7 +382,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 id_)), channel_connected_(false), sent_render_process_ready_(false), -@@ -1615,7 +1616,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1612,7 +1613,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -392,7 +392,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 AddObserver(indexed_db_factory_.get()); AddObserver(service_worker_dispatcher_host_.get()); -@@ -1951,6 +1953,15 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1948,6 +1950,15 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -408,7 +408,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // from guests. -@@ -1989,10 +2000,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1986,10 +1997,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { ChromeBlobStorageContext::GetFor(browser_context); resource_message_filter_ = new ResourceMessageFilter( @@ -421,7 +421,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 storage_partition_impl_->GetPrefetchURLLoaderService(), BrowserContext::GetSharedCorsOriginAccessList(browser_context), std::move(get_contexts_callback), -@@ -2002,8 +2013,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1999,8 +2010,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter( new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service())); @@ -431,7 +431,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); AddFilter(peer_connection_tracker_host_.get()); -@@ -2020,10 +2030,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -2017,10 +2027,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(new TraceMessageFilter(GetID())); AddFilter(new ResolveProxyMsgHelper(GetID())); @@ -442,7 +442,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 } void RenderProcessHostImpl::BindCacheStorage( -@@ -2035,7 +2041,8 @@ void RenderProcessHostImpl::BindCacheStorage( +@@ -2032,7 +2038,8 @@ void RenderProcessHostImpl::BindCacheStorage( cache_storage_dispatcher_host_ = base::MakeRefCounted(); cache_storage_dispatcher_host_->Init( @@ -452,7 +452,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 } // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // thread entirely. -@@ -2205,7 +2212,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2217,7 +2224,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &CodeCacheHostImpl::Create, GetID(), @@ -462,7 +462,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 base::RetainedRef( storage_partition_impl_->GetGeneratedCodeCacheContext()))); -@@ -2216,7 +2224,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2228,7 +2236,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &AppCacheDispatcherHost::Create, @@ -472,7 +472,7 @@ index 96eb6578f347..3e7b0fc5d196 100644 GetID())); AddUIThreadInterface( -@@ -2253,6 +2262,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2273,6 +2282,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { plugin_registry_.reset( new PluginRegistryImpl(GetBrowserContext()->GetResourceContext())); } @@ -483,10 +483,10 @@ index 96eb6578f347..3e7b0fc5d196 100644 &PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get()))); #endif diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h -index 95c1a4766444..5f4f2cd7baff 100644 +index f11aa8252ea1..029f9672db2a 100644 --- content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h -@@ -99,7 +99,6 @@ class ServiceWorkerDispatcherHost; +@@ -100,7 +100,6 @@ class ServiceWorkerDispatcherHost; class SiteInstance; class SiteInstanceImpl; class StoragePartition; @@ -494,7 +494,7 @@ index 95c1a4766444..5f4f2cd7baff 100644 struct ChildProcessTerminationInfo; typedef base::Thread* (*RendererMainThreadFactoryFunction)( -@@ -142,7 +141,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -143,7 +142,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // null. static RenderProcessHost* CreateRenderProcessHost( BrowserContext* browser_context, @@ -503,7 +503,7 @@ index 95c1a4766444..5f4f2cd7baff 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -487,7 +486,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -491,7 +490,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Use CreateRenderProcessHost() instead of calling this constructor // directly. RenderProcessHostImpl(BrowserContext* browser_context, @@ -512,7 +512,7 @@ index 95c1a4766444..5f4f2cd7baff 100644 bool is_for_guests_only); // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected -@@ -756,10 +755,10 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -754,10 +753,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // called. int instance_id_ = 1; @@ -526,10 +526,10 @@ index 95c1a4766444..5f4f2cd7baff 100644 // The observers watching our lifetime. base::ObserverList::Unchecked observers_; diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc -index c3a8bdc572de..73f66acbe200 100644 +index 5a6e7ed16110..d20a8e216f57 100644 --- content/browser/renderer_interface_binders.cc +++ content/browser/renderer_interface_binders.cc -@@ -139,7 +139,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -140,7 +140,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface( base::Bind([](payments::mojom::PaymentManagerRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -538,7 +538,7 @@ index c3a8bdc572de..73f66acbe200 100644 ->GetPaymentAppContext() ->CreatePaymentManager(std::move(request)); })); -@@ -159,15 +159,16 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -167,15 +167,16 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface(base::BindRepeating( [](blink::mojom::LockManagerRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -558,7 +558,7 @@ index c3a8bdc572de..73f66acbe200 100644 ->CreateService(origin, std::move(request)); })); parameterized_binder_registry_.AddInterface( -@@ -179,7 +180,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -187,7 +188,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface(base::BindRepeating( [](blink::mojom::CookieStoreRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -583,10 +583,10 @@ index 454febaba66b..90d430bb95d3 100644 std::move(client), creation_context_type, blink::MessagePortChannel(std::move(message_port)), diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc -index 1033953db1e6..8dc848dfb0b5 100644 +index 04d1913121ec..e2e3afce5e04 100644 --- content/browser/shared_worker/shared_worker_service_impl.cc +++ content/browser/shared_worker/shared_worker_service_impl.cc -@@ -480,7 +480,8 @@ void SharedWorkerServiceImpl::CreateWorker( +@@ -493,7 +493,8 @@ void SharedWorkerServiceImpl::CreateWorker( FROM_HERE, {BrowserThread::IO}, base::BindOnce( &CreateScriptLoaderOnIO, @@ -838,10 +838,10 @@ index f55e28d79cda..297541d0a99a 100644 virtual ~StoragePartition() {} }; diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index e18b8180bb5e..f775176238ac 100644 +index b0cf62a1d886..051bef980eb3 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc -@@ -481,7 +481,7 @@ bool DatabaseTracker::LazyInit() { +@@ -479,7 +479,7 @@ bool DatabaseTracker::LazyInit() { meta_table_.reset(new sql::MetaTable()); is_initialized_ = diff --git a/patch/patches/ui_dragdrop_355390.patch b/patch/patches/ui_dragdrop_355390.patch index 250701691..8c49b2b9f 100644 --- a/patch/patches/ui_dragdrop_355390.patch +++ b/patch/patches/ui_dragdrop_355390.patch @@ -1,5 +1,5 @@ diff --git ui/base/dragdrop/os_exchange_data_provider_aurax11.cc ui/base/dragdrop/os_exchange_data_provider_aurax11.cc -index 1a6e9a1c7892..08eb8007c5f7 100644 +index 6666737fd2da..b4c294733f5b 100644 --- ui/base/dragdrop/os_exchange_data_provider_aurax11.cc +++ ui/base/dragdrop/os_exchange_data_provider_aurax11.cc @@ -141,7 +141,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url, diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index b6f4af209..abb11fee3 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -295,10 +295,10 @@ index 9c78b30ab3a0..999eb4048f5c 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index 63a169e74862..16a01b6eb2bd 100644 +index 5a2af4b405ec..9cec0cc9b33b 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2440,8 +2440,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2439,8 +2439,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -313,7 +313,7 @@ index 63a169e74862..16a01b6eb2bd 100644 MenuItemView* to_select = NULL; if (item->GetSubmenu()->GetMenuItemCount() > 0) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2456,8 +2461,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2455,8 +2460,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -365,7 +365,7 @@ index 706605182f9a..e97d0495bc72 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 dc3228c2e060..e402e021b464 100644 +index 7b17d2662ecc..0c577b7c5908 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc @@ -926,7 +926,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { 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 f716277b6..27ab09c2c 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 9829370a3c94..1f6604026456 100644 +index e155153ec1ee..47b2ac1b3968 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -575,6 +575,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { @@ -18,7 +18,7 @@ index 9829370a3c94..1f6604026456 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 881511547f74..14190c538bf3 100644 +index becc63fa3a8a..fb5822319d62 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -83,6 +83,7 @@ class CursorManager; @@ -48,7 +48,7 @@ index 881511547f74..14190c538bf3 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; -@@ -482,6 +488,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -494,6 +500,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 881511547f74..14190c538bf3 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -671,6 +683,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -683,6 +695,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool is_currently_scrolling_viewport_ = false; @@ -73,10 +73,10 @@ index 881511547f74..14190c538bf3 100644 void SynchronizeVisualProperties(); 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 7318323bb5a5..4884943e414f 100644 +index caea824f8743..8573ab3bb9e9 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc -@@ -29,6 +29,10 @@ +@@ -32,6 +32,10 @@ #include "ui/events/keycodes/dom/dom_code.h" #include "ui/touch_selection/touch_selection_controller.h" @@ -87,7 +87,7 @@ index 7318323bb5a5..4884943e414f 100644 #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/public/common/context_menu_params.h" -@@ -871,6 +875,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { +@@ -886,6 +890,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { ::SetFocus(hwnd); } } @@ -194,7 +194,7 @@ index 364d6df184c5..0d32a4579c87 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 065d98ec077e..e63ddacfd8a7 100644 +index 53e0077dca31..9eb853fd3532 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc @@ -145,6 +145,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -222,7 +222,7 @@ index 065d98ec077e..e63ddacfd8a7 100644 return bounds_in_pixels_; } -@@ -504,7 +508,8 @@ void DesktopWindowTreeHostX11::CloseNow() { +@@ -503,7 +507,8 @@ void DesktopWindowTreeHostX11::CloseNow() { // Actually free our native resources. if (ui::PlatformEventSource::GetInstance()) ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); @@ -232,7 +232,7 @@ index 065d98ec077e..e63ddacfd8a7 100644 xwindow_ = x11::None; desktop_native_widget_aura_->OnHostClosed(); -@@ -646,6 +651,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( +@@ -645,6 +650,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( } gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { @@ -250,7 +250,7 @@ index 065d98ec077e..e63ddacfd8a7 100644 return bounds_in_pixels_.origin(); } -@@ -1416,7 +1425,6 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1412,7 +1421,6 @@ void DesktopWindowTreeHostX11::InitX11Window( XAtom window_type; switch (params.type) { case Widget::InitParams::TYPE_MENU: @@ -258,7 +258,7 @@ index 065d98ec077e..e63ddacfd8a7 100644 window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU"); break; case Widget::InitParams::TYPE_TOOLTIP: -@@ -1472,9 +1480,15 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1468,9 +1476,15 @@ void DesktopWindowTreeHostX11::InitX11Window( attribute_mask |= CWBorderPixel; swa.border_pixel = 0; @@ -275,7 +275,7 @@ index 065d98ec077e..e63ddacfd8a7 100644 bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.height(), 0, // border width -@@ -2092,6 +2106,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( +@@ -2083,6 +2097,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( } break; } @@ -287,7 +287,7 @@ index 065d98ec077e..e63ddacfd8a7 100644 case x11::FocusOut: OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode, 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 cc9d5fb48234..f8daf495d5d9 100644 +index 4ae19b04ef8a..6e58f00808db 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h @@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -303,7 +303,7 @@ index cc9d5fb48234..f8daf495d5d9 100644 protected: // Overridden from DesktopWindowTreeHost: void Init(const Widget::InitParams& params) override; -@@ -330,6 +336,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -324,6 +330,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 // The bounds of |xwindow_|. gfx::Rect bounds_in_pixels_; @@ -313,7 +313,7 @@ index cc9d5fb48234..f8daf495d5d9 100644 // Whenever the bounds are set, we keep the previous set of bounds around so // we can have a better chance of getting the real // |restored_bounds_in_pixels_|. Window managers tend to send a Configure -@@ -370,6 +379,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -364,6 +373,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 // Whether we used an ARGB visual for our window. bool use_argb_visual_; @@ -324,7 +324,7 @@ index cc9d5fb48234..f8daf495d5d9 100644 DesktopDragDropClientAuraX11* drag_drop_client_; std::unique_ptr x11_non_client_event_filter_; -@@ -459,6 +472,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -453,6 +466,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 uint32_t modal_dialog_counter_; @@ -427,7 +427,7 @@ index c7296fed234d..244d0034a1c4 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 2841eb8bfc0d..ed42a0936f0d 100644 +index 9afbcf6ca30a..76729a6357be 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc @@ -2872,10 +2872,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, diff --git a/patch/patches/vr_build_873170.patch b/patch/patches/vr_build_873170.patch index dd9f9774d..4282099b9 100644 --- a/patch/patches/vr_build_873170.patch +++ b/patch/patches/vr_build_873170.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/vr/BUILD.gn chrome/browser/vr/BUILD.gn -index f79a44750343..ca460c149d1e 100644 +index cd0f342dfd04..342afb92fd51 100644 --- chrome/browser/vr/BUILD.gn +++ chrome/browser/vr/BUILD.gn -@@ -389,6 +389,7 @@ source_set("vr_base") { +@@ -406,6 +406,7 @@ source_set("vr_base") { ] deps = [ diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index a00dd722a..c654e54ba 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 169b1d8d8cb7..453ba504d41f 100644 +index 8ce6d0d2f8ca..79927c392d2a 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -1958,21 +1958,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1992,21 +1992,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -45,7 +45,7 @@ index 169b1d8d8cb7..453ba504d41f 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2665,6 +2674,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2701,6 +2710,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -61,16 +61,16 @@ index 169b1d8d8cb7..453ba504d41f 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2695,7 +2713,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2733,7 +2751,7 @@ void WebContentsImpl::CreateNewWindow( // TODO(brettw): It seems bogus that we have to call this function on the // newly created object and give it one of its own member variables. new_view->CreateViewForWidget( -- new_contents->GetRenderViewHost()->GetWidget(), false); -+ new_contents->GetRenderViewHost()->GetWidget(), nullptr); +- new_contents_impl->GetRenderViewHost()->GetWidget(), false); ++ new_contents_impl->GetRenderViewHost()->GetWidget(), nullptr); } // Save the created window associated with the route so we can show it // later. -@@ -6117,7 +6135,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -6170,7 +6188,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -122,10 +122,10 @@ index f26f7e501663..1b773a654118 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 1c9c817e6075..ed4a5461e0f7 100644 +index df6045dc917c..ca0b7812eba9 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h -@@ -47,10 +47,12 @@ class ColorChooser; +@@ -54,10 +54,12 @@ class FileSelectListener; class JavaScriptDialogManager; class RenderFrameHost; class RenderProcessHost; @@ -138,7 +138,7 @@ index 1c9c817e6075..ed4a5461e0f7 100644 struct ContextMenuParams; struct DropData; struct NativeWebKeyboardEvent; -@@ -309,6 +311,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -316,6 +318,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 94ad52041..5a98f3963 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,10 +10,10 @@ index 92e9cb865204..4628c56882b4 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 5a98eaf6821f..ee20e83b52cf 100644 +index 2f57bdd1ef3e..7910c9c12937 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -771,6 +771,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -766,6 +766,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -23,7 +23,7 @@ index 5a98eaf6821f..ee20e83b52cf 100644 + virtual void DevToolsAgentDetached() {} + protected: - WebThread* main_thread_; + Thread* main_thread_; diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc index c360933eb10f..6295f9d675f7 100644 @@ -43,32 +43,11 @@ index c360933eb10f..6295f9d675f7 100644 ->Tree() .Top() .GetSecurityContext() -diff --git third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc -index 368ce9049971..6865c8af9d75 100644 ---- third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc -+++ third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc -@@ -313,6 +313,8 @@ WebDevToolsAgentImpl::Session::Session( - &WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this))); - - InitializeInspectorSession(std::move(reattach_session_state)); -+ -+ Platform::Current()->DevToolsAgentAttached(); - } - - WebDevToolsAgentImpl::Session::~Session() { -@@ -337,6 +339,7 @@ void WebDevToolsAgentImpl::Session::Detach() { - io_session_->DeleteSoon(); - io_session_ = nullptr; - inspector_session_->Dispose(); -+ Platform::Current()->DevToolsAgentDetached(); - } - - void WebDevToolsAgentImpl::Session::SendProtocolResponse( diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index e25ac447fb90..3a0c728f1d95 100644 +index 339d96d4dfbd..27b86a9b7a78 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1223,7 +1223,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { +@@ -1238,7 +1238,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -77,6 +56,34 @@ index e25ac447fb90..3a0c728f1d95 100644 Tree().Top().GetSecurityContext()->GetSecurityOrigin()); } +diff --git third_party/blink/renderer/core/inspector/devtools_agent.cc third_party/blink/renderer/core/inspector/devtools_agent.cc +index 6d31a13f56b8..be2888da4762 100644 +--- third_party/blink/renderer/core/inspector/devtools_agent.cc ++++ third_party/blink/renderer/core/inspector/devtools_agent.cc +@@ -8,6 +8,7 @@ + #include + + #include "mojo/public/cpp/bindings/binding.h" ++#include "third_party/blink/public/platform/platform.h" + #include "third_party/blink/renderer/core/inspector/inspector_session.h" + #include "third_party/blink/renderer/core/inspector/inspector_task_runner.h" + #include "third_party/blink/renderer/platform/cross_thread_functional.h" +@@ -132,6 +133,7 @@ DevToolsAgent::Session::Session( + WTF::Bind(&DevToolsAgent::Session::Detach, WrapWeakPersistent(this))); + inspector_session_ = + agent_->client_->AttachSession(this, std::move(reattach_session_state)); ++ Platform::Current()->DevToolsAgentAttached(); + } + + DevToolsAgent::Session::~Session() { +@@ -151,6 +153,7 @@ void DevToolsAgent::Session::Detach() { + io_session_->DeleteSoon(); + io_session_ = nullptr; + inspector_session_->Dispose(); ++ Platform::Current()->DevToolsAgentDetached(); + } + + void DevToolsAgent::Session::SendProtocolResponse( diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc index 4277312bcad3..ca460b9ec0ca 100644 --- third_party/blink/renderer/core/page/page.cc @@ -176,7 +183,7 @@ index 8d2baa9630d6..223de74e8e02 100644 Member validation_message_client_; diff --git third_party/blink/renderer/platform/plugins/plugin_data.cc third_party/blink/renderer/platform/plugins/plugin_data.cc -index 0ae2fafa2498..1ed863662584 100644 +index 8e1cba5dcfe9..07a2b150dcc5 100644 --- third_party/blink/renderer/platform/plugins/plugin_data.cc +++ third_party/blink/renderer/platform/plugins/plugin_data.cc @@ -88,10 +88,12 @@ void PluginData::RefreshBrowserSidePluginCache() { @@ -204,7 +211,7 @@ index 0ae2fafa2498..1ed863662584 100644 auto* plugin_info = new PluginInfo(plugin->name, FilePathToWebString(plugin->filename), diff --git third_party/blink/renderer/platform/plugins/plugin_data.h third_party/blink/renderer/platform/plugins/plugin_data.h -index f1a78d3e0d5f..f6403f5ac018 100644 +index fc395cb63ce9..0645b6ae102c 100644 --- third_party/blink/renderer/platform/plugins/plugin_data.h +++ third_party/blink/renderer/platform/plugins/plugin_data.h @@ -101,7 +101,8 @@ class PLATFORM_EXPORT PluginData final diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index cc379e685..2d04020b4 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 94806693b332..ca5ad0c33a7f 100644 +index 2faa7369ddf3..7d0d41299fdd 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc @@ -281,7 +281,7 @@ void PointerEventManager::HandlePointerInterruption( diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index ac0d283af..83cda5176 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 bafddd241354..1f66e731b111 100644 +index 68e82b2554c6..3434655b89b8 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -356,6 +356,7 @@ class WebView : protected WebWidget { +@@ -357,6 +357,7 @@ class WebView : protected WebWidget { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -10,7 +10,7 @@ index bafddd241354..1f66e731b111 100644 // Hides any popup (suggestions, selects...) that might be showing. virtual void HidePopups() = 0; -@@ -380,6 +381,8 @@ class WebView : protected WebWidget { +@@ -381,6 +382,8 @@ class WebView : protected WebWidget { unsigned inactive_background_color, unsigned inactive_foreground_color) = 0; @@ -20,7 +20,7 @@ index bafddd241354..1f66e731b111 100644 // Call these methods before and after running a nested, modal event loop diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index c6c7154f6e0a..0ed9276cb46e 100644 +index 81b10a7c81a5..66c66305b340 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -234,8 +234,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -48,10 +48,10 @@ index c6c7154f6e0a..0ed9276cb46e 100644 suppress_next_keypress_event_(false), ime_accept_events_(true), diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index b1399b141480..2a9bba9f2746 100644 +index fb8a36b05106..9db158c1e538 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -104,7 +104,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -105,7 +105,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). @@ -61,7 +61,7 @@ index b1399b141480..2a9bba9f2746 100644 // WebWidget methods: void Close() override; -@@ -246,7 +247,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -241,7 +242,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, HitTestResult CoreHitTestResultAt(const WebPoint&); void InvalidateRect(const IntRect&); @@ -70,7 +70,7 @@ index b1399b141480..2a9bba9f2746 100644 void SetBaseBackgroundColorOverride(SkColor); void ClearBaseBackgroundColorOverride(); void SetBackgroundColorOverride(SkColor); -@@ -607,6 +608,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -602,6 +603,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_; bool fake_page_scale_animation_use_anchor_; diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index 10dc81bc5..7fc616dc4 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ 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 dfe0f29dc772..606f07a1d1ed 100644 +index c9a041567458..96b2bf09d5f2 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 @@ -18,6 +18,7 @@ @@ -21,7 +21,7 @@ index dfe0f29dc772..606f07a1d1ed 100644 // We are only interested in sync logs for the primary user profile. Profile* profile = ProfileManager::GetPrimaryUserProfile(); if (!profile || -@@ -268,6 +273,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( +@@ -267,6 +272,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; @@ -35,7 +35,7 @@ index dfe0f29dc772..606f07a1d1ed 100644 extensions::ExtensionRegistry::Get(profile); std::string extensions_list; diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc -index 3280b5e9fd6b..13ef1b99191e 100644 +index 8594ab10d673..41acbbe058a1 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc @@ -17,6 +17,7 @@ @@ -46,7 +46,7 @@ index 3280b5e9fd6b..13ef1b99191e 100644 #include "components/nacl/common/nacl_process_type.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/browser_child_process_host_iterator.h" -@@ -252,8 +253,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -249,8 +250,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { #if BUILDFLAG(ENABLE_EXTENSIONS) // Determine if this is an extension process. diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index a1df9a7fc..ae7d5c6c8 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 078f4f2a1c07..2cdb1166dec8 100644 +index bb7bbbd686f0..da72f775794b 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4502,7 +4502,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4510,7 +4510,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 1143491d6..bbd1ec6e4 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 79ae61d7e5c9..92b1721013bc 100644 +index 95cffa1b4eec..691ca2f622f8 100644 --- services/service_manager/sandbox/win/sandbox_win.cc +++ services/service_manager/sandbox/win/sandbox_win.cc -@@ -883,8 +883,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( +@@ -912,8 +912,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( #endif // Post-startup mitigations. diff --git a/tools/make_pack_header.py b/tools/make_pack_header.py index f07afc40d..e2f431118 100644 --- a/tools/make_pack_header.py +++ b/tools/make_pack_header.py @@ -14,7 +14,7 @@ import string import sys -def MakeFileSegment(input): +def MakeFileSegment(input, all_names): result = """ // --------------------------------------------------------------------------- @@ -30,6 +30,13 @@ def MakeFileSegment(input): p = re.compile('#define\s([A-Za-z0-9_]{1,})\s([0-9]{1,})') list = p.findall(contents) for name, id in list: + # If the same define exists in multiple files add a suffix. + if name in all_names: + all_names[name] += 1 + name += '_%d' % all_names[name] + else: + all_names[name] = 1 + result += "\n#define %s %s" % (name, id) return result @@ -79,9 +86,11 @@ def MakeFile(output, input): # sort the input files by name input = sorted(input, key=lambda path: os.path.split(path)[1]) + all_names = {} + # generate the file segments for file in input: - result += MakeFileSegment(file) + result += MakeFileSegment(file, all_names) # footer string result += \