Update to Chromium version 117.0.5895.0 (#1171312)

This commit is contained in:
Marshall Greenblatt
2023-07-20 18:11:34 -04:00
parent 1353677a98
commit 8b46735b79
78 changed files with 489 additions and 476 deletions

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index 728db9db53e6c..6a6f6bede9985 100644
index 02cc754da4225..58b21e3918231 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -408,6 +408,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -400,6 +400,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 728db9db53e6c..6a6f6bede9985 100644
return false;
}
@@ -424,6 +425,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -416,6 +417,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id;
@ -24,7 +24,7 @@ index 728db9db53e6c..6a6f6bede9985 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1155,11 +1163,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1147,11 +1155,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@ -41,7 +41,7 @@ index 728db9db53e6c..6a6f6bede9985 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 9bbe98269afb6..99ba07e148f84 100644
index 1e7083240e30c..dcac39ae73469 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -585,6 +585,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
@ -102,7 +102,7 @@ index 9bbe98269afb6..99ba07e148f84 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1303,7 +1354,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1315,7 +1366,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@ -111,7 +111,7 @@ index 9bbe98269afb6..99ba07e148f84 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1318,6 +1369,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
@@ -1330,6 +1381,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@ -142,8 +142,8 @@ index 9bbe98269afb6..99ba07e148f84 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if ((command_id == IDC_RECENT_TABS_MENU) ||
(command_id == AppMenuModel::kMinRecentTabsCommandId)) {
@@ -1468,11 +1543,15 @@ void AppMenuModel::Build() {
}
@@ -1497,11 +1572,15 @@ void AppMenuModel::Build() {
kDefaultIconSize));
}
- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR
@ -163,7 +163,7 @@ index 9bbe98269afb6..99ba07e148f84 100644
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
@@ -1545,9 +1624,13 @@ void AppMenuModel::Build() {
@@ -1572,9 +1651,13 @@ void AppMenuModel::Build() {
kMoreToolsMenuItem);
if (!features::IsChromeRefresh2023()) {
@ -180,7 +180,7 @@ index 9bbe98269afb6..99ba07e148f84 100644
}
if (!features::IsChromeRefresh2023()) {
@@ -1629,6 +1712,11 @@ void AppMenuModel::Build() {
@@ -1656,6 +1739,11 @@ void AppMenuModel::Build() {
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
}
@ -193,10 +193,10 @@ index 9bbe98269afb6..99ba07e148f84 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index 4d70f711ce633..2a3834702dca2 100644
index 4d50034fc658d..a23a871f7f17d 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -194,6 +194,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -195,6 +195,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;
@ -204,9 +204,9 @@ index 4d70f711ce633..2a3834702dca2 100644
bool IsCommandIdAlerted(int command_id) const override;
bool GetAcceleratorForCommandId(int command_id,
ui::Accelerator* accelerator) const override;
@@ -218,6 +219,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
// Appends a zoom menu (without separators).
void CreateZoomMenu();
@@ -227,6 +228,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
// took to select the command.
void LogMenuMetrics(int command_id);
+ bool IsCommandIdEnabledInternal(int command_id) const;
+
@ -231,10 +231,10 @@ index 59024587ef6b7..0c30aa71768cf 100644
void FindBarHost::RegisterAccelerators() {
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index d9f30b0876f4a..c4675bf8b95b7 100644
index 235307773037f..56a5af5e44bd6 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -75,15 +75,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) {
@@ -90,15 +90,23 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
////////////////////////////////////////////////////////////////////////////////
// BrowserFrame, public:
@ -260,7 +260,7 @@ index d9f30b0876f4a..c4675bf8b95b7 100644
}
BrowserFrame::~BrowserFrame() {}
@@ -178,6 +186,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
@@ -193,6 +201,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
}
int BrowserFrame::GetTopInset() const {
@ -273,7 +273,7 @@ index d9f30b0876f4a..c4675bf8b95b7 100644
return browser_frame_view_->GetTopInset(false);
}
@@ -194,6 +208,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
@@ -209,6 +223,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
}
bool BrowserFrame::UseCustomFrame() const {
@ -282,7 +282,7 @@ index d9f30b0876f4a..c4675bf8b95b7 100644
return native_browser_frame_->UseCustomFrame();
}
@@ -207,20 +223,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
@@ -222,20 +238,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
@ -313,7 +313,7 @@ index d9f30b0876f4a..c4675bf8b95b7 100644
browser_frame_view_->OnBrowserViewInitViewsComplete();
}
@@ -300,6 +326,8 @@ BrowserFrame::GetCustomTheme() const {
@@ -315,6 +341,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
}
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
@ -322,16 +322,16 @@ index d9f30b0876f4a..c4675bf8b95b7 100644
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
IsVisibleOnAllWorkspaces());
@@ -411,6 +439,8 @@ void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
@@ -426,6 +454,8 @@ void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const {
ui::ColorProviderKey BrowserFrame::GetColorProviderKey() const {
auto key = Widget::GetColorProviderKey();
+ if (!browser_view_)
+ return key;
// color_mode.
[this, &key]() {
@@ -558,5 +588,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
@@ -580,5 +610,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
}
bool BrowserFrame::IsIncognitoBrowser() const {
@ -341,7 +341,7 @@ index d9f30b0876f4a..c4675bf8b95b7 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 965bd2525b212..6a637609b65e9 100644
index 77ca1dbf118f9..c60711991d093 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -61,7 +61,9 @@ enum class TabDragKind {
@ -355,10 +355,10 @@ index 965bd2525b212..6a637609b65e9 100644
BrowserFrame(const BrowserFrame&) = delete;
BrowserFrame& operator=(const BrowserFrame&) = delete;
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 306affc1d9573..3a7cad35c6352 100644
index 7005d2c0be663..8d55893627837 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -320,11 +320,10 @@ using content::NativeWebKeyboardEvent;
@@ -327,11 +327,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents;
using web_modal::WebContentsModalDialogHost;
@ -373,7 +373,7 @@ index 306affc1d9573..3a7cad35c6352 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -793,11 +792,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -800,11 +799,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@ -397,7 +397,7 @@ index 306affc1d9573..3a7cad35c6352 100644
SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -841,7 +851,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -848,7 +858,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
@ -405,7 +405,7 @@ index 306affc1d9573..3a7cad35c6352 100644
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -897,8 +906,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -904,8 +913,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@ -423,7 +423,7 @@ index 306affc1d9573..3a7cad35c6352 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1086,12 +1102,14 @@ gfx::Size BrowserView::GetWebAppFrameToolbarPreferredSize() const {
@@ -1089,12 +1105,14 @@ gfx::Size BrowserView::GetWebAppFrameToolbarPreferredSize() const {
#if BUILDFLAG(IS_MAC)
bool BrowserView::UsesImmersiveFullscreenMode() const {
@ -440,7 +440,7 @@ index 306affc1d9573..3a7cad35c6352 100644
}
bool BrowserView::UsesImmersiveFullscreenTabbedMode() const {
@@ -1816,6 +1834,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
@@ -1820,6 +1838,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled())
return false;
@ -449,7 +449,7 @@ index 306affc1d9573..3a7cad35c6352 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -2759,7 +2779,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
@@ -2817,7 +2837,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@ -459,7 +459,7 @@ index 306affc1d9573..3a7cad35c6352 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3295,7 +3316,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3353,7 +3374,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@ -469,7 +469,7 @@ index 306affc1d9573..3a7cad35c6352 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -3852,8 +3874,10 @@ void BrowserView::Layout() {
@@ -3928,8 +3950,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -482,7 +482,7 @@ index 306affc1d9573..3a7cad35c6352 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -3919,6 +3943,11 @@ void BrowserView::AddedToWidget() {
@@ -3995,6 +4019,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@ -494,7 +494,7 @@ index 306affc1d9573..3a7cad35c6352 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -3966,13 +3995,9 @@ void BrowserView::AddedToWidget() {
@@ -4042,13 +4071,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@ -510,7 +510,7 @@ index 306affc1d9573..3a7cad35c6352 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4377,7 +4402,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4453,7 +4478,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@ -520,7 +520,7 @@ index 306affc1d9573..3a7cad35c6352 100644
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -4748,6 +4774,8 @@ Profile* BrowserView::GetProfile() {
@@ -4822,6 +4848,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@ -529,7 +529,7 @@ index 306affc1d9573..3a7cad35c6352 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -4770,6 +4798,8 @@ void BrowserView::HideDownloadShelf() {
@@ -4844,6 +4872,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@ -539,10 +539,10 @@ index 306affc1d9573..3a7cad35c6352 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index bde91001c6f75..a7434456fc75f 100644
index e149a732b5d06..b8ae00f1e44b8 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -123,11 +123,16 @@ class BrowserView : public BrowserWindow,
@@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow,
public webapps::AppBannerManager::Observer {
public:
METADATA_HEADER(BrowserView);
@ -559,7 +559,7 @@ index bde91001c6f75..a7434456fc75f 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -783,6 +788,12 @@ class BrowserView : public BrowserWindow,
@@ -788,6 +793,12 @@ class BrowserView : public BrowserWindow,
return web_app_frame_toolbar();
}
@ -573,7 +573,7 @@ index bde91001c6f75..a7434456fc75f 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 25fa3e495f4b1..21ef37e0b2495 100644
index f6c2991d8c453..459f39740a2de 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -47,6 +47,10 @@
@ -587,7 +587,7 @@ index 25fa3e495f4b1..21ef37e0b2495 100644
using views::View;
using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost;
@@ -569,6 +573,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
@@ -566,6 +570,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -602,10 +602,10 @@ index 25fa3e495f4b1..21ef37e0b2495 100644
bool toolbar_visible = delegate_->IsToolbarVisible();
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
index 5e059b9878fc2..c1f6fbcd40ec4 100644
index 8267a265a8e10..ee08f18e96a34 100644
--- chrome/browser/ui/views/frame/contents_web_view.cc
+++ chrome/browser/ui/views/frame/contents_web_view.cc
@@ -26,6 +26,11 @@
@@ -23,6 +23,11 @@
ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
: views::WebView(browser_context),
status_bubble_(nullptr) {
@ -618,7 +618,7 @@ index 5e059b9878fc2..c1f6fbcd40ec4 100644
ContentsWebView::~ContentsWebView() {
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 21e08a062b192..c9b6ba5cc7538 100644
index 09e828d1e079e..7f42618d67e77 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -94,6 +94,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@ -635,10 +635,10 @@ index 21e08a062b192..c9b6ba5cc7538 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 fb8bfdbcb2bd5..741d84ecba4ea 100644
index dc792bea0ab88..e02cdd3214b1d 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -559,29 +559,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -560,29 +560,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {