Update to Chromium version 127.0.6533.0 (#1313161)

This commit is contained in:
Marshall Greenblatt 2024-06-14 13:01:45 -04:00
parent 4ed13d8c47
commit c44aa35bfc
144 changed files with 877 additions and 910 deletions

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/126.0.6478.0'
'chromium_checkout': 'refs/tags/127.0.6533.0'
}

View File

@ -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 "3ecad1c27a9f10720824f4c4be478dab28f1258d"
#define CEF_API_HASH_UNIVERSAL "ed1dfa5ff8a041241f8fb72eb7454811f358f0d3"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "551fbcb8ec2687c554be82cc10f471201c88727b"
#define CEF_API_HASH_PLATFORM "0d99d1b9b85b2efab91a39d6fc325bb6d56fd524"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "4ca22671083a799f3c8c09905804882988ebd97b"
#define CEF_API_HASH_PLATFORM "e585e190387e31a71267207b66d175e213991470"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "fb827bbeab0a16044f5cee11912d7dfc2ad44999"
#define CEF_API_HASH_PLATFORM "09d3e280ed38f7a082b794c56ff71c52f86f0ea8"
#endif
#ifdef __cplusplus

View File

@ -3463,7 +3463,7 @@ typedef enum {
CEF_CPAIT_COOKIE_CONTROLS,
CEF_CPAIT_FILE_SYSTEM_ACCESS,
CEF_CPAIT_FIND,
CEF_CPAIT_HIGH_EFFICIENCY,
CEF_CPAIT_MEMORY_SAVER,
CEF_CPAIT_INTENT_PICKER,
CEF_CPAIT_LOCAL_CARD_MIGRATION,
CEF_CPAIT_MANAGE_PASSWORDS,
@ -3487,7 +3487,8 @@ typedef enum {
CEF_CPAIT_PRICE_INSIGHTS,
CEF_CPAIT_PRICE_READ_ANYTHING,
CEF_CPAIT_PRODUCT_SPECIFICATIONS,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRODUCT_SPECIFICATIONS,
CEF_CPAIT_LENS_OVERLAY,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_LENS_OVERLAY,
} cef_chrome_page_action_icon_type_t;
///

View File

@ -34,6 +34,7 @@
#include "cef/libcef/features/runtime.h"
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
#include "components/input/native_web_keyboard_event.h"
#include "components/zoom/page_zoom.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/public/browser/desktop_media_id.h"
@ -46,7 +47,6 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
#include "net/base/net_errors.h"
@ -1084,13 +1084,13 @@ void AlloyBrowserHostImpl::CanDownload(
KeyboardEventProcessingResult AlloyBrowserHostImpl::PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
return contents_delegate_->PreHandleKeyboardEvent(source, event);
}
bool AlloyBrowserHostImpl::HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// Check to see if event should be ignored.
if (event.skip_if_unhandled) {
return false;
@ -1297,7 +1297,8 @@ void AlloyBrowserHostImpl::ExitPictureInPicture() {
PictureInPictureWindowManager::GetInstance()->ExitPictureInPicture();
}
bool AlloyBrowserHostImpl::IsBackForwardCacheSupported() {
bool AlloyBrowserHostImpl::IsBackForwardCacheSupported(
content::WebContents& web_contents) {
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
return true;
#else

View File

@ -222,10 +222,9 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
base::OnceCallback<void(bool)> callback) override;
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
const input::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(content::WebContents* source,
const input::NativeWebKeyboardEvent& event) override;
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
bool PreHandleGestureEvent(content::WebContents* source,
const blink::WebGestureEvent& event) override;
@ -289,7 +288,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
content::PictureInPictureResult EnterPictureInPicture(
content::WebContents* web_contents) override;
void ExitPictureInPicture() override;
bool IsBackForwardCacheSupported() override;
bool IsBackForwardCacheSupported(content::WebContents& web_contents) override;
content::PreloadingEligibility IsPrerender2Supported(
content::WebContents& web_contents) override;
void DraggableRegionsChanged(

View File

@ -361,10 +361,15 @@ const extensions::Extension* GetEnabledExtensionFromSiteURL(
std::unique_ptr<blink::URLLoaderThrottle> CreateGoogleURLLoaderThrottle(
Profile* profile) {
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
std::vector<chrome::mojom::BoundSessionThrottlerParamsPtr>
bound_session_throttler_params;
#endif
chrome::mojom::DynamicParamsPtr dynamic_params =
chrome::mojom::DynamicParams::New(
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
/*bound_session_params=*/nullptr,
std::move(bound_session_throttler_params),
#endif
profile->GetPrefs()->GetBoolean(
policy::policy_prefs::kForceGoogleSafeSearch),

View File

@ -18,7 +18,6 @@
#include "cef/libcef/common/cef_switches.h"
#include "cef/libcef/common/extensions/extensions_client.h"
#include "cef/libcef/common/extensions/extensions_util.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/component_updater/chrome_component_updater_configurator.h"
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/browser/permissions/chrome_permissions_client.h"
@ -92,16 +91,12 @@ void ChromeBrowserProcessAlloy::OnContextInitialized() {
providers;
#if BUILDFLAG(IS_WIN)
// TODO(crbug.com/1373092): For Windows, continue to add providers behind
// features, as support for them is added.
if (base::FeatureList::IsEnabled(features::kEnableDPAPIEncryptionProvider)) {
// The DPAPI key provider requires OSCrypt::Init to have already been called
// to initialize the key storage. This happens in
// AlloyBrowserMainParts::PreCreateMainMessageLoop.
providers.emplace_back(std::make_pair(
/*precedence=*/10u,
std::make_unique<os_crypt_async::DPAPIKeyProvider>(local_state())));
}
// The DPAPI key provider requires OSCrypt::Init to have already been called
// to initialize the key storage. This happens in
// AlloyBrowserMainParts::PreCreateMainMessageLoop.
providers.emplace_back(std::make_pair(
/*precedence=*/10u,
std::make_unique<os_crypt_async::DPAPIKeyProvider>(local_state())));
#endif // BUILDFLAG(IS_WIN)
os_crypt_async_ =

View File

@ -37,30 +37,17 @@ class CefVariationsClient : public variations::VariationsClient {
} // namespace
ChromeProfileAlloy::ChromeProfileAlloy() {
ChromeProfileAlloy::ChromeProfileAlloy() : Profile(nullptr) {
// Alloy contexts are never flagged as off-the-record. It causes problems
// for the extension system.
DCHECK(!IsOffTheRecord());
profile_metrics::SetBrowserProfileType(
this, profile_metrics::BrowserProfileType::kRegular);
}
ChromeProfileAlloy::~ChromeProfileAlloy() = default;
bool ChromeProfileAlloy::IsOffTheRecord() {
return false;
}
bool ChromeProfileAlloy::IsOffTheRecord() const {
// Alloy contexts are never flagged as off-the-record. It causes problems
// for the extension system.
return false;
}
const Profile::OTRProfileID& ChromeProfileAlloy::GetOTRProfileID() const {
DCHECK(false);
static base::NoDestructor<Profile::OTRProfileID> otr_profile_id(
Profile::OTRProfileID::PrimaryID());
return *otr_profile_id;
}
variations::VariationsClient* ChromeProfileAlloy::GetVariationsClient() {
if (!variations_client_) {
variations_client_ = std::make_unique<CefVariationsClient>(this);

View File

@ -25,9 +25,6 @@ class ChromeProfileAlloy : public Profile {
protected:
// Profile methods.
bool IsOffTheRecord() override;
bool IsOffTheRecord() const override;
const OTRProfileID& GetOTRProfileID() const override;
variations::VariationsClient* GetVariationsClient() override;
scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
std::string GetProfileUserName() const override;

View File

@ -495,6 +495,9 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
url_loader_factory.get(), request_id);
loaders_.insert(std::move(resource_loader));
return;
} else if (*method == "getHostConfig") {
SendMessageAck(request_id, {});
return;
} else if (*method == "getPreferences") {
SendMessageAck(request_id,
GetPrefs()->GetDict(prefs::kDevToolsPreferences).Clone());

View File

@ -12,6 +12,7 @@
#include "cef/libcef/common/frame_util.h"
#include "chrome/browser/ui/views/sad_tab_view.h"
#include "chrome/common/chrome_result_codes.h"
#include "components/input/native_web_keyboard_event.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/focused_node_details.h"
#include "content/public/browser/keyboard_event_processing_result.h"
@ -21,7 +22,6 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_observer.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
@ -247,7 +247,7 @@ void CefBrowserContentsDelegate::CanDownload(
KeyboardEventProcessingResult
CefBrowserContentsDelegate::PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
if (auto delegate = platform_delegate()) {
if (auto c = client()) {
if (auto handler = c->GetKeyboardHandler()) {
@ -274,7 +274,7 @@ CefBrowserContentsDelegate::PreHandleKeyboardEvent(
bool CefBrowserContentsDelegate::HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// Check to see if event should be ignored.
if (event.skip_if_unhandled) {
return false;

View File

@ -105,10 +105,9 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
base::OnceCallback<void(bool)> callback) override;
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
const input::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(content::WebContents* source,
const input::NativeWebKeyboardEvent& event) override;
void DraggableRegionsChanged(
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
content::WebContents* contents) override;

View File

@ -590,7 +590,7 @@ CefBrowserInfo::NotificationStateLock::NotificationStateLock(
// Take the browser info state lock.
browser_info_lock_scope_ =
std::make_unique<base::AutoLock>(browser_info_->lock_);
std::make_unique<base::MovableAutoLock>(browser_info_->lock_);
}
CefBrowserInfo::NotificationStateLock::~NotificationStateLock() {

View File

@ -221,7 +221,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
friend class CefBrowserInfo;
const raw_ptr<CefBrowserInfo> browser_info_;
CefRefPtr<CefFrameHandler> frame_handler_;
std::unique_ptr<base::AutoLock> browser_info_lock_scope_;
std::unique_ptr<base::MovableAutoLock> browser_info_lock_scope_;
std::queue<FrameNotifyOnceAction> queue_;
};

View File

@ -34,10 +34,7 @@ class MessagePumpExternal : public base::MessagePumpForUI {
#endif
base::TimeTicks next_run_time; // is_null()
const bool has_more_work = DirectRunWork(delegate, &next_run_time);
if (!has_more_work) {
break;
}
DirectRunWork(delegate, &next_run_time);
if (next_run_time.is_null()) {
// We have more work that should run immediately.
@ -63,10 +60,9 @@ class MessagePumpExternal : public base::MessagePumpForUI {
}
private:
static bool DirectRunWork(Delegate* delegate,
static void DirectRunWork(Delegate* delegate,
base::TimeTicks* next_run_time) {
bool more_immediate_work = false;
bool more_idle_work = false;
bool more_delayed_work = false;
Delegate::NextWorkInfo next_work_info = delegate->DoWork();
@ -85,11 +81,8 @@ class MessagePumpExternal : public base::MessagePumpForUI {
}
if (!more_immediate_work && !more_delayed_work) {
// DoIdleWork() returns true if idle work was all done.
more_idle_work = !delegate->DoIdleWork();
delegate->DoIdleWork();
}
return more_immediate_work || more_idle_work || more_delayed_work;
}
const float max_time_slice_;

View File

@ -345,7 +345,7 @@ void CefBrowserPlatformDelegate::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegate::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
DCHECK(false);
return false;
}
@ -369,7 +369,7 @@ void CefBrowserPlatformDelegate::HandleExternalProtocol(const GURL& url) {
}
CefEventHandle CefBrowserPlatformDelegate::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
DCHECK(false);
return kNullEventHandle;
}

View File

@ -42,7 +42,6 @@ class WindowFeatures;
namespace content {
struct DropData;
struct NativeWebKeyboardEvent;
class RenderViewHost;
class RenderViewHostDelegateView;
class RenderWidgetHostImpl;
@ -65,6 +64,10 @@ class Size;
class Vector2d;
} // namespace gfx
namespace input {
struct NativeWebKeyboardEvent;
}
namespace ui {
struct AXLocationChanges;
struct AXUpdatesAndEvents;
@ -288,8 +291,7 @@ class CefBrowserPlatformDelegate {
// Forward the keyboard event to the application or frame window to allow
// processing of shortcut keys.
virtual bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event);
virtual bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event);
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
// See WebContentsDelegate documentation.
@ -305,7 +307,7 @@ class CefBrowserPlatformDelegate {
// Returns the OS event handle, if any, associated with |event|.
virtual CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const;
const input::NativeWebKeyboardEvent& event) const;
// Create the platform-specific JavaScript dialog runner.
virtual std::unique_ptr<CefJavaScriptDialogRunner>

View File

@ -4,11 +4,11 @@
#include "cef/libcef/browser/browser_util.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "components/input/native_web_keyboard_event.h"
namespace browser_util {
bool GetCefKeyEvent(const content::NativeWebKeyboardEvent& event,
bool GetCefKeyEvent(const input::NativeWebKeyboardEvent& event,
CefKeyEvent& cef_event) {
switch (event.GetType()) {
case blink::WebKeyboardEvent::Type::kRawKeyDown:
@ -66,7 +66,7 @@ bool GetCefKeyEvent(const content::NativeWebKeyboardEvent& event,
}
bool GetCefKeyEvent(const ui::KeyEvent& event, CefKeyEvent& cef_event) {
content::NativeWebKeyboardEvent native_event(event);
input::NativeWebKeyboardEvent native_event(event);
return GetCefKeyEvent(native_event, cef_event);
}

View File

@ -8,7 +8,7 @@
#include "cef/include/internal/cef_types_wrappers.h"
namespace content {
namespace input {
struct NativeWebKeyboardEvent;
}
@ -18,8 +18,8 @@ class KeyEvent;
namespace browser_util {
// Convert a content::NativeWebKeyboardEvent to a CefKeyEvent.
bool GetCefKeyEvent(const content::NativeWebKeyboardEvent& event,
// Convert a input::NativeWebKeyboardEvent to a CefKeyEvent.
bool GetCefKeyEvent(const input::NativeWebKeyboardEvent& event,
CefKeyEvent& cef_event);
// Convert a ui::KeyEvent to a CefKeyEvent.

View File

@ -114,7 +114,7 @@ void CefBrowserPlatformDelegateChrome::ViewText(const std::string& text) {
}
CefEventHandle CefBrowserPlatformDelegateChrome::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
return native_delegate_->GetEventHandle(event);
}

View File

@ -42,7 +42,7 @@ class CefBrowserPlatformDelegateChrome
bool want_dip_coords) const override;
void ViewText(const std::string& text) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
bool IsAlloyStyle() const override { return false; }
// CefBrowserPlatformDelegateNative::WindowlessHandler methods:

View File

@ -25,12 +25,12 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "components/input/native_web_keyboard_event.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/keyboard_event_processing_result.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "third_party/blink/public/mojom/page/draggable_region.mojom.h"
using content::KeyboardEventProcessingResult;
@ -631,7 +631,7 @@ ChromeBrowserDelegate::GetJavaScriptDialogManager(
KeyboardEventProcessingResult ChromeBrowserDelegate::PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
if (auto delegate = GetDelegateForWebContents(source)) {
return delegate->PreHandleKeyboardEvent(source, event);
}
@ -640,7 +640,7 @@ KeyboardEventProcessingResult ChromeBrowserDelegate::PreHandleKeyboardEvent(
bool ChromeBrowserDelegate::HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
if (auto delegate = GetDelegateForWebContents(source)) {
return delegate->HandleKeyboardEvent(source, event);
}

View File

@ -122,10 +122,9 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate {
content::WebContents* source) override;
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
const input::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(content::WebContents* source,
const input::NativeWebKeyboardEvent& event) override;
void DraggableRegionsChanged(
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
content::WebContents* contents) override;

View File

@ -93,13 +93,13 @@ void CefBrowserPlatformDelegateBackground::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegateBackground::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// Nothing to do here.
return false;
}
CefEventHandle CefBrowserPlatformDelegateBackground::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
return native_delegate_->GetEventHandle(event);
}

View File

@ -37,10 +37,9 @@ class CefBrowserPlatformDelegateBackground
gfx::Point GetScreenPoint(const gfx::Point& view,
bool want_dip_coords) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
std::unique_ptr<CefMenuRunner> CreateMenuRunner() override;
// CefBrowserPlatformDelegateNative::WindowlessHandler methods:

View File

@ -40,7 +40,6 @@ const char* const kSupportedAPIs[] = {
ContentSettingsContentSettingGetResourceIdentifiersFunction),
"pdfViewerPrivate",
EXTENSION_FUNCTION_NAME(PdfViewerPrivateIsAllowedLocalFileAccessFunction),
EXTENSION_FUNCTION_NAME(PdfViewerPrivateIsPdfOcrAlwaysActiveFunction),
"resourcesPrivate",
EXTENSION_FUNCTION_NAME(ResourcesPrivateGetStringsFunction),
"storage",
@ -89,7 +88,6 @@ void ChromeFunctionRegistry::RegisterAll(ExtensionFunctionRegistry* registry) {
ContentSettingsContentSettingGetResourceIdentifiersFunction>();
registry
->RegisterFunction<PdfViewerPrivateIsAllowedLocalFileAccessFunction>();
registry->RegisterFunction<PdfViewerPrivateIsPdfOcrAlwaysActiveFunction>();
registry->RegisterFunction<ResourcesPrivateGetStringsFunction>();
registry->RegisterFunction<StorageStorageAreaGetFunction>();
registry->RegisterFunction<StorageStorageAreaSetFunction>();

View File

@ -10,10 +10,10 @@
#include "extensions/browser/process_util.h"
#include "third_party/blink/public/common/input/web_gesture_event.h"
using content::NativeWebKeyboardEvent;
using content::OpenURLParams;
using content::WebContents;
using content::WebContentsObserver;
using input::NativeWebKeyboardEvent;
namespace extensions {

View File

@ -34,7 +34,7 @@ class CefBrowserPlatformDelegateNative
void WasResized() override;
// Translate CEF events to Chromium/Blink Web events.
virtual content::NativeWebKeyboardEvent TranslateWebKeyEvent(
virtual input::NativeWebKeyboardEvent TranslateWebKeyEvent(
const CefKeyEvent& key_event) const = 0;
virtual blink::WebMouseEvent TranslateWebClickEvent(
const CefMouseEvent& mouse_event,

View File

@ -101,10 +101,10 @@ gfx::Point CefBrowserPlatformDelegateNativeAura::GetScreenPoint(
return screen_pt;
}
content::NativeWebKeyboardEvent
input::NativeWebKeyboardEvent
CefBrowserPlatformDelegateNativeAura::TranslateWebKeyEvent(
const CefKeyEvent& key_event) const {
return content::NativeWebKeyboardEvent(TranslateUiKeyEvent(key_event));
return input::NativeWebKeyboardEvent(TranslateUiKeyEvent(key_event));
}
blink::WebMouseEvent

View File

@ -41,7 +41,7 @@ class CefBrowserPlatformDelegateNativeAura
bool want_dip_coords) const override;
// CefBrowserPlatformDelegateNative methods:
content::NativeWebKeyboardEvent TranslateWebKeyEvent(
input::NativeWebKeyboardEvent TranslateWebKeyEvent(
const CefKeyEvent& key_event) const override;
blink::WebMouseEvent TranslateWebClickEvent(
const CefMouseEvent& mouse_event,

View File

@ -9,9 +9,9 @@
#include "cef/libcef/browser/context.h"
#include "cef/libcef/browser/native/window_delegate_view.h"
#include "cef/libcef/browser/thread_util.h"
#include "components/input/native_web_keyboard_event.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
@ -227,13 +227,13 @@ void CefBrowserPlatformDelegateNativeLinux::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegateNativeLinux::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// TODO(cef): Is something required here to handle shortcut keys?
return false;
}
CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
// TODO(cef): We need to return an XEvent* from this method, but
// |event.os_event->native_event()| now returns a ui::Event* instead.
// See https://crbug.com/965991.
@ -285,12 +285,12 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
return ui::KeyEvent(type, key_code, dom_code, flags, dom_key, time_stamp);
}
content::NativeWebKeyboardEvent
input::NativeWebKeyboardEvent
CefBrowserPlatformDelegateNativeLinux::TranslateWebKeyEvent(
const CefKeyEvent& key_event) const {
ui::KeyEvent ui_event = TranslateUiKeyEvent(key_event);
if (key_event.type == KEYEVENT_CHAR) {
return content::NativeWebKeyboardEvent(ui_event, key_event.character);
return input::NativeWebKeyboardEvent(ui_event, key_event.character);
}
return content::NativeWebKeyboardEvent(ui_event);
return input::NativeWebKeyboardEvent(ui_event);
}

View File

@ -30,14 +30,13 @@ class CefBrowserPlatformDelegateNativeLinux
void NotifyMoveOrResizeStarted() override;
void SizeTo(int width, int height) override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
// CefBrowserPlatformDelegateNativeAura methods:
ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override;
content::NativeWebKeyboardEvent TranslateWebKeyEvent(
input::NativeWebKeyboardEvent TranslateWebKeyEvent(
const CefKeyEvent& key_event) const override;
private:

View File

@ -43,17 +43,16 @@ class CefBrowserPlatformDelegateNativeMac
gfx::Point GetScreenPoint(const gfx::Point& view,
bool want_dip_coords) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
std::unique_ptr<CefJavaScriptDialogRunner> CreateJavaScriptDialogRunner()
override;
std::unique_ptr<CefMenuRunner> CreateMenuRunner() override;
bool IsPrintPreviewSupported() const override;
// CefBrowserPlatformDelegateNative methods:
content::NativeWebKeyboardEvent TranslateWebKeyEvent(
input::NativeWebKeyboardEvent TranslateWebKeyEvent(
const CefKeyEvent& key_event) const override;
blink::WebMouseEvent TranslateWebClickEvent(
const CefMouseEvent& mouse_event,

View File

@ -17,10 +17,10 @@
#include "cef/libcef/browser/native/javascript_dialog_runner_mac.h"
#include "cef/libcef/browser/native/menu_runner_mac.h"
#include "cef/libcef/browser/thread_util.h"
#include "components/input/native_web_keyboard_event.h"
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
@ -360,7 +360,7 @@ void CefBrowserPlatformDelegateNativeMac::SendKeyEvent(
return;
}
content::NativeWebKeyboardEvent web_event = TranslateWebKeyEvent(event);
input::NativeWebKeyboardEvent web_event = TranslateWebKeyEvent(event);
view->ForwardKeyboardEvent(web_event, ui::LatencyInfo());
}
@ -450,7 +450,7 @@ void CefBrowserPlatformDelegateNativeMac::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegateNativeMac::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// Give the top level menu equivalents a chance to handle the event.
NSEvent* ns_event = event.os_event.Get();
if (ns_event.type == NSEventTypeKeyDown) {
@ -460,7 +460,7 @@ bool CefBrowserPlatformDelegateNativeMac::HandleKeyboardEvent(
}
CefEventHandle CefBrowserPlatformDelegateNativeMac::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
return CAST_NSEVENT_TO_CEF_EVENT_HANDLE(event.os_event.Get());
}
@ -481,10 +481,10 @@ bool CefBrowserPlatformDelegateNativeMac::IsPrintPreviewSupported() const {
return false;
}
content::NativeWebKeyboardEvent
input::NativeWebKeyboardEvent
CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(
const CefKeyEvent& key_event) const {
content::NativeWebKeyboardEvent result(
input::NativeWebKeyboardEvent result(
blink::WebInputEvent::Type::kUndefined,
blink::WebInputEvent::Modifiers::kNoModifiers, ui::EventTimeForNow());
@ -533,8 +533,8 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(
isARepeat:NO
keyCode:key_event.native_key_code];
result = content::NativeWebKeyboardEvent(
base::apple::OwnedNSEvent(synthetic_event));
result =
input::NativeWebKeyboardEvent(base::apple::OwnedNSEvent(synthetic_event));
if (key_event.type == KEYEVENT_CHAR) {
result.SetType(blink::WebInputEvent::Type::kChar);
}

View File

@ -18,7 +18,7 @@
#include "cef/libcef/browser/geometry_util.h"
#include "cef/libcef/browser/native/window_delegate_view.h"
#include "cef/libcef/browser/thread_util.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "components/input/native_web_keyboard_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
#include "ui/aura/window.h"
@ -375,7 +375,7 @@ void CefBrowserPlatformDelegateNativeWin::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
// shortcut keys work correctly.
if (event.os_event) {
@ -409,7 +409,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
UINT scan_code = ::MapVirtualKeyW(event.windows_key_code, MAPVK_VK_TO_VSC);
msg.lParam = (scan_code << 16) | // key scan code
1; // key repeat count
if (event.GetModifiers() & content::NativeWebKeyboardEvent::kAltKey) {
if (event.GetModifiers() & input::NativeWebKeyboardEvent::kAltKey) {
msg.lParam |= (1 << 29);
}
@ -418,7 +418,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
}
CefEventHandle CefBrowserPlatformDelegateNativeWin::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
if (!event.os_event) {
return nullptr;
}

View File

@ -29,10 +29,9 @@ class CefBrowserPlatformDelegateNativeWin
void NotifyMoveOrResizeStarted() override;
void SizeTo(int width, int height) override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
// CefBrowserPlatformDelegateNativeAura methods:
ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override;

View File

@ -37,7 +37,8 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
// See CalculateWindowStylesFromInitParams in
// ui/views/widget/widget_hwnd_utils.cc for the conversion of |params| to
// Windows style flags.
views::Widget::InitParams params;
views::Widget::InitParams params(
views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
params.parent_widget = parent_widget;
params.bounds = bounds;
params.delegate = this;

View File

@ -301,8 +301,7 @@ void SaveCookies(const CefBrowserContext::Getter& browser_context_getter,
std::unique_ptr<net::CanonicalCookie> cookie = net::CanonicalCookie::Create(
request.url, cookie_string, base::Time::Now(),
std::make_optional(response_date),
/*cookie_partition_key=*/std::nullopt,
/*block_truncated=*/true, net::CookieSourceType::kHTTP,
/*cookie_partition_key=*/std::nullopt, net::CookieSourceType::kHTTP,
&returned_status);
if (!returned_status.IsInclude()) {
continue;

View File

@ -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 "content/browser/renderer_host/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"
@ -109,7 +109,7 @@ void CefBrowserPlatformDelegateOsr::SendKeyEvent(const CefKeyEvent& event) {
return;
}
content::NativeWebKeyboardEvent web_event =
input::NativeWebKeyboardEvent web_event =
native_delegate_->TranslateWebKeyEvent(event);
view->SendKeyEvent(web_event);
}
@ -200,12 +200,12 @@ void CefBrowserPlatformDelegateOsr::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegateOsr::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
return native_delegate_->HandleKeyboardEvent(event);
}
CefEventHandle CefBrowserPlatformDelegateOsr::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
return native_delegate_->GetEventHandle(event);
}

View File

@ -47,10 +47,9 @@ class CefBrowserPlatformDelegateOsr
gfx::Point GetScreenPoint(const gfx::Point& view,
bool want_dip_coords) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
std::unique_ptr<CefJavaScriptDialogRunner> CreateJavaScriptDialogRunner()
override;
std::unique_ptr<CefMenuRunner> CreateMenuRunner() override;

View File

@ -30,15 +30,15 @@
#include "components/viz/common/switches.h"
#include "content/browser/bad_message.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/renderer_host/cursor_manager.h"
#include "content/browser/renderer_host/delegated_frame_host.h"
#include "content/browser/renderer_host/dip_util.h"
#include "content/browser/renderer_host/input/motion_event_web.h"
#include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
#include "content/browser/renderer_host/render_widget_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_input_event_router.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"
@ -1186,7 +1186,7 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
}
void CefRenderWidgetHostViewOSR::SendKeyEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
TRACE_EVENT0("cef", "CefRenderWidgetHostViewOSR::SendKeyEvent");
content::RenderWidgetHostImpl* target_host = render_widget_host_;
@ -1415,8 +1415,8 @@ void CefRenderWidgetHostViewOSR::SendTouchEvent(const CefTouchEvent& event) {
render_widget_host_->delegate()->GetInputEventRouter()->RouteTouchEvent(
this, &touch_event, latency_info);
} else {
render_widget_host_->ForwardTouchEventWithLatencyInfo(touch_event,
latency_info);
render_widget_host_->GetRenderInputRouter()
->ForwardTouchEventWithLatencyInfo(touch_event, latency_info);
}
bool touch_end =
@ -1495,7 +1495,7 @@ void CefRenderWidgetHostViewOSR::OnUpdateTextInputStateCalled(
}
void CefRenderWidgetHostViewOSR::ProcessAckedTouchEvent(
const content::TouchEventWithLatencyInfo& touch,
const input::TouchEventWithLatencyInfo& touch,
blink::mojom::InputEventResultState ack_result) {
const bool event_consumed =
ack_result == blink::mojom::InputEventResultState::kConsumed;

View File

@ -228,7 +228,7 @@ class CefRenderWidgetHostViewOSR
// ui::GestureProviderClient implementation.
void ProcessAckedTouchEvent(
const content::TouchEventWithLatencyInfo& touch,
const input::TouchEventWithLatencyInfo& touch,
blink::mojom::InputEventResultState ack_result) override;
void OnGestureEvent(const ui::GestureEventData& gesture) override;
@ -241,7 +241,7 @@ class CefRenderWidgetHostViewOSR
void OnScreenInfoChanged();
void Invalidate(CefBrowserHost::PaintElementType type);
void SendExternalBeginFrame();
void SendKeyEvent(const content::NativeWebKeyboardEvent& event);
void SendKeyEvent(const input::NativeWebKeyboardEvent& event);
void SendMouseEvent(const blink::WebMouseEvent& event);
void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
void SendTouchEvent(const CefTouchEvent& event);

View File

@ -311,11 +311,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
registry->RegisterBooleanPref(
prefs::kAccessControlAllowMethodsInCORSPreflightSpecConformant, true);
// Based on browser_prefs::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kAccessibilityPdfOcrAlwaysActive,
false);
registry->RegisterBooleanPref(prefs::kBlockTruncatedCookies, true);
// Spell checking preferences.
// Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs.
std::string spellcheck_lang =

View File

@ -86,7 +86,7 @@ PersistentPrefStore::PrefReadError CefPrefStore::ReadPrefs() {
void CefPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate) {
DCHECK(!pending_async_read_);
error_delegate_.reset(error_delegate);
error_delegate_.emplace(error_delegate);
if (block_async_read_) {
pending_async_read_ = true;
} else {
@ -106,6 +106,10 @@ void CefPrefStore::SchedulePendingLossyWrites() {}
void CefPrefStore::OnStoreDeletionFromDisk() {}
bool CefPrefStore::HasReadErrorDelegate() const {
return error_delegate_.has_value();
}
void CefPrefStore::SetInitializationCompleted() {
NotifyInitializationCompleted();
}
@ -119,8 +123,9 @@ void CefPrefStore::NotifyPrefValueChanged(const std::string& key) {
void CefPrefStore::NotifyInitializationCompleted() {
DCHECK(!init_complete_);
init_complete_ = true;
if (read_success_ && read_error_ != PREF_READ_ERROR_NONE && error_delegate_) {
error_delegate_->OnError(read_error_);
if (read_success_ && read_error_ != PREF_READ_ERROR_NONE &&
error_delegate_.has_value() && error_delegate_.value()) {
error_delegate_.value()->OnError(read_error_);
}
for (Observer& observer : observers_) {
observer.OnInitializationCompleted(read_success_);

View File

@ -7,6 +7,7 @@
#include <stdint.h>
#include <optional>
#include <string>
#include "base/observer_list.h"
@ -51,6 +52,7 @@ class CefPrefStore : public PersistentPrefStore {
base::OnceClosure synchronous_done_callback) override;
void SchedulePendingLossyWrites() override;
void OnStoreDeletionFromDisk() override;
bool HasReadErrorDelegate() const override;
// Marks the store as having completed initialization.
void SetInitializationCompleted();
@ -111,7 +113,8 @@ class CefPrefStore : public PersistentPrefStore {
// mutation.
bool committed_ = true;
std::unique_ptr<ReadErrorDelegate> error_delegate_;
// Optional so we can differentiate `nullopt` from `nullptr`.
std::optional<std::unique_ptr<ReadErrorDelegate>> error_delegate_;
base::ObserverList<PrefStore::Observer, true>::Unchecked observers_;
};

View File

@ -29,7 +29,6 @@
#include "services/network/public/cpp/resolve_host_client_base.h"
#include "services/network/public/mojom/clear_data_filter.mojom.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "ui/base/ui_base_features.h"
using content::BrowserThread;
@ -1029,12 +1028,8 @@ void CefRequestContextImpl::SetChromeColorSchemeInternal(
if (current_color) {
// User color is not currently transparent.
// Based on ThemeColorPickerHandler::SetDefaultColor.
if (features::IsChromeWebuiRefresh2023()) {
theme_service->SetUserColor(SK_ColorTRANSPARENT);
theme_service->UseDeviceTheme(false);
} else {
theme_service->UseDefaultTheme();
}
theme_service->SetUserColor(SK_ColorTRANSPARENT);
theme_service->UseDeviceTheme(false);
}
} else {
ui::mojom::BrowserColorVariant ui_variant;
@ -1060,13 +1055,8 @@ void CefRequestContextImpl::SetChromeColorSchemeInternal(
ui_variant != theme_service->GetBrowserColorVariant()) {
// User color and/or variant has changed.
// Based on ThemeColorPickerHandler::SetSeedColor.
if (features::IsChromeWebuiRefresh2023()) {
theme_service->SetUserColorAndBrowserColorVariant(user_color,
ui_variant);
theme_service->UseDeviceTheme(false);
} else {
theme_service->BuildAutogeneratedThemeFromColor(user_color);
}
theme_service->SetUserColorAndBrowserColorVariant(user_color, ui_variant);
theme_service->UseDeviceTheme(false);
}
}
}

View File

@ -49,11 +49,11 @@ void CefSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {}
void CefSpeechRecognitionManagerDelegate::OnRecognitionResults(
int session_id,
const std::vector<blink::mojom::SpeechRecognitionResultPtr>& result) {}
const std::vector<media::mojom::WebSpeechRecognitionResultPtr>& result) {}
void CefSpeechRecognitionManagerDelegate::OnRecognitionError(
int session_id,
const blink::mojom::SpeechRecognitionError& error) {}
const media::mojom::SpeechRecognitionError& error) {}
void CefSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
int session_id,

View File

@ -35,11 +35,11 @@ class CefSpeechRecognitionManagerDelegate
void OnRecognitionEnd(int session_id) override;
void OnRecognitionResults(
int session_id,
const std::vector<blink::mojom::SpeechRecognitionResultPtr>& result)
const std::vector<media::mojom::WebSpeechRecognitionResultPtr>& result)
override;
void OnRecognitionError(
int session_id,
const blink::mojom::SpeechRecognitionError& error) override;
const media::mojom::SpeechRecognitionError& error) override;
void OnAudioLevelsChange(int session_id,
float volume,
float noise_volume) override;

View File

@ -3,6 +3,7 @@
// can be found in the LICENSE file.
#include "base/feature_list.h"
#include "base/features.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "cef/include/test/cef_test_helpers.h"
@ -17,6 +18,7 @@ void CefSetDataDirectoryForTests(const CefString& dir) {
bool CefIsFeatureEnabledForTests(const CefString& feature_name) {
// Only includes values that are queried by unit tests.
const base::Feature* features[] = {
&base::features::kUseRustJsonParser,
&network::features::kReduceAcceptLanguage,
};

View File

@ -176,13 +176,13 @@ void CefBrowserPlatformDelegateViews::ViewText(const std::string& text) {
}
bool CefBrowserPlatformDelegateViews::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
// The BrowserView will handle accelerators.
return browser_view_->HandleKeyboardEvent(event);
}
CefEventHandle CefBrowserPlatformDelegateViews::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
const input::NativeWebKeyboardEvent& event) const {
return native_delegate_->GetEventHandle(event);
}

View File

@ -50,10 +50,9 @@ class CefBrowserPlatformDelegateViews
gfx::Point GetScreenPoint(const gfx::Point& view,
bool want_dip_coords) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) override;
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
CefEventHandle GetEventHandle(
const content::NativeWebKeyboardEvent& event) const override;
const input::NativeWebKeyboardEvent& event) const override;
std::unique_ptr<CefMenuRunner> CreateMenuRunner() override;
bool IsViewsHosted() const override;
gfx::Point GetDialogPosition(const gfx::Size& size) override;

View File

@ -17,7 +17,7 @@
#include "cef/libcef/browser/views/window_impl.h"
#include "cef/libcef/features/runtime.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/common/input/native_web_keyboard_event.h"
#include "components/input/native_web_keyboard_event.h"
#include "ui/content_accelerators/accelerator_util.h"
namespace {
@ -186,7 +186,7 @@ void CefBrowserViewImpl::BrowserDestroyed(CefBrowserHostBase* browser) {
}
bool CefBrowserViewImpl::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
if (!root_view()) {
return false;
}
@ -428,7 +428,7 @@ CefWindowImpl* CefBrowserViewImpl::cef_window_impl() const {
}
bool CefBrowserViewImpl::HandleAccelerator(
const content::NativeWebKeyboardEvent& event,
const input::NativeWebKeyboardEvent& event,
views::FocusManager* focus_manager) {
// Previous calls to TranslateMessage can generate Char events as well as
// RawKeyDown events, even if the latter triggered an accelerator. In these

View File

@ -60,7 +60,7 @@ class CefBrowserViewImpl
// Called to handle accelerators when the event is unhandled by the web
// content and the browser client.
bool HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event);
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event);
// CefBrowserView methods:
CefRefPtr<CefBrowser> GetBrowser() override;
@ -120,7 +120,7 @@ class CefBrowserViewImpl
// Logic extracted from UnhandledKeyboardEventHandler::HandleKeyboardEvent for
// the handling of accelerators. Returns true if the event was handled by the
// accelerator.
bool HandleAccelerator(const content::NativeWebKeyboardEvent& event,
bool HandleAccelerator(const input::NativeWebKeyboardEvent& event,
views::FocusManager* focus_manager);
void RequestFocusInternal();

View File

@ -410,7 +410,8 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) {
CefWidget* cef_widget = CefWidget::Create(this);
views::Widget* widget = cef_widget->GetWidget();
views::Widget::InitParams params;
views::Widget::InitParams params(
views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
params.delegate = this;
views::Widget* host_widget = nullptr;

View File

@ -60,7 +60,9 @@ bool CefCreateTempDirectoryInDirectory(const CefString& base_dir,
return false;
}
base::FilePath result;
if (base::CreateTemporaryDirInDir(base_dir, prefix, &result)) {
base::FilePath::StringType prefix_str = prefix;
if (base::CreateTemporaryDirInDir(
base_dir, base::FilePath::StringPieceType(prefix_str), &result)) {
new_dir = result.value();
return true;
}

View File

@ -371,9 +371,9 @@ void CefFrameImpl::OnDraggableRegionsChanged() {
regions.reserve(webregions.size());
for (const auto& webregion : webregions) {
auto region = cef::mojom::DraggableRegionEntry::New(webregion.bounds,
webregion.draggable);
render_frame->ConvertViewportToWindow(&region->bounds);
auto region = cef::mojom::DraggableRegionEntry::New(
render_frame->ConvertViewportToWindow(webregion.bounds),
webregion.draggable);
regions.emplace_back(std::move(region));
}
}

View File

@ -233,6 +233,9 @@ patches = [
# Fix fatal error: 'components/printing/common/print.mojom.h' file not found
# From chrome/browser/ui/browser_commands.cc via
# chrome/browser/printing/print_view_manager_common.h
#
# Linux: Fix duplicate symbol error for window_frame_util.cc
# https://issuetracker.google.com/issues/343037853#comment3
'name': 'chrome_browser_browser',
},
{
@ -791,19 +794,6 @@ patches = [
# https://chromium-review.googlesource.com/c/chromium/src/+/5302103
'name': 'osr_win_remove_keyed_mutex_2575'
},
{
# win: Fix generated binaries crashing with exit code 3221225477.
# https://issues.chromium.org/issues/336007395
# Reverts
# https://chromium-review.googlesource.com/c/chromium/src/+/5454331
'name': 'win_partition_freelist_entry_336007395'
},
{
# Fix deadlock with enable_backup_ref_ptr_instance_tracer=true
# https://issues.chromium.org/issues/340815319
# https://chromium-review.googlesource.com/c/chromium/src/+/5542485
'name': 'base_allocator_instance_tracer_5542485'
},
{
# Fix dangling raw_ptr errors.
# https://github.com/chromiumembedded/cef/issues/3239
@ -820,5 +810,16 @@ patches = [
# cef_sandbox with VS 17.9.2 version of MSVC STL.
# https://github.com/chromiumembedded/cef/issues/3708
'name': 'win_sandbox_op3way_3708'
},
{
# Fix ThreadPool DCHECK during startup when using multi-threaded message
# loop. Related to the following CL:
# 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'
}
]

View File

@ -1,13 +0,0 @@
diff --git base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc
index fecc2c35a3dcf..3745ac1d22a93 100644
--- base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc
+++ base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc
@@ -42,7 +42,7 @@ auto& GetStorage() {
}
auto& GetStorageMutex() {
- static partition_alloc::internal::base::NoDestructor<std::mutex>
+ static partition_alloc::internal::base::NoDestructor<std::recursive_mutex>
storage_mutex;
return *storage_mutex;
}

View File

@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index 575149b2f3246..74719a39cf4e4 100644
index 4ae52e5351615..272875eb5fe93 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -41,6 +41,7 @@ import("//build/nocompile.gni")
@ -10,7 +10,7 @@ index 575149b2f3246..74719a39cf4e4 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
@@ -1525,7 +1526,11 @@ component("base") {
@@ -1510,7 +1511,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@ -23,7 +23,7 @@ index 575149b2f3246..74719a39cf4e4 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1954,6 +1959,12 @@ component("base") {
@@ -1939,6 +1944,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}
@ -73,11 +73,11 @@ index 215d636fec275..922e88f31b999 100644
#else
#include "base/hash/md5_boringssl.h"
diff --git base/hash/sha1.h base/hash/sha1.h
index 1891e95fa387d..fc190dc39ae7d 100644
index 857159d757637..63b5b396a00dd 100644
--- base/hash/sha1.h
+++ base/hash/sha1.h
@@ -14,7 +14,9 @@
#include "base/base_export.h"
@@ -15,7 +15,9 @@
#include "base/compiler_specific.h"
#include "base/containers/span.h"
#include "build/build_config.h"
-#if BUILDFLAG(IS_NACL)
@ -188,7 +188,7 @@ index 1f91a938caf55..e7b383ebe3986 100644
return lhs.token_ == rhs.token_;
#else
diff --git base/win/sid.cc base/win/sid.cc
index dd063382d97e1..6f8d6a0be91b1 100644
index dd063382d97e1..968dde0567c44 100644
--- base/win/sid.cc
+++ base/win/sid.cc
@@ -22,6 +22,7 @@
@ -220,13 +220,12 @@ index dd063382d97e1..6f8d6a0be91b1 100644
CRYPTO_library_init();
static_assert((SHA256_DIGEST_LENGTH / sizeof(DWORD)) ==
SECURITY_APP_PACKAGE_RID_COUNT);
@@ -143,6 +149,10 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) {
@@ -143,6 +149,9 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) {
reinterpret_cast<uint8_t*>(&rids[2]));
return FromSubAuthorities(SECURITY_APP_PACKAGE_AUTHORITY, std::size(rids),
rids);
+#else
+ NOTREACHED();
+ return Sid(WellKnownSid::kNull);
+#endif
}

View File

@ -1,8 +1,8 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn
index feafabc3a60f9..f78cafeadb879 100644
index a60a2c1de0166..a191640ca0375 100644
--- base/test/BUILD.gn
+++ base/test/BUILD.gn
@@ -191,11 +191,6 @@ static_library("test_support") {
@@ -192,11 +192,6 @@ static_library("test_support") {
if (enable_base_tracing) {
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
@ -14,7 +14,7 @@ index feafabc3a60f9..f78cafeadb879 100644
deps += [
":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor",
@@ -563,7 +558,7 @@ if (enable_base_tracing) {
@@ -564,7 +559,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 feafabc3a60f9..f78cafeadb879 100644
if (is_ios) {
_target_type = "ios_framework_bundle"
}
@@ -572,6 +567,8 @@ if (enable_base_tracing) {
@@ -573,6 +568,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true
sources = [
@ -32,7 +32,7 @@ index feafabc3a60f9..f78cafeadb879 100644
"test_trace_processor_export.h",
"test_trace_processor_impl.cc",
"test_trace_processor_impl.h",
@@ -589,33 +586,6 @@ if (enable_base_tracing) {
@@ -590,33 +587,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 2439098be9ada..7235455526000 100644
index fdc8e7ef0641d..494fa1379b5a3 100644
--- content/shell/BUILD.gn
+++ content/shell/BUILD.gn
@@ -908,7 +908,6 @@ if (is_mac) {
@@ -913,7 +913,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" ]

View File

@ -0,0 +1,15 @@
diff --git base/task/thread_pool/thread_pool_impl.cc base/task/thread_pool/thread_pool_impl.cc
index 4ac5cea5f6c08..559593f1564c9 100644
--- base/task/thread_pool/thread_pool_impl.cc
+++ base/task/thread_pool/thread_pool_impl.cc
@@ -105,6 +105,10 @@ ThreadPoolImpl::ThreadPoolImpl(std::string_view histogram_label,
: kForegroundPoolEnvironmentParams.thread_type_hint,
task_tracker_->GetTrackedRef(), tracked_ref_factory_.GetTrackedRef());
}
+
+ // After https://crrev.com/e2e090c363 the ThreadPool is being created earlier
+ // during initialization. Detach now so we can rebind later on the UI thread.
+ DETACH_FROM_SEQUENCE(sequence_checker_);
}
ThreadPoolImpl::~ThreadPoolImpl() {

View File

@ -1,5 +1,5 @@
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
index 103cbab74b515..3b763e5100340 100644
index 023ce7091b061..f175b3683f48f 100644
--- third_party/blink/public/web/web_element.h
+++ third_party/blink/public/web/web_element.h
@@ -82,6 +82,9 @@ class BLINK_EXPORT WebElement : public WebNode {
@ -10,13 +10,13 @@ index 103cbab74b515..3b763e5100340 100644
+ WebString AttributeValue(unsigned index) const;
+ unsigned AttributeCount() const;
// Returns true if the element's contenteditable attribute is in the true
// state or in the plaintext-only state:
// Returns true if the element's computed writing suggestions value is true.
// https://html.spec.whatwg.org/#writing-suggestions:computed-writing-suggestions-value
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
index f05470ff9c673..7ffee95e4540b 100644
index da6ab6488ad80..7b23243e21a61 100644
--- third_party/blink/renderer/core/exported/web_element.cc
+++ third_party/blink/renderer/core/exported/web_element.cc
@@ -118,6 +118,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
@@ -119,6 +119,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
IGNORE_EXCEPTION_FOR_TESTING);
}

View File

@ -1,5 +1,5 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
index 68b69f564d911..0dba72515782f 100644
index e8283fc396ec7..527e81fac898a 100644
--- content/browser/scheduler/browser_task_executor.cc
+++ content/browser/scheduler/browser_task_executor.cc
@@ -209,7 +209,7 @@ BrowserTaskExecutor::OnUserInputStart() {

View File

@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 7822aeab4826a..fa72112bfee98 100644
index 26fbdc7e7db0c..ac02e60276e5c 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1988,6 +1988,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin(
@@ -2048,6 +2048,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;
@ -20,10 +20,10 @@ index 7822aeab4826a..fa72112bfee98 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 e3dd21898b85e..2176fde9c1764 100644
index 87db8bec18603..22c7d3fb838ab 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -7958,10 +7958,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
@@ -8057,10 +8057,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin;
@ -47,7 +47,7 @@ index e3dd21898b85e..2176fde9c1764 100644
}
return origin_and_debug_info;
@@ -8069,6 +8081,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
@@ -8168,6 +8180,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host()));

View File

@ -1,5 +1,5 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 6efe967eb0a1c..429b3d8897085 100644
index f598fd188a4ce..ed515fc40d77c 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -133,6 +133,9 @@ declare_args() {
@ -12,7 +12,7 @@ index 6efe967eb0a1c..429b3d8897085 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,
@@ -2179,11 +2182,13 @@ config("export_dynamic") {
@@ -2203,11 +2206,13 @@ config("export_dynamic") {
config("thin_archive") {
# The macOS and iOS default linker ld64 does not support reading thin
# archives.

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index c9ff70a8f2f71..d056d3758d564 100644
index 8e3fde5e841e1..8adc42aea0836 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@ -10,7 +10,7 @@ index c9ff70a8f2f71..d056d3758d564 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -2091,6 +2092,7 @@ static_library("browser") {
@@ -2049,6 +2050,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@ -18,7 +18,7 @@ index c9ff70a8f2f71..d056d3758d564 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2790,6 +2792,10 @@ static_library("browser") {
@@ -2769,6 +2771,10 @@ static_library("browser") {
]
}

View File

@ -14,10 +14,10 @@ index 21ab47267370b..eb9b383727995 100644
std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index f77210dcc2ff5..1d0eaa8ff245d 100644
index 762b9d42bc7f7..361e25df2d8f5 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -1113,18 +1113,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -1111,18 +1111,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}

View File

@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644
return false;
}
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
index e857e2363da9e..3dd4db8ae4267 100644
index 02ff1e580d3a7..7f51115896049 100644
--- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc
@@ -37,6 +37,7 @@
@ -24,7 +24,7 @@ index e857e2363da9e..3dd4db8ae4267 100644
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
@@ -1235,6 +1236,13 @@ DevToolsWindow* DevToolsWindow::Create(
@@ -1234,6 +1235,13 @@ DevToolsWindow* DevToolsWindow::Create(
!browser->is_type_normal()) {
can_dock = false;
}
@ -38,7 +38,7 @@ index e857e2363da9e..3dd4db8ae4267 100644
}
// Create WebContents with devtools.
@@ -1916,12 +1924,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
@@ -1919,12 +1927,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) {
return;
}
@ -74,7 +74,7 @@ index e857e2363da9e..3dd4db8ae4267 100644
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 6ca4ed42a601d..feec87943fee4 100644
index 74460ac479210..8cf70c80a87ad 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
@ -85,7 +85,7 @@ index 6ca4ed42a601d..feec87943fee4 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -403,6 +404,10 @@ static_library("ui") {
@@ -412,6 +413,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -96,7 +96,7 @@ index 6ca4ed42a601d..feec87943fee4 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -429,6 +434,7 @@ static_library("ui") {
@@ -439,6 +444,7 @@ static_library("ui") {
"//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//cc/paint",
@ -104,8 +104,8 @@ index 6ca4ed42a601d..feec87943fee4 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/app:chrome_dll_resources",
@@ -3000,6 +3006,8 @@ static_library("ui") {
"views/apps/app_dialog/app_block_dialog_view.h",
@@ -3040,6 +3046,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",
+ "views/apps/app_dialog/app_uninstall_dialog_view.cc",
@ -113,7 +113,16 @@ index 6ca4ed42a601d..feec87943fee4 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",
@@ -5113,8 +5121,6 @@ static_library("ui") {
@@ -4249,8 +4257,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 +5131,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",
@ -122,7 +131,7 @@ index 6ca4ed42a601d..feec87943fee4 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",
@@ -6965,6 +6971,7 @@ static_library("ui") {
@@ -6908,6 +6912,7 @@ static_library("ui") {
if (enable_printing) {
deps += [
"//components/printing/browser",
@ -131,10 +140,10 @@ index 6ca4ed42a601d..feec87943fee4 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index a1d50c2e47056..e85ee7027bd19 100644
index 557abfcd71d85..fb64e93157148 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -269,6 +269,25 @@
@@ -272,6 +272,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@ -160,7 +169,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -515,6 +534,10 @@ Browser::Browser(const CreateParams& params)
@@ -537,6 +556,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type),
profile_(params.profile),
window_(nullptr),
@ -171,7 +180,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
tab_strip_model_delegate_(
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
tab_strip_model_(std::make_unique<TabStripModel>(
@@ -722,6 +745,12 @@ Browser::~Browser() {
@@ -757,6 +780,12 @@ Browser::~Browser() {
// away so they don't try and call back to us.
if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed();
@ -184,7 +193,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
///////////////////////////////////////////////////////////////////////////////
@@ -1170,6 +1199,8 @@ void Browser::WindowFullscreenStateChanged() {
@@ -1217,6 +1246,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@ -193,7 +202,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
void Browser::FullscreenTopUIStateChanged() {
@@ -1511,6 +1542,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1584,6 +1615,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@ -208,7 +217,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1518,8 +1557,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1591,8 +1630,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -229,7 +238,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
bool Browser::TabsNeedBeforeUnloadFired() const {
@@ -1695,6 +1744,16 @@ WebContents* Browser::OpenURLFromTab(
@@ -1768,6 +1817,16 @@ WebContents* Browser::OpenURLFromTab(
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -246,7 +255,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1857,6 +1916,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1930,6 +1989,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@ -255,7 +264,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1885,6 +1946,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1958,6 +2019,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -264,7 +273,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
if (!GetStatusBubble())
return;
@@ -1892,6 +1955,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1965,6 +2028,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@ -282,7 +291,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
const ui::EventType type = event.type();
const bool exited = type == ui::ET_MOUSE_EXITED;
@@ -1919,6 +1993,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -1992,6 +2066,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false;
}
@ -302,7 +311,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -2018,12 +2105,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -2091,12 +2178,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -327,7 +336,7 @@ index a1d50c2e47056..e85ee7027bd19 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();
@@ -2036,6 +2135,13 @@ void Browser::RendererUnresponsive(
@@ -2109,6 +2208,13 @@ void Browser::RendererUnresponsive(
void Browser::RendererResponsive(
WebContents* source,
content::RenderWidgetHost* render_widget_host) {
@ -341,7 +350,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
RenderWidgetHostView* view = render_widget_host->GetView();
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
@@ -2045,6 +2151,15 @@ void Browser::RendererResponsive(
@@ -2118,6 +2224,15 @@ void Browser::RendererResponsive(
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
WebContents* source) {
@ -357,7 +366,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
}
@@ -2089,6 +2204,11 @@ void Browser::DraggableRegionsChanged(
@@ -2153,6 +2268,11 @@ void Browser::DraggableRegionsChanged(
if (app_controller_) {
app_controller_->DraggableRegionsChanged(regions, contents);
}
@ -369,7 +378,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
void Browser::DidFinishNavigation(
@@ -2169,11 +2289,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -2233,11 +2353,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@ -385,7 +394,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2373,6 +2497,15 @@ void Browser::RequestMediaAccessPermission(
@@ -2437,6 +2561,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@ -401,7 +410,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2917,9 +3050,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -2981,9 +3114,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
@ -414,7 +423,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
// We hide the status bar for web apps windows as this matches native
@@ -2927,6 +3062,12 @@ StatusBubble* Browser::GetStatusBubble() {
@@ -2991,6 +3126,12 @@ StatusBubble* Browser::GetStatusBubble() {
// mode, as the minimal browser UI includes the status bar.
if (web_app::AppBrowserController::IsWebApp(this) &&
!app_controller()->HasMinimalUiButtons()) {
@ -427,7 +436,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
return nullptr;
}
@@ -3076,6 +3217,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -3140,6 +3281,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents);
}
@ -436,7 +445,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
}
void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3230,6 +3373,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
@@ -3294,6 +3437,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const {
@ -452,7 +461,7 @@ index a1d50c2e47056..e85ee7027bd19 100644
case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index af562dfe07909..c81b2b05a85df 100644
index 69f2c9c0ff003..3cae24a0e42d2 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@
@ -463,7 +472,7 @@ index af562dfe07909..c81b2b05a85df 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"
@@ -50,6 +51,10 @@
@@ -51,6 +52,10 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/shell_dialogs/select_file_dialog.h"
@ -474,7 +483,7 @@ index af562dfe07909..c81b2b05a85df 100644
#if BUILDFLAG(IS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -367,6 +372,15 @@ class Browser : public TabStripModelObserver,
@@ -370,6 +375,15 @@ class Browser : public TabStripModelObserver,
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
@ -490,7 +499,7 @@ index af562dfe07909..c81b2b05a85df 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -448,6 +462,13 @@ class Browser : public TabStripModelObserver,
@@ -451,6 +465,13 @@ class Browser : public TabStripModelObserver,
update_ui_immediately_for_testing_ = true;
}
@ -504,7 +513,7 @@ index af562dfe07909..c81b2b05a85df 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -541,6 +562,12 @@ class Browser : public TabStripModelObserver,
@@ -546,6 +567,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
base::WeakPtr<const Browser> AsWeakPtr() const;
@ -517,7 +526,7 @@ index af562dfe07909..c81b2b05a85df 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -947,10 +974,18 @@ class Browser : public TabStripModelObserver,
@@ -959,10 +986,18 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -536,7 +545,7 @@ index af562dfe07909..c81b2b05a85df 100644
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
@@ -1292,6 +1327,10 @@ class Browser : public TabStripModelObserver,
@@ -1297,6 +1332,10 @@ class Browser : public TabStripModelObserver,
// This Browser's window.
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
@ -547,7 +556,7 @@ index af562dfe07909..c81b2b05a85df 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1358,6 +1397,8 @@ class Browser : public TabStripModelObserver,
@@ -1363,6 +1402,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@ -557,7 +566,7 @@ index af562dfe07909..c81b2b05a85df 100644
UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 1bf5227d7c252..250012b2eb5fb 100644
index ec2ca0cefeb4a..66b480f50f72d 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -313,6 +313,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
@ -586,7 +595,7 @@ index 1bf5227d7c252..250012b2eb5fb 100644
// tab helpers, so the entire set of tab helpers needs to be set up
// immediately.
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
index ca462913858cd..4b4153ab9aa1a 100644
index e12f401ab7d11..59222cc9601ba 100644
--- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc
@@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(

View File

@ -56,15 +56,15 @@ index a344dc5c74ce3..548e6218b0e82 100644
supervised_user::SupervisedUserSettingsService* supervised_service =
SupervisedUserSettingsServiceFactory::GetForKey(profile->GetProfileKey());
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
index f988c812b4ad9..3d5637f3cbdf3 100644
index 0cc2bfa06245f..86655f6746459 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(
return rule.GetContentSetting();
}
}
- NOTREACHED();
+ // NOTREACHED();
- NOTREACHED_IN_MIGRATION();
+ // NOTREACHED_IN_MIGRATION();
return CONTENT_SETTING_DEFAULT;
}
} // namespace

View File

@ -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 b62e659a27d00..e76cc7c0a7813 100644
index b3908e6711f3e..58db1ed6e1e8a 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -357,6 +357,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -356,6 +356,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@ -21,9 +21,9 @@ index b62e659a27d00..e76cc7c0a7813 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -618,6 +630,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
@@ -619,6 +631,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
return 1;
}
+ // Match the MENU_ID_USER_FIRST to MENU_ID_USER_LAST range from cef_types.h.
+ if (id >= 26500 && id <= 28500)
@ -32,9 +32,9 @@ index b62e659a27d00..e76cc7c0a7813 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -868,6 +884,14 @@ RenderViewContextMenu::RenderViewContextMenu(
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
@@ -882,6 +898,14 @@ RenderViewContextMenu::RenderViewContextMenu(
: nullptr;
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+ auto* cb = GetMenuCreatedCallback();
+ if (!cb->is_null()) {
@ -47,9 +47,9 @@ index b62e659a27d00..e76cc7c0a7813 100644
observers_.AddObserver(&autofill_context_menu_manager_);
}
@@ -1343,6 +1367,12 @@ void RenderViewContextMenu::InitMenu() {
autofill::SuggestionHidingReason::kContextMenuOpened);
}
@@ -1350,6 +1374,12 @@ void RenderViewContextMenu::InitMenu() {
autofill_client->HideAutofillSuggestions(
autofill::SuggestionHidingReason::kContextMenuOpened);
}
+
+ if (first_observer_) {
@ -60,7 +60,7 @@ index b62e659a27d00..e76cc7c0a7813 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -3564,6 +3594,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
@@ -3596,6 +3626,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb);
}
@ -88,10 +88,10 @@ index b62e659a27d00..e76cc7c0a7813 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 6c59d4ccaf3d5..21c959aea9c21 100644
index 8f0e62fe84ff2..77bf0875db2b2 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -155,7 +155,21 @@ class RenderViewContextMenu
@@ -153,7 +153,21 @@ class RenderViewContextMenu
}
#endif
@ -113,7 +113,7 @@ index 6c59d4ccaf3d5..21c959aea9c21 100644
Profile* GetProfile() const;
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
@@ -464,6 +478,9 @@ class RenderViewContextMenu
@@ -475,6 +489,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;
@ -305,7 +305,7 @@ index 042428f77f4ad..e4efd98ca45d5 100644
raw_ptr<content::WebContents> web_contents_ = nullptr;
};
diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc
index 8e45cecb17039..e40115e23ee82 100644
index c22b3a584bb54..542b838ba3a44 100644
--- components/renderer_context_menu/render_view_context_menu_base.cc
+++ components/renderer_context_menu/render_view_context_menu_base.cc
@@ -374,6 +374,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc
index ee871fcaed0fd..96480a8bd5db7 100644
index 10fd31daf60fa..49b10da9625f0 100644
--- chrome/browser/devtools/chrome_devtools_manager_delegate.cc
+++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc
@@ -13,6 +13,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index 447a91b9ac380..0452f0a8b57cf 100644
index b6e26d1d2e082..90aec2642adfe 100644
--- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc
@@ -20,6 +20,7 @@
@ -188,7 +188,7 @@ index 49272553c7c53..5ba90c9a06ecf 100644
raw_ptr<content::WebContents, AcrossTasksDanglingUntriaged> source_contents_;
};
diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc
index 9361287ac3411..59567b485bf99 100644
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,
@ -240,10 +240,10 @@ index 9361287ac3411..59567b485bf99 100644
paths.push_back(std::move(path));
}
diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc
index 68dd62159b686..e94831cd44a2d 100644
index 4a71b1d4535d9..722a9480681bd 100644
--- ui/shell_dialogs/select_file_dialog.cc
+++ ui/shell_dialogs/select_file_dialog.cc
@@ -73,8 +73,10 @@ void SelectFileDialog::SetFactory(
@@ -89,8 +89,10 @@ void SelectFileDialog::SetFactory(
// static
scoped_refptr<SelectFileDialog> SelectFileDialog::Create(
Listener* listener,
@ -257,7 +257,7 @@ index 68dd62159b686..e94831cd44a2d 100644
return CreateSelectFileDialog(listener, std::move(policy));
}
diff --git ui/shell_dialogs/select_file_dialog.h ui/shell_dialogs/select_file_dialog.h
index 9b12fae59c3cc..a80873f421c8d 100644
index e71c14e499c25..3bc1e44b4c856 100644
--- ui/shell_dialogs/select_file_dialog.h
+++ ui/shell_dialogs/select_file_dialog.h
@@ -102,7 +102,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@ -270,8 +270,8 @@ index 9b12fae59c3cc..a80873f421c8d 100644
SelectFileDialog(const SelectFileDialog&) = delete;
SelectFileDialog& operator=(const SelectFileDialog&) = delete;
@@ -126,6 +127,10 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// be used.
@@ -136,6 +137,10 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// FileTypeExtensions instead of this and the above vector?
std::vector<std::u16string> extension_description_overrides;
+ // Original mime types for the specified extensions. Entries correspond to
@ -281,7 +281,7 @@ index 9b12fae59c3cc..a80873f421c8d 100644
// Specifies whether there will be a filter added for all files (i.e. *.*).
bool include_all_files = false;
@@ -199,6 +204,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -209,6 +214,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
const GURL* caller = nullptr);
bool HasMultipleFileTypeChoices();
@ -301,7 +301,7 @@ index 9b12fae59c3cc..a80873f421c8d 100644
protected:
friend class base::RefCountedThreadSafe<SelectFileDialog>;
@@ -224,6 +242,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -234,6 +252,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// The listener to be notified of selection completion.
raw_ptr<Listener> listener_;
@ -313,7 +313,7 @@ index 9b12fae59c3cc..a80873f421c8d 100644
private:
// Tests if the file selection dialog can be displayed by
// testing if the AllowFileSelectionDialogs-Policy is
@@ -236,8 +259,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -246,8 +269,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// Returns true if the dialog has multiple file type choices.
virtual bool HasMultipleFileTypeChoicesImpl() = 0;
@ -336,7 +336,7 @@ 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 bf99047fa53cf..0efdb76233331 100644
index abf5baa269fa2..b5e88a82537c1 100644
--- ui/shell_dialogs/select_file_dialog_mac.mm
+++ ui/shell_dialogs/select_file_dialog_mac.mm
@@ -107,6 +107,10 @@ void SelectFileDialogImpl::SelectFileImpl(
@ -351,7 +351,7 @@ index bf99047fa53cf..0efdb76233331 100644
std::make_unique<remote_cocoa::SelectFileDialogBridge>(ns_window),
std::move(receiver));
diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc
index e5d4311ba152c..16c86e544fe3a 100644
index 9200d30f8d58a..f4156db6a7a73 100644
--- ui/shell_dialogs/select_file_dialog_win.cc
+++ ui/shell_dialogs/select_file_dialog_win.cc
@@ -254,6 +254,8 @@ void SelectFileDialogImpl::SelectFileImpl(

View File

@ -12,16 +12,15 @@ 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 a2ca2f52148fd..7689d43ec9e0b 100644
index 0ffc333329d4d..91b7567c123ac 100644
--- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc
@@ -101,9 +101,18 @@ class WidgetModalDialogHostObserverViews : public views::WidgetObserver,
@@ -101,10 +101,17 @@ class WidgetModalDialogHostObserverViews : public views::WidgetObserver,
gfx::Rect GetModalDialogBounds(views::Widget* widget,
web_modal::ModalDialogHost* dialog_host,
const gfx::Size& size) {
- views::Widget* const host_widget =
- views::Widget::GetWidgetForNativeView(dialog_host->GetHostView());
- CHECK(host_widget);
+ // |host_view| will be nullptr with CEF windowless rendering.
+ auto host_view = dialog_host->GetHostView();
+ views::Widget* host_widget =
@ -31,13 +30,13 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
+ // size. This can happen on MacViews under the Cocoa browser where the window
+ // modal dialogs are displayed as sheets, and their position is managed by a
+ // ConstrainedWindowSheetController instance.
+ if (!host_widget) {
if (!host_widget) {
- return gfx::Rect();
+ return gfx::Rect(dialog_host->GetDialogPosition(size), size);
+ }
}
gfx::Point position = dialog_host->GetDialogPosition(size);
// Align the first row of pixels inside the border. This is the apparent top
@@ -111,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
@@ -113,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
position.set_y(position.y() -
widget->non_client_view()->frame_view()->GetInsets().top());
@ -95,7 +94,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
}
void UpdateModalDialogPosition(views::Widget* widget,
@@ -158,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
@@ -160,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
return;
}
@ -122,7 +121,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
return;
}
@@ -282,8 +279,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -284,8 +279,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view =
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
@ -137,7 +136,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -299,8 +301,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -301,8 +301,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
if (!requires_positioning)
return widget;
@ -147,7 +146,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
if (host) {
DCHECK_EQ(parent_view, host->GetHostView());
ModalDialogHostObserver* dialog_host_observer =
@@ -313,10 +314,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -315,10 +314,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
views::Widget* ShowBrowserModal(std::unique_ptr<ui::DialogModel> dialog_model,
gfx::NativeWindow parent) {
@ -210,10 +209,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 941699c28e286..3f6569b116e64 100644
index 18611879ee372..938dbba3e3a87 100644
--- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc
@@ -85,10 +85,12 @@ DialogDelegate::DialogDelegate() {
@@ -91,10 +91,12 @@ DialogDelegate::DialogDelegate() {
// static
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
gfx::NativeWindow context,
@ -228,15 +227,14 @@ index 941699c28e286..3f6569b116e64 100644
widget->Init(std::move(params));
return widget;
}
@@ -97,17 +99,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
@@ -103,16 +105,18 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
Widget* DialogDelegate::CreateDialogWidget(
std::unique_ptr<WidgetDelegate> delegate,
gfx::NativeWindow context,
- gfx::NativeView parent) {
- return CreateDialogWidget(delegate.release(), context, parent);
+ gfx::NativeView parent,
+ gfx::AcceleratedWidget parent_widget) {
DCHECK(delegate->owned_by_widget());
- return CreateDialogWidget(delegate.release(), context, parent);
+ return CreateDialogWidget(delegate.release(), context, parent, parent_widget);
}
@ -252,16 +250,17 @@ index 941699c28e286..3f6569b116e64 100644
#else
return true;
#endif
@@ -118,14 +122,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -123,7 +127,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;
views::Widget::InitParams params(
Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
params.delegate = delegate;
params.bounds = bounds;
@@ -131,7 +136,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
DialogDelegate* dialog = delegate->AsDialogDelegate();
if (dialog)
@ -270,7 +269,7 @@ index 941699c28e286..3f6569b116e64 100644
if (!dialog || dialog->use_custom_frame()) {
params.opacity = Widget::InitParams::WindowOpacity::kTranslucent;
@@ -138,6 +143,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -144,6 +149,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
}
params.context = context;
params.parent = parent;

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
index bc10e7566bd71..3b513b0b00b34 100644
index 2628f1751cd14..cc2c330d8db5d 100644
--- chrome/browser/download/chrome_download_manager_delegate.cc
+++ chrome/browser/download/chrome_download_manager_delegate.cc
@@ -146,6 +146,10 @@
@@ -148,6 +148,10 @@
#include "chrome/browser/safe_browsing/download_protection/download_protection_util.h"
#endif
@ -13,7 +13,7 @@ index bc10e7566bd71..3b513b0b00b34 100644
using content::BrowserThread;
using content::DownloadManager;
using download::DownloadItem;
@@ -490,6 +494,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
@@ -492,6 +496,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
download_dialog_bridge_ = std::make_unique<DownloadDialogBridge>();
download_message_bridge_ = std::make_unique<DownloadMessageBridge>();
#endif
@ -25,7 +25,7 @@ index bc10e7566bd71..3b513b0b00b34 100644
}
ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
@@ -549,6 +558,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
@@ -551,6 +560,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
download_manager_->RemoveObserver(this);
download_manager_ = nullptr;
}
@ -35,7 +35,7 @@ index bc10e7566bd71..3b513b0b00b34 100644
}
void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown(
@@ -617,6 +629,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
@@ -619,6 +631,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload);
}
@ -49,7 +49,7 @@ index bc10e7566bd71..3b513b0b00b34 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 e2cf12d2c8fee..376818e28798c 100644
index af7f1d5fac12b..1cb1d01464c11 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 e2cf12d2c8fee..376818e28798c 100644
// This is the Chrome side helper for the download system.
class ChromeDownloadManagerDelegate
: public content::DownloadManagerDelegate,
@@ -387,6 +394,10 @@ class ChromeDownloadManagerDelegate
@@ -389,6 +396,10 @@ class ChromeDownloadManagerDelegate
// Whether a file picker dialog is showing.
bool is_file_picker_showing_;

View File

@ -34,10 +34,10 @@ index 4007e26f780c3..5f92d74018f9e 100644
}
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
index 3d0843c7d1a60..b07956d25797d 100644
index 73de5dd73a522..12005b67a6ee9 100644
--- chrome/browser/extensions/api/tabs/tabs_api.cc
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1550,7 +1550,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1553,7 +1553,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
if (DevToolsWindow::IsDevToolsWindow(contents))
return RespondNow(Error(tabs_constants::kNotAllowedForDevToolsError));
@ -46,7 +46,7 @@ index 3d0843c7d1a60..b07956d25797d 100644
return RespondNow(Error(tabs_constants::kNoCurrentWindowError));
web_contents_ = contents;
@@ -1574,7 +1574,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1577,7 +1577,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
return RespondNow(Error(tabs_constants::kTabStripNotEditableError));
}
@ -55,7 +55,7 @@ index 3d0843c7d1a60..b07956d25797d 100644
tab_strip->ActivateTabAt(tab_index);
DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
}
@@ -1588,7 +1588,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1591,7 +1591,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
}
bool highlighted = *params->update_properties.highlighted;
@ -64,7 +64,7 @@ index 3d0843c7d1a60..b07956d25797d 100644
tab_strip->ToggleSelectionAt(tab_index);
}
}
@@ -1601,7 +1601,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1604,7 +1604,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
base::NumberToString(tab_id))));
}
@ -73,7 +73,7 @@ index 3d0843c7d1a60..b07956d25797d 100644
int opener_id = *params->update_properties.opener_tab_id;
WebContents* opener_contents = nullptr;
if (opener_id == tab_id) {
@@ -1636,11 +1636,11 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1639,11 +1639,11 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
}
const bool contents_in_an_uneditable_saved_group =
@ -87,7 +87,7 @@ index 3d0843c7d1a60..b07956d25797d 100644
// Pinning will result in changes to the tabs index/group affiliation in
// some cases, Throw an error if a tab is attempting to be pinned.
if (contents_in_an_uneditable_saved_group) {
@@ -1671,8 +1671,9 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1674,8 +1674,9 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
}
std::string updated_url = *params->update_properties.url;
@ -99,14 +99,14 @@ index 3d0843c7d1a60..b07956d25797d 100644
return RespondNow(Error(ErrorUtils::FormatErrorMessage(
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
}
@@ -1686,7 +1687,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1689,7 +1690,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
return RespondNow(Error(std::move(error)));
}
- NotifyExtensionTelemetry(Profile::FromBrowserContext(browser_context()),
+ NotifyExtensionTelemetry(profile,
extension(), safe_browsing::TabsApiInfo::UPDATE,
current_url, updated_url);
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
@ -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 b667ccfe87ccf..65283ef921458 100644
index b9bca4946ef9f..41207ebb86045 100644
--- chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
+++ chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
@@ -841,6 +841,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() {
@@ -830,6 +830,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() {
if (!gfx::Animation::ShouldRenderRichAnimation()) {
return;
}

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/views/frame/browser_frame_mac.h chrome/browser/ui/views/frame/browser_frame_mac.h
index a5ee05ae5f5e9..97fd2e8da450e 100644
index decd0b51ddc3d..17fce2da6ad0e 100644
--- chrome/browser/ui/views/frame/browser_frame_mac.h
+++ chrome/browser/ui/views/frame/browser_frame_mac.h
@@ -11,6 +11,7 @@
@ -10,7 +10,7 @@ index a5ee05ae5f5e9..97fd2e8da450e 100644
class BrowserFrame;
class BrowserView;
@class BrowserWindowTouchBarController;
@@ -54,6 +55,21 @@ class BrowserFrameMac : public views::NativeWidgetMac,
@@ -53,6 +54,21 @@ class BrowserFrameMac : public views::NativeWidgetMac,
bool ShouldUseInitialVisibleOnAllWorkspaces() const override;
void AnnounceTextInInProcessWindow(const std::u16string& text) override;
@ -33,7 +33,7 @@ index a5ee05ae5f5e9..97fd2e8da450e 100644
~BrowserFrameMac() override;
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
index 13300a3ec7e25..b8f61c5845779 100644
index 0d7f72e291a14..b0fb3eae5eab6 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() {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/net/proxy_config_monitor.cc chrome/browser/net/proxy_config_monitor.cc
index c9281f7abfbde..670872e610d88 100644
index c2adfa2bd0f79..ccb076655002c 100644
--- chrome/browser/net/proxy_config_monitor.cc
+++ chrome/browser/net/proxy_config_monitor.cc
@@ -9,6 +9,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/background_fetch/background_fetch_permission_context.cc chrome/browser/background_fetch/background_fetch_permission_context.cc
index 429739d7b8dfe..726cc7d9e9ced 100644
index fbc2dccbeb46d..9eea3a3c5c64c 100644
--- chrome/browser/background_fetch/background_fetch_permission_context.cc
+++ chrome/browser/background_fetch/background_fetch_permission_context.cc
@@ -4,6 +4,7 @@
@ -24,7 +24,7 @@ index 429739d7b8dfe..726cc7d9e9ced 100644
g_browser_process->download_request_limiter();
DCHECK(limiter);
diff --git chrome/browser/background_sync/periodic_background_sync_permission_context.cc chrome/browser/background_sync/periodic_background_sync_permission_context.cc
index d63a055919747..49adba291f1bb 100644
index c45e337c0c746..948cbbc9e3d7a 100644
--- chrome/browser/background_sync/periodic_background_sync_permission_context.cc
+++ chrome/browser/background_sync/periodic_background_sync_permission_context.cc
@@ -6,6 +6,7 @@
@ -49,10 +49,10 @@ index d63a055919747..49adba291f1bb 100644
base::FeatureList::IsEnabled(
features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
index 6d07868a1100b..ac8fc5e70f045 100644
index 1123ef8c5aa52..51f42541b3d7b 100644
--- chrome/browser/permissions/chrome_permissions_client.cc
+++ chrome/browser/permissions/chrome_permissions_client.cc
@@ -14,6 +14,7 @@
@@ -15,6 +15,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@ -60,7 +60,7 @@ index 6d07868a1100b..ac8fc5e70f045 100644
#include "chrome/browser/ash/shimless_rma/chrome_shimless_rma_delegate.h"
#include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h"
#include "chrome/browser/browser_process.h"
@@ -198,6 +199,11 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
@@ -199,6 +200,11 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
double ChromePermissionsClient::GetSiteEngagementScore(
content::BrowserContext* browser_context,
const GURL& origin) {
@ -72,7 +72,7 @@ index 6d07868a1100b..ac8fc5e70f045 100644
return site_engagement::SiteEngagementService::Get(
Profile::FromBrowserContext(browser_context))
->GetScore(origin);
@@ -368,8 +374,14 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
@@ -369,8 +375,14 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
std::make_unique<ContextualNotificationPermissionUiSelector>());
selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
Profile::FromBrowserContext(browser_context)));
@ -161,10 +161,10 @@ index fbce13c16ad10..0512b2f09937e 100644
std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
content::WebContents* web_contents,
diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc
index 7bf3d2015afc8..8a58296f19c30 100644
index 7f976b5bc5c44..ee2faa5c297a7 100644
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
@@ -217,11 +217,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
@@ -222,11 +222,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
}
}

View File

@ -105,7 +105,7 @@ index d8fda08453256..466718e824503 100644
}
diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc
index 50f1b5313ce45..687e667e4b942 100644
index 138ae48ca13c1..6d4e45a234a4e 100644
--- chrome/browser/policy/chrome_browser_policy_connector.cc
+++ chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -13,11 +13,14 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc
index e3a6645add6e3..4dde23d0451ff 100644
index a79694f7bdcc2..ec42dd0dc5ba2 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;
@ -17,5 +17,5 @@ index e3a6645add6e3..4dde23d0451ff 100644
+ }
+ return base::win::HandleToUint32(hwnd);
#else
NOTREACHED();
NOTREACHED_IN_MIGRATION();
return 0;

View File

@ -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 52da35f06a7a9..5fb43c7c65d34 100644
index 941d4bf2d302d..7d41044d01d9b 100644
--- chrome/browser/profiles/off_the_record_profile_impl.cc
+++ chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -669,7 +669,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
@@ -660,7 +660,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
#endif
if (!profile)
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
@ -14,7 +14,7 @@ index 52da35f06a7a9..5fb43c7c65d34 100644
}
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index a9762d47c397d..482c0e4c8550f 100644
index cd4fd8104866c..5cf5853d6632b 100644
--- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc
@@ -91,6 +91,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@ -52,7 +52,7 @@ index a9762d47c397d..482c0e4c8550f 100644
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
return CreateUnique(kDevToolsOTRProfileIDPrefix);
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index 7ad5372c8a135..1112491861262 100644
index 02454f4e780b5..4641f33c26f5f 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -94,6 +94,10 @@ class Profile : public content::BrowserContext {
@ -66,16 +66,17 @@ index 7ad5372c8a135..1112491861262 100644
// Creates a unique OTR profile id to be used for DevTools browser contexts.
static OTRProfileID CreateUniqueForDevTools();
@@ -515,6 +519,8 @@ class Profile : public content::BrowserContext {
return instant_service_;
}
@@ -519,6 +523,9 @@ class Profile : public content::BrowserContext {
static Profile* FromJavaObject(const jni_zero::JavaRef<jobject>& obj);
jni_zero::ScopedJavaLocalRef<jobject> GetJavaObject() const;
#endif // BUILDFLAG(IS_ANDROID)
+
+ void NotifyOffTheRecordProfileCreated(Profile* off_the_record);
+
protected:
// Creates an OffTheRecordProfile which points to this Profile.
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
@@ -526,7 +532,6 @@ class Profile : public content::BrowserContext {
@@ -530,7 +537,6 @@ class Profile : public content::BrowserContext {
static PrefStore* CreateExtensionPrefStore(Profile*,
bool incognito_pref_store);
@ -84,10 +85,10 @@ index 7ad5372c8a135..1112491861262 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 fbe18f0773bda..1066b8d2b382a 100644
index 0909a332a46bf..163de8ef6a878 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -1040,7 +1040,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1030,7 +1030,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);
@ -99,10 +100,10 @@ index fbe18f0773bda..1066b8d2b382a 100644
return raw_otr_profile;
}
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 6e991d99df8ff..00145aba0bd83 100644
index 35ed366d5e749..da51d2e0081f5 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -436,7 +436,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -437,7 +437,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
profile_manager_android_ = std::make_unique<ProfileManagerAndroid>(this);
#endif
@ -134,10 +135,10 @@ index 3d5fd0d5ca858..965ab69b3fe8f 100644
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use.
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
index 0d1d2e3661ff1..ba4b8cb233102 100644
index 1154f4f02cc16..4c9e5128cd177 100644
--- chrome/browser/profiles/renderer_updater.cc
+++ chrome/browser/profiles/renderer_updater.cc
@@ -9,6 +9,7 @@
@@ -10,6 +10,7 @@
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "build/chromeos_buildflags.h"
@ -145,7 +146,7 @@ index 0d1d2e3661ff1..ba4b8cb233102 100644
#include "chrome/browser/content_settings/content_settings_manager_delegate.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -45,6 +46,9 @@ RendererUpdater::RendererUpdater(Profile* profile)
@@ -46,6 +47,9 @@ RendererUpdater::RendererUpdater(Profile* profile)
#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS)
,
bound_session_cookie_refresh_service_(

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 102625231e535..47d0d7574b2ee 100644
index 22fd2393c9c70..e033dbd0d6d10 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -33,6 +33,7 @@ static_library("safe_browsing") {
@@ -34,6 +34,7 @@ static_library("safe_browsing") {
"//components/enterprise:enterprise",
"//components/enterprise/buildflags",
"//components/enterprise/common:strings",

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
index 86ab9563e08bc..182be3b6ec1dc 100644
index 22a2efe170757..9c8c6c24dfa78 100644
--- chrome/browser/ui/startup/startup_browser_creator.cc
+++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -604,6 +604,13 @@ std::optional<ash::KioskAppId> GetAppId(const base::CommandLine& command_line,
@@ -605,6 +605,13 @@ std::optional<ash::KioskAppId> GetAppId(const base::CommandLine& command_line,
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -16,7 +16,7 @@ index 86ab9563e08bc..182be3b6ec1dc 100644
} // namespace
StartupProfileMode StartupProfileModeFromReason(
@@ -1488,6 +1495,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
@@ -1489,6 +1496,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
{profile, mode}, last_opened_profiles);
}
@ -29,7 +29,7 @@ index 86ab9563e08bc..182be3b6ec1dc 100644
// static
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
const base::CommandLine& command_line,
@@ -1497,6 +1510,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
@@ -1498,6 +1511,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return;
}

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index dd41ca3cb8f35..6123e27acffa8 100644
index 354965a6332b3..6843e6d123cc8 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -30,6 +30,7 @@
@ -9,8 +9,8 @@ index dd41ca3cb8f35..6123e27acffa8 100644
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
#include "chrome/browser/new_tab_page/chrome_colors/chrome_colors_service.h"
@@ -68,6 +69,10 @@
#include "chrome/browser/new_tab_page/chrome_colors/chrome_colors_util.h"
@@ -65,6 +66,10 @@
#include "ui/color/color_provider_manager.h"
#include "ui/native_theme/native_theme.h"
@ -21,7 +21,7 @@ index dd41ca3cb8f35..6123e27acffa8 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "base/scoped_observation.h"
#include "extensions/browser/extension_registry_observer.h"
@@ -269,11 +274,19 @@ void ThemeService::Init() {
@@ -266,11 +271,19 @@ void ThemeService::Init() {
// OnExtensionServiceReady. Otherwise, the ThemeObserver won't be
// constructed in time to observe the corresponding events.
#if BUILDFLAG(ENABLE_EXTENSIONS)

View File

@ -1,5 +1,5 @@
diff --git chrome/common/features.gni chrome/common/features.gni
index fc2d817cdab5d..bb0fe5b982aae 100644
index bcc0da3ae5a96..87617098debd3 100644
--- chrome/common/features.gni
+++ chrome/common/features.gni
@@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni")
@ -19,7 +19,7 @@ index fc2d817cdab5d..bb0fe5b982aae 100644
# Platforms where Chrome x509 server certificate enterprise policies are
# supported. This must must match the supported_on/future_on list of the
@@ -94,11 +95,13 @@ declare_args() {
@@ -95,11 +96,13 @@ declare_args() {
# optimize_webui was moved to ui/base/ui_features.gni
}

View File

@ -64,10 +64,10 @@ index 00dd9a34cd3fb..89d4588bdbe4e 100644
const extensions::Extension* extension =
registry->enabled_extensions().GetByID(extension_id);
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index 60bc3751cb325..ebce071c74a8b 100644
index 120ec8af72623..012f7b602cf40 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -1006,6 +1006,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -996,6 +996,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@ -75,7 +75,7 @@ index 60bc3751cb325..ebce071c74a8b 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1166,7 +1167,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1156,7 +1157,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -85,7 +85,7 @@ index 60bc3751cb325..ebce071c74a8b 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1175,7 +1177,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1165,7 +1167,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -95,7 +95,7 @@ index 60bc3751cb325..ebce071c74a8b 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1185,7 +1188,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1175,7 +1178,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@ -106,7 +106,7 @@ index 60bc3751cb325..ebce071c74a8b 100644
}
}
diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h
index 8b26a93f7527e..17890bf20e481 100644
index ea2891a279371..595e5b8eb2cb6 100644
--- content/browser/browser_plugin/browser_plugin_embedder.h
+++ content/browser/browser_plugin/browser_plugin_embedder.h
@@ -15,6 +15,7 @@
@ -115,9 +115,9 @@ index 8b26a93f7527e..17890bf20e481 100644
#include "base/memory/raw_ptr.h"
+#include "content/common/content_export.h"
namespace content {
@@ -26,7 +27,7 @@ struct NativeWebKeyboardEvent;
namespace input {
struct NativeWebKeyboardEvent;
@@ -29,7 +30,7 @@ class WebContentsImpl;
// TODO(wjmaclean): Get rid of "BrowserPlugin" in the name of this class.
// Perhaps "WebContentsEmbedderDelegate" would be better?

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 857247dd93f75..fc2f196d450cd 100644
index 3108e12b92e7f..18cc9062a4cd0 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index d60a195d58a27..df74bb2c60264 100644
index 2805028bc810c..bdf6f2fb7b3a1 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -37,6 +37,7 @@
@ -10,7 +10,7 @@ index d60a195d58a27..df74bb2c60264 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,9 @@ struct MainFunction {
@@ -610,6 +611,9 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@ -20,7 +20,7 @@ index d60a195d58a27..df74bb2c60264 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// In debug builds of Lacros, we keep track of when the user data dir
// is initialized, to ensure the cryptohome is not accessed before login
@@ -845,6 +849,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -847,6 +851,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@ -31,7 +31,7 @@ index d60a195d58a27..df74bb2c60264 100644
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -870,7 +878,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -872,7 +880,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics.
DeferBrowserMetrics(user_data_dir);
@ -40,7 +40,7 @@ index d60a195d58a27..df74bb2c60264 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.
@@ -1038,7 +1046,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -1040,7 +1048,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// Initializes the resource bundle and determines the locale.
std::string actual_locale = LoadLocalState(
@ -50,7 +50,7 @@ index d60a195d58a27..df74bb2c60264 100644
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
chrome_feature_list_creator->OverrideCachedUIStrings();
@@ -1057,7 +1066,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -1059,7 +1068,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
@ -60,7 +60,7 @@ index d60a195d58a27..df74bb2c60264 100644
#if BUILDFLAG(IS_ANDROID)
record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
@@ -1502,6 +1512,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1506,6 +1516,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@ -68,7 +68,7 @@ index d60a195d58a27..df74bb2c60264 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_POSIX)
@@ -1512,6 +1523,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1516,6 +1527,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@ -76,7 +76,7 @@ index d60a195d58a27..df74bb2c60264 100644
#if BUILDFLAG(IS_WIN)
child_process_logging::Init();
@@ -1692,7 +1704,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1696,7 +1708,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
#else
const std::string loaded_locale =
ui::ResourceBundle::InitSharedInstanceWithLocale(
@ -86,7 +86,7 @@ index d60a195d58a27..df74bb2c60264 100644
base::FilePath resources_pack_path;
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
@@ -1722,6 +1735,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1726,6 +1739,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@ -94,7 +94,7 @@ index d60a195d58a27..df74bb2c60264 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1757,6 +1771,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1761,6 +1775,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -102,7 +102,7 @@ index d60a195d58a27..df74bb2c60264 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1880,6 +1895,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1888,6 +1903,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@ -110,7 +110,7 @@ index d60a195d58a27..df74bb2c60264 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 =
@@ -1892,6 +1908,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1900,6 +1916,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -118,7 +118,7 @@ index d60a195d58a27..df74bb2c60264 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1994,6 +2011,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -2002,6 +2019,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
: memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kIgnore;
@ -126,7 +126,7 @@ index d60a195d58a27..df74bb2c60264 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(chrome::GetChannel(),
@@ -2001,5 +2019,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -2009,5 +2027,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
.SetDispatcherParameters(memory_system::DispatcherParameters::
PoissonAllocationSamplerInclusion::kEnforce,
allocation_recorder_inclusion, process_type)
@ -174,7 +174,7 @@ index 3553377e96017..9f6edc70ef1d4 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
std::unique_ptr<chromeos::LacrosService> lacros_service_;
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index d6c9d21a0d4d3..9e0673a150d40 100644
index f90f1b8fa54d9..3dc8a9fe49363 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@ -194,7 +194,7 @@ index d6c9d21a0d4d3..9e0673a150d40 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
@@ -832,7 +833,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -833,7 +834,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT;
}
@ -203,7 +203,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
// If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser(
@@ -845,7 +846,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -846,7 +847,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
// result in browser startup bailing.
return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED;
}
@ -212,7 +212,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
return load_local_state_result;
}
@@ -951,7 +952,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -952,7 +953,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback());
@ -221,7 +221,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
if (first_run::IsChromeFirstRun()) {
bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -964,7 +965,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -965,7 +966,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
: metrics::EnableMetricsDefault::OPT_IN);
}
}
@ -230,7 +230,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
std::string locale =
startup_data_->chrome_feature_list_creator()->actual_locale();
@@ -997,6 +998,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -998,6 +999,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@ -238,7 +238,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs)
@@ -1030,6 +1032,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -1031,6 +1033,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit);
}
#endif // BUILDFLAG(IS_MAC)
@ -246,7 +246,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -1091,6 +1094,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1092,6 +1095,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@ -254,7 +254,7 @@ index d6c9d21a0d4d3..9e0673a150d40 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)
@@ -1112,6 +1116,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1113,6 +1117,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@ -262,7 +262,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
#if BUILDFLAG(IS_MAC)
#if defined(ARCH_CPU_X86_64)
@@ -1470,6 +1475,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1473,6 +1478,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN)
@ -270,7 +270,7 @@ index d6c9d21a0d4d3..9e0673a150d40 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)) {
@@ -1481,6 +1487,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1484,6 +1490,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess());
}
@ -278,7 +278,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1506,6 +1513,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1509,6 +1516,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // BUILDFLAG(CHROME_FOR_TESTING)
@ -286,7 +286,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1519,18 +1527,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1522,18 +1530,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
}
@ -309,7 +309,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
// Begin relaunch processing immediately if User Data migration is required
@@ -1569,7 +1581,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1572,7 +1584,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
@ -318,7 +318,7 @@ index d6c9d21a0d4d3..9e0673a150d40 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
@@ -1578,7 +1590,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1581,7 +1593,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// obtained but before potentially creating the first run sentinel).
if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall())
return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
@ -327,7 +327,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
// Desktop construction occurs here, (required before profile creation).
PreProfileInit();
@@ -1621,12 +1633,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1624,12 +1636,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state());
}
@ -342,7 +342,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
#if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1653,6 +1667,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1656,6 +1670,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@ -350,7 +350,7 @@ index d6c9d21a0d4d3..9e0673a150d40 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
@@ -1692,6 +1707,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1695,6 +1710,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess());
}
#endif // BUILDFLAG(IS_WIN)
@ -358,7 +358,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1783,6 +1799,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1786,6 +1802,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -370,7 +370,7 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info,
@@ -1815,11 +1836,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1818,11 +1839,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@ -386,10 +386,10 @@ index d6c9d21a0d4d3..9e0673a150d40 100644
#endif // !BUILDFLAG(IS_ANDROID)
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index 3c12614c4d7d2..1dc97ecf5a11e 100644
index 6b27cf7037fce..70fd49bb873ff 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -18,6 +18,7 @@
@@ -20,6 +20,7 @@
#include "base/path_service.h"
#include "base/strings/sys_string_conversions.h"
#include "build/branding_buildflags.h"
@ -397,7 +397,7 @@ index 3c12614c4d7d2..1dc97ecf5a11e 100644
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_listener.h"
#include "chrome/browser/browser_process.h"
@@ -106,6 +107,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -120,6 +121,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
}
#endif // !BUILDFLAG(CHROME_FOR_TESTING)
@ -405,7 +405,7 @@ index 3c12614c4d7d2..1dc97ecf5a11e 100644
// Create the app delegate by requesting the shared AppController.
CHECK_EQ(nil, NSApp.delegate);
AppController* app_controller = AppController.sharedController;
@@ -114,6 +116,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -128,6 +130,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
chrome::BuildMainMenu(NSApp, app_controller,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
[app_controller mainMenuCreated];
@ -413,7 +413,7 @@ index 3c12614c4d7d2..1dc97ecf5a11e 100644
ui::WarmScreenCapture();
@@ -154,5 +157,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
@@ -168,5 +171,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
}
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
@ -422,7 +422,7 @@ index 3c12614c4d7d2..1dc97ecf5a11e 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 675a9ab64ea08..d0c160a14b2a7 100644
index d81a2b75f4c6c..4c29ef42b4576 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -46,6 +46,7 @@
@ -431,9 +431,9 @@ index 675a9ab64ea08..d0c160a14b2a7 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/app_mode/app_mode_utils.h"
#include "chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.h"
@@ -1467,6 +1468,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1486,6 +1487,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@ -442,7 +442,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1504,6 +1507,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1523,6 +1526,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@ -454,7 +454,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -3707,28 +3715,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
@@ -3744,28 +3752,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
web_prefs->preferred_color_scheme;
}
#else
@ -500,7 +500,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
#endif // BUILDFLAG(IS_ANDROID)
// Reauth WebUI doesn't support dark mode yet because it shares the dialog
@@ -4471,9 +4476,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4506,9 +4511,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@ -512,7 +512,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6592,7 +6599,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6627,7 +6634,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@ -521,7 +521,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6610,6 +6617,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6645,6 +6652,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@ -530,7 +530,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
}
std::vector<base::FilePath>
@@ -7732,10 +7741,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -7767,10 +7776,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@ -543,7 +543,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -7754,7 +7763,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -7789,7 +7798,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@ -553,7 +553,7 @@ index 675a9ab64ea08..d0c160a14b2a7 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -7923,7 +7933,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -7968,7 +7978,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@ -563,10 +563,10 @@ index 675a9ab64ea08..d0c160a14b2a7 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 6c9208d7b7907..77f049cc7483c 100644
index 522c072575325..b63e9aacd1f0a 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -146,6 +146,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -147,6 +147,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override;
@ -575,7 +575,7 @@ index 6c9208d7b7907..77f049cc7483c 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.
@@ -686,7 +688,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -691,7 +693,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@ -584,7 +584,7 @@ index 6c9208d7b7907..77f049cc7483c 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1213,7 +1215,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1233,7 +1235,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@ -594,7 +594,7 @@ index 6c9208d7b7907..77f049cc7483c 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 750d634f641b1..86220ec515c0c 100644
index 7c9cd6b688f88..f66aa28081c37 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -16,6 +16,7 @@
@ -605,7 +605,7 @@ index 750d634f641b1..86220ec515c0c 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
@@ -197,6 +198,10 @@
@@ -198,6 +199,10 @@
#include "chrome/browser/background/background_mode_manager.h"
#endif
@ -616,7 +616,7 @@ index 750d634f641b1..86220ec515c0c 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1820,7 +1825,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1917,7 +1922,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#endif // BUILDFLAG(IS_WIN)
@ -626,7 +626,7 @@ index 750d634f641b1..86220ec515c0c 100644
downgrade::RegisterPrefs(registry);
#endif
@@ -1864,6 +1870,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1961,6 +1967,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@ -638,7 +638,7 @@ index 750d634f641b1..86220ec515c0c 100644
}
// Register prefs applicable to all profiles.
@@ -2317,6 +2328,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -2411,6 +2422,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) {
RegisterProfilePrefs(registry, locale);

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index 3b992709445b9..822de797dcb3e 100644
index e70c1340dd2ee..745b3982aa9ad 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -406,6 +406,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -411,6 +411,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 3b992709445b9..822de797dcb3e 100644
return false;
}
@@ -422,6 +423,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -427,6 +428,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id;
@ -24,7 +24,7 @@ index 3b992709445b9..822de797dcb3e 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1207,11 +1215,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1215,11 +1223,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@ -41,10 +41,23 @@ index 3b992709445b9..822de797dcb3e 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index dca26d57b903d..3de463129b7ac 100644
index 2a1eb7cd0a644..b3e95b92b2951 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -739,6 +739,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
@@ -658,10 +658,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
ui::SimpleMenuModel::Delegate* delegate)
: SimpleMenuModel(delegate) {
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
+ if (delegate->IsCommandIdVisible(IDC_EDIT_MENU)) {
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringIdAndVectorIcon(this, IDC_CUT, IDS_CUT, kCutMenuIcon);
AddItemWithStringIdAndVectorIcon(this, IDC_COPY, IDS_COPY, kCopyMenuIcon);
AddItemWithStringIdAndVectorIcon(this, IDC_PASTE, IDS_PASTE, kPasteMenuIcon);
+ }
}
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
@@ -736,6 +738,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
}
}
@ -102,7 +115,7 @@ index dca26d57b903d..3de463129b7ac 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1583,7 +1634,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1596,7 +1649,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@ -111,7 +124,7 @@ index dca26d57b903d..3de463129b7ac 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1598,6 +1649,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
@@ -1611,6 +1664,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@ -142,7 +155,7 @@ index dca26d57b903d..3de463129b7ac 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1763,8 +1838,10 @@ void AppMenuModel::Build() {
@@ -1773,8 +1850,10 @@ void AppMenuModel::Build() {
IDS_CLEAR_BROWSING_DATA,
kTrashCanRefreshIcon);
@ -153,7 +166,7 @@ index dca26d57b903d..3de463129b7ac 100644
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
@@ -1883,6 +1960,11 @@ void AppMenuModel::Build() {
@@ -1896,6 +1975,11 @@ void AppMenuModel::Build() {
}
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
@ -166,10 +179,10 @@ index dca26d57b903d..3de463129b7ac 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index 0824a0b655cde..507021a7c1b66 100644
index ada5cc02223d4..37da48f2e5412 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -225,6 +225,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -232,6 +232,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;
@ -177,7 +190,7 @@ index 0824a0b655cde..507021a7c1b66 100644
bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id,
@@ -265,6 +266,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
int event_flags);
@ -187,10 +200,10 @@ index 0824a0b655cde..507021a7c1b66 100644
// Adds actionable global error menu items to the menu.
// Examples: Extension permissions and sign in errors.
diff --git chrome/browser/ui/views/find_bar_host.cc chrome/browser/ui/views/find_bar_host.cc
index 0ccfe39eb5696..c9424316b6d14 100644
index 86fad4ad36024..8ca6f3e0eb42f 100644
--- chrome/browser/ui/views/find_bar_host.cc
+++ chrome/browser/ui/views/find_bar_host.cc
@@ -581,6 +581,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
@@ -583,6 +583,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
// The BrowserView does Layout for the components that we care about
// positioning relative to, so we ask it to tell us where we should go.
gfx::Rect find_bar_bounds = browser_view_->GetFindBarBoundingBox();
@ -206,7 +219,7 @@ index 0ccfe39eb5696..c9424316b6d14 100644
return gfx::Rect();
}
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index 8dd3620ba2720..bb69a77f9551e 100644
index 19343898d78d9..9b974442606b4 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -114,15 +114,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
@ -279,14 +292,14 @@ index 8dd3620ba2720..bb69a77f9551e 100644
}
content::KeyboardEventProcessingResult BrowserFrame::PreHandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
+ if (!native_browser_frame_)
+ return content::KeyboardEventProcessingResult::NOT_HANDLED;
return native_browser_frame_->PreHandleKeyboardEvent(event);
}
bool BrowserFrame::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
const input::NativeWebKeyboardEvent& event) {
+ if (!native_browser_frame_)
+ return false;
return native_browser_frame_->HandleKeyboardEvent(event);
@ -331,7 +344,7 @@ index 8dd3620ba2720..bb69a77f9551e 100644
return browser_view_->browser()->profile()->IsIncognitoProfile();
}
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 2e973c9e279b0..07d04a364d60c 100644
index 14a8a70d853f6..bf81594947886 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -58,6 +58,7 @@ enum class TabDragKind {
@ -384,11 +397,11 @@ index 2e973c9e279b0..07d04a364d60c 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 4b52ce3877855..7dae2a6b1b151 100644
index 1142fec7a138c..71e381f04adcc 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -353,11 +353,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents;
@@ -350,11 +350,10 @@ using content::WebContents;
using input::NativeWebKeyboardEvent;
using web_modal::WebContentsModalDialogHost;
-namespace {
@ -402,7 +415,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -690,6 +689,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
@@ -694,6 +693,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
return browser_view_->frame()->GetTopInset() - browser_view_->y();
}
@ -417,7 +430,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible();
}
@@ -841,11 +848,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -845,11 +852,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@ -437,10 +450,10 @@ index 4b52ce3877855..7dae2a6b1b151 100644
+ DCHECK(!browser_);
+ browser_ = std::move(browser);
+
// Store the actions so that the access is available for other classes.
if (features::IsSidePanelPinningEnabled()) {
browser_->SetUserData(BrowserActions::UserDataKey(),
@@ -946,8 +963,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -944,8 +961,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_, watermark_view_));
@ -458,7 +471,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1021,7 +1045,9 @@ BrowserView::~BrowserView() {
@@ -1019,7 +1043,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.
@ -468,7 +481,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
// Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor.
@@ -1030,17 +1056,18 @@ BrowserView::~BrowserView() {
@@ -1028,17 +1054,18 @@ BrowserView::~BrowserView() {
// Immersive mode may need to reparent views before they are removed/deleted.
immersive_mode_controller_.reset();
@ -491,7 +504,7 @@ index 4b52ce3877855..7dae2a6b1b151 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.
@@ -1064,7 +1091,9 @@ BrowserView::~BrowserView() {
@@ -1062,7 +1089,9 @@ BrowserView::~BrowserView() {
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
// SidePanelCoordinator.
@ -501,7 +514,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
}
// static
@@ -1625,6 +1654,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
@@ -1618,6 +1647,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
}
@ -515,7 +528,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
// static:
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
const gfx::Rect& contents_webview_bounds,
@@ -2029,9 +2065,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
@@ -2021,9 +2057,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@ -531,7 +544,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -3173,7 +3214,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
@@ -3185,7 +3226,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@ -541,7 +554,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3728,7 +3770,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3740,7 +3782,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@ -551,7 +564,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -4210,11 +4253,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
@@ -4223,11 +4266,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@ -592,7 +605,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
// Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4223,7 +4293,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
@@ -4236,7 +4306,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.
@ -601,7 +614,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4334,8 +4404,10 @@ void BrowserView::Layout(PassKey) {
@@ -4347,8 +4417,10 @@ void BrowserView::Layout(PassKey) {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -614,7 +627,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -4401,6 +4473,11 @@ void BrowserView::AddedToWidget() {
@@ -4414,6 +4486,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@ -626,7 +639,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -4448,13 +4525,9 @@ void BrowserView::AddedToWidget() {
@@ -4455,13 +4532,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@ -642,7 +655,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4828,7 +4901,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4821,7 +4894,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@ -652,7 +665,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
}
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
@@ -5312,6 +5386,8 @@ Profile* BrowserView::GetProfile() {
@@ -5294,6 +5368,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@ -661,7 +674,7 @@ index 4b52ce3877855..7dae2a6b1b151 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -5334,6 +5410,8 @@ void BrowserView::HideDownloadShelf() {
@@ -5316,6 +5392,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@ -671,10 +684,10 @@ index 4b52ce3877855..7dae2a6b1b151 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index e7337adf73caf..6130a2eb8fb5c 100644
index 0e1ac9a2fd806..0b6f9370737f0 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -143,11 +143,16 @@ class BrowserView : public BrowserWindow,
@@ -142,11 +142,16 @@ class BrowserView : public BrowserWindow,
METADATA_HEADER(BrowserView, views::ClientView)
public:
@ -691,9 +704,9 @@ index e7337adf73caf..6130a2eb8fb5c 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -850,6 +855,10 @@ class BrowserView : public BrowserWindow,
// TopContainerBackground::PaintThemeCustomImage for details.
gfx::Point GetThemeOffsetFromBrowserView() const;
@@ -862,6 +867,10 @@ class BrowserView : public BrowserWindow,
base::WeakPtr<content::WebContents> expected_web_contents,
const enterprise_data_protection::UrlSettings& settings);
+ // Called during Toolbar destruction to remove dependent objects that have
+ // dangling references.
@ -702,7 +715,7 @@ index e7337adf73caf..6130a2eb8fb5c 100644
protected:
// Enumerates where the devtools are docked relative to the browser's main
// web contents.
@@ -873,6 +882,8 @@ class BrowserView : public BrowserWindow,
@@ -885,6 +894,8 @@ class BrowserView : public BrowserWindow,
const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds);
@ -712,7 +725,7 @@ index e7337adf73caf..6130a2eb8fb5c 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index a7f0ff7ce857e..0ee1c61503204 100644
index 96b489221fb3a..b372f67cd5c92 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -48,6 +48,10 @@
@ -755,8 +768,8 @@ index a7f0ff7ce857e..0ee1c61503204 100644
return gfx::Size(content_area.width(), content_area.bottom() - top);
}
@@ -131,6 +139,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
return GetHostWidget()->GetNativeView();
@@ -132,6 +140,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
return host_widget ? host_widget->GetNativeView() : nullptr;
}
+ int GetDialogTopY() const {
@ -769,7 +782,7 @@ index a7f0ff7ce857e..0ee1c61503204 100644
// Add/remove observer.
void AddObserver(ModalDialogHostObserver* observer) override {
observer_list_.AddObserver(observer);
@@ -441,6 +456,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
@@ -442,6 +457,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
if (exclusive_access_bubble)
exclusive_access_bubble->RepositionIfVisible();
@ -778,7 +791,7 @@ index a7f0ff7ce857e..0ee1c61503204 100644
// Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
dialog_host_->GetMaximumDialogSize());
@@ -454,6 +471,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
@@ -455,6 +472,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
dialog_host_->NotifyPositionRequiresUpdate();
}
@ -786,7 +799,7 @@ index a7f0ff7ce857e..0ee1c61503204 100644
}
gfx::Size BrowserViewLayout::GetPreferredSize(
@@ -589,6 +607,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
@@ -590,6 +608,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -830,12 +843,12 @@ 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 636be129ccfd6..dbb19d94c1ef9 100644
index 9858a9660ccee..a0cc25fb4fca4 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
@@ -604,6 +604,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
frame->GetNativeWindow()->SetEventTargeter(
std::make_unique<chromeos::InteriorResizeHandleTargeter>());
@@ -606,6 +606,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
return window->GetProperty(chromeos::kWindowStateTypeKey);
})));
#endif
+
+ if (!browser_view->browser()->SupportsWindowFeature(
@ -845,7 +858,7 @@ index 636be129ccfd6..dbb19d94c1ef9 100644
}
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -731,18 +736,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
@@ -733,18 +738,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) {
@ -896,7 +909,7 @@ index 636be129ccfd6..dbb19d94c1ef9 100644
// Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame(
@@ -811,7 +840,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
@@ -813,7 +842,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area;
@ -906,7 +919,7 @@ index 636be129ccfd6..dbb19d94c1ef9 100644
top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) {
@@ -1298,7 +1328,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
@@ -1300,7 +1330,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
}
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@ -931,7 +944,7 @@ index b862ceac7225d..9575440a77d67 100644
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 ad0147f9b8fe8..80aea21bb605a 100644
index 04639b0a2f603..f4cfc16f6b4de 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,
@ -948,10 +961,10 @@ index ad0147f9b8fe8..80aea21bb605a 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 880d83324cfa6..a6a80cd0b3def 100644
index 9ba58b49d613e..90749dcd2d945 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -554,29 +554,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -605,29 +605,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {
@ -994,10 +1007,10 @@ index 880d83324cfa6..a6a80cd0b3def 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index e02fe5d5e6290..9e893b2ff1727 100644
index 05ae08a41e203..1d99112e56e14 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background {
@@ -190,7 +190,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@ -1006,7 +1019,7 @@ index e02fe5d5e6290..9e893b2ff1727 100644
SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent);
@@ -222,12 +222,13 @@ END_METADATA
@@ -220,12 +220,13 @@ END_METADATA
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public:
@ -1022,7 +1035,7 @@ index e02fe5d5e6290..9e893b2ff1727 100644
SetID(VIEW_ID_TOOLBAR);
container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -251,9 +252,24 @@ ToolbarView::~ToolbarView() {
@@ -249,9 +250,24 @@ ToolbarView::~ToolbarView() {
for (const auto& view_and_command : GetViewCommandMap())
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
@ -1047,7 +1060,7 @@ index e02fe5d5e6290..9e893b2ff1727 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
@@ -278,12 +294,12 @@ void ToolbarView::Init() {
@@ -274,12 +290,12 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
@ -1062,8 +1075,8 @@ index e02fe5d5e6290..9e893b2ff1727 100644
download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_);
}
@@ -365,8 +381,10 @@ void ToolbarView::Init() {
}
@@ -359,8 +375,10 @@ void ToolbarView::Init() {
toolbar_divider = std::make_unique<views::View>();
}
std::unique_ptr<media_router::CastToolbarButton> cast;
- if (media_router::MediaRouterEnabled(browser_->profile()))
@ -1074,7 +1087,7 @@ index e02fe5d5e6290..9e893b2ff1727 100644
std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -376,7 +394,8 @@ void ToolbarView::Init() {
@@ -370,7 +388,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button;
@ -1084,29 +1097,21 @@ index e02fe5d5e6290..9e893b2ff1727 100644
send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_);
@@ -461,7 +480,7 @@ void ToolbarView::Init() {
send_tab_to_self_button_ =
container_view_->AddChildView(std::move(send_tab_to_self_button));
@@ -796,7 +815,8 @@ void ToolbarView::Layout(PassKey) {
- if (!features::IsSidePanelPinningEnabled()) {
+ if (!features::IsSidePanelPinningEnabled() && BUTTON_VISIBLE(kSidePanel)) {
if (companion::IsCompanionFeatureEnabled()) {
side_panel_container_ = container_view_->AddChildView(
std::make_unique<SidePanelToolbarContainer>(browser_view_));
@@ -828,7 +847,7 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
- if (features::IsChromeRefresh2023()) {
+ if (features::IsChromeRefresh2023() && !browser_->toolbar_overridden()) {
UpdateClipPath();
}
- UpdateClipPath();
+ if (!browser_->toolbar_overridden())
+ UpdateClipPath();
}
// 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 2437b17ffab96..24ac297165db1 100644
index 78079d1c56460..0585cfd0de16b 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView,
@@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView,
// needs to be displayed.
};
@ -1116,16 +1121,3 @@ index 2437b17ffab96..24ac297165db1 100644
ToolbarView(const ToolbarView&) = delete;
ToolbarView& operator=(const ToolbarView&) = delete;
~ToolbarView() override;
diff --git chrome/browser/ui/web_applications/web_app_menu_model.cc chrome/browser/ui/web_applications/web_app_menu_model.cc
index 09eb9dbce62f6..93e6dde56ca16 100644
--- chrome/browser/ui/web_applications/web_app_menu_model.cc
+++ chrome/browser/ui/web_applications/web_app_menu_model.cc
@@ -216,7 +216,7 @@ void WebAppMenuModel::Build() {
}
if (media_router::MediaRouterEnabled(browser()->profile()))
AddItemWithStringId(IDC_ROUTE_MEDIA, IDS_MEDIA_ROUTER_MENU_ITEM_TITLE);
- if (!features::IsChromeRefresh2023()) {
+ if (!features::IsChromeRefresh2023() && IsCommandIdVisible(IDC_EDIT_MENU)) {
AddSeparator(ui::LOWER_SEPARATOR);
CreateCutCopyPasteMenu();
}

View File

@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index 2068552edfba8..6ef07a0a5b7fa 100644
index a24477b920c5f..4a62dddd15ec7 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -591,7 +591,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@@ -596,7 +596,7 @@ void DevToolsHttpHandler::OnJsonRequest(
base::Value::Dict version;
version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion());
version.Set("WebKit-Version", GetWebKitVersion());
@ -12,10 +12,10 @@ index 2068552edfba8..6ef07a0a5b7fa 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 eef1951861e8b..4800ef3400623 100644
index 6ff681f94dcba..82b93e6d3052a 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -850,7 +850,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@@ -854,7 +854,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
mojo::PendingRemote<network::mojom::URLLoaderFactory>
terminal_external_protocol;
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
@ -24,7 +24,7 @@ index eef1951861e8b..4800ef3400623 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,
@@ -862,6 +862,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@@ -866,6 +866,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
*request_info.initiator_document_token)
: nullptr,
&terminal_external_protocol);
@ -47,10 +47,10 @@ index eef1951861e8b..4800ef3400623 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 62fed61bd87f1..7a4631e9fb6b7 100644
index 8df62dd712ad5..b191ea472448a 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -1100,7 +1100,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
@@ -1104,7 +1104,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {}
@ -59,7 +59,7 @@ index 62fed61bd87f1..7a4631e9fb6b7 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1109,6 +1109,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
@@ -1113,6 +1113,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 62fed61bd87f1..7a4631e9fb6b7 100644
std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 406607bd32563..e32e445aa8923 100644
index 8f457dd1d2afb..6df18f193039e 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -2079,7 +2079,7 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2094,7 +2094,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 406607bd32563..e32e445aa8923 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -2300,6 +2300,21 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2307,6 +2307,21 @@ class CONTENT_EXPORT ContentBrowserClient {
RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -102,7 +102,7 @@ index 406607bd32563..e32e445aa8923 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.
@@ -2357,6 +2372,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2364,6 +2379,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@ -114,7 +114,7 @@ index 406607bd32563..e32e445aa8923 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 a062418a22ec9..9b97b77a1f916 100644
index 7a9334a6cb0c7..031f5eb442331 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 a062418a22ec9..9b97b77a1f916 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -337,6 +340,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -339,6 +342,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@ -139,10 +139,10 @@ index a062418a22ec9..9b97b77a1f916 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index da4a8410a6c5d..41cb281d271dd 100644
index c977c0ed18151..fa6241f2c761d 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -549,6 +549,8 @@ void RenderThreadImpl::Init() {
@@ -556,6 +556,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@ -152,10 +152,10 @@ index da4a8410a6c5d..41cb281d271dd 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 c053926291ea4..6edf384e53cd8 100644
index 32f322e1ef607..f4aabab498e88 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -989,6 +989,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -1000,6 +1000,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@ -172,10 +172,10 @@ index c053926291ea4..6edf384e53cd8 100644
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
return std::make_unique<V8ValueConverterImpl>();
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index d5ab3967f21cc..b6494070f6840 100644
index 8a8faf056bee0..03edc844d5d6e 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -236,6 +236,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -238,6 +238,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif // BUILDFLAG(IS_ANDROID)
@ -186,10 +186,10 @@ index d5ab3967f21cc..b6494070f6840 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 d8a569dde0012..d3e755f66e4ec 100644
index feb037de8a1ad..77d6079e85912 100644
--- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc
@@ -749,7 +749,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
@@ -736,7 +736,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@ -198,7 +198,7 @@ index d8a569dde0012..d3e755f66e4ec 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -758,6 +758,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
@@ -745,6 +745,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
ConfigureNetworkContextParamsForShell(context, network_context_params,
cert_verifier_creation_params);
@ -207,10 +207,10 @@ index d8a569dde0012..d3e755f66e4ec 100644
std::vector<base::FilePath>
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
index 810c7adb1e2b9..1827d957ed012 100644
index 281435690f2b9..6d3cc5b627bb3 100644
--- content/shell/browser/shell_content_browser_client.h
+++ content/shell/browser/shell_content_browser_client.h
@@ -151,7 +151,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
@@ -148,7 +148,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
GetGeolocationSystemPermissionManager() override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@ -220,7 +220,7 @@ index 810c7adb1e2b9..1827d957ed012 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 e4be49f9cccf8..6132a90e5ee93 100644
index 77cf03ca44be9..43928ef67393b 100644
--- headless/lib/browser/headless_content_browser_client.cc
+++ headless/lib/browser/headless_content_browser_client.cc
@@ -301,7 +301,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
@ -241,7 +241,7 @@ index e4be49f9cccf8..6132a90e5ee93 100644
std::string HeadlessContentBrowserClient::GetProduct() {
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
index 90cc52b93e737..882f385844d59 100644
index eae1297164eb0..abab2091ace5f 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 {

View File

@ -103,10 +103,10 @@ index 96c28a7ce3183..3d60ab170e9a5 100644
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 5e4c1f8d6c872..6df7bdba1cff7 100644
index 78b9930f1ca5c..1d93552c3da25 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -47,6 +47,7 @@
@@ -52,6 +52,7 @@
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/hang_watcher.h"
#include "base/threading/platform_thread.h"
@ -114,7 +114,7 @@ index 5e4c1f8d6c872..6df7bdba1cff7 100644
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -1349,6 +1350,11 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1342,6 +1343,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 83defaaaad55d..76486ceed16e5 100644
index 32454297cb12b..1f0b5d5d6a5e4 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -1628,7 +1628,8 @@ bool RenderProcessHostImpl::Init() {
@@ -1639,7 +1639,8 @@ bool RenderProcessHostImpl::Init() {
// initialized because in tests the factory may never have been initialized.
if (!GetBrowserContext()->IsOffTheRecord() &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(

View File

@ -357,16 +357,15 @@ index 171095381e8ac..13407a7809844 100644
annotations, arguments, false, false));
} else {
diff --git components/crash/core/app/crashpad_mac.mm components/crash/core/app/crashpad_mac.mm
index eb5bcfe0234c3..8963b26806922 100644
index 42fe73aefe44f..575ce6732ae43 100644
--- components/crash/core/app/crashpad_mac.mm
+++ components/crash/core/app/crashpad_mac.mm
@@ -17,11 +17,14 @@
@@ -17,10 +17,13 @@
#include "base/apple/foundation_util.h"
#include "base/check.h"
#include "base/files/file_path.h"
+#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/sys_string_conversions.h"
#include "build/branding_buildflags.h"
#include "components/crash/core/app/crash_reporter_client.h"
@ -375,7 +374,7 @@ index eb5bcfe0234c3..8963b26806922 100644
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
@@ -39,15 +42,25 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
@@ -38,15 +41,25 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
std::map<std::string, std::string> process_annotations;
@autoreleasepool {
NSBundle* outer_bundle = base::apple::OuterBundle();
@ -407,7 +406,7 @@ index eb5bcfe0234c3..8963b26806922 100644
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Empty means stable.
@@ -78,12 +91,20 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
@@ -77,12 +90,20 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
}
}
@ -433,7 +432,7 @@ index eb5bcfe0234c3..8963b26806922 100644
} // @autoreleasepool
return process_annotations;
}();
@@ -143,10 +164,10 @@ bool PlatformCrashpadInitialization(
@@ -142,10 +163,10 @@ bool PlatformCrashpadInitialization(
if (initial_client) {
@autoreleasepool {
@ -448,7 +447,7 @@ index eb5bcfe0234c3..8963b26806922 100644
// Is there a way to recover if this fails?
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
@@ -175,6 +196,12 @@ bool PlatformCrashpadInitialization(
@@ -174,6 +195,12 @@ bool PlatformCrashpadInitialization(
"--reset-own-crash-exception-port-to-system-default");
}

View File

@ -1,5 +1,5 @@
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc
index 077694f541d57..928a520485414 100644
index 59b96461bbbbb..b3781cd1c42d9 100644
--- third_party/crashpad/crashpad/client/prune_crash_reports.cc
+++ third_party/crashpad/crashpad/client/prune_crash_reports.cc
@@ -75,13 +75,19 @@ size_t PruneCrashReportDatabase(CrashReportDatabase* database,
@ -40,7 +40,7 @@ index b362e0aadbadd..1588232a6e4d4 100644
virtual ~PruneCondition() {}
diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc
index 5e4119e2175c7..e66600089be04 100644
index 420fbfc958168..eef5955d6f5a8 100644
--- third_party/crashpad/crashpad/client/settings.cc
+++ third_party/crashpad/crashpad/client/settings.cc
@@ -117,7 +117,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
@ -184,7 +184,7 @@ index a2d6f7fb482a7..a5b6ae04f897b 100644
if (crashpad_is_win) {
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
index 5bd2889eda975..bf3ff4bfcf5c8 100644
index c224871a1de23..3186b9a45428d 100644
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
@@ -297,6 +297,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(

View File

@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index fe76e8806f05f..30b184844a5b5 100644
index 0d9ed98759c4b..48ed045b691a1 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -18,6 +18,7 @@

View File

@ -64,7 +64,7 @@ index b9b147c8c11df..1e3acf4e679ae 100644
std::unique_ptr<StreamContainer> stream_container(
new StreamContainer(tab_id, embedded, handler_url, extension_id,
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index 2bf778dd0c85d..c75d693c6487b 100644
index 55b798350ae8d..e4f7f261efcb3 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -142,12 +142,13 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@ -238,7 +238,7 @@ index 8b515b7b8c353..f8e4106ac26d4 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index c9793db28037b..e5f017bf2f2f8 100644
index 8e512cd3c826e..0cfda0e69be23 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -353,9 +353,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@ -261,7 +261,7 @@ index c9793db28037b..e5f017bf2f2f8 100644
base::BindOnce(&ProcessManager::HandleCloseExtensionHost,
weak_ptr_factory_.GetWeakPtr()));
diff --git extensions/common/extensions_client.cc extensions/common/extensions_client.cc
index 5142f341b8392..0589a1f1466f5 100644
index c313f6f98cabc..d49f624cce881 100644
--- extensions/common/extensions_client.cc
+++ extensions/common/extensions_client.cc
@@ -8,6 +8,7 @@
@ -269,9 +269,9 @@ index 5142f341b8392..0589a1f1466f5 100644
#include "base/check.h"
#include "base/notreached.h"
+#include "cef/libcef/features/features.h"
#include "extensions/common/extension_icon_set.h"
#include "extensions/common/extensions_api_provider.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/features/json_feature_provider_source.h"
@@ -25,7 +26,10 @@ ExtensionsClient* g_client = nullptr;
} // namespace

View File

@ -1,8 +1,8 @@
diff --git .gn .gn
index e6f5cbc9c49f9..f64ed7ae77ea1 100644
index 44a11ec90ec9b..4c35b35a97f28 100644
--- .gn
+++ .gn
@@ -155,6 +155,8 @@ exec_script_whitelist =
@@ -158,6 +158,8 @@ exec_script_whitelist =
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
"//chrome/version.gni",
@ -12,7 +12,7 @@ index e6f5cbc9c49f9..f64ed7ae77ea1 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 3ede70d5d17be..764ce45183919 100644
index 2902e374bb1a2..875924ff22c23 100644
--- BUILD.gn
+++ BUILD.gn
@@ -20,6 +20,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@ -20,10 +20,10 @@ index 3ede70d5d17be..764ce45183919 100644
import("//build/gn_logs.gni")
import("//build/util/generate_wrapper.gni")
+import("//cef/libcef/features/features.gni")
import("//chrome/enterprise_companion/buildflags.gni")
import("//components/enterprise/buildflags/buildflags.gni")
import("//components/nacl/features.gni")
import("//device/vr/buildflags/buildflags.gni")
@@ -275,6 +276,10 @@ group("gn_all") {
@@ -280,6 +281,10 @@ group("gn_all") {
deps += root_extra_deps
@ -76,20 +76,20 @@ index 1da479dd5eebc..ff9c7e467997c 100644
- visual_studio_runtime_dirs = []
}
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 87e4b167b6a55..6dafb9ac4ed94 100644
index e75651677c098..9288caaf195e1 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -5,6 +5,7 @@
import("//ash/ambient/resources/resources.gni")
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/locales.gni")
+import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//components/compose/features.gni")
@@ -82,6 +83,10 @@ template("chrome_repack_percent") {
"//ui/chromeos/resources",
]
@@ -89,6 +90,10 @@ template("chrome_repack_percent") {
]
}
}
+ if (enable_cef) {
+ sources += [ "$root_gen_dir/cef/cef_resources.pak" ]

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index f3ca54d7277ac..16a52e64f3078 100644
index 2450f2cece033..73c3bf885cf06 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -1312,6 +1312,15 @@
@@ -1341,6 +1341,15 @@
# END "everything else" section.
# Everything but chrome/, components/, content/, and ios/

View File

@ -48,7 +48,7 @@ index 23d0611fdb2b5..81fd1055e926e 100644
}
diff --git ui/gtk/native_theme_gtk.cc ui/gtk/native_theme_gtk.cc
index d69b17b004120..5175ea3a785a3 100644
index 0b765216c727f..d2c1e21e19b98 100644
--- ui/gtk/native_theme_gtk.cc
+++ ui/gtk/native_theme_gtk.cc
@@ -164,9 +164,11 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings,
@ -107,7 +107,7 @@ index fc32dfb0de44f..44ca8103247b1 100644
explicit NativeTheme(
bool should_only_use_dark_colors,
diff --git ui/native_theme/native_theme_mac.mm ui/native_theme/native_theme_mac.mm
index 9ca3120cfe3ac..c29c17330a7e5 100644
index a2dbe84d61e09..aff4aad15e069 100644
--- ui/native_theme/native_theme_mac.mm
+++ ui/native_theme/native_theme_mac.mm
@@ -586,11 +586,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
@ -129,10 +129,10 @@ index 9ca3120cfe3ac..c29c17330a7e5 100644
theme->NotifyOnNativeThemeUpdated();
}];
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
index 547872076d126..14d0e817f3243 100644
index b5bdcf72d8b33..e3f04dda5c1a6 100644
--- ui/native_theme/native_theme_win.cc
+++ ui/native_theme/native_theme_win.cc
@@ -673,14 +673,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -675,14 +675,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// Windows high contrast modes are entirely different themes,
// so let them take priority over dark mode.
// ...unless --force-dark-mode was specified in which case caveat emptor.
@ -152,7 +152,7 @@ index 547872076d126..14d0e817f3243 100644
return NativeTheme::CalculatePreferredColorScheme();
// According to the spec, the preferred color scheme for web content is 'dark'
@@ -1671,8 +1674,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
@@ -1673,8 +1676,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
}
void NativeThemeWin::UpdateDarkModeStatus() {

View File

@ -1,5 +1,5 @@
diff --git chrome/common/media/component_widevine_cdm_hint_file_linux.cc chrome/common/media/component_widevine_cdm_hint_file_linux.cc
index 60033bb10af50..afb0d23c07a34 100644
index 1084e82141790..ebd1b051d81b9 100644
--- chrome/common/media/component_widevine_cdm_hint_file_linux.cc
+++ chrome/common/media/component_widevine_cdm_hint_file_linux.cc
@@ -18,6 +18,7 @@
@ -8,9 +8,9 @@ index 60033bb10af50..afb0d23c07a34 100644
#include "chrome/common/chrome_paths.h"
+#include "third_party/widevine/cdm/widevine_cdm_common.h"
namespace {
@@ -25,12 +26,31 @@ namespace {
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "base/command_line.h"
@@ -32,6 +33,26 @@ namespace {
const char kPath[] = "Path";
const char kLastBundledVersion[] = "LastBundledVersion";
@ -37,16 +37,19 @@ index 60033bb10af50..afb0d23c07a34 100644
// Returns the hint file contents as a Value::Dict. Returned result may be an
// empty dictionary if the hint file does not exist or is formatted incorrectly.
base::Value::Dict GetHintFileContents() {
base::FilePath hint_file_path;
@@ -58,8 +79,7 @@ base::Value::Dict GetHintFileContents() {
hint_file_path = command_line->GetSwitchValuePath(
switches::kCrosWidevineComponentUpdatedHintFile);
#else
- CHECK(base::PathService::Get(chrome::FILE_COMPONENT_WIDEVINE_CDM_HINT,
- &hint_file_path));
+ CHECK(GetHintFilePath(&hint_file_path));
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
DVLOG(1) << __func__ << " checking " << hint_file_path;
if (!base::PathExists(hint_file_path)) {
@@ -65,8 +85,7 @@ bool UpdateWidevineCdmHintFile(const base::FilePath& cdm_base_path,
DCHECK(!cdm_base_path.empty());
@@ -98,8 +118,7 @@ bool UpdateWidevineCdmHintFile(const base::FilePath& cdm_base_path,
NOTREACHED_NORETURN() << "Lacros should not be updating the hint file.";
#else
base::FilePath hint_file_path;
- CHECK(base::PathService::Get(chrome::FILE_COMPONENT_WIDEVINE_CDM_HINT,
- &hint_file_path));

Some files were not shown because too many files have changed in this diff Show More