diff --git a/BUILD.gn b/BUILD.gn index b002c0daa..5e9592ec9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1328,8 +1328,9 @@ make_pack_header("strings") { "$root_gen_dir/components/strings/grit/components_strings.h", "$root_gen_dir/extensions/strings/grit/extensions_strings.h", "$root_gen_dir/services/strings/grit/services_strings.h", - "$root_gen_dir/third_party/blink/public/strings/grit/blink_accessibility_strings.h", "$root_gen_dir/third_party/blink/public/strings/grit/blink_strings.h", + "$root_gen_dir/ui/strings/grit/app_locale_settings.h", + "$root_gen_dir/ui/strings/grit/auto_image_annotation_strings.h", "$root_gen_dir/ui/strings/grit/ui_strings.h", ] @@ -1346,8 +1347,8 @@ make_pack_header("strings") { "//extensions/strings", "//services/strings", "//third_party/blink/public/strings", - "//third_party/blink/public/strings:accessibility_strings", "//ui/strings:app_locale_settings", + "//ui/strings:auto_image_annotation_strings", "//ui/strings:ui_strings", ] } @@ -1471,50 +1472,32 @@ if (is_mac) { ] } - if (use_egl) { - # Add the ANGLE .dylibs in the MODULE_DIR of the Framework app bundle. - bundle_data("cef_framework_angle_binaries") { - sources = [ - "$root_out_dir/egl_intermediates/libEGL.dylib", - "$root_out_dir/egl_intermediates/libGLESv2.dylib", - ] - outputs = [ - "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", - ] - public_deps = [ - "//ui/gl:angle_library_copy", - ] - } - - # Add the SwiftShader .dylibs in the MODULE_DIR of the Framework app bundle. - bundle_data("cef_framework_swiftshader_binaries") { - sources = [ - "$root_out_dir/vk_intermediates/libvk_swiftshader.dylib", - "$root_out_dir/vk_intermediates/vk_swiftshader_icd.json", - ] - outputs = [ - "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", - ] - public_deps = [ - "//ui/gl:swiftshader_vk_library_copy", - ] - } + # Add the ANGLE .dylibs in the MODULE_DIR of the Framework app bundle. + bundle_data("cef_framework_angle_binaries") { + sources = [ + "$root_out_dir/egl_intermediates/libEGL.dylib", + "$root_out_dir/egl_intermediates/libGLESv2.dylib", + ] + outputs = [ + "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", + ] + public_deps = [ + "//ui/gl:angle_library_copy", + ] } - group("cef_framework_angle_library") { - if (use_egl) { - deps = [ - ":cef_framework_angle_binaries", - ] - } - } - - group("cef_framework_swiftshader_library") { - if (use_egl) { - deps = [ - ":cef_framework_swiftshader_binaries", - ] - } + # Add the SwiftShader .dylibs in the MODULE_DIR of the Framework app bundle. + bundle_data("cef_framework_swiftshader_binaries") { + sources = [ + "$root_out_dir/vk_intermediates/libvk_swiftshader.dylib", + "$root_out_dir/vk_intermediates/vk_swiftshader_icd.json", + ] + outputs = [ + "{{bundle_contents_dir}}/Libraries/{{source_file_part}}", + ] + public_deps = [ + "//ui/gl:swiftshader_vk_library_copy", + ] } mac_framework_bundle("cef_framework") { @@ -1538,9 +1521,9 @@ if (is_mac) { gypi_paths.autogen_library_side deps = [ - ":cef_framework_angle_library", + ":cef_framework_angle_binaries", ":cef_framework_resources", - ":cef_framework_swiftshader_library", + ":cef_framework_swiftshader_binaries", ":libcef_static", ":libcef_test_support", ] diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index aaa67eea5..7f617d3fa 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/127.0.6533.0' + 'chromium_checkout': 'refs/tags/128.0.6613.0' } diff --git a/CHROMIUM_UPDATE.txt b/CHROMIUM_UPDATE.txt index 254ec0fcf..d3d64f83a 100644 --- a/CHROMIUM_UPDATE.txt +++ b/CHROMIUM_UPDATE.txt @@ -27,17 +27,6 @@ # Files in the chromium/src directory that should be evaluated for changes. # Similar changes may need to be applied to the CEF source code. 'files': [ - 'chrome/browser/browser_process.h', - 'chrome/browser/extensions/api/tabs/tabs_api.*', - 'chrome/browser/extensions/chrome_component_extension_resource_manager.*', - 'chrome/browser/extensions/chrome_extension_web_contents_observer.*', - 'chrome/browser/extensions/component_loader.*', - 'chrome/browser/extensions/extension_service.*', - 'chrome/browser/profiles/profile.h', - 'chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.*', - 'chrome/common/extensions/api/*_features.json', - 'chrome/renderer/chrome_content_renderer_client.*', - 'chrome/renderer/extensions/chrome_extensions_renderer_client.*', 'components/content_settings/core/common/content_settings_types.mojom', 'components/permissions/request_type.h', 'content/browser/renderer_host/render_widget_host_view_base.*', diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index a9ea26afe..846ed4ede 100644 --- a/include/cef_api_hash.h +++ b/include/cef_api_hash.h @@ -42,13 +42,13 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "9428a74387b371a45469c91f7dbd648b2dc74132" +#define CEF_API_HASH_UNIVERSAL "316cc23ff49e0d0962090cbfb0a0279ce3dc3c50" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "e76d3804b2419a0bf024e97d6b9e10df53d93dad" +#define CEF_API_HASH_PLATFORM "66c126d91698670af3835a707a84ce4dbb4a16fa" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "c88c77c84ecbd81cbf4489c1b1ab4bf0396c26c3" +#define CEF_API_HASH_PLATFORM "c1d8d20920c3a3e13a6a6efef51b2b775f69d2c7" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "84373e28b1ed172ce6a08da2ea33ca787f92d6dc" +#define CEF_API_HASH_PLATFORM "7ccfa4c608c16a4f8bedc97a2bdf50729784c5ee" #endif #ifdef __cplusplus diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index a8d3c2a10..6e490adc3 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -3451,7 +3451,8 @@ typedef enum { CEF_CPAIT_PRICE_READ_ANYTHING, CEF_CPAIT_PRODUCT_SPECIFICATIONS, CEF_CPAIT_LENS_OVERLAY, - CEF_CPAIT_MAX_VALUE = CEF_CPAIT_LENS_OVERLAY, + CEF_CPAIT_DISCOUNTS, + CEF_CPAIT_MAX_VALUE = CEF_CPAIT_DISCOUNTS, } cef_chrome_page_action_icon_type_t; /// diff --git a/include/internal/cef_types_content_settings.h b/include/internal/cef_types_content_settings.h index f4fa4678b..456246dbe 100644 --- a/include/internal/cef_types_content_settings.h +++ b/include/internal/cef_types_content_settings.h @@ -438,12 +438,35 @@ typedef enum { /// Website setting which is used for UnusedSitePermissionsService to store /// auto-revoked notification permissions from abusive sites. - REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS, + CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS, /// Content setting that controls tracking protection status per site. /// BLOCK: Protections enabled. This is the default state. /// ALLOW: Protections disabled. - TRACKING_PROTECTION, + CEF_CONTENT_SETTING_TYPE_TRACKING_PROTECTION, + + // With this permission, when the application calls `getDisplayMedia()`, a + // system audio track can be returned without showing the display media + // selection picker. The application can explicitly specify + // `systemAudio: 'exclude'` or `video: true` to still show the display media + // selection picker if needed. Please note that the setting only works for + // WebUI. + CEF_CONTENT_SETTING_TYPE_DISPLAY_MEDIA_SYSTEM_AUDIO, + + // Whether to use the higher-tier v8 optimizers for running JavaScript on the + // page. + CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_OPTIMIZER, + + // Content Setting for the Storage Access Headers persistent origin trial that + // allows origins to opt into the storage access header behavior. Should be + // scoped to `REQUESTING_ORIGIN_AND_TOP_SCHEMEFUL_SITE_SCOPE` in order to + // correspond to the design of persistent origin trials. See also: + // https://github.com/cfredric/storage-access-headers + // ALLOW: storage access request headers will be attached to cross-site + // requests, and url requests will look for response headers from + // origins to retry a request or load with storage access. + // BLOCK (default): no effect. + CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS_HEADER_ORIGIN_TRIAL, } cef_content_setting_types_t; /// diff --git a/libcef/browser/browser_host_base.cc b/libcef/browser/browser_host_base.cc index d02b6ebf9..6cf749ebc 100644 --- a/libcef/browser/browser_host_base.cc +++ b/libcef/browser/browser_host_base.cc @@ -1275,16 +1275,15 @@ void CefBrowserHostBase::RunSelectFile( const ui::SelectFileDialog::FileTypeInfo* file_types, int file_type_index, const base::FilePath::StringType& default_extension, - gfx::NativeWindow owning_window, - void* params) { + gfx::NativeWindow owning_window) { if (!EnsureFileDialogManager()) { LOG(ERROR) << "File dialog canceled due to invalid state."; - listener->FileSelectionCanceled(params); + listener->FileSelectionCanceled(); return; } file_dialog_manager_->RunSelectFile(listener, std::move(policy), type, title, default_path, file_types, file_type_index, - default_extension, owning_window, params); + default_extension, owning_window); } void CefBrowserHostBase::SelectFileListenerDestroyed( diff --git a/libcef/browser/browser_host_base.h b/libcef/browser/browser_host_base.h index d266c36c9..ba1439ad7 100644 --- a/libcef/browser/browser_host_base.h +++ b/libcef/browser/browser_host_base.h @@ -330,8 +330,7 @@ class CefBrowserHostBase : public CefBrowserHost, const ui::SelectFileDialog::FileTypeInfo* file_types, int file_type_index, const base::FilePath::StringType& default_extension, - gfx::NativeWindow owning_window, - void* params); + gfx::NativeWindow owning_window); void SelectFileListenerDestroyed(ui::SelectFileDialog::Listener* listener); // Called from AlloyBrowserHostImpl::GetJavaScriptDialogManager and diff --git a/libcef/browser/file_dialog_manager.cc b/libcef/browser/file_dialog_manager.cc index 3021d9c65..3c9532403 100644 --- a/libcef/browser/file_dialog_manager.cc +++ b/libcef/browser/file_dialog_manager.cc @@ -203,9 +203,8 @@ class CefFileSelectListener : public content::FileSelectListener { class CefSelectFileDialogListener : public ui::SelectFileDialog::Listener { public: CefSelectFileDialogListener(ui::SelectFileDialog::Listener* listener, - void* params, base::OnceClosure callback) - : listener_(listener), params_(params), callback_(std::move(callback)) {} + : listener_(listener), callback_(std::move(callback)) {} CefSelectFileDialogListener(const CefSelectFileDialogListener&) = delete; CefSelectFileDialogListener& operator=(const CefSelectFileDialogListener&) = @@ -220,7 +219,7 @@ class CefSelectFileDialogListener : public ui::SelectFileDialog::Listener { // Don't execute the listener. Destroy(); } else { - FileSelectionCanceled(params_); + FileSelectionCanceled(); } } @@ -229,27 +228,22 @@ class CefSelectFileDialogListener : public ui::SelectFileDialog::Listener { private: ~CefSelectFileDialogListener() override = default; - void FileSelected(const ui::SelectedFileInfo& file, - int index, - void* params) override { - DCHECK_EQ(params, params_); + void FileSelected(const ui::SelectedFileInfo& file, int index) override { executing_ = true; - listener_.ExtractAsDangling()->FileSelected(file, index, params); + listener_.ExtractAsDangling()->FileSelected(file, index); Destroy(); } - void MultiFilesSelected(const std::vector& files, - void* params) override { - DCHECK_EQ(params, params_); + void MultiFilesSelected( + const std::vector& files) override { executing_ = true; - listener_.ExtractAsDangling()->MultiFilesSelected(files, params); + listener_.ExtractAsDangling()->MultiFilesSelected(files); Destroy(); } - void FileSelectionCanceled(void* params) override { - DCHECK_EQ(params, params_); + void FileSelectionCanceled() override { executing_ = true; - listener_.ExtractAsDangling()->FileSelectionCanceled(params); + listener_.ExtractAsDangling()->FileSelectionCanceled(); Destroy(); } @@ -259,7 +253,6 @@ class CefSelectFileDialogListener : public ui::SelectFileDialog::Listener { } raw_ptr listener_; - const raw_ptr params_; base::OnceClosure callback_; // Used to avoid re-entrancy from Cancel(). @@ -378,18 +371,16 @@ void CefFileDialogManager::RunSelectFile( const ui::SelectFileDialog::FileTypeInfo* file_types, int file_type_index, const base::FilePath::StringType& default_extension, - gfx::NativeWindow owning_window, - void* params) { + gfx::NativeWindow owning_window) { CEF_REQUIRE_UIT(); active_listeners_.insert(listener); auto chooser_params = SelectFileToFileChooserParams(type, title, default_path, file_types); - auto callback = - base::BindOnce(&CefFileDialogManager::SelectFileDoneByDelegateCallback, - weak_ptr_factory_.GetWeakPtr(), - base::UnsafeDangling(listener), base::Unretained(params)); + auto callback = base::BindOnce( + &CefFileDialogManager::SelectFileDoneByDelegateCallback, + weak_ptr_factory_.GetWeakPtr(), base::UnsafeDangling(listener)); callback = MaybeRunDelegate(chooser_params, file_types->extensions, file_types->extension_description_overrides, std::move(callback)); @@ -423,7 +414,7 @@ void CefFileDialogManager::RunSelectFile( // This object will delete itself. dialog_listener_ = new CefSelectFileDialogListener( - listener, params, + listener, base::BindOnce(&CefFileDialogManager::SelectFileDoneByListenerCallback, weak_ptr_factory_.GetWeakPtr(), base::UnsafeDangling(listener), @@ -442,7 +433,7 @@ void CefFileDialogManager::RunSelectFile( } dialog_->SelectFile(type, title, default_path, file_types, file_type_index, - default_extension, owning_window, params); + default_extension, owning_window); } void CefFileDialogManager::SelectFileListenerDestroyed( @@ -549,7 +540,6 @@ CefFileDialogManager::MaybeRunDelegate( void CefFileDialogManager::SelectFileDoneByDelegateCallback( MayBeDangling listener, - void* params, const std::vector& paths) { CEF_REQUIRE_UIT(); @@ -562,12 +552,11 @@ void CefFileDialogManager::SelectFileDoneByDelegateCallback( active_listeners_.erase(listener.get()); if (paths.empty()) { - listener->FileSelectionCanceled(params); + listener->FileSelectionCanceled(); } else if (paths.size() == 1) { - listener->FileSelected(ui::SelectedFileInfo(paths[0]), /*index=*/0, params); + listener->FileSelected(ui::SelectedFileInfo(paths[0]), /*index=*/0); } else { - listener->MultiFilesSelected(ui::FilePathListToSelectedFileInfoList(paths), - params); + listener->MultiFilesSelected(ui::FilePathListToSelectedFileInfoList(paths)); } // |listener| is likely deleted at this point. } diff --git a/libcef/browser/file_dialog_manager.h b/libcef/browser/file_dialog_manager.h index 16f3f1d6d..2003d4b62 100644 --- a/libcef/browser/file_dialog_manager.h +++ b/libcef/browser/file_dialog_manager.h @@ -66,8 +66,7 @@ class CefFileDialogManager { const ui::SelectFileDialog::FileTypeInfo* file_types, int file_type_index, const base::FilePath::StringType& default_extension, - gfx::NativeWindow owning_window, - void* params); + gfx::NativeWindow owning_window); // Must be called when the |listener| passed to RunSelectFile is destroyed. void SelectFileListenerDestroyed(ui::SelectFileDialog::Listener* listener); @@ -83,7 +82,6 @@ class CefFileDialogManager { void SelectFileDoneByDelegateCallback( MayBeDangling listener, - void* params, const std::vector& paths); void SelectFileDoneByListenerCallback( MayBeDangling listener, diff --git a/libcef/browser/file_dialog_runner.cc b/libcef/browser/file_dialog_runner.cc index a793fb1ad..6ddbe1ff5 100644 --- a/libcef/browser/file_dialog_runner.cc +++ b/libcef/browser/file_dialog_runner.cc @@ -57,7 +57,6 @@ class CefSelectFileDialog final : public ui::SelectFileDialog { int file_type_index, const base::FilePath::StringType& default_extension, gfx::NativeWindow owning_window, - void* params, const GURL* caller) override { // Try to determine the associated browser (with decreasing levels of // confidence). @@ -100,7 +99,7 @@ class CefSelectFileDialog final : public ui::SelectFileDialog { if (!browser_) { LOG(ERROR) << "Failed to identify associated browser; canceling the file dialog"; - listener_->FileSelectionCanceled(params); + listener_->FileSelectionCanceled(); return; } @@ -110,7 +109,7 @@ class CefSelectFileDialog final : public ui::SelectFileDialog { browser_->RunSelectFile(listener_, std::move(select_file_policy_), type, title, default_path, file_types, file_type_index, - default_extension, owning_window, params); + default_extension, owning_window); } bool IsRunning(gfx::NativeWindow owning_window) const override { diff --git a/libcef/browser/native/browser_platform_delegate_native_aura.cc b/libcef/browser/native/browser_platform_delegate_native_aura.cc index f0d6ab9c5..8ce6e5aee 100644 --- a/libcef/browser/native/browser_platform_delegate_native_aura.cc +++ b/libcef/browser/native/browser_platform_delegate_native_aura.cc @@ -141,7 +141,7 @@ ui::MouseEvent CefBrowserPlatformDelegateNativeAura::TranslateUiClickEvent( DCHECK_GE(clickCount, 1); ui::EventType event_type = - mouseUp ? ui::ET_MOUSE_RELEASED : ui::ET_MOUSE_PRESSED; + mouseUp ? ui::EventType::kMouseReleased : ui::EventType::kMousePressed; gfx::PointF location(mouse_event.x, mouse_event.y); gfx::PointF root_location(GetScreenPoint( gfx::Point(mouse_event.x, mouse_event.y), /*want_dip_coords=*/false)); @@ -173,7 +173,7 @@ ui::MouseEvent CefBrowserPlatformDelegateNativeAura::TranslateUiMoveEvent( const CefMouseEvent& mouse_event, bool mouseLeave) const { ui::EventType event_type = - mouseLeave ? ui::ET_MOUSE_EXITED : ui::ET_MOUSE_MOVED; + mouseLeave ? ui::EventType::kMouseExited : ui::EventType::kMouseMoved; gfx::PointF location(mouse_event.x, mouse_event.y); gfx::PointF root_location(GetScreenPoint( gfx::Point(mouse_event.x, mouse_event.y), /*want_dip_coords=*/false)); @@ -194,7 +194,6 @@ ui::MouseWheelEvent CefBrowserPlatformDelegateNativeAura::TranslateUiWheelEvent( int deltaX, int deltaY) const { gfx::Vector2d offset(GetUiWheelEventOffset(deltaX, deltaY)); - DCHECK(!offset.IsZero()); gfx::PointF location(mouse_event.x, mouse_event.y); gfx::PointF root_location(GetScreenPoint( diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index 539668800..0f5fd3b60 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -263,14 +263,14 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent( time_stamp); } - ui::EventType type = ui::ET_UNKNOWN; + ui::EventType type = ui::EventType::kUnknown; switch (key_event.type) { case KEYEVENT_RAWKEYDOWN: case KEYEVENT_KEYDOWN: - type = ui::ET_KEY_PRESSED; + type = ui::EventType::kKeyPressed; break; case KEYEVENT_KEYUP: - type = ui::ET_KEY_RELEASED; + type = ui::EventType::kKeyReleased; break; default: DCHECK(false); diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index b4edfd005..eb27170d1 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -440,14 +440,14 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent( key_code, dom_code, flags, time_stamp); } - ui::EventType type = ui::ET_UNKNOWN; + ui::EventType type = ui::EventType::kUnknown; switch (key_event.type) { case KEYEVENT_RAWKEYDOWN: case KEYEVENT_KEYDOWN: - type = ui::ET_KEY_PRESSED; + type = ui::EventType::kKeyPressed; break; case KEYEVENT_KEYUP: - type = ui::ET_KEY_RELEASED; + type = ui::EventType::kKeyReleased; break; default: DCHECK(false); diff --git a/libcef/browser/net_service/response_filter_wrapper.cc b/libcef/browser/net_service/response_filter_wrapper.cc index 6b81e9021..76bc7858a 100644 --- a/libcef/browser/net_service/response_filter_wrapper.cc +++ b/libcef/browser/net_service/response_filter_wrapper.cc @@ -6,6 +6,7 @@ #include +#include "base/containers/span.h" #include "base/logging.h" #include "mojo/public/cpp/system/simple_watcher.h" #include "mojo/public/cpp/system/string_data_source.h" @@ -92,10 +93,9 @@ bool ResponseFilterWrapper::CreateOutputHandle( void ResponseFilterWrapper::OnSourceReadable(MojoResult, const mojo::HandleSignalsState&) { - const void* buffer = nullptr; - size_t read_bytes = 0; - MojoResult result = source_handle_->BeginReadData(&buffer, &read_bytes, - MOJO_READ_DATA_FLAG_NONE); + base::span buffer; + MojoResult result = + source_handle_->BeginReadData(MOJO_READ_DATA_FLAG_NONE, buffer); if (result == MOJO_RESULT_SHOULD_WAIT) { source_watcher_.ArmOrNotify(); return; @@ -107,14 +107,15 @@ void ResponseFilterWrapper::OnSourceReadable(MojoResult, return; } - Filter(static_cast(buffer), read_bytes); + base::span chars = base::as_chars(buffer); + Filter(chars.data(), chars.size()); if (last_status_ == RESPONSE_FILTER_ERROR) { // Something went wrong. Drain(false); return; } - source_handle_->EndReadData(read_bytes); + source_handle_->EndReadData(buffer.size()); source_watcher_.ArmOrNotify(); } diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index 38c869cf1..57a152026 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -14,8 +14,8 @@ #include "cef/libcef/browser/osr/web_contents_view_osr.h" #include "cef/libcef/browser/views/view_util.h" #include "cef/libcef/common/drag_data_impl.h" +#include "components/input/render_widget_host_input_event_router.h" #include "content/browser/web_contents/web_contents_impl.h" -#include "content/common/input/render_widget_host_input_event_router.h" #include "content/public/browser/render_view_host.h" #include "ui/display/screen.h" #include "ui/events/base_event_utils.h" diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 377c7b6dd..01cd0549f 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -22,6 +22,8 @@ #include "cef/libcef/browser/osr/touch_selection_controller_client_osr.h" #include "cef/libcef/browser/osr/video_consumer_osr.h" #include "cef/libcef/browser/thread_util.h" +#include "components/input/cursor_manager.h" +#include "components/input/render_widget_host_input_event_router.h" #include "components/viz/common/features.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/frame_sinks/copy_output_request.h" @@ -37,8 +39,6 @@ #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/content_switches_internal.h" -#include "content/common/input/cursor_manager.h" -#include "content/common/input/render_widget_host_input_event_router.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/context_factory.h" @@ -261,7 +261,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( render_widget_host_impl->SetCompositorForFlingScheduler(compositor_.get()); } - cursor_manager_ = std::make_unique(this); + cursor_manager_ = std::make_unique(this); // This may result in a call to GetFrameSinkId(). render_widget_host_->SetView(this); @@ -660,7 +660,7 @@ void CefRenderWidgetHostViewOSR::InitAsPopup( void CefRenderWidgetHostViewOSR::UpdateCursor(const ui::Cursor& cursor) {} -content::CursorManager* CefRenderWidgetHostViewOSR::GetCursorManager() { +input::CursorManager* CefRenderWidgetHostViewOSR::GetCursorManager() { return cursor_manager_.get(); } @@ -961,7 +961,7 @@ CefRenderWidgetHostViewOSR::CreateSyntheticGestureTarget() { bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView( const gfx::PointF& point, - RenderWidgetHostViewInput* target_view, + input::RenderWidgetHostViewInput* target_view, gfx::PointF* transformed_point) { if (target_view == this) { *transformed_point = point; @@ -1203,13 +1203,7 @@ void CefRenderWidgetHostViewOSR::SendKeyEvent( if (target_host && target_host->GetView()) { // Direct routing requires that events go directly to the View. - target_host->ForwardKeyboardEventWithLatencyInfo( - event, - ui::LatencyInfo(event.GetType() == blink::WebInputEvent::Type::kChar || - event.GetType() == - blink::WebInputEvent::Type::kRawKeyDown - ? ui::SourceEventType::KEY_PRESS - : ui::SourceEventType::OTHER)); + target_host->ForwardKeyboardEventWithLatencyInfo(event, ui::LatencyInfo()); } } @@ -1272,11 +1266,10 @@ void CefRenderWidgetHostViewOSR::SendMouseEvent( // forwards it to RenderWidgetTargeter::FindTargetAndDispatch as a const // reference, so const_cast here is safe. render_widget_host_->delegate()->GetInputEventRouter()->RouteMouseEvent( - this, const_cast(&event), - ui::LatencyInfo(ui::SourceEventType::OTHER)); + this, const_cast(&event), ui::LatencyInfo()); } else { - render_widget_host_->GetView()->ProcessMouseEvent( - event, ui::LatencyInfo(ui::SourceEventType::OTHER)); + render_widget_host_->GetView()->ProcessMouseEvent(event, + ui::LatencyInfo()); } } } @@ -1355,10 +1348,10 @@ void CefRenderWidgetHostViewOSR::SendMouseWheelEvent( ->GetInputEventRouter() ->RouteMouseWheelEvent( this, const_cast(&mouse_wheel_event), - ui::LatencyInfo(ui::SourceEventType::WHEEL)); + ui::LatencyInfo()); } else { - render_widget_host_->GetView()->ProcessMouseWheelEvent( - mouse_wheel_event, ui::LatencyInfo(ui::SourceEventType::WHEEL)); + render_widget_host_->GetView()->ProcessMouseWheelEvent(mouse_wheel_event, + ui::LatencyInfo()); } } } @@ -1505,9 +1498,9 @@ void CefRenderWidgetHostViewOSR::ProcessAckedTouchEvent( void CefRenderWidgetHostViewOSR::OnGestureEvent( const ui::GestureEventData& gesture) { - if ((gesture.type() == ui::ET_GESTURE_PINCH_BEGIN || - gesture.type() == ui::ET_GESTURE_PINCH_UPDATE || - gesture.type() == ui::ET_GESTURE_PINCH_END) && + if ((gesture.type() == ui::EventType::kGesturePinchBegin || + gesture.type() == ui::EventType::kGesturePinchUpdate || + gesture.type() == ui::EventType::kGesturePinchEnd) && !pinch_zoom_enabled_) { return; } @@ -1525,8 +1518,8 @@ void CefRenderWidgetHostViewOSR::OnGestureEvent( render_widget_host_->delegate()->GetInputEventRouter()->RouteGestureEvent( this, &web_event, latency_info); } else { - render_widget_host_->ForwardGestureEventWithLatencyInfo(web_event, - latency_info); + render_widget_host_->GetRenderInputRouter() + ->ForwardGestureEventWithLatencyInfo(web_event, latency_info); } } diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 91daa9eb2..e82f7c9d7 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -52,7 +52,6 @@ class TouchSelectionController; namespace content { class BackingStore; -class CursorManager; class DelegatedFrameHost; class DelegatedFrameHostClient; class RenderWidgetHost; @@ -60,6 +59,10 @@ class RenderWidgetHostImpl; class RenderWidgetHostViewGuest; } // namespace content +namespace input { +class CursorManager; +} + class CefCopyFrameGenerator; class CefSoftwareOutputDeviceOSR; class CefTouchSelectionControllerClientOSR; @@ -164,7 +167,7 @@ class CefRenderWidgetHostViewOSR void RenderProcessGone() override; void Destroy() override; void UpdateTooltipUnderCursor(const std::u16string& tooltip_text) override; - content::CursorManager* GetCursorManager() override; + input::CursorManager* GetCursorManager() override; gfx::Size GetCompositorViewportPixelSize() override; void CopyFromSurface( const gfx::Rect& src_rect, @@ -188,7 +191,7 @@ class CefRenderWidgetHostViewOSR CreateSyntheticGestureTarget() override; bool TransformPointToCoordSpaceForView( const gfx::PointF& point, - RenderWidgetHostViewInput* target_view, + input::RenderWidgetHostViewInput* target_view, gfx::PointF* transformed_point) override; void DidNavigate() override; void SelectionChanged(const std::u16string& text, @@ -396,7 +399,7 @@ class CefRenderWidgetHostViewOSR parent_local_surface_id_allocator_; viz::ParentLocalSurfaceIdAllocator compositor_local_surface_id_allocator_; - std::unique_ptr cursor_manager_; + std::unique_ptr cursor_manager_; // Provides |source_id| for BeginFrameArgs that we create. viz::StubBeginFrameSource begin_frame_source_; diff --git a/libcef/browser/osr/synthetic_gesture_target_osr.cc b/libcef/browser/osr/synthetic_gesture_target_osr.cc index c28e24643..194e0afab 100644 --- a/libcef/browser/osr/synthetic_gesture_target_osr.cc +++ b/libcef/browser/osr/synthetic_gesture_target_osr.cc @@ -23,15 +23,17 @@ void CefSyntheticGestureTargetOSR::DispatchWebTouchEventToPlatform( void CefSyntheticGestureTargetOSR::DispatchWebMouseWheelEventToPlatform( const blink::WebMouseWheelEvent& web_wheel, const ui::LatencyInfo& latency_info) { - render_widget_host()->ForwardWheelEventWithLatencyInfo(web_wheel, - latency_info); + render_widget_host() + ->GetRenderInputRouter() + ->ForwardWheelEventWithLatencyInfo(web_wheel, latency_info); } void CefSyntheticGestureTargetOSR::DispatchWebGestureEventToPlatform( const blink::WebGestureEvent& web_gesture, const ui::LatencyInfo& latency_info) { - render_widget_host()->ForwardGestureEventWithLatencyInfo(web_gesture, - latency_info); + render_widget_host() + ->GetRenderInputRouter() + ->ForwardGestureEventWithLatencyInfo(web_gesture, latency_info); } void CefSyntheticGestureTargetOSR::DispatchWebMouseEventToPlatform( diff --git a/libcef/browser/osr/touch_selection_controller_client_osr.cc b/libcef/browser/osr/touch_selection_controller_client_osr.cc index 97e7acd3b..424587805 100644 --- a/libcef/browser/osr/touch_selection_controller_client_osr.cc +++ b/libcef/browser/osr/touch_selection_controller_client_osr.cc @@ -470,7 +470,7 @@ bool CefTouchSelectionControllerClientOSR::IsCommandIdEnabled( case QM_EDITFLAG_CAN_PASTE: { std::u16string result; ui::DataTransferEndpoint data_dst = ui::DataTransferEndpoint( - ui::EndpointType::kDefault, /*notify_if_restricted=*/false); + ui::EndpointType::kDefault, {.notify_if_restricted = false}); ui::Clipboard::GetForCurrentThread()->ReadText( ui::ClipboardBuffer::kCopyPaste, &data_dst, &result); return editable && !result.empty(); diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index 9ae974e0d..458e8143a 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -61,7 +61,6 @@ class CefWebContentsViewOSR : public content::WebContentsView, void SetOverscrollControllerEnabled(bool enabled) override {} void OnCapturerCountChanged() override {} void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override {} - void TransferDragSecurityInfo(content::WebContentsView* view) override {} content::BackForwardTransitionAnimationManager* GetBackForwardTransitionAnimationManager() override { return nullptr; diff --git a/libcef/browser/permission_prompt.cc b/libcef/browser/permission_prompt.cc index 3a161e4d7..ece99d6fd 100644 --- a/libcef/browser/permission_prompt.cc +++ b/libcef/browser/permission_prompt.cc @@ -131,6 +131,10 @@ class CefPermissionPrompt : public permissions::PermissionPrompt { const override { return {}; } + std::optional + GetPromptPosition() const override { + return std::nullopt; + } bool IsAskPrompt() const override { return true; } private: diff --git a/libcef/browser/prefs/pref_helper.cc b/libcef/browser/prefs/pref_helper.cc index 146b0a1cc..be1eb8949 100644 --- a/libcef/browser/prefs/pref_helper.cc +++ b/libcef/browser/prefs/pref_helper.cc @@ -41,12 +41,14 @@ const char* GetTypeString(base::Value::Type type) { } // namespace bool HasPreference(PrefService* pref_service, const CefString& name) { - return (pref_service->FindPreference(name) != nullptr); + return (pref_service->FindPreference(std::string_view(name.ToString())) != + nullptr); } CefRefPtr GetPreference(PrefService* pref_service, const CefString& name) { - const PrefService::Preference* pref = pref_service->FindPreference(name); + const PrefService::Preference* pref = + pref_service->FindPreference(std::string_view(name.ToString())); if (!pref) { return nullptr; } @@ -65,7 +67,8 @@ CefRefPtr GetAllPreferences(PrefService* pref_service, } bool CanSetPreference(PrefService* pref_service, const CefString& name) { - const PrefService::Preference* pref = pref_service->FindPreference(name); + const PrefService::Preference* pref = + pref_service->FindPreference(std::string_view(name.ToString())); return (pref && pref->IsUserModifiable()); } @@ -75,7 +78,8 @@ bool SetPreference(PrefService* pref_service, CefString& error) { // The below validation logic should match PrefService::SetUserPrefValue. - const PrefService::Preference* pref = pref_service->FindPreference(name); + const PrefService::Preference* pref = + pref_service->FindPreference(std::string_view(name.ToString())); if (!pref) { error = "Trying to modify an unregistered preference"; return false; @@ -88,7 +92,7 @@ bool SetPreference(PrefService* pref_service, if (!value.get()) { // Reset the preference to its default value. - pref_service->ClearPref(name); + pref_service->ClearPref(std::string_view(name.ToString())); return true; } @@ -110,7 +114,7 @@ bool SetPreference(PrefService* pref_service, } // PrefService will make a DeepCopy of |impl_value|. - pref_service->Set(name, *impl_value); + pref_service->Set(std::string_view(name.ToString()), *impl_value); return true; } diff --git a/libcef/browser/prefs/pref_registrar.cc b/libcef/browser/prefs/pref_registrar.cc index 304c736f3..cb5e74b25 100644 --- a/libcef/browser/prefs/pref_registrar.cc +++ b/libcef/browser/prefs/pref_registrar.cc @@ -51,7 +51,8 @@ class CefPreferenceRegistrarImpl : public CefPreferenceRegistrar { registry_->RegisterDoublePref(nameStr, default_value->GetDouble()); return true; case VTYPE_STRING: - registry_->RegisterStringPref(nameStr, default_value->GetString()); + registry_->RegisterStringPref( + nameStr, std::string_view(default_value->GetString().ToString())); return true; case VTYPE_DICTIONARY: case VTYPE_LIST: @@ -70,9 +71,11 @@ class CefPreferenceRegistrarImpl : public CefPreferenceRegistrar { auto impl_value = impl->CopyValue(); if (impl_value.type() == base::Value::Type::DICT) { - registry_->RegisterDictionaryPref(name, std::move(impl_value.GetDict())); + registry_->RegisterDictionaryPref(std::string_view(name), + std::move(impl_value.GetDict())); } else if (impl_value.type() == base::Value::Type::LIST) { - registry_->RegisterListPref(name, std::move(impl_value.GetList())); + registry_->RegisterListPref(std::string_view(name), + std::move(impl_value.GetList())); } else { DCHECK(false); } diff --git a/libcef/browser/views/browser_view_impl.cc b/libcef/browser/views/browser_view_impl.cc index 5bbeec704..feead0781 100644 --- a/libcef/browser/views/browser_view_impl.cc +++ b/libcef/browser/views/browser_view_impl.cc @@ -24,7 +24,7 @@ namespace { std::optional GetGestureCommand( ui::GestureEvent* event) { #if BUILDFLAG(IS_MAC) - if (event->details().type() == ui::ET_GESTURE_SWIPE) { + if (event->details().type() == ui::EventType::kGestureSwipe) { if (event->details().swipe_left()) { return CEF_GESTURE_COMMAND_BACK; } else if (event->details().swipe_right()) { diff --git a/libcef/browser/x509_certificate_impl.cc b/libcef/browser/x509_certificate_impl.cc index 5c60fa396..95cfd13b9 100644 --- a/libcef/browser/x509_certificate_impl.cc +++ b/libcef/browser/x509_certificate_impl.cc @@ -7,7 +7,6 @@ #include "cef/libcef/browser/x509_cert_principal_impl.h" #include "cef/libcef/common/time_util.h" #include "net/cert/x509_util.h" -#include "net/ssl/ssl_private_key.h" namespace { @@ -28,10 +27,6 @@ CefRefPtr EncodeCertificate(const CRYPTO_BUFFER* cert_buffer, } // namespace -CefX509CertificateImpl::CefX509CertificateImpl( - std::unique_ptr identity) - : identity_(std::move(identity)), cert_(identity_->certificate()) {} - CefX509CertificateImpl::CefX509CertificateImpl( scoped_refptr cert) : cert_(cert) {} @@ -99,16 +94,6 @@ size_t CefX509CertificateImpl::GetIssuerChainSize() { return 0; } -void CefX509CertificateImpl::AcquirePrivateKey( - base::OnceCallback)> - private_key_callback) { - if (identity_) { - identity_->AcquirePrivateKey(std::move(private_key_callback)); - } else { - std::move(private_key_callback).Run(nullptr); - } -} - void CefX509CertificateImpl::GetEncodedIssuerChain( CefX509Certificate::IssuerChainBinaryList& chain, bool der) { diff --git a/libcef/browser/x509_certificate_impl.h b/libcef/browser/x509_certificate_impl.h index 7a7aeec77..92ab8bf41 100644 --- a/libcef/browser/x509_certificate_impl.h +++ b/libcef/browser/x509_certificate_impl.h @@ -9,7 +9,7 @@ #include #include "cef/include/cef_x509_certificate.h" -#include "net/ssl/client_cert_identity.h" +#include "net/cert/x509_certificate.h" // CefX509Certificate implementation class CefX509CertificateImpl : public CefX509Certificate { @@ -19,10 +19,6 @@ class CefX509CertificateImpl : public CefX509Certificate { CefX509CertificateImpl(const CefX509CertificateImpl&) = delete; CefX509CertificateImpl& operator=(const CefX509CertificateImpl&) = delete; - // Used with AlloyContentBrowserClient::SelectClientCertificate only. - explicit CefX509CertificateImpl( - std::unique_ptr identity); - // CefX509Certificate methods. CefRefPtr GetSubject() override; CefRefPtr GetIssuer() override; @@ -36,14 +32,10 @@ class CefX509CertificateImpl : public CefX509Certificate { void GetPEMEncodedIssuerChain(IssuerChainBinaryList& chain) override; scoped_refptr GetInternalCertObject() { return cert_; } - void AcquirePrivateKey( - base::OnceCallback)> - private_key_callback); private: void GetEncodedIssuerChain(IssuerChainBinaryList& chain, bool der); - std::unique_ptr identity_; scoped_refptr cert_; IssuerChainBinaryList pem_encoded_issuer_chain_; IssuerChainBinaryList der_encoded_issuer_chain_; diff --git a/libcef/common/chrome/chrome_main_delegate_cef.cc b/libcef/common/chrome/chrome_main_delegate_cef.cc index 8761d53e5..779206036 100644 --- a/libcef/common/chrome/chrome_main_delegate_cef.cc +++ b/libcef/common/chrome/chrome_main_delegate_cef.cc @@ -118,7 +118,7 @@ void InitLogging(const base::CommandLine* command_line) { ChromeMainDelegateCef::ChromeMainDelegateCef(CefMainRunner* runner, CefSettings* settings, CefRefPtr application) - : ChromeMainDelegate(base::TimeTicks::Now()), + : ChromeMainDelegate({.exe_entry_point_ticks = base::TimeTicks::Now()}), runner_(runner), settings_(settings), application_(application) { diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index 5bcb04657..abe6c8bd1 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -524,7 +524,7 @@ const mojo::Remote& CefFrameImpl::GetBrowserFrame( auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_); if (render_frame) { // Triggers creation of a CefBrowserFrame in the browser process. - render_frame->GetBrowserInterfaceBroker()->GetInterface( + render_frame->GetBrowserInterfaceBroker().GetInterface( browser_frame_.BindNewPipeAndPassReceiver()); browser_frame_.set_disconnect_with_reason_handler( base::BindOnce(&CefFrameImpl::OnBrowserFrameDisconnect, this)); diff --git a/patch/patch.cfg b/patch/patch.cfg index 1b6d950d0..fa6b9c5e3 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -227,6 +227,9 @@ patches = [ # Linux: Fix duplicate symbol error for window_frame_util.cc # https://issuetracker.google.com/issues/343037853#comment3 # + # Linux: Fix duplicate symbol error for tab_network_state.cc + # https://issuetracker.google.com/issues/353628440#comment8 + # # Avoid duplicate window from DevTools when CEF handles the open via # OnOpenURLFromTab. # https://github.com/chromiumembedded/cef/issues/3735 @@ -722,11 +725,6 @@ patches = [ # https://chromium-review.googlesource.com/c/chromium/src/+/5548577 'name': 'base_thread_pool_5548577' }, - { - # Linux: Fix ARM build broken by build_tflite_with_xnnpack change. - # https://issues.chromium.org/issues/348117454 - 'name': 'linux_tflite_348117454' - }, { # Fix DCHECK in SimpleMenuModel::AddSeparator when adding a separator with # hidden menu items. diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 1c1f8f0f4..e66c59f34 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 4ae52e5351615..272875eb5fe93 100644 +index 59f1502704eac..7e33aec70c24b 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -41,6 +41,7 @@ import("//build/nocompile.gni") @@ -10,7 +10,7 @@ index 4ae52e5351615..272875eb5fe93 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1510,7 +1511,11 @@ component("base") { +@@ -1521,7 +1522,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 4ae52e5351615..272875eb5fe93 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -1939,6 +1944,12 @@ component("base") { +@@ -1950,6 +1955,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -37,7 +37,7 @@ index 4ae52e5351615..272875eb5fe93 100644 "cfgmgr32.lib", "ntdll.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index 2c5dfc7870ce8..7ed12711289b4 100644 +index 3e47d1f5d35df..004eefac8bbf3 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc @@ -8,6 +8,7 @@ @@ -45,7 +45,7 @@ index 2c5dfc7870ce8..7ed12711289b4 100644 #include "base/dcheck_is_on.h" #include "base/no_destructor.h" +#include "cef/libcef/features/features.h" - #include "partition_alloc/partition_alloc_buildflags.h" + #include "partition_alloc/buildflags.h" #include "partition_alloc/shim/allocator_shim.h" @@ -33,7 +34,7 @@ struct Dispatcher::Impl { @@ -87,6 +87,28 @@ index 857159d757637..63b5b396a00dd 100644 #include "base/hash/sha1_nacl.h" #else #include "base/hash/sha1_boringssl.h" +diff --git base/metrics/crc32.cc base/metrics/crc32.cc +index 83e3cee2579ab..8238767ab9126 100644 +--- base/metrics/crc32.cc ++++ base/metrics/crc32.cc +@@ -3,14 +3,15 @@ + // found in the LICENSE file. + + #include "base/metrics/crc32.h" ++#include "cef/libcef/features/features.h" + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + #include "third_party/zlib/zlib.h" + #endif // !BUILDFLAG(IS_NACL) + + namespace base { + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + uint32_t Crc32(uint32_t sum, span data) { + if (data.empty()) { + return sum; diff --git base/rand_util.h base/rand_util.h index 746166bf75df7..7192a939e4fec 100644 --- base/rand_util.h @@ -112,23 +134,22 @@ index 746166bf75df7..7192a939e4fec 100644 public: using result_type = uint64_t; diff --git base/rand_util_win.cc base/rand_util_win.cc -index 6961e0ef8153c..8863f4ed65ee8 100644 +index 9c2ae8389bfb2..e639a4d85b3dd 100644 --- base/rand_util_win.cc +++ base/rand_util_win.cc -@@ -20,8 +20,12 @@ +@@ -20,7 +20,11 @@ #include "base/check.h" #include "base/feature_list.h" +#include "cef/libcef/features/features.h" + +#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) - #include "third_party/boringssl/src/include/openssl/crypto.h" #include "third_party/boringssl/src/include/openssl/rand.h" +#endif // Prototype for ProcessPrng. // See: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng -@@ -33,6 +37,7 @@ namespace base { +@@ -32,6 +36,7 @@ namespace base { namespace internal { @@ -136,7 +157,7 @@ index 6961e0ef8153c..8863f4ed65ee8 100644 namespace { // The BoringSSl helpers are duplicated in rand_util_fuchsia.cc and -@@ -54,6 +59,10 @@ bool UseBoringSSLForRandBytes() { +@@ -53,6 +58,10 @@ bool UseBoringSSLForRandBytes() { return g_use_boringssl.load(std::memory_order_relaxed); } @@ -147,15 +168,13 @@ index 6961e0ef8153c..8863f4ed65ee8 100644 } // namespace internal namespace { -@@ -71,6 +80,7 @@ decltype(&ProcessPrng) GetProcessPrng() { +@@ -70,11 +79,13 @@ decltype(&ProcessPrng) GetProcessPrng() { } void RandBytesInternal(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { - // Ensure BoringSSL is initialized so it can use things like RDRAND. - CRYPTO_library_init(); -@@ -78,6 +88,7 @@ void RandBytesInternal(span output, bool avoid_allocation) { + // BoringSSL's RAND_bytes always returns 1. Any error aborts the program. (void)RAND_bytes(output.data(), output.size()); return; } @@ -164,10 +183,10 @@ index 6961e0ef8153c..8863f4ed65ee8 100644 static decltype(&ProcessPrng) process_prng_fn = GetProcessPrng(); BOOL success = diff --git base/unguessable_token.cc base/unguessable_token.cc -index 1f91a938caf55..e7b383ebe3986 100644 +index ea33ca66f384c..33f4cc76f76bd 100644 --- base/unguessable_token.cc +++ base/unguessable_token.cc -@@ -10,8 +10,9 @@ +@@ -11,8 +11,9 @@ #include "base/format_macros.h" #include "base/rand_util.h" #include "build/build_config.h" @@ -178,7 +197,7 @@ index 1f91a938caf55..e7b383ebe3986 100644 #include "third_party/boringssl/src/include/openssl/mem.h" #endif -@@ -57,7 +58,7 @@ std::optional UnguessableToken::DeserializeFromString( +@@ -58,7 +59,7 @@ std::optional UnguessableToken::DeserializeFromString( } bool operator==(const UnguessableToken& lhs, const UnguessableToken& rhs) { @@ -188,7 +207,7 @@ index 1f91a938caf55..e7b383ebe3986 100644 return lhs.token_ == rhs.token_; #else diff --git base/win/sid.cc base/win/sid.cc -index dd063382d97e1..968dde0567c44 100644 +index 2f250ba9bf79d..8a269af206051 100644 --- base/win/sid.cc +++ base/win/sid.cc @@ -22,6 +22,7 @@ @@ -199,28 +218,27 @@ index dd063382d97e1..968dde0567c44 100644 #include "base/no_destructor.h" #include "base/rand_util.h" #include "base/ranges/algorithm.h" -@@ -29,8 +30,12 @@ +@@ -29,7 +30,11 @@ #include "base/win/scoped_handle.h" #include "base/win/scoped_localalloc.h" #include "base/win/windows_version.h" +#include "cef/libcef/features/features.h" + +#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) - #include "third_party/boringssl/src/include/openssl/crypto.h" #include "third_party/boringssl/src/include/openssl/sha.h" +#endif namespace base::win { -@@ -131,6 +136,7 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { +@@ -130,6 +135,7 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { if (known_cap != known_capabilities->end()) { return FromKnownCapability(known_cap->second); } +#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) - CRYPTO_library_init(); static_assert((SHA256_DIGEST_LENGTH / sizeof(DWORD)) == SECURITY_APP_PACKAGE_RID_COUNT); -@@ -143,6 +149,9 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { + DWORD rids[(SHA256_DIGEST_LENGTH / sizeof(DWORD)) + 2]; +@@ -141,6 +147,9 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { reinterpret_cast(&rids[2])); return FromSubAuthorities(SECURITY_APP_PACKAGE_AUTHORITY, std::size(rids), rids); diff --git a/patch/patches/base_test_4396276.patch b/patch/patches/base_test_4396276.patch index 95b1f2d7d..742897dac 100644 --- a/patch/patches/base_test_4396276.patch +++ b/patch/patches/base_test_4396276.patch @@ -1,8 +1,8 @@ diff --git base/test/BUILD.gn base/test/BUILD.gn -index a60a2c1de0166..a191640ca0375 100644 +index f7afbfba3f38b..0a40b88800afc 100644 --- base/test/BUILD.gn +++ base/test/BUILD.gn -@@ -192,11 +192,6 @@ static_library("test_support") { +@@ -197,11 +197,6 @@ static_library("test_support") { if (enable_base_tracing) { public_deps += [ "//third_party/perfetto:perfetto_test_support" ] @@ -14,7 +14,7 @@ index a60a2c1de0166..a191640ca0375 100644 deps += [ ":amalgamated_perfetto_sql_stdlib", ":gen_cc_chrome_track_event_descriptor", -@@ -564,7 +559,7 @@ if (enable_base_tracing) { +@@ -569,7 +564,7 @@ if (enable_base_tracing) { # processor depends on dev_sqlite. The two share the same symbols but have # different implementations, so we need to hide dev_sqlite in this shared # library even in non-component builds to prevent duplicate symbols. @@ -23,7 +23,7 @@ index a60a2c1de0166..a191640ca0375 100644 if (is_ios) { _target_type = "ios_framework_bundle" } -@@ -573,6 +568,8 @@ if (enable_base_tracing) { +@@ -578,6 +573,8 @@ if (enable_base_tracing) { defines = [ "TEST_TRACE_PROCESSOR_IMPL" ] testonly = true sources = [ @@ -32,7 +32,7 @@ index a60a2c1de0166..a191640ca0375 100644 "test_trace_processor_export.h", "test_trace_processor_impl.cc", "test_trace_processor_impl.h", -@@ -590,33 +587,6 @@ if (enable_base_tracing) { +@@ -595,33 +592,6 @@ if (enable_base_tracing) { output_name = "TestTraceProcessor" bundle_deps_filter = [ "//third_party/icu:icudata" ] } @@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644 + #endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_ diff --git content/shell/BUILD.gn content/shell/BUILD.gn -index fdc8e7ef0641d..494fa1379b5a3 100644 +index 1cc29e1598bea..71accbbc8c91e 100644 --- content/shell/BUILD.gn +++ content/shell/BUILD.gn -@@ -913,7 +913,6 @@ if (is_mac) { +@@ -912,7 +912,6 @@ if (is_mac) { # Specify a sensible install_name for static builds. The library is # dlopen()ed so this is not used to resolve the module. ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ] diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 58706aa7e..1ce011fd8 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc -index 26fbdc7e7db0c..ac02e60276e5c 100644 +index 214c70f690b18..7e481aee2a1ca 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -2048,6 +2048,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin( +@@ -2079,6 +2079,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin( // DeclarativeApiTest.PersistRules. if (actual_process_lock.matches_scheme(url::kDataScheme)) return true; @@ -20,10 +20,10 @@ index 26fbdc7e7db0c..ac02e60276e5c 100644 // Make an exception to allow most visited tiles to commit in diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index 87db8bec18603..22c7d3fb838ab 100644 +index fa22dada07038..470611958482f 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -8057,10 +8057,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -8128,10 +8128,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index 87db8bec18603..22c7d3fb838ab 100644 } return origin_and_debug_info; -@@ -8168,6 +8180,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -8239,6 +8251,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { DetermineInitiatorRelationship(initiator_rfh, frame_tree_node_->current_frame_host())); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 180391dc8..57544b168 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index f598fd188a4ce..ed515fc40d77c 100644 +index 5898b8c54bef2..b490e38838e41 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn @@ -133,6 +133,9 @@ declare_args() { @@ -12,7 +12,7 @@ index f598fd188a4ce..ed515fc40d77c 100644 # Initialize all local variables with a pattern. This flag will fill # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent, -@@ -2203,11 +2206,13 @@ config("export_dynamic") { +@@ -2236,11 +2239,13 @@ config("export_dynamic") { config("thin_archive") { # The macOS and iOS default linker ld64 does not support reading thin # archives. diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 0250ae6b3..c87d25831 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 8e3fde5e841e1..8adc42aea0836 100644 +index 7c6e3dea2fa88..8eded7f24dfc2 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn -@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") +@@ -12,6 +12,7 @@ import("//build/config/compiler/pgo/pgo.gni") import("//build/config/features.gni") import("//build/config/python.gni") import("//build/config/ui.gni") +import("//cef/libcef/features/features.gni") import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") - import("//chrome/common/features.gni") -@@ -2049,6 +2050,7 @@ static_library("browser") { + import("//chrome/browser/request_header_integrity/buildflags.gni") +@@ -2062,6 +2063,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index 8e3fde5e841e1..8adc42aea0836 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2769,6 +2771,10 @@ static_library("browser") { +@@ -2771,6 +2773,10 @@ static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 5363bbc09..8e4d92f87 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index 21ab47267370b..eb9b383727995 100644 +index 583dbb67a9def..c76c7984642a7 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h -@@ -211,9 +211,9 @@ class BrowserProcess { +@@ -212,9 +212,9 @@ class BrowserProcess { virtual DownloadStatusUpdater* download_status_updater() = 0; virtual DownloadRequestLimiter* download_request_limiter() = 0; @@ -14,7 +14,7 @@ index 21ab47267370b..eb9b383727995 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 762b9d42bc7f7..361e25df2d8f5 100644 +index c37a02792e1ff..9002b26fd85f3 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc @@ -1111,18 +1111,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { @@ -38,10 +38,10 @@ index 762b9d42bc7f7..361e25df2d8f5 100644 std::unique_ptr manager) { background_mode_manager_ = std::move(manager); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index 8091cc691f093..9f16156c1f2cb 100644 +index 0baa5aac365c4..a31fd6207f99e 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h -@@ -194,8 +194,8 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -193,8 +193,8 @@ class BrowserProcessImpl : public BrowserProcess, void SetApplicationLocale(const std::string& actual_locale) override; DownloadStatusUpdater* download_status_updater() override; DownloadRequestLimiter* download_request_limiter() override; diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 4d772a54e..ea8375cf0 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,10 +13,10 @@ index 2480282a19d12..dbd1fbf8a15b5 100644 return false; } diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc -index 02ff1e580d3a7..e2e232c424029 100644 +index 4acc7a7a3998c..d80104e8f5aa3 100644 --- chrome/browser/devtools/devtools_window.cc +++ chrome/browser/devtools/devtools_window.cc -@@ -37,6 +37,7 @@ +@@ -38,6 +38,7 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/task_manager/web_contents_tags.h" #include "chrome/browser/ui/browser.h" @@ -24,7 +24,7 @@ index 02ff1e580d3a7..e2e232c424029 100644 #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/browser_window.h" -@@ -1234,6 +1235,13 @@ DevToolsWindow* DevToolsWindow::Create( +@@ -1211,6 +1212,13 @@ DevToolsWindow* DevToolsWindow::Create( !browser->is_type_normal()) { can_dock = false; } @@ -38,7 +38,7 @@ index 02ff1e580d3a7..e2e232c424029 100644 } // Create WebContents with devtools. -@@ -1754,9 +1762,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { +@@ -1674,9 +1682,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { if (!inspected_web_contents || !inspected_web_contents->OpenURL(params, /*navigation_handle_callback=*/{})) { @@ -52,7 +52,7 @@ index 02ff1e580d3a7..e2e232c424029 100644 } } -@@ -1919,12 +1931,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { +@@ -1839,12 +1851,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { Browser::CreationStatus::kOk) { return; } @@ -88,7 +88,7 @@ index 02ff1e580d3a7..e2e232c424029 100644 } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 74460ac479210..c484be466eefb 100644 +index c54ec37e56ad7..fda899ec278ef 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni") @@ -99,7 +99,7 @@ index 74460ac479210..c484be466eefb 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -412,6 +413,10 @@ static_library("ui") { +@@ -417,6 +418,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -107,10 +107,10 @@ index 74460ac479210..c484be466eefb 100644 + configs += [ "//cef/libcef/features:config" ] + } + - # Since browser and browser_ui actually depend on each other, - # we must omit the dependency from browser_ui to browser. - # However, this means browser_ui and browser should more or less -@@ -439,6 +444,7 @@ static_library("ui") { + public_deps = [ + # WARNING WARNING WARNING + # New dependencies outside of //chrome/browser should be added to +@@ -438,6 +443,7 @@ static_library("ui") { "//build:chromeos_buildflags", "//build/config/chromebox_for_meetings:buildflags", "//cc/paint", @@ -118,7 +118,7 @@ index 74460ac479210..c484be466eefb 100644 "//chrome:resources", "//chrome:strings", "//chrome/app:chrome_dll_resources", -@@ -759,6 +765,10 @@ static_library("ui") { +@@ -739,6 +745,10 @@ static_library("ui") { deps += [ "//components/plus_addresses/resources:vector_icons" ] } @@ -127,9 +127,17 @@ index 74460ac479210..c484be466eefb 100644 + } + # TODO(crbug.com/41437292): Remove this circular dependency. + # Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies". allow_circular_includes_from = [ - # TODO(crbug.com/40161499): Remove this circular dependency. -@@ -3040,6 +3050,8 @@ static_library("ui") { +@@ -1540,7 +1550,6 @@ static_library("ui") { + "tabs/tab_menu_model_factory.h", + "tabs/tab_model.cc", + "tabs/tab_model.h", +- "tabs/tab_network_state.cc", + "tabs/tab_network_state.h", + "tabs/tab_renderer_data.cc", + "tabs/tab_renderer_data.h", +@@ -2323,6 +2332,8 @@ static_library("ui") { "views/apps/app_dialog/app_local_block_dialog_view.h", "views/apps/app_dialog/app_pause_dialog_view.cc", "views/apps/app_dialog/app_pause_dialog_view.h", @@ -138,16 +146,16 @@ index 74460ac479210..c484be466eefb 100644 "views/apps/app_info_dialog/arc_app_info_links_panel.cc", "views/apps/app_info_dialog/arc_app_info_links_panel.h", "views/apps/chrome_app_window_client_views_chromeos.cc", -@@ -4249,8 +4261,6 @@ static_library("ui") { +@@ -3875,8 +3886,6 @@ static_library("ui") { "autofill/payments/webauthn_dialog_model.h", "autofill/payments/webauthn_dialog_model_observer.h", "autofill/payments/webauthn_dialog_state.h", - "frame/window_frame_util.cc", - "frame/window_frame_util.h", "incognito_clear_browsing_data_dialog_interface.h", - "signin/signin_modal_dialog.cc", - "signin/signin_modal_dialog.h", -@@ -5125,8 +5135,6 @@ static_library("ui") { + "passwords/password_cross_domain_confirmation_popup_controller_impl.cc", + "passwords/password_cross_domain_confirmation_popup_controller_impl.h", +@@ -4758,8 +4767,6 @@ static_library("ui") { "views/accessibility/theme_tracking_non_accessible_image_view.h", "views/apps/app_dialog/app_dialog_view.cc", "views/apps/app_dialog/app_dialog_view.h", @@ -156,7 +164,7 @@ index 74460ac479210..c484be466eefb 100644 "views/apps/app_info_dialog/app_info_dialog_container.cc", "views/apps/app_info_dialog/app_info_dialog_container.h", "views/apps/app_info_dialog/app_info_dialog_views.cc", -@@ -6908,6 +6916,7 @@ static_library("ui") { +@@ -6578,6 +6585,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -165,10 +173,10 @@ index 74460ac479210..c484be466eefb 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index 557abfcd71d85..fb64e93157148 100644 +index 681fe10f28260..89da7d87b306b 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -272,6 +272,25 @@ +@@ -271,6 +271,25 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -194,7 +202,7 @@ index 557abfcd71d85..fb64e93157148 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -537,6 +556,10 @@ Browser::Browser(const CreateParams& params) +@@ -536,6 +555,10 @@ Browser::Browser(const CreateParams& params) type_(params.type), profile_(params.profile), window_(nullptr), @@ -205,7 +213,7 @@ index 557abfcd71d85..fb64e93157148 100644 tab_strip_model_delegate_( std::make_unique(this)), tab_strip_model_(std::make_unique( -@@ -757,6 +780,12 @@ Browser::~Browser() { +@@ -769,6 +792,12 @@ Browser::~Browser() { // away so they don't try and call back to us. if (select_file_dialog_.get()) select_file_dialog_->ListenerDestroyed(); @@ -218,7 +226,7 @@ index 557abfcd71d85..fb64e93157148 100644 } /////////////////////////////////////////////////////////////////////////////// -@@ -1217,6 +1246,8 @@ void Browser::WindowFullscreenStateChanged() { +@@ -1242,6 +1271,8 @@ void Browser::WindowFullscreenStateChanged() { ->WindowFullscreenStateChanged(); command_controller_->FullscreenStateChanged(); UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); @@ -227,7 +235,7 @@ index 557abfcd71d85..fb64e93157148 100644 } void Browser::FullscreenTopUIStateChanged() { -@@ -1584,6 +1615,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1615,6 +1646,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -242,7 +250,7 @@ index 557abfcd71d85..fb64e93157148 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1591,8 +1630,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1622,8 +1661,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -263,7 +271,7 @@ index 557abfcd71d85..fb64e93157148 100644 } bool Browser::TabsNeedBeforeUnloadFired() const { -@@ -1768,6 +1817,16 @@ WebContents* Browser::OpenURLFromTab( +@@ -1785,6 +1834,16 @@ WebContents* Browser::OpenURLFromTab( } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -280,7 +288,7 @@ index 557abfcd71d85..fb64e93157148 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1930,6 +1989,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1947,6 +2006,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -289,7 +297,7 @@ index 557abfcd71d85..fb64e93157148 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1958,6 +2019,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1975,6 +2036,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -298,7 +306,7 @@ index 557abfcd71d85..fb64e93157148 100644 if (!GetStatusBubble()) return; -@@ -1965,6 +2028,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1982,6 +2045,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -315,8 +323,8 @@ index 557abfcd71d85..fb64e93157148 100644 + void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) { const ui::EventType type = event.type(); - const bool exited = type == ui::ET_MOUSE_EXITED; -@@ -1992,6 +2066,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { + const bool exited = type == ui::EventType::kMouseExited; +@@ -2010,6 +2084,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -336,7 +344,7 @@ index 557abfcd71d85..fb64e93157148 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -2091,12 +2178,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -2109,12 +2196,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -361,7 +369,7 @@ index 557abfcd71d85..fb64e93157148 100644 // Don't show the page hung dialog when a HTML popup hangs because // the dialog will take the focus and immediately close the popup. RenderWidgetHostView* view = render_widget_host->GetView(); -@@ -2109,6 +2208,13 @@ void Browser::RendererUnresponsive( +@@ -2127,6 +2226,13 @@ void Browser::RendererUnresponsive( void Browser::RendererResponsive( WebContents* source, content::RenderWidgetHost* render_widget_host) { @@ -375,7 +383,7 @@ index 557abfcd71d85..fb64e93157148 100644 RenderWidgetHostView* view = render_widget_host->GetView(); if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) { TabDialogs::FromWebContents(source)->HideHungRendererDialog( -@@ -2118,6 +2224,15 @@ void Browser::RendererResponsive( +@@ -2136,6 +2242,15 @@ void Browser::RendererResponsive( content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( WebContents* source) { @@ -391,7 +399,7 @@ index 557abfcd71d85..fb64e93157148 100644 return javascript_dialogs::TabModalDialogManager::FromWebContents(source); } -@@ -2153,6 +2268,11 @@ void Browser::DraggableRegionsChanged( +@@ -2171,6 +2286,11 @@ void Browser::DraggableRegionsChanged( if (app_controller_) { app_controller_->DraggableRegionsChanged(regions, contents); } @@ -403,7 +411,7 @@ index 557abfcd71d85..fb64e93157148 100644 } void Browser::DidFinishNavigation( -@@ -2233,11 +2353,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -2251,11 +2371,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -419,7 +427,7 @@ index 557abfcd71d85..fb64e93157148 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2437,6 +2561,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2456,6 +2580,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -435,7 +443,7 @@ index 557abfcd71d85..fb64e93157148 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2981,9 +3114,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2998,9 +3131,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -448,7 +456,7 @@ index 557abfcd71d85..fb64e93157148 100644 } // We hide the status bar for web apps windows as this matches native -@@ -2991,6 +3126,12 @@ StatusBubble* Browser::GetStatusBubble() { +@@ -3008,6 +3143,12 @@ StatusBubble* Browser::GetStatusBubble() { // mode, as the minimal browser UI includes the status bar. if (web_app::AppBrowserController::IsWebApp(this) && !app_controller()->HasMinimalUiButtons()) { @@ -461,7 +469,7 @@ index 557abfcd71d85..fb64e93157148 100644 return nullptr; } -@@ -3140,6 +3281,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -3157,6 +3298,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); web_contents_collection_.StopObserving(web_contents); } @@ -470,7 +478,7 @@ index 557abfcd71d85..fb64e93157148 100644 } void Browser::TabDetachedAtImpl(content::WebContents* contents, -@@ -3294,6 +3437,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( +@@ -3311,6 +3454,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, bool check_can_support) const { @@ -486,10 +494,10 @@ index 557abfcd71d85..fb64e93157148 100644 case TYPE_NORMAL: return NormalBrowserSupportsWindowFeature(feature, check_can_support); diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index 69f2c9c0ff003..83d46c6326568 100644 +index cbc5ae1c02941..f0200afb918c1 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h -@@ -22,6 +22,7 @@ +@@ -24,6 +24,7 @@ #include "base/timer/elapsed_timer.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -497,7 +505,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 #include "chrome/browser/tab_contents/web_contents_collection.h" #include "chrome/browser/themes/theme_service_observer.h" #include "chrome/browser/ui/bookmarks/bookmark_bar.h" -@@ -51,6 +52,10 @@ +@@ -53,6 +54,10 @@ #include "ui/gfx/geometry/rect.h" #include "ui/shell_dialogs/select_file_dialog.h" @@ -508,7 +516,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 #if BUILDFLAG(IS_ANDROID) #error This file should only be included on desktop. #endif -@@ -370,6 +375,15 @@ class Browser : public TabStripModelObserver, +@@ -376,6 +381,15 @@ class Browser : public TabStripModelObserver, // Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE. std::optional pip_options; @@ -524,7 +532,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 private: friend class Browser; friend class WindowSizerChromeOSTest; -@@ -451,6 +465,13 @@ class Browser : public TabStripModelObserver, +@@ -457,6 +471,13 @@ class Browser : public TabStripModelObserver, update_ui_immediately_for_testing_ = true; } @@ -538,7 +546,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 // Accessors //////////////////////////////////////////////////////////////// const CreateParams& create_params() const { return create_params_; } -@@ -546,6 +567,12 @@ class Browser : public TabStripModelObserver, +@@ -552,6 +573,12 @@ class Browser : public TabStripModelObserver, base::WeakPtr AsWeakPtr(); base::WeakPtr AsWeakPtr() const; @@ -551,7 +559,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -959,10 +986,18 @@ class Browser : public TabStripModelObserver, +@@ -963,10 +990,18 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -570,7 +578,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1297,6 +1332,10 @@ class Browser : public TabStripModelObserver, +@@ -1294,6 +1329,10 @@ class Browser : public TabStripModelObserver, // This Browser's window. raw_ptr window_; @@ -581,7 +589,7 @@ index 69f2c9c0ff003..83d46c6326568 100644 std::unique_ptr const tab_strip_model_delegate_; std::unique_ptr const tab_strip_model_; -@@ -1363,6 +1402,8 @@ class Browser : public TabStripModelObserver, +@@ -1360,6 +1399,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -591,11 +599,11 @@ index 69f2c9c0ff003..83d46c6326568 100644 UnloadController unload_controller_; diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index ec2ca0cefeb4a..66b480f50f72d 100644 +index 1e4d7bc3a4c0a..9ac5f645e4591 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc -@@ -313,6 +313,10 @@ std::pair GetBrowserAndTabForDisposition( - : 1.0; +@@ -311,6 +311,10 @@ std::pair GetBrowserAndTabForDisposition( + browser_params.pip_options = pip_options; +#if BUILDFLAG(ENABLE_CEF) @@ -605,7 +613,7 @@ index ec2ca0cefeb4a..66b480f50f72d 100644 const BrowserWindow* const browser_window = params.browser->window(); const gfx::NativeWindow native_window = browser_window ? browser_window->GetNativeWindow() -@@ -598,6 +602,13 @@ std::unique_ptr CreateTargetContents( +@@ -599,6 +603,13 @@ std::unique_ptr CreateTargetContents( std::unique_ptr target_contents = WebContents::Create(create_params); diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 9845f2c02..67e56baf2 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index 0cc2bfa06245f..86655f6746459 100644 +index fdc02b8b65544..825dba69168e3 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc @@ -148,7 +148,7 @@ ContentSetting GetContentSettingFromRules( diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 5211915ea..5ec900cac 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index b3908e6711f3e..58db1ed6e1e8a 100644 +index ec801ac598ed6..818c55412f280 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -356,6 +356,18 @@ base::OnceCallback* GetMenuShownCallback() { +@@ -350,6 +350,18 @@ base::OnceCallback* GetMenuShownCallback() { return callback.get(); } @@ -21,7 +21,7 @@ index b3908e6711f3e..58db1ed6e1e8a 100644 enum class UmaEnumIdLookupType { GeneralEnumId, ContextSpecificEnumId, -@@ -619,6 +631,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { +@@ -615,6 +627,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { return 1; } @@ -32,7 +32,7 @@ index b3908e6711f3e..58db1ed6e1e8a 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -882,6 +898,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -881,6 +897,14 @@ RenderViewContextMenu::RenderViewContextMenu( : nullptr; #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -47,7 +47,7 @@ index b3908e6711f3e..58db1ed6e1e8a 100644 observers_.AddObserver(&autofill_context_menu_manager_); } -@@ -1350,6 +1374,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1342,6 +1366,12 @@ void RenderViewContextMenu::InitMenu() { autofill_client->HideAutofillSuggestions( autofill::SuggestionHidingReason::kContextMenuOpened); } @@ -60,7 +60,7 @@ index b3908e6711f3e..58db1ed6e1e8a 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3596,6 +3626,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3615,6 +3645,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -88,7 +88,7 @@ index b3908e6711f3e..58db1ed6e1e8a 100644 RenderViewContextMenu::GetHandlersForLinkUrl() { custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers = diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h -index 8f0e62fe84ff2..77bf0875db2b2 100644 +index 1fb447e87c1f9..7e530509425f4 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -153,7 +153,21 @@ class RenderViewContextMenu diff --git a/patch/patches/chrome_browser_devtools_osr.patch b/patch/patches/chrome_browser_devtools_osr.patch index 1d3d7dc82..d5f1c9ec2 100644 --- a/patch/patches/chrome_browser_devtools_osr.patch +++ b/patch/patches/chrome_browser_devtools_osr.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc -index 10fd31daf60fa..49b10da9625f0 100644 +index c2850e124952c..0b5b32a70da71 100644 --- chrome/browser/devtools/chrome_devtools_manager_delegate.cc +++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -10,7 +10,7 @@ index 10fd31daf60fa..49b10da9625f0 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/devtools/chrome_devtools_session.h" #include "chrome/browser/devtools/device/android_device_manager.h" -@@ -67,6 +68,10 @@ +@@ -68,6 +69,10 @@ #include "ash/constants/ash_switches.h" #endif @@ -21,7 +21,7 @@ index 10fd31daf60fa..49b10da9625f0 100644 using content::DevToolsAgentHost; const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app"; -@@ -247,6 +252,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( +@@ -278,6 +283,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( return DevToolsAgentHost::kTypePage; } diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index ff0bd745c..99b0da8a0 100644 --- a/patch/patches/chrome_browser_dialogs_native.patch +++ b/patch/patches/chrome_browser_dialogs_native.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc -index b6e26d1d2e082..c84b890fa8a62 100644 +index b35b0303e723d..97d43a18a9bed 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc @@ -245,6 +245,13 @@ void FileSelectHelper::OnListFile( @@ -115,7 +115,7 @@ index b6e26d1d2e082..c84b890fa8a62 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -547,6 +591,7 @@ void FileSelectHelper::RunFileChooser( +@@ -536,6 +580,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr file_select_helper( new FileSelectHelper(profile)); @@ -124,7 +124,7 @@ index b6e26d1d2e082..c84b890fa8a62 100644 params.Clone()); } diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h -index 7194323c36956..fd4a5361798f0 100644 +index a89c6ae3ea21a..0533cec2752bb 100644 --- chrome/browser/file_select_helper.h +++ chrome/browser/file_select_helper.h @@ -62,7 +62,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< @@ -137,9 +137,9 @@ index 7194323c36956..fd4a5361798f0 100644 // Enumerates all the files in directory. static void EnumerateDirectory( -@@ -325,6 +326,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< - // Set to false in unit tests since there is no WebContents. - bool abort_on_missing_web_contents_in_tests_ = true; +@@ -330,6 +331,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< + bool has_notified_picture_in_picture_window_manager_of_open_dialog_ = false; + #endif // !BUILDFLAG(IS_ANDROID) + // Set to true if this dialog was triggered via CEF. + bool run_from_cef_ = false; @@ -160,63 +160,11 @@ index 49272553c7c53..5ba90c9a06ecf 100644 private: raw_ptr source_contents_; }; -diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc -index 5ef377bcbd69f..a2b9cc0b9be48 100644 ---- ui/shell_dialogs/execute_select_file_win.cc -+++ ui/shell_dialogs/execute_select_file_win.cc -@@ -360,9 +360,7 @@ bool ExecuteSelectSingleFile(HWND owner, - const std::vector& filter, - int* filter_index, - std::vector* paths) { -- // Note: The title is not passed down for historical reasons. -- // TODO(pmonette): Figure out if it's a worthwhile improvement. -- return RunOpenFileDialog(owner, std::u16string(), std::u16string(), -+ return RunOpenFileDialog(owner, title, std::u16string(), - default_path, filter, 0, filter_index, paths); - } - -@@ -374,14 +372,13 @@ bool ExecuteSelectMultipleFile(HWND owner, - std::vector* paths) { - DWORD dialog_options = FOS_ALLOWMULTISELECT; - -- // Note: The title is not passed down for historical reasons. -- // TODO(pmonette): Figure out if it's a worthwhile improvement. -- return RunOpenFileDialog(owner, std::u16string(), std::u16string(), -+ return RunOpenFileDialog(owner, title, std::u16string(), - default_path, filter, dialog_options, filter_index, - paths); - } - - bool ExecuteSaveFile(HWND owner, -+ const std::u16string& title, - const base::FilePath& default_path, - const std::vector& filter, - const std::wstring& def_ext, -@@ -394,9 +391,7 @@ bool ExecuteSaveFile(HWND owner, - - DWORD dialog_options = FOS_OVERWRITEPROMPT; - -- // Note: The title is not passed down for historical reasons. -- // TODO(pmonette): Figure out if it's a worthwhile improvement. -- return RunSaveFileDialog(owner, std::u16string(), default_path, filter, -+ return RunSaveFileDialog(owner, title, default_path, filter, - dialog_options, def_ext, filter_index, path); - } - -@@ -421,7 +416,7 @@ void ExecuteSelectFile( - break; - case SelectFileDialog::SELECT_SAVEAS_FILE: { - base::FilePath path; -- if (ExecuteSaveFile(owner, default_path, filter, default_extension, -+ if (ExecuteSaveFile(owner, title, default_path, filter, default_extension, - &file_type_index, &path)) { - paths.push_back(std::move(path)); - } diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc -index 4a71b1d4535d9..722a9480681bd 100644 +index 1bc5ddb0ab802..053916ea1c998 100644 --- ui/shell_dialogs/select_file_dialog.cc +++ ui/shell_dialogs/select_file_dialog.cc -@@ -89,8 +89,10 @@ void SelectFileDialog::SetFactory( +@@ -88,8 +88,10 @@ void SelectFileDialog::SetFactory( // static scoped_refptr SelectFileDialog::Create( Listener* listener, @@ -230,11 +178,11 @@ index 4a71b1d4535d9..722a9480681bd 100644 return CreateSelectFileDialog(listener, std::move(policy)); } diff --git ui/shell_dialogs/select_file_dialog.h ui/shell_dialogs/select_file_dialog.h -index e71c14e499c25..3bc1e44b4c856 100644 +index ab916846f3776..70ac544ca6884 100644 --- ui/shell_dialogs/select_file_dialog.h +++ ui/shell_dialogs/select_file_dialog.h -@@ -102,7 +102,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog - // is refcounted and uses a background thread. +@@ -96,7 +96,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog + // listener when there are no calls to SelectFile() outstanding. static scoped_refptr Create( Listener* listener, - std::unique_ptr policy); @@ -243,7 +191,7 @@ index e71c14e499c25..3bc1e44b4c856 100644 SelectFileDialog(const SelectFileDialog&) = delete; SelectFileDialog& operator=(const SelectFileDialog&) = delete; -@@ -136,6 +137,10 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -130,6 +131,10 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog // FileTypeExtensions instead of this and the above vector? std::vector extension_description_overrides; @@ -254,7 +202,7 @@ index e71c14e499c25..3bc1e44b4c856 100644 // Specifies whether there will be a filter added for all files (i.e. *.*). bool include_all_files = false; -@@ -209,6 +214,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -220,6 +225,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog const GURL* caller = nullptr); bool HasMultipleFileTypeChoices(); @@ -274,7 +222,7 @@ index e71c14e499c25..3bc1e44b4c856 100644 protected: friend class base::RefCountedThreadSafe; -@@ -234,6 +252,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -244,6 +262,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog // The listener to be notified of selection completion. raw_ptr listener_; @@ -286,7 +234,7 @@ index e71c14e499c25..3bc1e44b4c856 100644 private: // Tests if the file selection dialog can be displayed by // testing if the AllowFileSelectionDialogs-Policy is -@@ -246,8 +269,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -256,8 +279,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog // Returns true if the dialog has multiple file type choices. virtual bool HasMultipleFileTypeChoicesImpl() = 0; @@ -309,10 +257,10 @@ index c7acd9b05fbb8..3e95e4125fa24 100644 } // namespace ui diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm -index abf5baa269fa2..b5e88a82537c1 100644 +index 72f687be6fb42..4fa78758dd4df 100644 --- ui/shell_dialogs/select_file_dialog_mac.mm +++ ui/shell_dialogs/select_file_dialog_mac.mm -@@ -107,6 +107,10 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -104,6 +104,10 @@ void SelectFileDialogImpl::SelectFileImpl( mojo_window->CreateSelectFileDialog(std::move(receiver)); } else { NSWindow* ns_window = gfx_window.GetNativeNSWindow(); @@ -324,10 +272,10 @@ index abf5baa269fa2..b5e88a82537c1 100644 std::make_unique(ns_window), std::move(receiver)); diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc -index 9200d30f8d58a..f4156db6a7a73 100644 +index ed343dc032789..a7105f4c78a1c 100644 --- ui/shell_dialogs/select_file_dialog_win.cc +++ ui/shell_dialogs/select_file_dialog_win.cc -@@ -254,6 +254,8 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -251,6 +251,8 @@ void SelectFileDialogImpl::SelectFileImpl( HWND owner = owning_window && owning_window->GetRootWindow() ? owning_window->GetHost()->GetAcceleratedWidget() : nullptr; diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index f4e8cb1ad..59d8bcb2f 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -12,10 +12,10 @@ index b169371e4d42f..509e4bda85b47 100644 // on the screen, we can't actually attach to it. parent_window = nullptr; diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc -index 0ffc333329d4d..91b7567c123ac 100644 +index d0a13b1666772..2b604aa1da656 100644 --- components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc -@@ -101,10 +101,17 @@ class WidgetModalDialogHostObserverViews : public views::WidgetObserver, +@@ -100,10 +100,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver { gfx::Rect GetModalDialogBounds(views::Widget* widget, web_modal::ModalDialogHost* dialog_host, const gfx::Size& size) { @@ -36,7 +36,7 @@ index 0ffc333329d4d..91b7567c123ac 100644 } gfx::Point position = dialog_host->GetDialogPosition(size); -@@ -113,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget, +@@ -112,43 +119,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget, position.set_y(position.y() - widget->non_client_view()->frame_view()->GetInsets().top()); @@ -94,7 +94,7 @@ index 0ffc333329d4d..91b7567c123ac 100644 } void UpdateModalDialogPosition(views::Widget* widget, -@@ -160,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget, +@@ -159,15 +145,24 @@ void UpdateModalDialogPosition(views::Widget* widget, return; } @@ -121,14 +121,14 @@ index 0ffc333329d4d..91b7567c123ac 100644 return; } -@@ -284,8 +279,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, +@@ -297,8 +292,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, gfx::NativeView parent_view = - parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; + parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) : nullptr; + // Use with CEF windowless rendering. -+ gfx::AcceleratedWidget parent_widget = parent ? -+ CurrentClient()->GetModalDialogHost(parent)->GetAcceleratedWidget() : -+ gfx::kNullAcceleratedWidget; ++ gfx::AcceleratedWidget parent_widget = ++ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)-> ++ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget; views::Widget* widget = - views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view); + views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view, @@ -136,31 +136,32 @@ index 0ffc333329d4d..91b7567c123ac 100644 widget->SetNativeWindowProperty( views::kWidgetIdentifierKey, const_cast(kConstrainedWindowWidgetIdentifier)); -@@ -301,8 +301,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, - if (!requires_positioning) +@@ -315,8 +315,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, return widget; -- ModalDialogHost* host = -- parent ? CurrentClient()->GetModalDialogHost(parent) : nullptr; -+ ModalDialogHost* host = CurrentClient()->GetModalDialogHost(parent); + ModalDialogHost* host = +- parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent) +- : nullptr; ++ CurrentBrowserModalClient()->GetModalDialogHost(parent); if (host) { DCHECK_EQ(parent_view, host->GetHostView()); - ModalDialogHostObserver* dialog_host_observer = -@@ -315,10 +314,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, + std::unique_ptr observer = +@@ -333,11 +332,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, views::Widget* ShowBrowserModal(std::unique_ptr dialog_model, gfx::NativeWindow parent) { + gfx::NativeView parent_view = -+ parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; ++ parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) : nullptr; + // Use with CEF windowless rendering. -+ gfx::AcceleratedWidget parent_widget = parent ? -+ CurrentClient()->GetModalDialogHost(parent)->GetAcceleratedWidget() : -+ gfx::kNullAcceleratedWidget; ++ gfx::AcceleratedWidget parent_widget = ++ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)-> ++ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget; + // TODO(crbug.com/41493925): Remove will_use_custom_frame once native frame // dialogs support autosize. bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame( -- parent ? CurrentClient()->GetDialogHostView(parent) : nullptr); +- parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) +- : nullptr); + parent_view, parent_widget); auto dialog = views::BubbleDialogModelHost::CreateModal( std::move(dialog_model), ui::MODAL_TYPE_WINDOW, will_use_custom_frame); @@ -209,10 +210,10 @@ index 51ed6bcf6b540..c6e1161140655 100644 virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0; // Returns whether a dialog currently about to be shown should be activated. diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc -index 18611879ee372..938dbba3e3a87 100644 +index e1ac8ad60e63b..53816c9d82db0 100644 --- ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc -@@ -91,10 +91,12 @@ DialogDelegate::DialogDelegate() { +@@ -85,10 +85,12 @@ DialogDelegate::DialogDelegate() { // static Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, gfx::NativeWindow context, @@ -227,7 +228,7 @@ index 18611879ee372..938dbba3e3a87 100644 widget->Init(std::move(params)); return widget; } -@@ -103,16 +105,18 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, +@@ -97,16 +99,18 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, Widget* DialogDelegate::CreateDialogWidget( std::unique_ptr delegate, gfx::NativeWindow context, @@ -250,26 +251,26 @@ index 18611879ee372..938dbba3e3a87 100644 #else return true; #endif -@@ -123,7 +127,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( +@@ -117,7 +121,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( WidgetDelegate* delegate, gfx::NativeWindow context, gfx::NativeView parent, - const gfx::Rect& bounds) { + const gfx::Rect& bounds, + gfx::AcceleratedWidget parent_widget) { - views::Widget::InitParams params( - Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET); - params.delegate = delegate; -@@ -131,7 +136,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( DialogDelegate* dialog = delegate->AsDialogDelegate(); + views::Widget::InitParams params( +@@ -127,7 +132,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( + params.bounds = bounds; + if (dialog) - dialog->params_.custom_frame &= CanSupportCustomFrame(parent); + dialog->params_.custom_frame &= CanSupportCustomFrame(parent, parent_widget); if (!dialog || dialog->use_custom_frame()) { params.opacity = Widget::InitParams::WindowOpacity::kTranslucent; -@@ -144,6 +149,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( +@@ -140,6 +145,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( } params.context = context; params.parent = parent; @@ -278,10 +279,10 @@ index 18611879ee372..938dbba3e3a87 100644 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child // widgets to prevent top-level window behavior (independent movement, etc). diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h -index 3cb2a5e22972d..1a716178e3f51 100644 +index e5e145be9e14a..6663b8645ae7d 100644 --- ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h -@@ -97,13 +97,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { +@@ -99,13 +99,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { // your use case. static Widget* CreateDialogWidget(std::unique_ptr delegate, gfx::NativeWindow context, @@ -303,7 +304,7 @@ index 3cb2a5e22972d..1a716178e3f51 100644 // Returns the dialog widget InitParams for a given |context| or |parent|. // If |bounds| is not empty, used to initially place the dialog, otherwise -@@ -111,7 +116,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { +@@ -113,7 +118,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate, gfx::NativeWindow context, gfx::NativeView parent, diff --git a/patch/patches/chrome_browser_download.patch b/patch/patches/chrome_browser_download.patch index f52faa2b6..14766c3ef 100644 --- a/patch/patches/chrome_browser_download.patch +++ b/patch/patches/chrome_browser_download.patch @@ -1,9 +1,9 @@ diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc -index 2628f1751cd14..cc2c330d8db5d 100644 +index 1becf94d357e9..9cb014e242917 100644 --- chrome/browser/download/chrome_download_manager_delegate.cc +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -148,6 +148,10 @@ - #include "chrome/browser/safe_browsing/download_protection/download_protection_util.h" +@@ -157,6 +157,10 @@ + #include "chrome/browser/ash/policy/skyvault/skyvault_rename_handler.h" #endif +#if BUILDFLAG(ENABLE_CEF) @@ -13,7 +13,7 @@ index 2628f1751cd14..cc2c330d8db5d 100644 using content::BrowserThread; using content::DownloadManager; using download::DownloadItem; -@@ -492,6 +496,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile) +@@ -513,6 +517,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile) download_dialog_bridge_ = std::make_unique(); download_message_bridge_ = std::make_unique(); #endif @@ -25,7 +25,7 @@ index 2628f1751cd14..cc2c330d8db5d 100644 } ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() { -@@ -551,6 +560,9 @@ void ChromeDownloadManagerDelegate::Shutdown() { +@@ -572,6 +581,9 @@ void ChromeDownloadManagerDelegate::Shutdown() { download_manager_->RemoveObserver(this); download_manager_ = nullptr; } @@ -35,7 +35,7 @@ index 2628f1751cd14..cc2c330d8db5d 100644 } void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown( -@@ -619,6 +631,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget( +@@ -640,6 +652,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget( ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload); } @@ -49,7 +49,7 @@ index 2628f1751cd14..cc2c330d8db5d 100644 base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined, weak_ptr_factory_.GetWeakPtr(), download->GetId(), diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h -index af7f1d5fac12b..8cd591798ab61 100644 +index 2c99baa2c9fa8..b721db7058d8f 100644 --- chrome/browser/download/chrome_download_manager_delegate.h +++ chrome/browser/download/chrome_download_manager_delegate.h @@ -19,6 +19,7 @@ @@ -73,7 +73,7 @@ index af7f1d5fac12b..8cd591798ab61 100644 // This is the Chrome side helper for the download system. class ChromeDownloadManagerDelegate : public content::DownloadManagerDelegate, -@@ -389,6 +396,10 @@ class ChromeDownloadManagerDelegate +@@ -391,6 +398,10 @@ class ChromeDownloadManagerDelegate // Whether a file picker dialog is showing. bool is_file_picker_showing_; diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index 3df223129..0be298835 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -34,7 +34,7 @@ index 4007e26f780c3..26d0d492cf176 100644 WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate( diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc -index 73de5dd73a522..12005b67a6ee9 100644 +index 6e3aae787fc9d..67ea775042117 100644 --- chrome/browser/extensions/api/tabs/tabs_api.cc +++ chrome/browser/extensions/api/tabs/tabs_api.cc @@ -1553,7 +1553,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -109,7 +109,7 @@ index 73de5dd73a522..12005b67a6ee9 100644 current_url, updated_url, js_callstack()); } diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc -index 46154f4501a36..81adec54cee06 100644 +index a6b36f62fe03c..215caeb8f1315 100644 --- chrome/browser/extensions/extension_tab_util.cc +++ chrome/browser/extensions/extension_tab_util.cc @@ -18,6 +18,7 @@ @@ -131,7 +131,7 @@ index 46154f4501a36..81adec54cee06 100644 using content::NavigationEntry; using content::WebContents; using extensions::mojom::APIPermissionID; -@@ -763,6 +768,20 @@ bool ExtensionTabUtil::GetTabById(int tab_id, +@@ -764,6 +769,20 @@ bool ExtensionTabUtil::GetTabById(int tab_id, } } @@ -187,10 +187,10 @@ index 4ca4ecd147267..dc8a8d004a1d6 100644 // ones that need to call AttachTabHelpers; if you think you do, re-read the // design document linked above, especially the section "Reusing tab helpers". diff --git chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc -index b9bca4946ef9f..41207ebb86045 100644 +index 427988cdc5b24..f448bb8dac9b4 100644 --- chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc +++ chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc -@@ -830,6 +830,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() { +@@ -831,6 +831,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() { if (!gfx::Animation::ShouldRenderRichAnimation()) { return; } diff --git a/patch/patches/chrome_browser_frame_mac.patch b/patch/patches/chrome_browser_frame_mac.patch index 274025a4d..5d9d65aa4 100644 --- a/patch/patches/chrome_browser_frame_mac.patch +++ b/patch/patches/chrome_browser_frame_mac.patch @@ -33,10 +33,10 @@ index decd0b51ddc3d..17fce2da6ad0e 100644 ~BrowserFrameMac() override; diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm -index 0d7f72e291a14..b0fb3eae5eab6 100644 +index 7b52e844d31d1..38862163b6698 100644 --- chrome/browser/ui/views/frame/browser_frame_mac.mm +++ chrome/browser/ui/views/frame/browser_frame_mac.mm -@@ -182,7 +182,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() { +@@ -184,7 +184,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() { void BrowserFrameMac::ValidateUserInterfaceItem( int32_t tag, remote_cocoa::mojom::ValidateUserInterfaceItemResult* result) { @@ -52,7 +52,7 @@ index 0d7f72e291a14..b0fb3eae5eab6 100644 if (!chrome::SupportsCommand(browser, tag)) { result->enable = false; return; -@@ -294,8 +301,16 @@ bool BrowserFrameMac::WillExecuteCommand( +@@ -305,8 +312,16 @@ bool BrowserFrameMac::WillExecuteCommand( int32_t command, WindowOpenDisposition window_open_disposition, bool is_before_first_responder) { @@ -70,7 +70,7 @@ index 0d7f72e291a14..b0fb3eae5eab6 100644 if (is_before_first_responder) { // The specification for this private extensions API is incredibly vague. // For now, we avoid triggering chrome commands prior to giving the -@@ -326,11 +341,20 @@ bool BrowserFrameMac::ExecuteCommand( +@@ -337,11 +352,20 @@ bool BrowserFrameMac::ExecuteCommand( int32_t command, WindowOpenDisposition window_open_disposition, bool is_before_first_responder) { diff --git a/patch/patches/chrome_browser_printing_oop_osr.patch b/patch/patches/chrome_browser_printing_oop_osr.patch index bccb39b33..df660aa2e 100644 --- a/patch/patches/chrome_browser_printing_oop_osr.patch +++ b/patch/patches/chrome_browser_printing_oop_osr.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc -index a79694f7bdcc2..ec42dd0dc5ba2 100644 +index aef82204869ce..b30d275c97ade 100644 --- chrome/browser/printing/print_backend_service_manager.cc +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -74,7 +74,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr; +@@ -75,7 +75,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr; // to support modal dialogs from OOP. uint32_t NativeViewToUint(gfx::NativeView view) { #if BUILDFLAG(IS_WIN) diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index a3f20255a..c38bd2f5a 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc -index 941d4bf2d302d..7d41044d01d9b 100644 +index 3a1fe80217915..43001575fceb6 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -660,7 +660,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -658,7 +658,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -14,7 +14,7 @@ index 941d4bf2d302d..7d41044d01d9b 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index cd4fd8104866c..5cf5853d6632b 100644 +index 5b20629062d21..852e39bd8421e 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc @@ -91,6 +91,7 @@ base::LazyInstance>::Leaky @@ -85,10 +85,10 @@ index 02454f4e780b5..4641f33c26f5f 100644 // Returns whether the user has signed in this profile to an account. diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index 0909a332a46bf..163de8ef6a878 100644 +index df8be30cd11b3..9248af3a7c131 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1030,7 +1030,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1036,7 +1036,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index bdebbba19..0ae289381 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 22fd2393c9c70..e033dbd0d6d10 100644 +index 66e7ef9749ecc..3f7f440643257 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -34,6 +34,7 @@ static_library("safe_browsing") { +@@ -36,6 +36,7 @@ static_library("safe_browsing") { "//components/enterprise:enterprise", "//components/enterprise/buildflags", "//components/enterprise/common:strings", diff --git a/patch/patches/chrome_browser_startup.patch b/patch/patches/chrome_browser_startup.patch index 3cfd6ebda..dbeb6557a 100644 --- a/patch/patches/chrome_browser_startup.patch +++ b/patch/patches/chrome_browser_startup.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc -index 22a2efe170757..9c8c6c24dfa78 100644 +index 8740af9bc6cd6..d23a0527420a7 100644 --- chrome/browser/ui/startup/startup_browser_creator.cc +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -605,6 +605,13 @@ std::optional GetAppId(const base::CommandLine& command_line, +@@ -606,6 +606,13 @@ std::optional GetAppId(const base::CommandLine& command_line, } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -16,7 +16,7 @@ index 22a2efe170757..9c8c6c24dfa78 100644 } // namespace StartupProfileMode StartupProfileModeFromReason( -@@ -1489,6 +1496,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( +@@ -1494,6 +1501,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( {profile, mode}, last_opened_profiles); } @@ -29,7 +29,7 @@ index 22a2efe170757..9c8c6c24dfa78 100644 // static void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( const base::CommandLine& command_line, -@@ -1498,6 +1511,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( +@@ -1503,6 +1516,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( return; } diff --git a/patch/patches/chrome_browser_webui_license.patch b/patch/patches/chrome_browser_webui_license.patch index 417db6aeb..386f325db 100644 --- a/patch/patches/chrome_browser_webui_license.patch +++ b/patch/patches/chrome_browser_webui_license.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc -index 7d04b86885167..b89b060efc9e0 100644 +index 93efcb5a7edc0..f1cb0c791adf6 100644 --- chrome/browser/ui/webui/about/about_ui.cc +++ chrome/browser/ui/webui/about/about_ui.cc -@@ -34,6 +34,7 @@ +@@ -35,6 +35,7 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -10,7 +10,7 @@ index 7d04b86885167..b89b060efc9e0 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" -@@ -91,6 +92,10 @@ +@@ -92,6 +93,10 @@ #include "chrome/common/webui_url_constants.h" #endif // BUILDFLAG(IS_CHROMEOS) @@ -21,7 +21,7 @@ index 7d04b86885167..b89b060efc9e0 100644 using content::BrowserThread; namespace { -@@ -692,6 +697,16 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -695,6 +700,16 @@ void AboutUIHTMLSource::StartDataRequest( IDS_TERMS_HTML); #endif } @@ -39,7 +39,7 @@ index 7d04b86885167..b89b060efc9e0 100644 FinishDataRequest(response, std::move(callback)); } diff --git chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -index 7b61f43d8c72a..811d075966239 100644 +index 39e7681c0c708..95c3f21fc22b4 100644 --- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc @@ -18,6 +18,7 @@ @@ -50,7 +50,7 @@ index 7b61f43d8c72a..811d075966239 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/buildflags.h" #include "chrome/browser/commerce/shopping_service_factory.h" -@@ -391,6 +392,9 @@ bool IsAboutUI(const GURL& url) { +@@ -385,6 +386,9 @@ bool IsAboutUI(const GURL& url) { || url.host_piece() == chrome::kChromeUIOSCreditsHost || url.host_piece() == chrome::kChromeUIBorealisCreditsHost || url.host_piece() == chrome::kChromeUICrostiniCreditsHost @@ -60,7 +60,7 @@ index 7b61f43d8c72a..811d075966239 100644 #endif ); // NOLINT } -@@ -1019,6 +1023,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() { +@@ -1000,6 +1004,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() { GURL(chrome::kChromeUIGpuURL), GURL(chrome::kChromeUIHistogramsURL), GURL(chrome::kChromeUIInspectURL), @@ -71,35 +71,24 @@ index 7b61f43d8c72a..811d075966239 100644 GURL(chrome::kChromeUINetExportURL), GURL(chrome::kChromeUIPrefsInternalsURL), diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc -index 4604facee295e..acd8857875d6e 100644 +index 248b6795e8cbe..c957f9d55613d 100644 --- chrome/common/webui_url_constants.cc +++ chrome/common/webui_url_constants.cc -@@ -131,6 +131,10 @@ const char kChromeUILauncherInternalsHost[] = "launcher-internals"; - const char kChromeUILauncherInternalsURL[] = "chrome://launcher-internals"; - const char kChromeUILensSearchBubbleHost[] = "lens-search-bubble"; - const char kChromeUILensSearchBubbleURL[] = "chrome://lens-search-bubble/"; +@@ -99,6 +99,9 @@ base::span ChromeURLHosts() { + kChromeUIHistoryHost, + history_clusters_internals::kChromeUIHistoryClustersInternalsHost, + kChromeUIInterstitialHost, +#if BUILDFLAG(ENABLE_CEF) -+const char kChromeUILicenseHost[] = "license"; -+const char kChromeUILicenseURL[] = "chrome://license/"; ++ kChromeUILicenseHost, +#endif - const char kChromeUISensorInfoHost[] = "sensor-info"; - const char kChromeUISensorInfoURL[] = "chrome://sensor-info/"; - const char kChromeUILocalStateHost[] = "local-state"; -@@ -704,6 +708,9 @@ const char* const kChromeHostURLs[] = { - kChromeUIHumanPresenceInternalsHost, - #endif - kChromeUIInterstitialHost, -+#if BUILDFLAG(ENABLE_CEF) -+ kChromeUILicenseHost, -+#endif - kChromeUILocalStateHost, + kChromeUILocalStateHost, #if !BUILDFLAG(IS_ANDROID) - kChromeUIManagementHost, + kChromeUIManagementHost, diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h -index b1247ef8ad3ff..a4ebfe2d585a0 100644 +index 70e366e816db5..87ec49d6b6636 100644 --- chrome/common/webui_url_constants.h +++ chrome/common/webui_url_constants.h -@@ -15,6 +15,7 @@ +@@ -18,6 +18,7 @@ #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -107,14 +96,14 @@ index b1247ef8ad3ff..a4ebfe2d585a0 100644 #include "chrome/common/buildflags.h" #include "components/lens/buildflags.h" #include "content/public/common/url_constants.h" -@@ -123,6 +124,10 @@ extern const char kChromeUILauncherInternalsHost[]; - extern const char kChromeUILauncherInternalsURL[]; - extern const char kChromeUILensSearchBubbleHost[]; - extern const char kChromeUILensSearchBubbleURL[]; +@@ -155,6 +156,10 @@ inline constexpr char kChromeUILauncherInternalsURL[] = + inline constexpr char kChromeUILensSearchBubbleHost[] = "lens-search-bubble"; + inline constexpr char kChromeUILensSearchBubbleURL[] = + "chrome://lens-search-bubble/"; +#if BUILDFLAG(ENABLE_CEF) -+extern const char kChromeUILicenseHost[]; -+extern const char kChromeUILicenseURL[]; ++inline constexpr char kChromeUILicenseHost[] = "license"; ++inline constexpr char kChromeUILicenseURL[] = "chrome://license/"; +#endif - extern const char kChromeUISensorInfoURL[]; - extern const char kChromeUISensorInfoHost[]; - extern const char kChromeUILocalStateHost[]; + inline constexpr char kChromeUILocalStateHost[] = "local-state"; + inline constexpr char kChromeUILocationInternalsHost[] = "location-internals"; + inline constexpr char kChromeUIManagementHost[] = "management"; diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index ca0e7b73e..a269067ef 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -20,7 +20,7 @@ index ea2891a279371..595e5b8eb2cb6 100644 BrowserPluginEmbedder(const BrowserPluginEmbedder&) = delete; BrowserPluginEmbedder& operator=(const BrowserPluginEmbedder&) = delete; diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc -index 1ce20a2a42705..7a3ef88ec689b 100644 +index 9c2b92be1dd07..adfda85e74ea8 100644 --- content/browser/browser_plugin/browser_plugin_guest.cc +++ content/browser/browser_plugin/browser_plugin_guest.cc @@ -49,6 +49,8 @@ std::unique_ptr BrowserPluginGuest::CreateNewGuestWindow( diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 0047cfadb..883d20b88 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 3108e12b92e7f..18cc9062a4cd0 100644 +index 84c9ef58f085a..0d7b8d423c917 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -10,7 +10,7 @@ index 3108e12b92e7f..18cc9062a4cd0 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -136,6 +137,7 @@ static_library("renderer") { +@@ -127,6 +128,7 @@ static_library("renderer") { deps = [ "//base/allocator:buildflags", "//build:chromeos_buildflags", @@ -19,8 +19,8 @@ index 3108e12b92e7f..18cc9062a4cd0 100644 "//chrome:strings", "//chrome/common", @@ -246,6 +248,10 @@ static_library("renderer") { - - configs += [ "//build/config/compiler:wexit_time_destructors" ] + ] + } + if (enable_cef) { + configs += [ "//cef/libcef/features:config" ] diff --git a/patch/patches/chrome_renderer_print_preview.patch b/patch/patches/chrome_renderer_print_preview.patch index 55c363c18..1d0fa089a 100644 --- a/patch/patches/chrome_renderer_print_preview.patch +++ b/patch/patches/chrome_renderer_print_preview.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc -index 631a01a21a562..33e318e251aa2 100644 +index 54cf4bbb6c1dc..312a603e6c639 100644 --- chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc +++ chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc @@ -25,12 +25,31 @@ diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 8ee3a99ed..27caac97f 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,5 +1,5 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index 2805028bc810c..0aef6f992262e 100644 +index cda3db439e32a..b9ba41139eccb 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -37,6 +37,7 @@ @@ -10,7 +10,7 @@ index 2805028bc810c..0aef6f992262e 100644 #include "chrome/browser/buildflags.h" #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" -@@ -608,6 +609,7 @@ struct MainFunction { +@@ -606,6 +607,7 @@ struct MainFunction { int (*function)(content::MainFunctionParams); }; @@ -18,7 +18,7 @@ index 2805028bc810c..0aef6f992262e 100644 // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { #if BUILDFLAG(IS_CHROMEOS_LACROS) -@@ -691,6 +693,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) { +@@ -689,6 +691,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) { command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); #endif // BUILDFLAG(IS_WIN) } @@ -26,7 +26,7 @@ index 2805028bc810c..0aef6f992262e 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) // If Lacros was prelaunched at login screen, this method blocks waiting -@@ -847,6 +850,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { +@@ -850,6 +853,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { ChromeMainDelegate::~ChromeMainDelegate() = default; #endif // !BUILDFLAG(IS_ANDROID) @@ -37,7 +37,7 @@ index 2805028bc810c..0aef6f992262e 100644 std::optional ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get()); -@@ -872,7 +879,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -875,7 +882,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( // future session's metrics. DeferBrowserMetrics(user_data_dir); @@ -46,7 +46,7 @@ index 2805028bc810c..0aef6f992262e 100644 // In the case the process is not the singleton process, the uninstall tasks // need to be executed here. A window will be displayed asking to close all // running instances. -@@ -1040,7 +1047,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -1035,7 +1042,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( // Initializes the resource bundle and determines the locale. std::string actual_locale = LoadLocalState( @@ -56,7 +56,7 @@ index 2805028bc810c..0aef6f992262e 100644 chrome_feature_list_creator->SetApplicationLocale(actual_locale); chrome_feature_list_creator->OverrideCachedUIStrings(); -@@ -1057,6 +1065,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -1052,6 +1060,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( new net::NetworkChangeNotifierFactoryAndroid()); #endif @@ -65,7 +65,7 @@ index 2805028bc810c..0aef6f992262e 100644 if (base::FeatureList::IsEnabled( features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { bool record = true; -@@ -1067,6 +1077,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -1062,6 +1072,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( if (record) chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile(); } @@ -73,7 +73,18 @@ index 2805028bc810c..0aef6f992262e 100644 #if BUILDFLAG(IS_ANDROID) UmaSessionStats::OnStartup(); -@@ -1506,6 +1517,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1099,8 +1110,8 @@ bool ChromeMainDelegate::ShouldInitializeMojo(InvokedIn invoked_in) { + void ChromeMainDelegate::CreateThreadPool(std::string_view name) { + base::ThreadPoolInstance::Create(name); + // `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little +-// later. +-#if !BUILDFLAG(IS_ANDROID) ++// later. Same with CEF. ++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(ENABLE_CEF) + // Start the sampling profiler as early as possible - namely, once the thread + // pool has been created. + sampling_profiler_ = std::make_unique(); +@@ -1512,6 +1523,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -81,7 +92,7 @@ index 2805028bc810c..0aef6f992262e 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1516,6 +1528,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1522,6 +1534,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -89,7 +100,7 @@ index 2805028bc810c..0aef6f992262e 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1527,6 +1540,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1533,6 +1546,7 @@ void ChromeMainDelegate::PreSandboxStartup() { base::CPU cpu_info; #endif @@ -97,7 +108,7 @@ index 2805028bc810c..0aef6f992262e 100644 // Initialize the user data dir for any process type that needs it. bool initialize_user_data_dir = chrome::ProcessNeedsProfileDir(process_type); #if BUILDFLAG(IS_CHROMEOS_LACROS) -@@ -1538,6 +1552,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1544,6 +1558,7 @@ void ChromeMainDelegate::PreSandboxStartup() { if (initialize_user_data_dir) { InitializeUserDataDir(base::CommandLine::ForCurrentProcess()); } @@ -105,7 +116,7 @@ index 2805028bc810c..0aef6f992262e 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) // Generate shared resource file only on browser process. This is to avoid -@@ -1696,7 +1711,8 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1702,7 +1717,8 @@ void ChromeMainDelegate::PreSandboxStartup() { #else const std::string loaded_locale = ui::ResourceBundle::InitSharedInstanceWithLocale( @@ -115,15 +126,15 @@ index 2805028bc810c..0aef6f992262e 100644 base::FilePath resources_pack_path; base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); -@@ -1726,6 +1742,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1732,6 +1748,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } +#if !BUILDFLAG(ENABLE_CEF) #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). - if (process_type != switches::kZygoteProcess) { -@@ -1761,6 +1778,7 @@ void ChromeMainDelegate::PreSandboxStartup() { + if (process_type != switches::kZygoteProcess && +@@ -1768,6 +1785,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -131,7 +142,7 @@ index 2805028bc810c..0aef6f992262e 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1888,6 +1906,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1895,6 +1913,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -139,7 +150,7 @@ index 2805028bc810c..0aef6f992262e 100644 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // this up for the browser process in a different manner. const base::CommandLine* command_line = -@@ -1900,6 +1919,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1907,6 +1926,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -147,7 +158,7 @@ index 2805028bc810c..0aef6f992262e 100644 } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -2002,6 +2022,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -2015,6 +2035,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { : memory_system::DispatcherParameters:: AllocationTraceRecorderInclusion::kIgnore; @@ -155,7 +166,7 @@ index 2805028bc810c..0aef6f992262e 100644 memory_system::Initializer() .SetGwpAsanParameters(gwp_asan_boost_sampling, process_type) .SetProfilingClientParameters(chrome::GetChannel(), -@@ -2009,5 +2030,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -2022,5 +2043,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { .SetDispatcherParameters(memory_system::DispatcherParameters:: PoissonAllocationSamplerInclusion::kEnforce, allocation_recorder_inclusion, process_type) @@ -163,10 +174,10 @@ index 2805028bc810c..0aef6f992262e 100644 + .Initialize(*memory_system_); } diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h -index 3553377e96017..9f6edc70ef1d4 100644 +index 521d5710b6387..8a5f3e6a312d2 100644 --- chrome/app/chrome_main_delegate.h +++ chrome/app/chrome_main_delegate.h -@@ -16,6 +16,7 @@ +@@ -17,6 +17,7 @@ #include "chrome/common/chrome_content_client.h" #include "components/memory_system/memory_system.h" #include "content/public/app/content_main_delegate.h" @@ -174,7 +185,7 @@ index 3553377e96017..9f6edc70ef1d4 100644 namespace base { class CommandLine; -@@ -49,6 +50,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate { +@@ -55,6 +56,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate { ~ChromeMainDelegate() override; @@ -183,7 +194,7 @@ index 3553377e96017..9f6edc70ef1d4 100644 protected: // content::ContentMainDelegate: std::optional BasicStartupComplete() override; -@@ -92,13 +95,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate { +@@ -99,13 +102,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate { void InitializeMemorySystem(); @@ -237,7 +248,7 @@ index ac1361bd6bc2e..a303ca169c7f7 100644 base::PathService::OverrideAndCreateIfNeeded( diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index f90f1b8fa54d9..22fac24f015e1 100644 +index 3bd823dc11c54..c8ac6d01a4d94 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -52,6 +52,7 @@ @@ -248,7 +259,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -529,7 +530,7 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -533,7 +534,7 @@ void ProcessSingletonNotificationCallbackImpl( return; } @@ -257,7 +268,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // The uninstall command-line switch is handled by the origin process; see // ChromeMainDelegate::PostEarlyInitialization(...). The other process won't // be able to become the singleton process and will display a window asking -@@ -833,7 +834,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { +@@ -837,7 +838,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { return content::RESULT_CODE_NORMAL_EXIT; } @@ -266,7 +277,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // If we are running stale binaries then relaunch and exit immediately. if (upgrade_util::IsRunningOldChrome()) { if (!upgrade_util::RelaunchChromeBrowser( -@@ -846,7 +847,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { +@@ -850,7 +851,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { // result in browser startup bailing. return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED; } @@ -275,7 +286,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 return load_local_state_result; } -@@ -952,7 +953,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( +@@ -960,7 +961,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( browser_process_->local_state()); platform_management_service->RefreshCache(base::NullCallback()); @@ -284,7 +295,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 if (first_run::IsChromeFirstRun()) { bool stats_default; if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) { -@@ -965,7 +966,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( +@@ -973,7 +974,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( : metrics::EnableMetricsDefault::OPT_IN); } } @@ -293,7 +304,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 std::string locale = startup_data_->chrome_feature_list_creator()->actual_locale(); -@@ -998,6 +999,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { +@@ -1006,6 +1007,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) master_prefs_ = std::make_unique(); @@ -301,7 +312,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 std::unique_ptr installer_initial_prefs = startup_data_->chrome_feature_list_creator()->TakeInitialPrefs(); if (!installer_initial_prefs) -@@ -1031,6 +1033,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { +@@ -1039,6 +1041,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { master_prefs_->confirm_to_quit); } #endif // BUILDFLAG(IS_MAC) @@ -309,7 +320,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) return content::RESULT_CODE_NORMAL_EXIT; } -@@ -1092,6 +1095,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1100,6 +1103,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { browser_process_->browser_policy_connector()->OnResourceBundleCreated(); @@ -317,7 +328,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // Android does first run in Java instead of native. // Chrome OS has its own out-of-box-experience code. #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) -@@ -1113,6 +1117,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1121,6 +1125,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) @@ -325,7 +336,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 #if BUILDFLAG(IS_MAC) #if defined(ARCH_CPU_X86_64) -@@ -1473,6 +1478,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1483,6 +1488,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->PreMainMessageLoopRun(); #if BUILDFLAG(IS_WIN) @@ -333,7 +344,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // If the command line specifies 'uninstall' then we need to work here // unless we detect another chrome browser running. if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) { -@@ -1484,6 +1490,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1494,6 +1500,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { return ChromeBrowserMainPartsWin::HandleIconsCommands( *base::CommandLine::ForCurrentProcess()); } @@ -341,7 +352,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 ui::SelectFileDialog::SetFactory( std::make_unique()); -@@ -1509,6 +1516,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1519,6 +1526,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // BUILDFLAG(CHROME_FOR_TESTING) @@ -349,7 +360,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMakeDefaultBrowser)) { bool is_managed = g_browser_process->local_state()->IsManagedPreference( -@@ -1522,18 +1530,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1532,18 +1540,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { ? static_cast(content::RESULT_CODE_NORMAL_EXIT) : static_cast(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED); } @@ -372,7 +383,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 #if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING) // Begin relaunch processing immediately if User Data migration is required -@@ -1572,7 +1584,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1582,7 +1594,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) @@ -381,7 +392,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // Check if there is any machine level Chrome installed on the current // machine. If yes and the current Chrome process is user level, we do not // allow the user level Chrome to run. So we notify the user and uninstall -@@ -1581,7 +1593,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1591,7 +1603,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // obtained but before potentially creating the first run sentinel). if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; @@ -390,7 +401,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // Desktop construction occurs here, (required before profile creation). PreProfileInit(); -@@ -1656,6 +1668,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1666,6 +1678,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Call `PostProfileInit()`and set it up for profiles created later. profile_init_manager_ = std::make_unique(this, profile); @@ -398,7 +409,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) // Execute first run specific code after the PrefService has been initialized // and preferences have been registered since some of the import code depends -@@ -1695,6 +1708,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1705,6 +1718,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { *base::CommandLine::ForCurrentProcess()); } #endif // BUILDFLAG(IS_WIN) @@ -406,7 +417,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // Configure modules that need access to resources. net::NetModule::SetResourceProvider(ChromeNetResourceProvider); -@@ -1786,6 +1800,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1796,6 +1810,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { g_browser_process->profile_manager()->GetLastOpenedProfiles(); } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -418,7 +429,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 // This step is costly. if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(), base::FilePath(), profile_info, -@@ -1818,11 +1837,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1828,11 +1847,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -434,7 +445,7 @@ index f90f1b8fa54d9..22fac24f015e1 100644 #endif // !BUILDFLAG(IS_ANDROID) diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm -index 6b27cf7037fce..70fd49bb873ff 100644 +index 9a8dfdb6bc3ce..5981a8a0fae38 100644 --- chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm @@ -20,6 +20,7 @@ @@ -445,7 +456,7 @@ index 6b27cf7037fce..70fd49bb873ff 100644 #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/browser_process.h" -@@ -120,6 +121,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -124,6 +125,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { } #endif // !BUILDFLAG(CHROME_FOR_TESTING) @@ -453,7 +464,7 @@ index 6b27cf7037fce..70fd49bb873ff 100644 // Create the app delegate by requesting the shared AppController. CHECK_EQ(nil, NSApp.delegate); AppController* app_controller = AppController.sharedController; -@@ -128,6 +130,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -132,6 +134,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { chrome::BuildMainMenu(NSApp, app_controller, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false); [app_controller mainMenuCreated]; @@ -461,7 +472,7 @@ index 6b27cf7037fce..70fd49bb873ff 100644 ui::WarmScreenCapture(); -@@ -168,5 +171,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, +@@ -172,5 +175,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, } void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { @@ -470,7 +481,7 @@ index 6b27cf7037fce..70fd49bb873ff 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index d81a2b75f4c6c..4c29ef42b4576 100644 +index 4b8cf312d4ca4..ef3c7e5e372b4 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc @@ -46,6 +46,7 @@ @@ -479,9 +490,9 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 #include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM +#include "cef/libcef/features/features.h" #include "chrome/browser/after_startup_task_utils.h" - #include "chrome/browser/ai/ai_manager_impl.h" + #include "chrome/browser/ai/ai_manager_keyed_service_factory.h" #include "chrome/browser/app_mode/app_mode_utils.h" -@@ -1486,6 +1487,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { +@@ -1518,6 +1519,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { } ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -490,7 +501,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back( std::make_unique()); -@@ -1523,6 +1526,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1555,6 +1558,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { } } @@ -502,7 +513,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -3744,28 +3752,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs, +@@ -3890,28 +3898,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs, web_prefs->preferred_color_scheme; } #else @@ -548,7 +559,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 #endif // BUILDFLAG(IS_ANDROID) // Reauth WebUI doesn't support dark mode yet because it shares the dialog -@@ -4506,9 +4511,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4693,9 +4698,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -560,7 +571,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -6627,7 +6634,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -6794,7 +6801,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( #endif } @@ -569,7 +580,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -6645,6 +6652,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -6812,6 +6819,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -578,7 +589,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 } std::vector -@@ -7767,10 +7776,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -7929,10 +7938,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -591,7 +602,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -7789,7 +7798,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -7951,7 +7960,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -601,7 +612,7 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -7968,7 +7978,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -8100,7 +8110,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -611,10 +622,10 @@ index d81a2b75f4c6c..4c29ef42b4576 100644 base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, weak_factory_.GetWeakPtr(), diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index 522c072575325..b63e9aacd1f0a 100644 +index be75c2ce84ba4..f76963b5023ef 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -147,6 +147,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -150,6 +150,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; @@ -623,7 +634,7 @@ index 522c072575325..b63e9aacd1f0a 100644 // TODO(crbug.com/41356866): This file is about calls from content/ out // to chrome/ to get values or notify about events, but both of these // functions are from chrome/ to chrome/ and don't involve content/ at all. -@@ -691,7 +693,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -705,7 +707,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -632,7 +643,7 @@ index 522c072575325..b63e9aacd1f0a 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1233,7 +1235,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -1248,7 +1250,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -642,7 +653,7 @@ index 522c072575325..b63e9aacd1f0a 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index 7c9cd6b688f88..f66aa28081c37 100644 +index 0f37944dfa465..6d36a31dff18c 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -16,6 +16,7 @@ @@ -653,7 +664,7 @@ index 7c9cd6b688f88..f66aa28081c37 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/invert_bubble_prefs.h" -@@ -198,6 +199,10 @@ +@@ -204,6 +205,10 @@ #include "chrome/browser/background/background_mode_manager.h" #endif @@ -664,7 +675,7 @@ index 7c9cd6b688f88..f66aa28081c37 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1917,7 +1922,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1694,7 +1699,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_WIN) @@ -674,7 +685,7 @@ index 7c9cd6b688f88..f66aa28081c37 100644 downgrade::RegisterPrefs(registry); #endif -@@ -1961,6 +1967,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1747,6 +1753,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); @@ -686,7 +697,7 @@ index 7c9cd6b688f88..f66aa28081c37 100644 } // Register prefs applicable to all profiles. -@@ -2411,6 +2422,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2199,6 +2210,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, const std::string& locale) { RegisterProfilePrefs(registry, locale); diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index 0108839ff..555f657ab 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc -index e70c1340dd2ee..745b3982aa9ad 100644 +index 0108532731b73..ddfcc75ae9801 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -411,6 +411,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -412,6 +412,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( // choose to not implement CommandUpdaterDelegate inside this class and // therefore command_updater_ doesn't have the delegate set). if (!SupportsCommand(id) || !IsCommandEnabled(id)) { @@ -10,7 +10,7 @@ index e70c1340dd2ee..745b3982aa9ad 100644 return false; } -@@ -427,6 +428,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -428,6 +429,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -24,7 +24,7 @@ index e70c1340dd2ee..745b3982aa9ad 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1215,11 +1223,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1217,11 +1225,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -39,12 +39,12 @@ index e70c1340dd2ee..745b3982aa9ad 100644 + browser_->toolbar_overridden(); } - bool BrowserCommandController::IsWebAppOrCustomTab() const { + void BrowserCommandController::InitCommandState() { diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc -index 2a1eb7cd0a644..b3e95b92b2951 100644 +index 28f18cbca8a49..31cec595eab48 100644 --- chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc -@@ -658,10 +658,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel( +@@ -715,10 +715,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel( ui::SimpleMenuModel::Delegate* delegate) : SimpleMenuModel(delegate) { AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon); @@ -57,7 +57,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 } class SaveAndShareSubMenuModel : public ui::SimpleMenuModel { -@@ -736,6 +738,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( +@@ -783,6 +785,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( } } @@ -66,7 +66,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 + +void FilterMenuModel(ui::SimpleMenuModel* model, + const IsVisibleCallback& is_visible) { -+ absl::optional last_separator; ++ std::optional last_separator; + size_t visible_ct = 0; + for (size_t i = 0; i < model->GetItemCount(); ++i) { + const auto type = model->GetTypeAt(i); @@ -115,7 +115,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 } // namespace //////////////////////////////////////////////////////////////////////////////// -@@ -1596,7 +1649,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { +@@ -1676,7 +1729,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { return false; } @@ -124,7 +124,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 GlobalError* error = GlobalErrorServiceFactory::GetForProfile(browser_->profile()) ->GetGlobalErrorByMenuItemCommandID(command_id); -@@ -1611,6 +1664,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { +@@ -1692,6 +1745,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { } } @@ -155,7 +155,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 bool AppMenuModel::IsCommandIdAlerted(int command_id) const { if (command_id == IDC_VIEW_PASSWORDS || command_id == IDC_SHOW_PASSWORD_MANAGER) { -@@ -1773,8 +1850,10 @@ void AppMenuModel::Build() { +@@ -1854,8 +1931,10 @@ void AppMenuModel::Build() { IDS_CLEAR_BROWSING_DATA, kTrashCanRefreshIcon); @@ -166,7 +166,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 AddSeparator(ui::NORMAL_SEPARATOR); AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon); -@@ -1896,6 +1975,11 @@ void AppMenuModel::Build() { +@@ -1967,6 +2046,11 @@ void AppMenuModel::Build() { } #endif // !BUILDFLAG(IS_CHROMEOS_ASH) @@ -179,10 +179,10 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644 } diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h -index ada5cc02223d4..37da48f2e5412 100644 +index 3451f237e2df0..dfcc57b661a45 100644 --- chrome/browser/ui/toolbar/app_menu_model.h +++ chrome/browser/ui/toolbar/app_menu_model.h -@@ -232,6 +232,7 @@ class AppMenuModel : public ui::SimpleMenuModel, +@@ -233,6 +233,7 @@ class AppMenuModel : public ui::SimpleMenuModel, void ExecuteCommand(int command_id, int event_flags) override; bool IsCommandIdChecked(int command_id) const override; bool IsCommandIdEnabled(int command_id) const override; @@ -190,7 +190,7 @@ index ada5cc02223d4..37da48f2e5412 100644 bool IsCommandIdAlerted(int command_id) const override; bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override; bool GetAcceleratorForCommandId(int command_id, -@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel, +@@ -273,6 +274,8 @@ class AppMenuModel : public ui::SimpleMenuModel, void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module, int event_flags); @@ -397,10 +397,10 @@ index 14a8a70d853f6..bf81594947886 100644 // regenerated. bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type); diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index 1142fec7a138c..71e381f04adcc 100644 +index ab37088b71722..f4e1786b902c9 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -350,11 +350,10 @@ using content::WebContents; +@@ -354,11 +354,10 @@ using content::WebContents; using input::NativeWebKeyboardEvent; using web_modal::WebContentsModalDialogHost; @@ -415,7 +415,7 @@ index 1142fec7a138c..71e381f04adcc 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // UMA histograms that record animation smoothness for tab loading animation. -@@ -694,6 +693,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { +@@ -698,6 +697,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { return browser_view_->frame()->GetTopInset() - browser_view_->y(); } @@ -430,7 +430,7 @@ index 1142fec7a138c..71e381f04adcc 100644 bool IsToolbarVisible() const override { return browser_view_->IsToolbarVisible(); } -@@ -845,11 +852,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { +@@ -849,11 +856,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -453,7 +453,7 @@ index 1142fec7a138c..71e381f04adcc 100644 SetShowIcon( ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); -@@ -944,8 +961,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -948,8 +965,15 @@ BrowserView::BrowserView(std::unique_ptr browser) contents_container->SetLayoutManager(std::make_unique( devtools_web_view_, contents_web_view_, watermark_view_)); @@ -461,7 +461,7 @@ index 1142fec7a138c..71e381f04adcc 100644 - std::make_unique(browser_.get(), this)); + toolbar_ = OverrideCreateToolbar(); + if (!toolbar_) { -+ toolbar_ = new ToolbarView(browser_.get(), this, absl::nullopt); ++ toolbar_ = new ToolbarView(browser_.get(), this, std::nullopt); + } else { + browser_->set_toolbar_overridden(true); + // Update state that depends on the above flag. @@ -471,7 +471,17 @@ index 1142fec7a138c..71e381f04adcc 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1019,7 +1043,9 @@ BrowserView::~BrowserView() { +@@ -1016,7 +1040,9 @@ BrowserView::BrowserView(std::unique_ptr browser) + } + + BrowserView::~BrowserView() { ++ if (browser_) { + browser_->GetFeatures().TearDownPreBrowserViewDestruction(); ++ } + + // Destroy the top controls slide controller first as it depends on the + // tabstrip model and the browser frame. +@@ -1024,7 +1050,9 @@ BrowserView::~BrowserView() { // All the tabs should have been destroyed already. If we were closed by the // OS with some tabs than the NativeBrowserFrame should have destroyed them. @@ -481,7 +491,7 @@ index 1142fec7a138c..71e381f04adcc 100644 // Stop the animation timer explicitly here to avoid running it in a nested // message loop, which may run by Browser destructor. -@@ -1028,17 +1054,18 @@ BrowserView::~BrowserView() { +@@ -1033,17 +1061,18 @@ BrowserView::~BrowserView() { // Immersive mode may need to reparent views before they are removed/deleted. immersive_mode_controller_.reset(); @@ -502,19 +512,9 @@ index 1142fec7a138c..71e381f04adcc 100644 } + } - // The TabStrip attaches a listener to the model. Make sure we shut down the - // TabStrip first so that it can cleanly remove the listener. -@@ -1062,7 +1089,9 @@ BrowserView::~BrowserView() { - - // `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the - // SidePanelCoordinator. -+ if (browser()) { - SidePanelUI::RemoveSidePanelUIForBrowser(browser()); -+ } - } - - // static -@@ -1618,6 +1647,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { + #if BUILDFLAG(ENTERPRISE_WATERMARK) + // `watermark_view_` is a raw pointer to a child view, so it needs to be set +@@ -1604,6 +1633,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y()); } @@ -528,7 +528,7 @@ index 1142fec7a138c..71e381f04adcc 100644 // static: BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement( const gfx::Rect& contents_webview_bounds, -@@ -2021,9 +2057,14 @@ void BrowserView::OnExclusiveAccessUserInput() { +@@ -2028,9 +2064,14 @@ void BrowserView::OnExclusiveAccessUserInput() { bool BrowserView::ShouldHideUIForFullscreen() const { // Immersive mode needs UI for the slide-down top panel. @@ -544,7 +544,7 @@ index 1142fec7a138c..71e381f04adcc 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -3185,7 +3226,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { +@@ -3242,7 +3283,8 @@ views::View* BrowserView::GetTopContainer() { } DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { @@ -554,7 +554,7 @@ index 1142fec7a138c..71e381f04adcc 100644 if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) return download_button->bubble_controller(); return nullptr; -@@ -3740,7 +3782,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -3797,7 +3839,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -564,7 +564,7 @@ index 1142fec7a138c..71e381f04adcc 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -4223,11 +4266,38 @@ void BrowserView::GetAccessiblePanes(std::vector* panes) { +@@ -4280,11 +4323,38 @@ void BrowserView::GetAccessiblePanes(std::vector* panes) { bool BrowserView::ShouldDescendIntoChildForEventHandling( gfx::NativeView child, const gfx::Point& location) { @@ -583,7 +583,7 @@ index 1142fec7a138c..71e381f04adcc 100644 + } +#endif + -+ absl::optional draggable_region; ++ std::optional draggable_region; + // Window for PWAs with window-controls-overlay display override should claim // mouse events that fall within the draggable region. @@ -605,7 +605,7 @@ index 1142fec7a138c..71e381f04adcc 100644 // Draggable regions are defined relative to the web contents. gfx::Point point_in_contents_web_view_coords(location); views::View::ConvertPointToTarget(GetWidget()->GetRootView(), -@@ -4236,7 +4306,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( +@@ -4293,7 +4363,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( // Draggable regions should be ignored for clicks into any browser view's // owned widgets, for example alerts, permission prompts or find bar. @@ -614,7 +614,7 @@ index 1142fec7a138c..71e381f04adcc 100644 point_in_contents_web_view_coords.x(), point_in_contents_web_view_coords.y()) || WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords); -@@ -4347,8 +4417,10 @@ void BrowserView::Layout(PassKey) { +@@ -4404,8 +4474,10 @@ void BrowserView::Layout(PassKey) { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -627,7 +627,7 @@ index 1142fec7a138c..71e381f04adcc 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -4414,6 +4486,11 @@ void BrowserView::AddedToWidget() { +@@ -4471,6 +4543,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -639,7 +639,7 @@ index 1142fec7a138c..71e381f04adcc 100644 toolbar_->Init(); // TODO(pbos): Investigate whether the side panels should be creatable when -@@ -4455,13 +4532,9 @@ void BrowserView::AddedToWidget() { +@@ -4512,13 +4589,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -655,7 +655,7 @@ index 1142fec7a138c..71e381f04adcc 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4821,7 +4894,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4886,7 +4959,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) { // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -665,7 +665,7 @@ index 1142fec7a138c..71e381f04adcc 100644 } void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) { -@@ -5294,6 +5368,8 @@ Profile* BrowserView::GetProfile() { +@@ -5387,6 +5461,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -674,7 +674,7 @@ index 1142fec7a138c..71e381f04adcc 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -5316,6 +5392,8 @@ void BrowserView::HideDownloadShelf() { +@@ -5409,6 +5485,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -684,10 +684,10 @@ index 1142fec7a138c..71e381f04adcc 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index 0e1ac9a2fd806..0b6f9370737f0 100644 +index 89816fdfe6b77..8974f7ca4ae31 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h -@@ -142,11 +142,16 @@ class BrowserView : public BrowserWindow, +@@ -143,11 +143,16 @@ class BrowserView : public BrowserWindow, METADATA_HEADER(BrowserView, views::ClientView) public: @@ -704,7 +704,7 @@ index 0e1ac9a2fd806..0b6f9370737f0 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; paint_as_active_subscription_ = -@@ -862,6 +867,10 @@ class BrowserView : public BrowserWindow, +@@ -852,6 +857,10 @@ class BrowserView : public BrowserWindow, base::WeakPtr expected_web_contents, const enterprise_data_protection::UrlSettings& settings); @@ -715,7 +715,7 @@ index 0e1ac9a2fd806..0b6f9370737f0 100644 protected: // Enumerates where the devtools are docked relative to the browser's main // web contents. -@@ -885,6 +894,8 @@ class BrowserView : public BrowserWindow, +@@ -875,6 +884,8 @@ class BrowserView : public BrowserWindow, const gfx::Rect& contents_webview_bounds, const gfx::Rect& local_webview_container_bounds); @@ -814,7 +814,7 @@ index 96b489221fb3a..b372f67cd5c92 100644 bool toolbar_visible = delegate_->IsToolbarVisible(); int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0; diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h -index 29ad5517bd3c9..b0fe093467abc 100644 +index 06ff29d3f9b27..65301b6ecf076 100644 --- chrome/browser/ui/views/frame/browser_view_layout_delegate.h +++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h @@ -28,6 +28,7 @@ class BrowserViewLayoutDelegate { @@ -843,10 +843,10 @@ index 71445bfab1824..c77750ea2a820 100644 ContentsWebView::~ContentsWebView() { diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -index 9858a9660ccee..a0cc25fb4fca4 100644 +index 5778e6329ad87..9c594b43d16cd 100644 --- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -606,6 +606,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( +@@ -609,6 +609,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( return window->GetProperty(chromeos::kWindowStateTypeKey); }))); #endif @@ -858,7 +858,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644 } PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() { -@@ -733,18 +738,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( +@@ -736,18 +741,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( int PictureInPictureBrowserFrameView::NonClientHitTest( const gfx::Point& point) { @@ -909,7 +909,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644 // Allow dragging and resizing the window. int window_component = GetHTComponentForFrame( -@@ -813,7 +842,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { +@@ -816,7 +845,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { gfx::Rect content_area = GetLocalBounds(); content_area.Inset(FrameBorderInsets()); gfx::Rect top_bar = content_area; @@ -919,7 +919,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644 top_bar_container_view_->SetBoundsRect(top_bar); #if !BUILDFLAG(IS_ANDROID) if (auto_pip_setting_overlay_) { -@@ -1300,7 +1330,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { +@@ -1315,7 +1345,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { } int PictureInPictureBrowserFrameView::GetTopAreaHeight() const { @@ -930,7 +930,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644 gfx::Size PictureInPictureBrowserFrameView::GetNonClientViewAreaSize() const { diff --git chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc -index b862ceac7225d..9575440a77d67 100644 +index 33c6444869375..d74818698d81a 100644 --- chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc +++ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc @@ -27,7 +27,8 @@ OmniboxPopupCloser::OmniboxPopupCloser(BrowserView* browser_view) @@ -940,14 +940,14 @@ index b862ceac7225d..9575440a77d67 100644 - if (!browser_view_->browser()->is_delete_scheduled() && + if (browser_view_->browser() && + !browser_view_->browser()->is_delete_scheduled() && - event->type() == ui::ET_MOUSE_PRESSED) { + event->type() == ui::EventType::kMousePressed) { LocationBarView* location_bar_view = browser_view_->GetLocationBarView(); CHECK(location_bar_view); diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc -index 04639b0a2f603..f4cfc16f6b4de 100644 +index 0bd4cfc52548b..8515cec793563 100644 --- chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc -@@ -96,6 +96,12 @@ void PageActionIconController::Init(const PageActionIconParams& params, +@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params, }; for (PageActionIconType type : params.types_enabled) { @@ -961,10 +961,10 @@ index 04639b0a2f603..f4cfc16f6b4de 100644 case PageActionIconType::kPaymentsOfferNotification: add_page_action_icon( diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -index 9ba58b49d613e..90749dcd2d945 100644 +index 28cff32121b69..443e43779e8f5 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -605,29 +605,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( +@@ -606,29 +606,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( } bool BrowserTabStripController::IsFrameCondensed() const { @@ -1007,10 +1007,10 @@ index 9ba58b49d613e..90749dcd2d945 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index 05ae08a41e203..1d99112e56e14 100644 +index 0ef2fcb160af2..010279ae8e5dc 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -190,7 +190,7 @@ class TabstripLikeBackground : public views::Background { +@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background { void Paint(gfx::Canvas* canvas, views::View* view) const override { bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view, browser_view_); @@ -1019,13 +1019,13 @@ index 05ae08a41e203..1d99112e56e14 100644 SkColor frame_color = browser_view_->frame()->GetFrameView()->GetFrameColor( BrowserFrameActiveState::kUseCurrent); -@@ -220,12 +220,13 @@ END_METADATA +@@ -223,12 +223,13 @@ END_METADATA //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: -ToolbarView::ToolbarView(Browser* browser, BrowserView* browser_view) +ToolbarView::ToolbarView(Browser* browser, BrowserView* browser_view, -+ absl::optional display_mode) ++ std::optional display_mode) : AnimationDelegateViews(this), browser_(browser), browser_view_(browser_view), @@ -1035,7 +1035,7 @@ index 05ae08a41e203..1d99112e56e14 100644 SetID(VIEW_ID_TOOLBAR); container_view_ = AddChildView(std::make_unique()); -@@ -249,9 +250,24 @@ ToolbarView::~ToolbarView() { +@@ -255,9 +256,24 @@ ToolbarView::~ToolbarView() { for (const auto& view_and_command : GetViewCommandMap()) chrome::RemoveCommandObserver(browser_, view_and_command.second, this); @@ -1060,7 +1060,7 @@ index 05ae08a41e203..1d99112e56e14 100644 #if defined(USE_AURA) // Avoid generating too many occlusion tracking calculation events before this // function returns. The occlusion status will be computed only once once this -@@ -274,12 +290,12 @@ void ToolbarView::Init() { +@@ -280,12 +296,12 @@ void ToolbarView::Init() { auto location_bar = std::make_unique( browser_, browser_->profile(), browser_->command_controller(), this, @@ -1075,7 +1075,7 @@ index 05ae08a41e203..1d99112e56e14 100644 download_button = std::make_unique(browser_view_); } -@@ -359,8 +375,10 @@ void ToolbarView::Init() { +@@ -365,8 +381,10 @@ void ToolbarView::Init() { toolbar_divider = std::make_unique(); } std::unique_ptr cast; @@ -1087,7 +1087,7 @@ index 05ae08a41e203..1d99112e56e14 100644 std::unique_ptr media_button; if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) { -@@ -370,7 +388,8 @@ void ToolbarView::Init() { +@@ -376,7 +394,8 @@ void ToolbarView::Init() { std::unique_ptr send_tab_to_self_button; @@ -1097,7 +1097,7 @@ index 05ae08a41e203..1d99112e56e14 100644 send_tab_to_self_button = std::make_unique( browser_view_); -@@ -796,7 +815,8 @@ void ToolbarView::Layout(PassKey) { +@@ -810,7 +829,8 @@ void ToolbarView::Layout(PassKey) { if (display_mode_ == DisplayMode::NORMAL) { LayoutCommon(); @@ -1108,16 +1108,16 @@ index 05ae08a41e203..1d99112e56e14 100644 // Use two-pass solution to avoid the overflow button interfering with toolbar diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h -index 78079d1c56460..0585cfd0de16b 100644 +index cb361877682b9..5f13a11a494a1 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h -@@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView, +@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView, // needs to be displayed. }; - ToolbarView(Browser* browser, BrowserView* browser_view); + ToolbarView(Browser* browser, BrowserView* browser_view, -+ absl::optional display_mode); ++ std::optional display_mode); ToolbarView(const ToolbarView&) = delete; ToolbarView& operator=(const ToolbarView&) = delete; ~ToolbarView() override; diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index fae053d3b..5110df75e 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index c16e81b7d357f..2e74fc89de36f 100644 +index 71f67744bc79a..2bb886ea46ab5 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h -@@ -115,7 +115,7 @@ bool ApplyUserAgentMetadataOverrides( +@@ -114,7 +114,7 @@ bool ApplyUserAgentMetadataOverrides( FrameTreeNode* frame_tree_node, std::optional* override_out); diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 5b50dfe8c..f6e236312 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index a24477b920c5f..4a62dddd15ec7 100644 +index 11c9cd82d0392..9c700bc625cd5 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc -@@ -596,7 +596,7 @@ void DevToolsHttpHandler::OnJsonRequest( +@@ -598,7 +598,7 @@ void DevToolsHttpHandler::OnJsonRequest( base::Value::Dict version; version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); version.Set("WebKit-Version", GetWebKitVersion()); @@ -12,10 +12,10 @@ index a24477b920c5f..4a62dddd15ec7 100644 version.Set("V8-Version", V8_VERSION_STRING); std::string host = info.GetHeaderValue("host"); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 6ff681f94dcba..82b93e6d3052a 100644 +index a7b8a6ed9165c..cf3b7ee6d06de 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -854,7 +854,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( +@@ -858,7 +858,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( mojo::PendingRemote terminal_external_protocol; bool handled = GetContentClient()->browser()->HandleExternalProtocol( @@ -24,7 +24,7 @@ index 6ff681f94dcba..82b93e6d3052a 100644 frame_tree_node->frame_tree_node_id(), navigation_ui_data, request_info.is_primary_main_frame, frame_tree_node->IsInFencedFrameTree(), request_info.sandbox_flags, -@@ -866,6 +866,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( +@@ -870,6 +870,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( *request_info.initiator_document_token) : nullptr, &terminal_external_protocol); @@ -47,10 +47,10 @@ index 6ff681f94dcba..82b93e6d3052a 100644 return std::make_pair( /*is_cacheable=*/false, diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index 8df62dd712ad5..b191ea472448a 100644 +index dc4110d8878b8..936f861619e26 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -1104,7 +1104,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -1127,7 +1127,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -59,7 +59,7 @@ index 8df62dd712ad5..b191ea472448a 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1113,6 +1113,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -1136,6 +1136,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -68,10 +68,10 @@ index 8df62dd712ad5..b191ea472448a 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 8f457dd1d2afb..6df18f193039e 100644 +index 77e3d993b3dc0..349043f3d965b 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -2094,7 +2094,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2141,7 +2141,7 @@ class CONTENT_EXPORT ContentBrowserClient { // // If |relative_partition_path| is the empty string, it means this needs to // create the default NetworkContext for the BrowserContext. @@ -80,7 +80,7 @@ index 8f457dd1d2afb..6df18f193039e 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -2307,6 +2307,21 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2354,6 +2354,21 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -102,7 +102,7 @@ index 8f457dd1d2afb..6df18f193039e 100644 // Creates an OverlayWindow to be used for video or Picture-in-Picture. // This window will house the content shown when in Picture-in-Picture mode. // This will return a new OverlayWindow. -@@ -2364,6 +2379,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2414,6 +2429,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -114,7 +114,7 @@ index 8f457dd1d2afb..6df18f193039e 100644 // on blink::features::kUserAgentReduction. Content may cache this value. virtual std::string GetUserAgent(); diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 7a9334a6cb0c7..031f5eb442331 100644 +index dd8f6b9a87a0c..c1f93a716b485 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -108,6 +108,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -127,7 +127,7 @@ index 7a9334a6cb0c7..031f5eb442331 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -339,6 +342,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -345,6 +348,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -139,10 +139,10 @@ index 7a9334a6cb0c7..031f5eb442331 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index c977c0ed18151..fa6241f2c761d 100644 +index f2b7b6d436431..988447abd44b9 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -556,6 +556,8 @@ void RenderThreadImpl::Init() { +@@ -572,6 +572,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -152,10 +152,10 @@ index c977c0ed18151..fa6241f2c761d 100644 base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 32f322e1ef607..f4aabab498e88 100644 +index 06000a2c90989..df8daf5b60a1e 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1000,6 +1000,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1030,6 +1030,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -172,10 +172,10 @@ index 32f322e1ef607..f4aabab498e88 100644 RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { return std::make_unique(); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 8a8faf056bee0..03edc844d5d6e 100644 +index 75504bfc89cbe..8a315105f4390 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -238,6 +238,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -243,6 +243,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override; #endif // BUILDFLAG(IS_ANDROID) @@ -186,10 +186,10 @@ index 8a8faf056bee0..03edc844d5d6e 100644 // plus eTLD+1, such as https://google.com), or to a more specific origin. void SetIsLockedToSite(); diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc -index feb037de8a1ad..77d6079e85912 100644 +index 9064deed51d23..bea9f5e400c5f 100644 --- content/shell/browser/shell_content_browser_client.cc +++ content/shell/browser/shell_content_browser_client.cc -@@ -736,7 +736,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( +@@ -743,7 +743,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( #endif } @@ -198,7 +198,7 @@ index feb037de8a1ad..77d6079e85912 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -745,6 +745,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( +@@ -752,6 +752,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { ConfigureNetworkContextParamsForShell(context, network_context_params, cert_verifier_creation_params); @@ -207,10 +207,10 @@ index feb037de8a1ad..77d6079e85912 100644 std::vector diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h -index 281435690f2b9..6d3cc5b627bb3 100644 +index adda0a797eb58..a83a9e048000c 100644 --- content/shell/browser/shell_content_browser_client.h +++ content/shell/browser/shell_content_browser_client.h -@@ -148,7 +148,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { +@@ -149,7 +149,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { GetGeolocationSystemPermissionManager() override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -220,10 +220,10 @@ index 281435690f2b9..6d3cc5b627bb3 100644 bool in_memory, const base::FilePath& relative_partition_path, diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc -index 77cf03ca44be9..43928ef67393b 100644 +index 5818c29a8efd2..eac53ff61db95 100644 --- headless/lib/browser/headless_content_browser_client.cc +++ headless/lib/browser/headless_content_browser_client.cc -@@ -301,7 +301,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed( +@@ -338,7 +338,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed( return true; } @@ -232,7 +232,7 @@ index 77cf03ca44be9..43928ef67393b 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -311,6 +311,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( +@@ -348,6 +348,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams( in_memory, relative_partition_path, network_context_params, cert_verifier_creation_params); @@ -241,10 +241,10 @@ index 77cf03ca44be9..43928ef67393b 100644 std::string HeadlessContentBrowserClient::GetProduct() { diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h -index eae1297164eb0..abab2091ace5f 100644 +index 487ab091cb880..5c9cd62d4c6d1 100644 --- headless/lib/browser/headless_content_browser_client.h +++ headless/lib/browser/headless_content_browser_client.h -@@ -85,7 +85,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { +@@ -94,7 +94,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { std::string* out_debug_message, bool* out_block_is_site_setting_specific) override; diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index cf726a40b..06df2f3fe 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -12,7 +12,7 @@ index 79ba3ac1913f8..46bcb4366d2f8 100644 if (main_argv) setproctitle_init(main_argv); diff --git content/app/content_main.cc content/app/content_main.cc -index 96c28a7ce3183..3d60ab170e9a5 100644 +index 4251459b695e6..d74286fec151b 100644 --- content/app/content_main.cc +++ content/app/content_main.cc @@ -174,11 +174,8 @@ ContentMainParams::~ContentMainParams() = default; @@ -39,7 +39,7 @@ index 96c28a7ce3183..3d60ab170e9a5 100644 // A flag to indicate whether Main() has been called before. On Android, we // may re-run Main() without restarting the browser process. This flag -@@ -274,14 +268,6 @@ RunContentProcess(ContentMainParams params, +@@ -275,14 +269,6 @@ RunContentProcess(ContentMainParams params, #endif #if BUILDFLAG(IS_MAC) @@ -54,7 +54,7 @@ index 96c28a7ce3183..3d60ab170e9a5 100644 InitializeMac(); #endif -@@ -329,12 +315,46 @@ RunContentProcess(ContentMainParams params, +@@ -330,12 +316,46 @@ RunContentProcess(ContentMainParams params, if (IsSubprocess()) CommonSubprocessInit(); @@ -103,7 +103,7 @@ index 96c28a7ce3183..3d60ab170e9a5 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 78b9930f1ca5c..1d93552c3da25 100644 +index eedd753c7990a..87f342581607b 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -52,6 +52,7 @@ @@ -114,7 +114,7 @@ index 78b9930f1ca5c..1d93552c3da25 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1342,6 +1343,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1361,6 +1362,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 534c1af2f..c818af605 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -270,10 +270,10 @@ index a604df7a5ea6a..618fbde10a65c 100644 } // namespace crash_reporter diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc -index 874ade6000ded..31fffc23197fc 100644 +index 3e96d2562b6cb..06133487e4157 100644 --- components/crash/core/app/crashpad.cc +++ components/crash/core/app/crashpad.cc -@@ -137,7 +137,8 @@ bool InitializeCrashpadImpl(bool initial_client, +@@ -124,7 +124,8 @@ bool InitializeCrashpadImpl(bool initial_client, // fallback. Forwarding is turned off for debug-mode builds even for the // browser process, because the system's crash reporter can take a very long // time to chew on symbols. diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 50a2359cd..a6d7a8efb 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,7 +12,7 @@ index 44a11ec90ec9b..4c35b35a97f28 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 2902e374bb1a2..875924ff22c23 100644 +index 35e7fdec17819..c4734b7519f52 100644 --- BUILD.gn +++ BUILD.gn @@ -20,6 +20,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -23,7 +23,7 @@ index 2902e374bb1a2..875924ff22c23 100644 import("//chrome/enterprise_companion/buildflags.gni") import("//components/enterprise/buildflags/buildflags.gni") import("//components/nacl/features.gni") -@@ -280,6 +281,10 @@ group("gn_all") { +@@ -279,6 +280,10 @@ group("gn_all") { deps += root_extra_deps @@ -76,7 +76,7 @@ index 1da479dd5eebc..ff9c7e467997c 100644 - visual_studio_runtime_dirs = [] } diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index e75651677c098..9288caaf195e1 100644 +index 274b4b40cbc2b..463d60597dda9 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -99,7 +99,7 @@ index e75651677c098..9288caaf195e1 100644 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] deps += [ "//extensions:extensions_browser_resources" ] diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni -index 2f5fedb03bc6b..b3b7126aa0f42 100644 +index e8f61e2fbf6f2..5de226ad5a8f2 100644 --- chrome/chrome_repack_locales.gni +++ chrome/chrome_repack_locales.gni @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 80a3958d3..435dc0e4e 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,8 +1,8 @@ diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec -index 2450f2cece033..73c3bf885cf06 100644 +index ed1887839c274..e79f9fcf9fea0 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1341,6 +1341,15 @@ +@@ -1345,6 +1345,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/light_mode_3534.patch b/patch/patches/light_mode_3534.patch index a1591a37f..bd649a824 100644 --- a/patch/patches/light_mode_3534.patch +++ b/patch/patches/light_mode_3534.patch @@ -32,11 +32,11 @@ index 73d6ad5e9bb36..6c450e79c0f94 100644 return (dark_mode_support.allow_dark_mode_for_app || dark_mode_support.set_preferred_app_mode) && diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc -index 23d0611fdb2b5..81fd1055e926e 100644 +index a4fc1857349e4..65f620ac8e289 100644 --- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc -@@ -61,7 +61,10 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { - linux_ui_theme->GetNativeTheme()->system_theme()); +@@ -56,7 +56,10 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { + ui::CursorFactory::GetInstance()->ObserveThemeChanges(); } #if defined(USE_DBUS) - dark_mode_manager_ = std::make_unique(); @@ -48,10 +48,10 @@ index 23d0611fdb2b5..81fd1055e926e 100644 } diff --git ui/gtk/native_theme_gtk.cc ui/gtk/native_theme_gtk.cc -index 0b765216c727f..d2c1e21e19b98 100644 +index d059f86ddad39..592b4d7903f15 100644 --- ui/gtk/native_theme_gtk.cc +++ ui/gtk/native_theme_gtk.cc -@@ -164,9 +164,11 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings, +@@ -156,9 +156,11 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings, // have a light variant and aren't affected by the setting. Because of this, // experimentally check if the theme is dark by checking if the window // background color is dark. @@ -67,7 +67,7 @@ index 0b765216c727f..d2c1e21e19b98 100644 // GTK doesn't have a native high contrast setting. Rather, it's implied by diff --git ui/native_theme/native_theme.cc ui/native_theme/native_theme.cc -index f62df6eb7d12b..68f78b5e8bce0 100644 +index e32c556fcf464..3cd78b04b7dad 100644 --- ui/native_theme/native_theme.cc +++ ui/native_theme/native_theme.cc @@ -143,6 +143,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() { @@ -93,10 +93,10 @@ index f62df6eb7d12b..68f78b5e8bce0 100644 static bool kIsForcedHighContrast = base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git ui/native_theme/native_theme.h ui/native_theme/native_theme.h -index fc32dfb0de44f..44ca8103247b1 100644 +index 0ec4f3d6d9d2c..6ba2631e9ef11 100644 --- ui/native_theme/native_theme.h +++ ui/native_theme/native_theme.h -@@ -587,6 +587,9 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -595,6 +595,9 @@ class NATIVE_THEME_EXPORT NativeTheme { // Whether dark mode is forced via command-line flag. static bool IsForcedDarkMode(); diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index 079ffc850..2063bfa95 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -12,10 +12,10 @@ index add20a2f81d66..97071092ff768 100644 base::File file(exe_dir.Append(path), base::File::FLAG_OPEN | base::File::FLAG_READ); diff --git sandbox/linux/suid/client/setuid_sandbox_host.cc sandbox/linux/suid/client/setuid_sandbox_host.cc -index 84fd365da0283..88f3adf813eca 100644 +index cdabcf3e5b2c7..2a12480efb68c 100644 --- sandbox/linux/suid/client/setuid_sandbox_host.cc +++ sandbox/linux/suid/client/setuid_sandbox_host.cc -@@ -120,7 +120,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { +@@ -125,7 +125,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() { base::FilePath sandbox_binary; base::FilePath exe_dir; diff --git a/patch/patches/linux_bluetooth_1319006.patch b/patch/patches/linux_bluetooth_1319006.patch index b439cb842..0f033b223 100644 --- a/patch/patches/linux_bluetooth_1319006.patch +++ b/patch/patches/linux_bluetooth_1319006.patch @@ -1,5 +1,5 @@ diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn -index 05cce11f233e0..91db8a1344d6a 100644 +index 2e53ca913d9b4..4360e4dd65475 100644 --- device/bluetooth/BUILD.gn +++ device/bluetooth/BUILD.gn @@ -50,10 +50,12 @@ source_set("deprecated_experimental_mojo") { diff --git a/patch/patches/linux_glib_deprecated_volatile.patch b/patch/patches/linux_glib_deprecated_volatile.patch index eead9fa5a..0731a2085 100644 --- a/patch/patches/linux_glib_deprecated_volatile.patch +++ b/patch/patches/linux_glib_deprecated_volatile.patch @@ -1,8 +1,8 @@ diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn -index 3e295499c9ddf..f9109fecb2f49 100644 +index b7f86265ef2c7..fe938f4af90c9 100644 --- ui/accessibility/platform/BUILD.gn +++ ui/accessibility/platform/BUILD.gn -@@ -305,6 +305,10 @@ component("platform") { +@@ -306,6 +306,10 @@ component("platform") { if (use_gio) { configs += [ "//build/linux:gio_config" ] } diff --git a/patch/patches/linux_gtk_theme_3610.patch b/patch/patches/linux_gtk_theme_3610.patch index f6a377e6c..040e0db61 100644 --- a/patch/patches/linux_gtk_theme_3610.patch +++ b/patch/patches/linux_gtk_theme_3610.patch @@ -1,5 +1,5 @@ diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc -index d6b7bf6496c25..2bae4e2a4e9e1 100644 +index ca2fc0b1b3fe9..7632f042bfe38 100644 --- ui/gtk/gtk_ui.cc +++ ui/gtk/gtk_ui.cc @@ -26,6 +26,7 @@ @@ -10,7 +10,7 @@ index d6b7bf6496c25..2bae4e2a4e9e1 100644 #include "chrome/browser/themes/theme_properties.h" // nogncheck #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" -@@ -238,10 +239,15 @@ bool GtkUi::Initialize() { +@@ -244,10 +245,15 @@ bool GtkUi::Initialize() { }; GtkSettings* settings = gtk_settings_get_default(); diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index b44358f09..cf315302d 100644 --- a/patch/patches/linux_printing_context.patch +++ b/patch/patches/linux_printing_context.patch @@ -76,7 +76,7 @@ index 3408b6200d17a..5d91e65a2b40f 100644 } diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h -index b940382678ba7..c2fa9b7303e87 100644 +index 0a4c394b07a68..a726244ad3ea3 100644 --- ui/linux/linux_ui.h +++ ui/linux/linux_ui.h @@ -20,6 +20,10 @@ diff --git a/patch/patches/linux_tflite_348117454.patch b/patch/patches/linux_tflite_348117454.patch deleted file mode 100644 index c0e65c489..000000000 --- a/patch/patches/linux_tflite_348117454.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git third_party/tflite/features.gni third_party/tflite/features.gni -index 2466577542552..d94d80cda02d6 100644 ---- third_party/tflite/features.gni -+++ third_party/tflite/features.gni -@@ -7,9 +7,9 @@ import("//build/config/chrome_build.gni") - declare_args() { - # This enables building TFLite with XNNPACK. Currently only available for - # Linux, macOS and Windows arm64/x64/x86 targets and ChromeOS non-ARM targets. -- build_tflite_with_xnnpack = -- is_win || is_mac || is_linux || -- (is_chromeos && target_cpu != "arm64" && target_cpu != "arm") -+ build_tflite_with_xnnpack = (is_win || is_mac || is_linux || -+ (is_chromeos && current_cpu != "arm64" && current_cpu != "arm")) && -+ (current_cpu == "arm64" || current_cpu == "x64" || current_cpu == "x86") - - # Turns on TFLITE_WITH_RUY, using ruy as the gemm backend instead of gemmlowp. - build_tflite_with_ruy = true diff --git a/patch/patches/mac_chrome_locale_3623.patch b/patch/patches/mac_chrome_locale_3623.patch index aeef1ffa7..9d680792c 100644 --- a/patch/patches/mac_chrome_locale_3623.patch +++ b/patch/patches/mac_chrome_locale_3623.patch @@ -98,7 +98,7 @@ index aa43742055b04..e84f21ab963cc 100644 // it will get the locale that should be used potentially from other sources, // depending on the platform (e.g. the OS locale on Mac). diff --git ui/base/l10n/l10n_util.cc ui/base/l10n/l10n_util.cc -index e7beb8277966b..63f2680128e72 100644 +index 62b1b0bab1553..cc03d5c173ea6 100644 --- ui/base/l10n/l10n_util.cc +++ ui/base/l10n/l10n_util.cc @@ -502,25 +502,7 @@ bool CheckAndResolveLocale(const std::string& locale, diff --git a/patch/patches/mac_platform_style_bubble_893292.patch b/patch/patches/mac_platform_style_bubble_893292.patch index 76f21ad14..1c3d0d64b 100644 --- a/patch/patches/mac_platform_style_bubble_893292.patch +++ b/patch/patches/mac_platform_style_bubble_893292.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc -index 70da374af533f..5d1804eab6831 100644 +index b1f2387812161..e8a55e883bbc9 100644 --- chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc @@ -1089,8 +1089,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { diff --git a/patch/patches/mac_render_widget_3680.patch b/patch/patches/mac_render_widget_3680.patch index dcfe3157d..cb87ce1e5 100644 --- a/patch/patches/mac_render_widget_3680.patch +++ b/patch/patches/mac_render_widget_3680.patch @@ -1,5 +1,5 @@ diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index a14c65728ec51..2c40d6074f8b8 100644 +index 4a476b69cf6b7..6f81f48aeb502 100644 --- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm @@ -171,6 +171,13 @@ void ExtractUnderlines(NSAttributedString* string, diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index b9e1c4539..4a61664d7 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index e55f8f0d40a79..6ffc10930a5cc 100644 +index b5cda6323f7a7..810c66cf01f48 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -43,7 +43,7 @@ index c4f8862b21ccf..c8c80509abc91 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/task/current_thread.h base/task/current_thread.h -index 6e21e7299afbf..c9e12a6e701c2 100644 +index 66382e91c78b2..5129e284acaa1 100644 --- base/task/current_thread.h +++ base/task/current_thread.h @@ -163,6 +163,12 @@ class BASE_EXPORT CurrentThread { diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index 61a5598f6..45c11d393 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -1,5 +1,5 @@ diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index 0cc1db9645f04..ab2ae8c744278 100644 +index 446020ac6a831..6e3f6d048704c 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -26,7 +26,7 @@ struct DropData; diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index 293400448..b384b4ef6 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index 0e563dbb253ca..891b2bbc3785c 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index 0a05208583e4e..0a2f2e1c39fba 100644 +index 240630765767e..8cf06d83b6af1 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1980,7 +1980,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -2053,7 +2053,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { // Read cookies whenever allow_credentials() is true, even if the PrivacyMode // is being overridden by NetworkDelegate and will eventually block them, as // blocked cookies still need to be logged in that case. diff --git a/patch/patches/net_url_request_3596.patch b/patch/patches/net_url_request_3596.patch index eba1fb36d..b85ab2128 100644 --- a/patch/patches/net_url_request_3596.patch +++ b/patch/patches/net_url_request_3596.patch @@ -1,8 +1,8 @@ diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc -index a3d565a410685..82e6ca8a4ca1e 100644 +index a2aa3c3361410..c5e91f6ddebe7 100644 --- net/url_request/url_request_job.cc +++ net/url_request/url_request_job.cc -@@ -34,6 +34,7 @@ +@@ -35,6 +35,7 @@ #include "net/ssl/ssl_private_key.h" #include "net/url_request/redirect_util.h" #include "net/url_request/url_request_context.h" @@ -10,7 +10,7 @@ index a3d565a410685..82e6ca8a4ca1e 100644 namespace net { -@@ -46,6 +47,16 @@ base::Value::Dict SourceStreamSetParams(SourceStream* source_stream) { +@@ -47,6 +48,16 @@ base::Value::Dict SourceStreamSetParams(SourceStream* source_stream) { return event_params; } @@ -27,7 +27,7 @@ index a3d565a410685..82e6ca8a4ca1e 100644 } // namespace // Each SourceStreams own the previous SourceStream in the chain, but the -@@ -338,8 +349,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy( +@@ -343,8 +354,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy( } bool secure_referrer_but_insecure_destination = diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 68ae98b5a..d9a495409 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -29,8 +29,20 @@ index 76057b3e50f78..d3b63a3b07805 100644 }; } // namespace input +diff --git components/input/render_input_router.h components/input/render_input_router.h +index c9c40a06b7bac..9f85335522a55 100644 +--- components/input/render_input_router.h ++++ components/input/render_input_router.h +@@ -66,6 +66,7 @@ class COMPONENT_EXPORT(INPUT) RenderInputRouter + + InputRouter* input_router() { return input_router_.get(); } + RenderInputRouterDelegate* delegate() { return delegate_; } ++ input::FlingSchedulerBase* fling_scheduler() { return fling_scheduler_.get(); } + + void SetForceEnableZoom(bool); + void SetDeviceScaleFactor(float device_scale_factor); diff --git content/browser/renderer_host/input/fling_scheduler.cc content/browser/renderer_host/input/fling_scheduler.cc -index 57ef85cbfdfdf..758af3beffde6 100644 +index f1030a744809c..c222a209949e6 100644 --- content/browser/renderer_host/input/fling_scheduler.cc +++ content/browser/renderer_host/input/fling_scheduler.cc @@ -98,6 +98,9 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded( @@ -44,11 +56,11 @@ index 57ef85cbfdfdf..758af3beffde6 100644 return nullptr; } diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 7f2fdc026d61b..9d719020f971f 100644 +index 632d06f99f2cf..e192b005dc0d8 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3277,6 +3277,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { - GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); +@@ -3170,6 +3170,11 @@ void RenderWidgetHostImpl::DecrementInFlightEventCount( + } } +void RenderWidgetHostImpl::SetCompositorForFlingScheduler( @@ -60,10 +72,10 @@ index 7f2fdc026d61b..9d719020f971f 100644 const WebInputEvent& event) { if ((base::FeatureList::IsEnabled( diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h -index 3f0048bea5698..24936dc2b3154 100644 +index 6f4e44aba5c19..c447c5e9e653e 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -827,6 +827,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -830,6 +830,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); @@ -71,15 +83,3 @@ index 3f0048bea5698..24936dc2b3154 100644 RenderWidgetHostViewBase* GetRenderWidgetHostViewBase(); -diff --git content/common/input/render_input_router.h content/common/input/render_input_router.h -index 6b6267448dcac..e166401709885 100644 ---- content/common/input/render_input_router.h -+++ content/common/input/render_input_router.h -@@ -62,6 +62,7 @@ class CONTENT_EXPORT RenderInputRouter : public InputRouterImplClient, - - InputRouter* input_router() { return input_router_.get(); } - RenderInputRouterDelegate* delegate() { return delegate_; } -+ input::FlingSchedulerBase* fling_scheduler() { return fling_scheduler_.get(); } - - void SetForceEnableZoom(bool); - void SetDeviceScaleFactor(float device_scale_factor); diff --git a/patch/patches/osr_win_remove_keyed_mutex_2575.patch b/patch/patches/osr_win_remove_keyed_mutex_2575.patch index fafeb4b8c..eaaeaab86 100644 --- a/patch/patches/osr_win_remove_keyed_mutex_2575.patch +++ b/patch/patches/osr_win_remove_keyed_mutex_2575.patch @@ -24,10 +24,10 @@ index 9cac49288f3b1..3ee5ff8714824 100644 Microsoft::WRL::ComPtr d3d11_texture; diff --git media/video/renderable_gpu_memory_buffer_video_frame_pool.cc media/video/renderable_gpu_memory_buffer_video_frame_pool.cc -index fb079f3ad91c5..74658c47bf04f 100644 +index b420e7f14165f..83f09abff7173 100644 --- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc +++ media/video/renderable_gpu_memory_buffer_video_frame_pool.cc -@@ -197,7 +197,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat( +@@ -195,7 +195,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat( bool FrameResources::Initialize() { auto* context = pool_->GetContext(); @@ -36,7 +36,7 @@ index fb079f3ad91c5..74658c47bf04f 100644 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) gfx::BufferUsage::SCANOUT_VEA_CPU_READ #else -@@ -211,13 +211,30 @@ bool FrameResources::Initialize() { +@@ -209,13 +209,30 @@ bool FrameResources::Initialize() { const gfx::Size buffer_size_in_pixels = GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_); diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 1468a7b49..a6bf7fb07 100644 --- a/patch/patches/renderer_host_1070713.patch +++ b/patch/patches/renderer_host_1070713.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc -index e3955cead61e4..72fc8ed8cac7e 100644 +index c398dc84de605..152f1ffbecad0 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -727,6 +727,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -734,6 +734,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/rfh_navigation_4829483.patch b/patch/patches/rfh_navigation_4829483.patch index 1aeb0b837..133eaf5bc 100644 --- a/patch/patches/rfh_navigation_4829483.patch +++ b/patch/patches/rfh_navigation_4829483.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc -index 9c8b401d00136..f1b9050b55bc3 100644 +index 83f9f7bc9ece3..af5982da7bbf8 100644 --- content/browser/renderer_host/render_frame_host_impl.cc +++ content/browser/renderer_host/render_frame_host_impl.cc -@@ -10880,6 +10880,7 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -11143,6 +11143,7 @@ void RenderFrameHostImpl::CommitNavigation( auto browser_calc_origin_to_commit = navigation_request->GetOriginToCommitWithDebugInfo(); if (!process_lock.is_error_page() && !is_mhtml_subframe && diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index fc1332ab1..497d3ba0d 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index a2e0720681d6f..5534dce563fcb 100644 +index 07de8257e5952..02fa4b4813566 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -6,6 +6,7 @@ @@ -18,7 +18,7 @@ index a2e0720681d6f..5534dce563fcb 100644 #include "content/public/common/page_visibility_state.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/common/input/web_input_event.h" -@@ -744,10 +746,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -754,10 +756,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { CHECK(GetBackgroundColor()); @@ -35,7 +35,7 @@ index a2e0720681d6f..5534dce563fcb 100644 } #if BUILDFLAG(IS_WIN) -@@ -2364,6 +2368,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2366,6 +2370,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { window_->layer()->SetColor(GetBackgroundColor() ? *GetBackgroundColor() : SK_ColorWHITE); UpdateFrameSinkIdRegistration(); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 45757a300..783349b02 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 8e1134654e2b1..d0f578b5f9976 100644 +index 98b23597fb61c..e476a9a86af35 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc @@ -635,6 +635,25 @@ void CookieMonster::SetCookieableSchemes( @@ -58,10 +58,10 @@ index 3f0be99e0e145..0462ebbe9bedc 100644 // reset to null. const CookieAccessDelegate* cookie_access_delegate() const { diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index 613f34e4bc536..35096fc6f5f19 100644 +index f78c6a467befc..97f1d21218eed 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc -@@ -340,14 +340,9 @@ void CookieManager::AllowFileSchemeCookies( +@@ -345,14 +345,9 @@ void CookieManager::AllowFileSchemeCookies( AllowFileSchemeCookiesCallback callback) { OnSettingsWillChange(); @@ -80,10 +80,10 @@ index 613f34e4bc536..35096fc6f5f19 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 42d451bfe43e1..1a1cf67b38d27 100644 +index 5c20e5b79fa0d..e8c7a287f38f2 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2495,16 +2495,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2524,16 +2524,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -112,7 +112,7 @@ index 42d451bfe43e1..1a1cf67b38d27 100644 base::FeatureList::IsEnabled(features::kFledgePst)) { trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index 5597a97f13cc0..c8524b7d971f0 100644 +index a618fd97fd4c5..623611337c7b7 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom @@ -359,6 +359,9 @@ struct NetworkContextParams { diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 3f6f04fda..5c0f3522b 100644 --- a/patch/patches/services_network_2718.patch +++ b/patch/patches/services_network_2718.patch @@ -1,8 +1,8 @@ diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc -index 8b04f2afe863e..ad04e519ca2df 100644 +index 4fbba48343b07..94a301cd02052 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -3364,9 +3364,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -3314,9 +3314,12 @@ void StoragePartitionImpl::InitNetworkContext() { cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = cert_verifier::mojom::CertVerifierCreationParams::New(); diff --git a/patch/patches/set_resize_background_color.patch b/patch/patches/set_resize_background_color.patch index 6cb9df1aa..51c4f347d 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -1,8 +1,8 @@ diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc -index 112c061004744..ee0ea41872823 100644 +index 06e6939826e5d..9cb98d3e6a991 100644 --- ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc -@@ -159,6 +159,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, +@@ -163,6 +163,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, } } @@ -14,10 +14,10 @@ index 112c061004744..ee0ea41872823 100644 if (crashed_overlay_view_.view() == crashed_overlay_view) { return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index 88692c0a858bf..7c277c4bbab11 100644 +index e5f3852898c46..47191c63a67bd 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h -@@ -93,6 +93,10 @@ class WEBVIEW_EXPORT WebView : public View, +@@ -105,6 +105,10 @@ class WEBVIEW_EXPORT WebView : public View, void EnableSizingFromWebContents(const gfx::Size& min_size, const gfx::Size& max_size); diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 1074f97c4..b8268d30f 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,5 +1,5 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index a3da4353d4ea5..ddb6479e4286a 100644 +index 560313ed41ea0..f0f9baefb25b7 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -71,6 +71,8 @@ diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index d986bc005..d1c5a6a96 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc -index 7986c86012518..fa75795aa6c30 100644 +index 3aa71316ccd2e..f7fe93711722c 100644 --- chrome/browser/ui/views/toolbar/app_menu.cc +++ chrome/browser/ui/views/toolbar/app_menu.cc -@@ -1025,7 +1025,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) { +@@ -1030,7 +1030,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) { host->button()->GetWidget(), host, host->button()->GetAnchorBoundsInScreen(), views::MenuAnchorPosition::kTopRight, ui::MENU_SOURCE_NONE, @@ -134,10 +134,10 @@ index c579f65dce9f0..a04e0d1f66aaa 100644 friend class test::InkDropHostTestApi; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index 04d4aca2784dc..b3ce5e1f2174c 100644 +index 4b916b981ff5b..174d9b2c6fbaa 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -596,6 +596,12 @@ void LabelButton::OnThemeChanged() { +@@ -589,6 +589,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -151,7 +151,7 @@ index 04d4aca2784dc..b3ce5e1f2174c 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index aaa15dcd8c72b..7d5fe7306a37c 100644 +index 414087e088a4e..0d757f5e7933e 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h @@ -187,6 +187,9 @@ class VIEWS_EXPORT LabelButton : public Button, @@ -165,10 +165,10 @@ index aaa15dcd8c72b..7d5fe7306a37c 100644 LabelButtonImageContainer* image_container() { return image_container_.get(); diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 33e534c7eb6d0..3ed887e0dae41 100644 +index c30910151dad1..d3a5bee2209e4 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -57,12 +57,29 @@ enum LabelPropertyKey { +@@ -51,12 +51,29 @@ enum LabelPropertyKey { kLabelLineHeight, kLabelObscured, kLabelAllowCharacterBreak, @@ -198,7 +198,7 @@ index 33e534c7eb6d0..3ed887e0dae41 100644 } // namespace namespace views { -@@ -492,6 +509,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -493,6 +510,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); } @@ -214,7 +214,7 @@ index 33e534c7eb6d0..3ed887e0dae41 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -796,6 +822,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -798,6 +824,16 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -255,7 +255,7 @@ index 40d9a89b66369..0c7245665d31b 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index ef6a903caf5a9..c329a7684bfca 100644 +index ca9e9f92c397e..3f410384b9fd1 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc @@ -578,7 +578,8 @@ void MenuController::Run(Widget* parent, @@ -276,7 +276,7 @@ index ef6a903caf5a9..c329a7684bfca 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2247,6 +2249,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2257,6 +2259,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { params.do_capture = do_capture; params.native_view_for_gestures = native_view_for_gestures_; params.owned_window_anchor = anchor; @@ -284,7 +284,7 @@ index ef6a903caf5a9..c329a7684bfca 100644 if (item->GetParentMenuItem()) { params.context = item->GetWidget(); // (crbug.com/1414232) The item to be open is a submenu. Make sure -@@ -2931,8 +2934,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -2941,8 +2944,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -299,7 +299,7 @@ index ef6a903caf5a9..c329a7684bfca 100644 // Show the sub-menu. SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY); -@@ -2952,8 +2960,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2962,8 +2970,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -312,7 +312,7 @@ index ef6a903caf5a9..c329a7684bfca 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h -index 4c25ffcf9ab92..df270df5c024e 100644 +index e1c59fd911f71..d2a72f6bdf8aa 100644 --- ui/views/controls/menu/menu_controller.h +++ ui/views/controls/menu/menu_controller.h @@ -137,7 +137,9 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate, @@ -326,7 +326,7 @@ index 4c25ffcf9ab92..df270df5c024e 100644 bool for_drop() const { return for_drop_; } -@@ -738,6 +740,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate, +@@ -741,6 +743,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate, // RunType::SEND_GESTURE_EVENTS_TO_OWNER is set. gfx::NativeView native_view_for_gestures_ = gfx::NativeView(); @@ -411,10 +411,10 @@ index fc1d5fccc3845..c065cafcd537c 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 6377bb1fe7a6c..9f20510d92c80 100644 +index 0f91dc080e84c..e4d9884c4ad97 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1076,6 +1076,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1098,6 +1098,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); @@ -430,7 +430,7 @@ index 6377bb1fe7a6c..9f20510d92c80 100644 } else if (paint_as_selected) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1140,6 +1149,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { +@@ -1162,6 +1171,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { } SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const { @@ -445,7 +445,7 @@ index 6377bb1fe7a6c..9f20510d92c80 100644 // use the default color. if (!paint_as_selected && foreground_color_id_.has_value()) { diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index d6a9c662edb9b..7bba7ca1cae5f 100644 +index a10f7db3d83c4..193654fc86f9d 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc @@ -4,6 +4,7 @@ @@ -790,7 +790,7 @@ index dcf4b60ad92c2..64fa80edefc1b 100644 #if !BUILDFLAG(IS_CHROMEOS_LACROS) if (root_location != root_current_location && diff --git ui/views/view.h ui/views/view.h -index 1a8ad95eed953..a1fa62ac5dcc4 100644 +index cd2c831a6a1d5..ffddca57a4006 100644 --- ui/views/view.h +++ ui/views/view.h @@ -25,6 +25,7 @@ diff --git a/patch/patches/views_textfield_5399416.patch b/patch/patches/views_textfield_5399416.patch index 4731c0695..b3921d626 100644 --- a/patch/patches/views_textfield_5399416.patch +++ b/patch/patches/views_textfield_5399416.patch @@ -1,8 +1,8 @@ diff --git ui/views/controls/textfield/textfield.cc ui/views/controls/textfield/textfield.cc -index f53fd1e03bdb2..5572b3d2cccc4 100644 +index d2ababefae343..423eff10fe3d1 100644 --- ui/views/controls/textfield/textfield.cc +++ ui/views/controls/textfield/textfield.cc -@@ -2990,6 +2990,10 @@ void Textfield::OnCursorBlinkTimerFired() { +@@ -3006,6 +3006,10 @@ void Textfield::OnCursorBlinkTimerFired() { void Textfield::OnEnabledChanged() { if (GetInputMethod()) GetInputMethod()->OnTextInputTypeChanged(this); @@ -11,5 +11,5 @@ index f53fd1e03bdb2..5572b3d2cccc4 100644 + UpdateBackgroundColor(); + } UpdateDefaultBorder(); - } + // Only expose readonly if enabled. Don't overwrite the disabled restriction. diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index 5cd81e953..2a0634162 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -61,10 +61,10 @@ index 791fc1874851e..db58beed440f8 100644 case ui::SHOW_STATE_MAXIMIZED: return kSerializedShowStateMaximized; diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index c9b1737f91452..7231c79be3bdc 100644 +index ae1a7849dab02..89db94663ad59 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -677,6 +677,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { +@@ -708,6 +708,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { return scale_override_for_capture_; } @@ -80,18 +80,18 @@ index c9b1737f91452..7231c79be3bdc 100644 if (!GetMouseWheelPhaseHandler()) return; diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 1a7932a580836..7ceb1b03ce36c 100644 +index 41308c925e5e3..bd958ba6acaa8 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -72,6 +72,7 @@ class CursorManager; +@@ -76,6 +76,7 @@ namespace content { class DevicePosturePlatformProvider; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; +class RenderWidgetHostViewGuest; - class RenderWidgetHostViewInputObserver; class ScopedViewTransitionResources; class TextInputManager; -@@ -195,6 +196,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase + class TouchSelectionControllerClientManager; +@@ -203,6 +204,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase float GetDeviceScaleFactor() const final; bool IsPointerLocked() override; @@ -101,7 +101,7 @@ index 1a7932a580836..7ceb1b03ce36c 100644 // Identical to `CopyFromSurface()`, except that this method issues the // `viz::CopyOutputRequest` against the exact `viz::Surface` currently // embedded by this View, while `CopyFromSurface()` may return a copy of any -@@ -256,6 +260,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -264,6 +268,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // Called when screen information or native widget bounds change. virtual void UpdateScreenInfo(); @@ -112,7 +112,7 @@ index 1a7932a580836..7ceb1b03ce36c 100644 // Called by the TextInputManager to notify the view about being removed from // the list of registered views, i.e., TextInputManager is no longer tracking // TextInputState from this view. The RWHV should reset |text_input_manager_| -@@ -384,6 +392,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -388,6 +396,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase const gfx::Rect& bounds, const gfx::Rect& anchor_rect) = 0; @@ -125,7 +125,7 @@ index 1a7932a580836..7ceb1b03ce36c 100644 // Indicates whether the page has finished loading. virtual void SetIsLoading(bool is_loading) = 0; -@@ -649,6 +663,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -648,6 +662,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // to all displays. gfx::Size system_cursor_size_; @@ -136,7 +136,7 @@ index 1a7932a580836..7ceb1b03ce36c 100644 private: FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, -@@ -670,10 +688,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -669,10 +687,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void SynchronizeVisualProperties(); @@ -148,7 +148,7 @@ index 1a7932a580836..7ceb1b03ce36c 100644 // renderer process changes. This method is called before notifying // RenderWidgetHostImpl in order to allow the view to allocate a new 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 dc28ddd51c86b..4ecdf11c67d1f 100644 +index a131d58351110..196fe4d25d4a7 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -52,6 +52,10 @@ namespace { @@ -162,7 +162,7 @@ index dc28ddd51c86b..4ecdf11c67d1f 100644 #if BUILDFLAG(IS_WIN) // A callback function for EnumThreadWindows to enumerate and dismiss // any owned popup windows. -@@ -821,6 +825,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter( +@@ -827,6 +831,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter( } return; } @@ -177,7 +177,7 @@ index dc28ddd51c86b..4ecdf11c67d1f 100644 #endif synthetic_move_position_ = center_in_screen; } -@@ -851,6 +863,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition( +@@ -857,6 +869,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition( } void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { @@ -259,10 +259,10 @@ index 2cf9330a4e24b..4bf0890ae000b 100644 // Specifies which edges of the window are tiled. diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc -index 4907de4e24cea..9824c17378207 100644 +index 74b4887f9a6fd..11f78739d9d61 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1864,7 +1864,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1869,7 +1869,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -350,7 +350,7 @@ index e698f71577c51..8a6e28128564d 100644 base::WeakPtrFactory weak_factory_{this}; }; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -index 30781b584b649..6edaa60e652ab 100644 +index 6eb1cf9451db1..97b1c9bcebb1d 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -281,8 +281,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { @@ -365,7 +365,7 @@ index 30781b584b649..6edaa60e652ab 100644 // Calculate initial bounds. diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index e24cb885f357c..f6998f9720124 100644 +index 269aabace2510..8e9c115c381fd 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -20,6 +20,7 @@ @@ -518,10 +518,10 @@ index 8169f17982253..fd8c22449a6a3 100644 // the implementation of ::ShowCursor() is based on a counter, so making this // member static ensures that ::ShowCursor() is always called exactly once diff --git ui/views/widget/native_widget_mac.mm ui/views/widget/native_widget_mac.mm -index 3698346dcf4c0..96365d3f28179 100644 +index e13f3a3fe4e9a..8827c0355b665 100644 --- ui/views/widget/native_widget_mac.mm +++ ui/views/widget/native_widget_mac.mm -@@ -640,6 +640,7 @@ void NativeWidgetMac::Show(ui::WindowShowState show_state, +@@ -656,6 +656,7 @@ void NativeWidgetMac::Show(ui::WindowShowState show_state, break; case ui::SHOW_STATE_MAXIMIZED: case ui::SHOW_STATE_FULLSCREEN: @@ -530,7 +530,7 @@ index 3698346dcf4c0..96365d3f28179 100644 break; case ui::SHOW_STATE_END: diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 8009dcfd98dac..5ee39207d190d 100644 +index 2fac5a83aac46..8db0925bf0edd 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -412,7 +412,8 @@ void Widget::Init(InitParams params) { @@ -572,7 +572,7 @@ index 8009dcfd98dac..5ee39207d190d 100644 } } -@@ -1714,10 +1725,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { +@@ -1723,10 +1734,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -589,7 +589,7 @@ index 8009dcfd98dac..5ee39207d190d 100644 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); } -@@ -1968,7 +1985,8 @@ bool Widget::SetInitialFocus(ui::WindowShowState show_state) { +@@ -1978,7 +1995,8 @@ bool Widget::SetInitialFocus(ui::WindowShowState show_state) { return false; View* v = widget_delegate_->GetInitiallyFocusedView(); if (!focus_on_creation_ || show_state == ui::SHOW_STATE_INACTIVE || @@ -600,10 +600,10 @@ index 8009dcfd98dac..5ee39207d190d 100644 // focus when the window is restored. if (v) diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index e6e8e42178d1a..ab30be8f29dff 100644 +index 721aa7432abbe..70dbf0eeb737e 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -368,6 +368,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -370,6 +370,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // the concept with bubble anchoring a la BubbleDialogDelegateView. gfx::NativeView parent = gfx::NativeView(); @@ -612,7 +612,7 @@ index e6e8e42178d1a..ab30be8f29dff 100644 // Specifies the initial bounds of the Widget. Default is empty, which means // the NativeWidget may specify a default size. If the parent is specified, // |bounds| is in the parent's coordinate system. If the parent is not -@@ -774,7 +776,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -776,7 +778,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, void ShowInactive(); // Activates the widget, assuming it already exists and is visible. @@ -651,7 +651,7 @@ index 3b9b00b7d79ae..e759e3c1a9f34 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 3bfc5b2257908..0d4437e091daa 100644 +index a3cd6a4bc6c8f..7d46a6f88a17e 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc @@ -772,7 +772,11 @@ bool HWNDMessageHandler::IsVisible() const { @@ -667,8 +667,8 @@ index 3bfc5b2257908..0d4437e091daa 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3225,10 +3229,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, - } else if (event.type() == ui::ET_MOUSEWHEEL) { +@@ -3226,10 +3230,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, + } else if (event.type() == ui::EventType::kMousewheel) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. - return (ui::RerouteMouseWheel(hwnd(), w_param, l_param) || @@ -684,4 +684,4 @@ index 3bfc5b2257908..0d4437e091daa 100644 + } } - // Suppress |ET_MOUSE_MOVED| and |ET_MOUSE_DRAGGED| events from WM_MOUSE* + // Suppress |EventType::kMouseMoved| and |EventType::kMouseDragged| events diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index 52e627060..303d93f75 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index f28503c3bd02b..7a474b9839e46 100644 +index 2ce093d0818f5..3ad06b1d10c61 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn -@@ -253,6 +253,8 @@ viz_component("service") { +@@ -255,6 +255,8 @@ viz_component("service") { "transitions/surface_animation_manager.h", "transitions/transferable_resource_tracker.cc", "transitions/transferable_resource_tracker.h", @@ -150,7 +150,7 @@ index 796ae2688436e..37a3406790210 100644 TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc -index 2ea7347d2abe0..ab412fabe399b 100644 +index b9ad5c8cbeb5b..05ab69062b3b2 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc @@ -390,8 +390,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 81b02d9f3..30a13ac8d 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 205a1bb692091..d5cf0a22b11b2 100644 +index 7318d2937012d..f7a002cb0566d 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3610,6 +3610,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3601,6 +3601,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -15,7 +15,7 @@ index 205a1bb692091..d5cf0a22b11b2 100644 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3620,6 +3626,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3611,6 +3617,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index 205a1bb692091..d5cf0a22b11b2 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3816,6 +3823,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -3807,6 +3814,9 @@ void WebContentsImpl::RenderWidgetCreated( OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated", "render_widget_host", render_widget_host); created_widgets_.insert(render_widget_host); @@ -33,7 +33,7 @@ index 205a1bb692091..d5cf0a22b11b2 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4678,6 +4688,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4672,6 +4682,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.picture_in_picture_options = *(params.pip_options); } @@ -49,7 +49,7 @@ index 205a1bb692091..d5cf0a22b11b2 100644 // Check whether there is an available prerendered page for this navigation if // this is not for guest. If it exists, take WebContents pre-created for // hosting the prerendered page instead of creating new WebContents. -@@ -9008,6 +9027,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -9027,6 +9046,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, } CloseListenerManager::DidChangeFocusedFrame(this); @@ -60,10 +60,10 @@ index 205a1bb692091..d5cf0a22b11b2 100644 FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 1ee36913ac37c..6dcca3c80ede2 100644 +index d7403bb66b945..a3369846ff61f 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -105,10 +105,12 @@ class BrowserContext; +@@ -109,10 +109,12 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -76,7 +76,7 @@ index 1ee36913ac37c..6dcca3c80ede2 100644 class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -255,6 +257,10 @@ class WebContents : public PageNavigator, +@@ -259,6 +261,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; @@ -88,7 +88,7 @@ index 1ee36913ac37c..6dcca3c80ede2 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 fd851a9347dd6..dc77e13235743 100644 +index 138761070b63c..2f07272bc4cdb 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -63,9 +63,11 @@ class EyeDropperListener; @@ -119,7 +119,7 @@ index fd851a9347dd6..dc77e13235743 100644 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h -index 33ce8386f5ca5..935909040c0ed 100644 +index 7e1fc02b87733..8f0cd27ec9786 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h @@ -239,6 +239,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { @@ -132,7 +132,7 @@ index 33ce8386f5ca5..935909040c0ed 100644 // This method is invoked when the `blink::WebView` of the current // RenderViewHost is ready, e.g. because we recreated it after a crash. virtual void RenderViewReady() {} -@@ -872,6 +875,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { +@@ -885,6 +888,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { // WebContents has gained/lost focus. virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index afc724143..cb82cf5be 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 86a9cc130b215..74322f90420f6 100644 +index 848edcdaf3a01..4c08bddc07337 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -787,6 +787,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -804,6 +804,11 @@ class BLINK_PLATFORM_EXPORT Platform { } #endif @@ -15,10 +15,10 @@ index 86a9cc130b215..74322f90420f6 100644 static void InitializeMainThreadCommon( Platform* platform, diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 9f9a6aa7c7a73..2cc5e50b7406b 100644 +index 8c581ccf3b1f7..478f1bdb63b40 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc -@@ -11,6 +11,7 @@ +@@ -16,6 +16,7 @@ #include "base/task/sequenced_task_runner.h" #include "base/task/single_thread_task_runner.h" #include "base/trace_event/trace_event.h" @@ -26,7 +26,7 @@ index 9f9a6aa7c7a73..2cc5e50b7406b 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -169,6 +170,7 @@ DevToolsSession::DevToolsSession( +@@ -174,6 +175,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -34,7 +34,7 @@ index 9f9a6aa7c7a73..2cc5e50b7406b 100644 } DevToolsSession::~DevToolsSession() { -@@ -214,6 +216,7 @@ void DevToolsSession::Detach() { +@@ -219,6 +221,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 4bdb134c8..b518c87b6 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 a1197832494af..7ba707ef9c442 100644 +index 4220a0aebf4a2..0bb15451c703f 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -337,6 +337,7 @@ class BLINK_EXPORT WebView { +@@ -335,6 +335,7 @@ class BLINK_EXPORT WebView { // Sets whether select popup menus should be rendered by the browser. static void SetUseExternalPopupMenus(bool); @@ -11,7 +11,7 @@ index a1197832494af..7ba707ef9c442 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 65c00aae8e04a..6ab9760efcc52 100644 +index 36bd7ee7ed789..319b00f0df16b 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -252,8 +252,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -30,19 +30,19 @@ index 65c00aae8e04a..6ab9760efcc52 100644 } namespace { -@@ -586,6 +591,7 @@ WebViewImpl::WebViewImpl( - chrome_client_(MakeGarbageCollected(this)), - minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), - maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), +@@ -600,6 +605,7 @@ WebViewImpl::WebViewImpl( + blink::ZoomFactorToZoomLevel(kMinimumBrowserZoomFactor)), + maximum_zoom_level_( + blink::ZoomFactorToZoomLevel(kMaximumBrowserZoomFactor)), + should_use_external_popup_menus_(g_should_use_external_popup_menus), does_composite_(does_composite), fullscreen_controller_(std::make_unique(this)), page_base_background_color_( diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 0a1db1e8faa6b..5369bac9c60cb 100644 +index 764d48e8fc89f..a7446fa5bf2ea 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -140,7 +140,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -139,7 +139,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). @@ -52,7 +52,7 @@ index 0a1db1e8faa6b..5369bac9c60cb 100644 // Returns whether frames under this WebView are backed by a compositor. bool does_composite() const { return does_composite_; } -@@ -872,6 +873,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -874,6 +875,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_ = 0.f; bool fake_page_scale_animation_use_anchor_ = false; @@ -62,7 +62,7 @@ index 0a1db1e8faa6b..5369bac9c60cb 100644 gfx::Transform device_emulation_transform_; diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc -index 1a299dabd80be..e8997cd629aee 100644 +index b227679f7f921..c9d7f749f0952 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc @@ -988,7 +988,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, diff --git a/patch/patches/win_app_icon_3606.patch b/patch/patches/win_app_icon_3606.patch index 7c3ced994..a8212cc0a 100644 --- a/patch/patches/win_app_icon_3606.patch +++ b/patch/patches/win_app_icon_3606.patch @@ -89,7 +89,7 @@ index db8209bbcc214..b50bce7fae5b5 100644 HICON GetSmallAppIcon(); diff --git chrome/common/chrome_constants.cc chrome/common/chrome_constants.cc -index 064cb8fef1f1b..fa8e50f8681a0 100644 +index 6d49c77d98046..1c60eb15b4f65 100644 --- chrome/common/chrome_constants.cc +++ chrome/common/chrome_constants.cc @@ -6,6 +6,7 @@ @@ -100,7 +100,7 @@ index 064cb8fef1f1b..fa8e50f8681a0 100644 #include "chrome/common/chrome_version.h" #define FPL FILE_PATH_LITERAL -@@ -100,7 +101,12 @@ const char kMacHelperSuffixAlerts[] = " (Alerts)"; +@@ -89,7 +90,12 @@ const char kMacHelperSuffixAlerts[] = " (Alerts)"; #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) diff --git a/patch/patches/win_sandbox_3210.patch b/patch/patches/win_sandbox_3210.patch index 348cacd85..82cdc39ac 100644 --- a/patch/patches/win_sandbox_3210.patch +++ b/patch/patches/win_sandbox_3210.patch @@ -1,8 +1,8 @@ diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc -index 0e6de2b7b4956..63ae91189c031 100644 +index d25dc43074f15..4c713f6ef1761 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -971,6 +971,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -981,6 +981,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) { diff --git a/patch/patches/win_sandbox_op3way_3708.patch b/patch/patches/win_sandbox_op3way_3708.patch index dcb9eec24..c90a22102 100644 --- a/patch/patches/win_sandbox_op3way_3708.patch +++ b/patch/patches/win_sandbox_op3way_3708.patch @@ -1,5 +1,5 @@ diff --git base/time/time.h base/time/time.h -index 295433eed9f83..2cee8bd38649e 100644 +index 9567ea3ae71cf..5fef15852a641 100644 --- base/time/time.h +++ base/time/time.h @@ -134,6 +134,13 @@ constexpr bool isnan(double d) { diff --git a/patch/patches/win_sandbox_policy.patch b/patch/patches/win_sandbox_policy.patch index d9715b71d..89174c2bd 100644 --- a/patch/patches/win_sandbox_policy.patch +++ b/patch/patches/win_sandbox_policy.patch @@ -1,8 +1,8 @@ diff --git sandbox/win/src/sandbox_policy.h sandbox/win/src/sandbox_policy.h -index a2d801b370b01..b56de03637fec 100644 +index ae3aafd2fe6e3..763ae43526762 100644 --- sandbox/win/src/sandbox_policy.h +++ sandbox/win/src/sandbox_policy.h -@@ -285,7 +285,7 @@ class [[clang::lto_visibility_public]] TargetPolicy { +@@ -295,7 +295,7 @@ class [[clang::lto_visibility_public]] TargetPolicy { // Adds a blob of data that will be made available in the child early in // startup via sandbox::GetDelegateData(). The contents of this data should // not vary between children with the same TargetConfig(). @@ -12,10 +12,10 @@ index a2d801b370b01..b56de03637fec 100644 } // namespace sandbox diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc -index e41f68c171438..40eeaacde5fad 100644 +index 84092ea3cf738..06cc6f6243c82 100644 --- sandbox/win/src/sandbox_policy_base.cc +++ sandbox/win/src/sandbox_policy_base.cc -@@ -190,12 +190,12 @@ PolicyGlobal* ConfigBase::policy() { +@@ -195,12 +195,12 @@ PolicyGlobal* ConfigBase::policy() { return policy_; } @@ -31,7 +31,7 @@ index e41f68c171438..40eeaacde5fad 100644 } return std::nullopt; } -@@ -790,14 +790,14 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) { +@@ -801,14 +801,14 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) { return (SBOX_ALL_OK == rc); } @@ -49,7 +49,7 @@ index e41f68c171438..40eeaacde5fad 100644 // Can only set this once - as there is only one region sent to the child. CHECK(!delegate_data_); diff --git sandbox/win/src/sandbox_policy_base.h sandbox/win/src/sandbox_policy_base.h -index 17c19aedcd774..e645245c72076 100644 +index 1481dc3343ee0..bae1373bc8f1f 100644 --- sandbox/win/src/sandbox_policy_base.h +++ sandbox/win/src/sandbox_policy_base.h @@ -122,7 +122,7 @@ class ConfigBase final : public TargetConfig { diff --git a/tests/ceftests/scheme_handler_unittest.cc b/tests/ceftests/scheme_handler_unittest.cc index fb8e4569d..68bed8f00 100644 --- a/tests/ceftests/scheme_handler_unittest.cc +++ b/tests/ceftests/scheme_handler_unittest.cc @@ -1400,8 +1400,8 @@ TEST(SchemeHandlerTest, CustomNonStandardXSSSameOrigin) { "customnonstd:xhr%20value"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"null\" from accessing a " + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"null\" from accessing a " "cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); @@ -1526,9 +1526,9 @@ TEST(SchemeHandlerTest, CustomStandardXSSDifferentOrigin) { "customstd://test2/iframe.html"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"customstd://test2\" from accessing " - "a cross-origin frame."); + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"customstd://test2\" from " + "accessing a cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); handler->ExecuteTest(); @@ -1554,9 +1554,9 @@ TEST(SchemeHandlerTest, CustomStandardXSSDifferentProtocolHttp) { "https://test2/iframe.html"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"https://test2\" from accessing a " - "cross-origin frame."); + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"https://test2\" from accessing " + "a cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); handler->ExecuteTest(); @@ -1583,8 +1583,8 @@ TEST(SchemeHandlerTest, CustomStandardXSSDifferentProtocolCustomNonStandard) { "customnonstd:some%20value"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"null\" from accessing a " + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"null\" from accessing a " "cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); @@ -1611,9 +1611,9 @@ TEST(SchemeHandlerTest, HttpXSSDifferentProtocolCustomStandard) { "customstd://test2/iframe.html"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"customstd://test2\" from accessing " - "a cross-origin frame."); + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"customstd://test2\" from " + "accessing a cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); handler->ExecuteTest(); @@ -1639,8 +1639,8 @@ TEST(SchemeHandlerTest, HttpXSSDifferentProtocolCustomNonStandard) { "customnonstd:some%20value"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"null\" from accessing a " + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"null\" from accessing a " "cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); @@ -1765,9 +1765,9 @@ TEST(SchemeHandlerTest, HttpXSSDifferentOrigin) { SetUpXSS(&test_results, "https://test1/run.html", "https://test2/xss.html"); test_results.console_messages.push_back( - "Error: Failed to read a named property 'getResult' from 'Window': " - "Blocked a frame with origin \"https://test2\" from accessing a " - "cross-origin frame."); + "SecurityError: Failed to read a named property 'getResult' from " + "'Window': Blocked a frame with origin \"https://test2\" from accessing " + "a cross-origin frame."); CefRefPtr handler = new TestSchemeHandler(&test_results); handler->ExecuteTest();