Update to Chromium version 128.0.6613.0 (#1331488)

This commit is contained in:
Marshall Greenblatt
2024-07-29 13:09:20 -04:00
parent a6c00b2ff6
commit 446b7d6535
96 changed files with 798 additions and 877 deletions

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index e70c1340dd2ee..745b3982aa9ad 100644
index 0108532731b73..ddfcc75ae9801 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -411,6 +411,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -412,6 +412,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
// choose to not implement CommandUpdaterDelegate inside this class and
// therefore command_updater_ doesn't have the delegate set).
if (!SupportsCommand(id) || !IsCommandEnabled(id)) {
@@ -10,7 +10,7 @@ index e70c1340dd2ee..745b3982aa9ad 100644
return false;
}
@@ -427,6 +428,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -428,6 +429,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id;
@@ -24,7 +24,7 @@ index e70c1340dd2ee..745b3982aa9ad 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1215,11 +1223,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1217,11 +1225,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@@ -39,12 +39,12 @@ index e70c1340dd2ee..745b3982aa9ad 100644
+ browser_->toolbar_overridden();
}
bool BrowserCommandController::IsWebAppOrCustomTab() const {
void BrowserCommandController::InitCommandState() {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 2a1eb7cd0a644..b3e95b92b2951 100644
index 28f18cbca8a49..31cec595eab48 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -658,10 +658,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
@@ -715,10 +715,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
ui::SimpleMenuModel::Delegate* delegate)
: SimpleMenuModel(delegate) {
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
@@ -57,7 +57,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
}
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
@@ -736,6 +738,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
@@ -783,6 +785,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
}
}
@@ -66,7 +66,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
+
+void FilterMenuModel(ui::SimpleMenuModel* model,
+ const IsVisibleCallback& is_visible) {
+ absl::optional<size_t> last_separator;
+ std::optional<size_t> last_separator;
+ size_t visible_ct = 0;
+ for (size_t i = 0; i < model->GetItemCount(); ++i) {
+ const auto type = model->GetTypeAt(i);
@@ -115,7 +115,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1596,7 +1649,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1676,7 +1729,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@@ -124,7 +124,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1611,6 +1664,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
@@ -1692,6 +1745,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@@ -155,7 +155,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1773,8 +1850,10 @@ void AppMenuModel::Build() {
@@ -1854,8 +1931,10 @@ void AppMenuModel::Build() {
IDS_CLEAR_BROWSING_DATA,
kTrashCanRefreshIcon);
@@ -166,7 +166,7 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
@@ -1896,6 +1975,11 @@ void AppMenuModel::Build() {
@@ -1967,6 +2046,11 @@ void AppMenuModel::Build() {
}
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -179,10 +179,10 @@ index 2a1eb7cd0a644..b3e95b92b2951 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index ada5cc02223d4..37da48f2e5412 100644
index 3451f237e2df0..dfcc57b661a45 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -232,6 +232,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -233,6 +233,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override;
@@ -190,7 +190,7 @@ index ada5cc02223d4..37da48f2e5412 100644
bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id,
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -273,6 +274,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
int event_flags);
@@ -397,10 +397,10 @@ index 14a8a70d853f6..bf81594947886 100644
// regenerated.
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 1142fec7a138c..71e381f04adcc 100644
index ab37088b71722..f4e1786b902c9 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -350,11 +350,10 @@ using content::WebContents;
@@ -354,11 +354,10 @@ using content::WebContents;
using input::NativeWebKeyboardEvent;
using web_modal::WebContentsModalDialogHost;
@@ -415,7 +415,7 @@ index 1142fec7a138c..71e381f04adcc 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -694,6 +693,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
@@ -698,6 +697,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
return browser_view_->frame()->GetTopInset() - browser_view_->y();
}
@@ -430,7 +430,7 @@ index 1142fec7a138c..71e381f04adcc 100644
bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible();
}
@@ -845,11 +852,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -849,11 +856,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -453,7 +453,7 @@ index 1142fec7a138c..71e381f04adcc 100644
SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -944,8 +961,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -948,8 +965,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_, watermark_view_));
@@ -461,7 +461,7 @@ index 1142fec7a138c..71e381f04adcc 100644
- std::make_unique<ToolbarView>(browser_.get(), this));
+ toolbar_ = OverrideCreateToolbar();
+ if (!toolbar_) {
+ toolbar_ = new ToolbarView(browser_.get(), this, absl::nullopt);
+ toolbar_ = new ToolbarView(browser_.get(), this, std::nullopt);
+ } else {
+ browser_->set_toolbar_overridden(true);
+ // Update state that depends on the above flag.
@@ -471,7 +471,17 @@ index 1142fec7a138c..71e381f04adcc 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1019,7 +1043,9 @@ BrowserView::~BrowserView() {
@@ -1016,7 +1040,9 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
BrowserView::~BrowserView() {
+ if (browser_) {
browser_->GetFeatures().TearDownPreBrowserViewDestruction();
+ }
// Destroy the top controls slide controller first as it depends on the
// tabstrip model and the browser frame.
@@ -1024,7 +1050,9 @@ BrowserView::~BrowserView() {
// All the tabs should have been destroyed already. If we were closed by the
// OS with some tabs than the NativeBrowserFrame should have destroyed them.
@@ -481,7 +491,7 @@ index 1142fec7a138c..71e381f04adcc 100644
// Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor.
@@ -1028,17 +1054,18 @@ BrowserView::~BrowserView() {
@@ -1033,17 +1061,18 @@ BrowserView::~BrowserView() {
// Immersive mode may need to reparent views before they are removed/deleted.
immersive_mode_controller_.reset();
@@ -502,19 +512,9 @@ index 1142fec7a138c..71e381f04adcc 100644
}
+ }
// The TabStrip attaches a listener to the model. Make sure we shut down the
// TabStrip first so that it can cleanly remove the listener.
@@ -1062,7 +1089,9 @@ BrowserView::~BrowserView() {
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
// SidePanelCoordinator.
+ if (browser()) {
SidePanelUI::RemoveSidePanelUIForBrowser(browser());
+ }
}
// static
@@ -1618,6 +1647,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
#if BUILDFLAG(ENTERPRISE_WATERMARK)
// `watermark_view_` is a raw pointer to a child view, so it needs to be set
@@ -1604,6 +1633,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
}
@@ -528,7 +528,7 @@ index 1142fec7a138c..71e381f04adcc 100644
// static:
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
const gfx::Rect& contents_webview_bounds,
@@ -2021,9 +2057,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
@@ -2028,9 +2064,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@@ -544,7 +544,7 @@ index 1142fec7a138c..71e381f04adcc 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -3185,7 +3226,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
@@ -3242,7 +3283,8 @@ views::View* BrowserView::GetTopContainer() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@@ -554,7 +554,7 @@ index 1142fec7a138c..71e381f04adcc 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3740,7 +3782,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3797,7 +3839,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@@ -564,7 +564,7 @@ index 1142fec7a138c..71e381f04adcc 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -4223,11 +4266,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
@@ -4280,11 +4323,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@@ -583,7 +583,7 @@ index 1142fec7a138c..71e381f04adcc 100644
+ }
+#endif
+
+ absl::optional<SkRegion> draggable_region;
+ std::optional<SkRegion> draggable_region;
+
// Window for PWAs with window-controls-overlay display override should claim
// mouse events that fall within the draggable region.
@@ -605,7 +605,7 @@ index 1142fec7a138c..71e381f04adcc 100644
// Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4236,7 +4306,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
@@ -4293,7 +4363,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
// Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar.
@@ -614,7 +614,7 @@ index 1142fec7a138c..71e381f04adcc 100644
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4347,8 +4417,10 @@ void BrowserView::Layout(PassKey) {
@@ -4404,8 +4474,10 @@ void BrowserView::Layout(PassKey) {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -627,7 +627,7 @@ index 1142fec7a138c..71e381f04adcc 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -4414,6 +4486,11 @@ void BrowserView::AddedToWidget() {
@@ -4471,6 +4543,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -639,7 +639,7 @@ index 1142fec7a138c..71e381f04adcc 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -4455,13 +4532,9 @@ void BrowserView::AddedToWidget() {
@@ -4512,13 +4589,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -655,7 +655,7 @@ index 1142fec7a138c..71e381f04adcc 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4821,7 +4894,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4886,7 +4959,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -665,7 +665,7 @@ index 1142fec7a138c..71e381f04adcc 100644
}
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
@@ -5294,6 +5368,8 @@ Profile* BrowserView::GetProfile() {
@@ -5387,6 +5461,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -674,7 +674,7 @@ index 1142fec7a138c..71e381f04adcc 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -5316,6 +5392,8 @@ void BrowserView::HideDownloadShelf() {
@@ -5409,6 +5485,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -684,10 +684,10 @@ index 1142fec7a138c..71e381f04adcc 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 0e1ac9a2fd806..0b6f9370737f0 100644
index 89816fdfe6b77..8974f7ca4ae31 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -142,11 +142,16 @@ class BrowserView : public BrowserWindow,
@@ -143,11 +143,16 @@ class BrowserView : public BrowserWindow,
METADATA_HEADER(BrowserView, views::ClientView)
public:
@@ -704,7 +704,7 @@ index 0e1ac9a2fd806..0b6f9370737f0 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -862,6 +867,10 @@ class BrowserView : public BrowserWindow,
@@ -852,6 +857,10 @@ class BrowserView : public BrowserWindow,
base::WeakPtr<content::WebContents> expected_web_contents,
const enterprise_data_protection::UrlSettings& settings);
@@ -715,7 +715,7 @@ index 0e1ac9a2fd806..0b6f9370737f0 100644
protected:
// Enumerates where the devtools are docked relative to the browser's main
// web contents.
@@ -885,6 +894,8 @@ class BrowserView : public BrowserWindow,
@@ -875,6 +884,8 @@ class BrowserView : public BrowserWindow,
const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds);
@@ -814,7 +814,7 @@ index 96b489221fb3a..b372f67cd5c92 100644
bool toolbar_visible = delegate_->IsToolbarVisible();
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h
index 29ad5517bd3c9..b0fe093467abc 100644
index 06ff29d3f9b27..65301b6ecf076 100644
--- chrome/browser/ui/views/frame/browser_view_layout_delegate.h
+++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h
@@ -28,6 +28,7 @@ class BrowserViewLayoutDelegate {
@@ -843,10 +843,10 @@ index 71445bfab1824..c77750ea2a820 100644
ContentsWebView::~ContentsWebView() {
diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
index 9858a9660ccee..a0cc25fb4fca4 100644
index 5778e6329ad87..9c594b43d16cd 100644
--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
+++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
@@ -606,6 +606,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
@@ -609,6 +609,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
return window->GetProperty(chromeos::kWindowStateTypeKey);
})));
#endif
@@ -858,7 +858,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644
}
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -733,18 +738,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
@@ -736,18 +741,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) {
@@ -909,7 +909,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644
// Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame(
@@ -813,7 +842,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
@@ -816,7 +845,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area;
@@ -919,7 +919,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644
top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) {
@@ -1300,7 +1330,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
@@ -1315,7 +1345,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
}
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@@ -930,7 +930,7 @@ index 9858a9660ccee..a0cc25fb4fca4 100644
gfx::Size PictureInPictureBrowserFrameView::GetNonClientViewAreaSize() const {
diff --git chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
index b862ceac7225d..9575440a77d67 100644
index 33c6444869375..d74818698d81a 100644
--- chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
+++ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
@@ -27,7 +27,8 @@ OmniboxPopupCloser::OmniboxPopupCloser(BrowserView* browser_view)
@@ -940,14 +940,14 @@ index b862ceac7225d..9575440a77d67 100644
- if (!browser_view_->browser()->is_delete_scheduled() &&
+ if (browser_view_->browser() &&
+ !browser_view_->browser()->is_delete_scheduled() &&
event->type() == ui::ET_MOUSE_PRESSED) {
event->type() == ui::EventType::kMousePressed) {
LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view);
diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc
index 04639b0a2f603..f4cfc16f6b4de 100644
index 0bd4cfc52548b..8515cec793563 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -96,6 +96,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
};
for (PageActionIconType type : params.types_enabled) {
@@ -961,10 +961,10 @@ index 04639b0a2f603..f4cfc16f6b4de 100644
case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon(
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 9ba58b49d613e..90749dcd2d945 100644
index 28cff32121b69..443e43779e8f5 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -605,29 +605,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -606,29 +606,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {
@@ -1007,10 +1007,10 @@ index 9ba58b49d613e..90749dcd2d945 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 05ae08a41e203..1d99112e56e14 100644
index 0ef2fcb160af2..010279ae8e5dc 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -190,7 +190,7 @@ class TabstripLikeBackground : public views::Background {
@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@@ -1019,13 +1019,13 @@ index 05ae08a41e203..1d99112e56e14 100644
SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent);
@@ -220,12 +220,13 @@ END_METADATA
@@ -223,12 +223,13 @@ END_METADATA
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public:
-ToolbarView::ToolbarView(Browser* browser, BrowserView* browser_view)
+ToolbarView::ToolbarView(Browser* browser, BrowserView* browser_view,
+ absl::optional<DisplayMode> display_mode)
+ std::optional<DisplayMode> display_mode)
: AnimationDelegateViews(this),
browser_(browser),
browser_view_(browser_view),
@@ -1035,7 +1035,7 @@ index 05ae08a41e203..1d99112e56e14 100644
SetID(VIEW_ID_TOOLBAR);
container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -249,9 +250,24 @@ ToolbarView::~ToolbarView() {
@@ -255,9 +256,24 @@ ToolbarView::~ToolbarView() {
for (const auto& view_and_command : GetViewCommandMap())
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
@@ -1060,7 +1060,7 @@ index 05ae08a41e203..1d99112e56e14 100644
#if defined(USE_AURA)
// Avoid generating too many occlusion tracking calculation events before this
// function returns. The occlusion status will be computed only once once this
@@ -274,12 +290,12 @@ void ToolbarView::Init() {
@@ -280,12 +296,12 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
@@ -1075,7 +1075,7 @@ index 05ae08a41e203..1d99112e56e14 100644
download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_);
}
@@ -359,8 +375,10 @@ void ToolbarView::Init() {
@@ -365,8 +381,10 @@ void ToolbarView::Init() {
toolbar_divider = std::make_unique<views::View>();
}
std::unique_ptr<media_router::CastToolbarButton> cast;
@@ -1087,7 +1087,7 @@ index 05ae08a41e203..1d99112e56e14 100644
std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -370,7 +388,8 @@ void ToolbarView::Init() {
@@ -376,7 +394,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button;
@@ -1097,7 +1097,7 @@ index 05ae08a41e203..1d99112e56e14 100644
send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_);
@@ -796,7 +815,8 @@ void ToolbarView::Layout(PassKey) {
@@ -810,7 +829,8 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
@@ -1108,16 +1108,16 @@ index 05ae08a41e203..1d99112e56e14 100644
// Use two-pass solution to avoid the overflow button interfering with toolbar
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index 78079d1c56460..0585cfd0de16b 100644
index cb361877682b9..5f13a11a494a1 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView,
@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView,
// needs to be displayed.
};
- ToolbarView(Browser* browser, BrowserView* browser_view);
+ ToolbarView(Browser* browser, BrowserView* browser_view,
+ absl::optional<DisplayMode> display_mode);
+ std::optional<DisplayMode> display_mode);
ToolbarView(const ToolbarView&) = delete;
ToolbarView& operator=(const ToolbarView&) = delete;
~ToolbarView() override;