mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 114.0.5735.0 (#1135570)
- Mac: 13.3 SDK (Xcode 14.3) is now supported (see https://crbug.com/1431897). - Mac: Removed UnderlayOpenGLHostingWindow which is no longer used.
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
|
||||
index dc085f13cb279..bad8857a44807 100644
|
||||
index 2a14f1b7c2f51..e679d7a24783b 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -389,6 +389,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -394,6 +394,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 dc085f13cb279..bad8857a44807 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -405,6 +406,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -410,6 +411,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
DCHECK(command_updater_.IsCommandEnabled(id))
|
||||
<< "Invalid/disabled command " << id;
|
||||
|
||||
@ -24,7 +24,7 @@ index dc085f13cb279..bad8857a44807 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1050,11 +1058,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1089,11 +1097,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@ -41,10 +41,10 @@ index dc085f13cb279..bad8857a44807 100644
|
||||
|
||||
bool BrowserCommandController::IsWebAppOrCustomTab() const {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index f505dbc9aa7b9..de2fa3e6732f5 100644
|
||||
index 3aa4da01852a1..59544aa46dc82 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -157,6 +157,57 @@ absl::optional<std::u16string> GetInstallPWAAppMenuItemName(Browser* browser) {
|
||||
@@ -169,6 +169,57 @@ absl::optional<std::u16string> GetInstallPWAAppMenuItemName(Browser* browser) {
|
||||
ui::EscapeMenuLabelAmpersands(app_name));
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -811,7 +862,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -901,7 +952,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -826,7 +877,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -916,7 +967,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644
|
||||
switch (command_id) {
|
||||
case IDC_PIN_TO_START_SCREEN:
|
||||
return false;
|
||||
@@ -849,6 +900,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const {
|
||||
@@ -939,6 +990,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,44 +155,47 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if ((command_id == IDC_RECENT_TABS_MENU) ||
|
||||
(command_id == AppMenuModel::kMinRecentTabsCommandId)) {
|
||||
@@ -965,9 +1044,13 @@ void AppMenuModel::Build() {
|
||||
kExtensionsMenuItem);
|
||||
@@ -1085,11 +1164,15 @@ void AppMenuModel::Build() {
|
||||
}
|
||||
}
|
||||
|
||||
- AddSeparator(ui::LOWER_SEPARATOR);
|
||||
- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR
|
||||
- : ui::LOWER_SEPARATOR);
|
||||
- CreateZoomMenu();
|
||||
- AddSeparator(ui::UPPER_SEPARATOR);
|
||||
- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR
|
||||
- : ui::UPPER_SEPARATOR);
|
||||
+ if (IsCommandIdVisible(IDC_ZOOM_MENU)) {
|
||||
+ AddSeparator(ui::LOWER_SEPARATOR);
|
||||
+ AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR
|
||||
+ : ui::LOWER_SEPARATOR);
|
||||
+ CreateZoomMenu();
|
||||
+ AddSeparator(ui::UPPER_SEPARATOR);
|
||||
+ AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR
|
||||
+ : ui::UPPER_SEPARATOR);
|
||||
+ } else {
|
||||
+ AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
+ }
|
||||
|
||||
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
|
||||
|
||||
@@ -1031,9 +1114,14 @@ void AppMenuModel::Build() {
|
||||
sub_menus_.back().get());
|
||||
SetElementIdentifierAt(GetIndexOfCommandId(IDC_MORE_TOOLS_MENU).value(),
|
||||
@@ -1178,9 +1261,13 @@ void AppMenuModel::Build() {
|
||||
kMoreToolsMenuItem);
|
||||
- AddSeparator(ui::LOWER_SEPARATOR);
|
||||
- CreateCutCopyPasteMenu();
|
||||
- AddSeparator(ui::UPPER_SEPARATOR);
|
||||
+
|
||||
+ if (IsCommandIdVisible(IDC_EDIT_MENU)) {
|
||||
+ AddSeparator(ui::LOWER_SEPARATOR);
|
||||
+ CreateCutCopyPasteMenu();
|
||||
+ AddSeparator(ui::UPPER_SEPARATOR);
|
||||
+ } else {
|
||||
+ AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
+ }
|
||||
|
||||
AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS);
|
||||
// The help submenu is only displayed on official Chrome builds. As the
|
||||
@@ -1070,6 +1158,11 @@ void AppMenuModel::Build() {
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
- AddSeparator(ui::LOWER_SEPARATOR);
|
||||
- CreateCutCopyPasteMenu();
|
||||
- AddSeparator(ui::UPPER_SEPARATOR);
|
||||
+ if (IsCommandIdVisible(IDC_EDIT_MENU)) {
|
||||
+ AddSeparator(ui::LOWER_SEPARATOR);
|
||||
+ CreateCutCopyPasteMenu();
|
||||
+ AddSeparator(ui::UPPER_SEPARATOR);
|
||||
+ } else {
|
||||
+ AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@@ -1265,6 +1352,11 @@ void AppMenuModel::Build() {
|
||||
set_icon(IDC_EXIT, kExitMenuIcon);
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ FilterMenuModel(this, base::BindRepeating(&AppMenuModel::IsCommandIdVisible,
|
||||
@ -203,10 +206,10 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index 26545b0cee2c1..118cf0df456d6 100644
|
||||
index 55fb00dbc746a..396eac70f92fd 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.h
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.h
|
||||
@@ -230,6 +230,9 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -254,6 +254,9 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
// Appends a zoom menu (without separators).
|
||||
void CreateZoomMenu();
|
||||
|
||||
@ -214,10 +217,10 @@ index 26545b0cee2c1..118cf0df456d6 100644
|
||||
+ bool IsCommandIdVisibleInternal(int command_id) const;
|
||||
+
|
||||
private:
|
||||
friend class ::MockAppMenuModel;
|
||||
|
||||
// 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 8ac822b917399..7a7e6fd15bdd9 100644
|
||||
index 59024587ef6b7..0c30aa71768cf 100644
|
||||
--- chrome/browser/ui/views/find_bar_host.cc
|
||||
+++ chrome/browser/ui/views/find_bar_host.cc
|
||||
@@ -412,6 +412,12 @@ void FindBarHost::GetWidgetBounds(gfx::Rect* bounds) {
|
||||
@ -234,7 +237,7 @@ index 8ac822b917399..7a7e6fd15bdd9 100644
|
||||
|
||||
void FindBarHost::RegisterAccelerators() {
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
|
||||
index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
index 618e1b254389e..0b5a25ffe96c3 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_frame.cc
|
||||
@@ -71,15 +71,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) {
|
||||
@ -263,7 +266,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
}
|
||||
|
||||
BrowserFrame::~BrowserFrame() {}
|
||||
@@ -170,6 +178,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
@@ -174,6 +182,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
}
|
||||
|
||||
int BrowserFrame::GetTopInset() const {
|
||||
@ -276,7 +279,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
return browser_frame_view_->GetTopInset(false);
|
||||
}
|
||||
|
||||
@@ -186,6 +200,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
@@ -190,6 +204,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
}
|
||||
|
||||
bool BrowserFrame::UseCustomFrame() const {
|
||||
@ -285,7 +288,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
return native_browser_frame_->UseCustomFrame();
|
||||
}
|
||||
|
||||
@@ -199,20 +215,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
@@ -203,20 +219,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
|
||||
void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
|
||||
ui::WindowShowState* show_state) const {
|
||||
@ -316,7 +319,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
browser_frame_view_->OnBrowserViewInitViewsComplete();
|
||||
}
|
||||
|
||||
@@ -274,7 +300,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const {
|
||||
@@ -278,7 +304,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const {
|
||||
ui::ColorProviderManager::ThemeInitializerSupplier*
|
||||
BrowserFrame::GetCustomTheme() const {
|
||||
// Do not return any custom theme if the browser has to use the dark theme.
|
||||
@ -325,7 +328,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
return nullptr;
|
||||
|
||||
Browser* browser = browser_view_->browser();
|
||||
@@ -291,6 +317,8 @@ BrowserFrame::GetCustomTheme() const {
|
||||
@@ -295,6 +321,8 @@ BrowserFrame::GetCustomTheme() const {
|
||||
}
|
||||
|
||||
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
|
||||
@ -334,7 +337,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
|
||||
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
|
||||
IsVisibleOnAllWorkspaces());
|
||||
@@ -388,6 +416,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) {
|
||||
@@ -402,6 +430,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) {
|
||||
|
||||
ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const {
|
||||
auto key = Widget::GetColorProviderKey();
|
||||
@ -343,7 +346,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
key.frame_type = UseCustomFrame()
|
||||
? ui::ColorProviderManager::FrameType::kChromium
|
||||
: ui::ColorProviderManager::FrameType::kNative;
|
||||
@@ -397,6 +427,9 @@ ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const {
|
||||
@@ -411,6 +441,9 @@ ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const {
|
||||
}
|
||||
|
||||
absl::optional<SkColor> BrowserFrame::GetUserColor() const {
|
||||
@ -353,7 +356,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// ChromeOS SystemWebApps use the OS theme all the time.
|
||||
if (ash::IsSystemWebApp(browser_view_->browser())) {
|
||||
@@ -489,5 +522,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
@@ -503,5 +536,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
}
|
||||
|
||||
bool BrowserFrame::ShouldUseDarkTheme() const {
|
||||
@ -362,7 +365,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 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 d9fb9af4db3eb..4a809ee9962fd 100644
|
||||
index ea9371d731de0..9398b262c8d83 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame.h
|
||||
+++ chrome/browser/ui/views/frame/browser_frame.h
|
||||
@@ -61,7 +61,9 @@ enum class TabDragKind {
|
||||
@ -376,7 +379,7 @@ index d9fb9af4db3eb..4a809ee9962fd 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 ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
index 6f9c8b1d38430..7250c21e5e781 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -308,11 +308,10 @@ using content::NativeWebKeyboardEvent;
|
||||
@ -444,7 +447,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1788,6 +1804,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
@@ -1805,6 +1821,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
if (immersive_mode_controller_->IsEnabled())
|
||||
return false;
|
||||
|
||||
@ -453,7 +456,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -2680,7 +2698,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
@@ -2703,7 +2721,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@ -463,7 +466,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
|
||||
return download_button->bubble_controller();
|
||||
return nullptr;
|
||||
@@ -3180,7 +3199,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -3203,7 +3222,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
@ -473,7 +476,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -3733,8 +3753,10 @@ void BrowserView::Layout() {
|
||||
@@ -3756,8 +3776,10 @@ void BrowserView::Layout() {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@ -486,7 +489,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -3800,6 +3822,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -3823,6 +3845,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@ -498,7 +501,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -3846,13 +3873,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -3869,13 +3896,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@ -514,7 +517,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -4258,7 +4281,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
@@ -4281,7 +4304,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
// Undo our anti-jankiness hacks and force a re-layout.
|
||||
in_process_fullscreen_ = false;
|
||||
ToolbarSizeChanged(false);
|
||||
@ -524,7 +527,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
}
|
||||
|
||||
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
|
||||
@@ -4606,6 +4630,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -4637,6 +4661,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@ -533,7 +536,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -4628,6 +4654,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
@@ -4659,6 +4685,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@ -543,7 +546,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index a2693a336f830..74d7864151d62 100644
|
||||
index 3eb7c4bd065e1..05ef8266d8650 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow,
|
||||
@ -563,7 +566,7 @@ index a2693a336f830..74d7864151d62 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -773,6 +778,12 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -784,6 +789,12 @@ class BrowserView : public BrowserWindow,
|
||||
return web_app_frame_toolbar();
|
||||
}
|
||||
|
||||
@ -639,10 +642,10 @@ index 0dcdb241b98f7..1117776bbc85c 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 f4a5c3ad8cc9c..4f9c1a111e7ce 100644
|
||||
index 73eff726270d3..be211a4a285be 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -565,33 +565,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@@ -569,33 +569,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
}
|
||||
|
||||
bool BrowserTabStripController::IsFrameCondensed() const {
|
||||
@ -691,10 +694,10 @@ index f4a5c3ad8cc9c..4f9c1a111e7ce 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index f2b0bd4099b4f..89b7520e359c3 100644
|
||||
index f650013dafc56..239f6551658d0 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -169,12 +169,13 @@ constexpr int kToolbarDividerCornerRadius = 1;
|
||||
@@ -173,12 +173,13 @@ constexpr int kToolbarDividerSpacing = 9;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ToolbarView, public:
|
||||
|
||||
@ -710,19 +713,10 @@ index f2b0bd4099b4f..89b7520e359c3 100644
|
||||
SetID(VIEW_ID_TOOLBAR);
|
||||
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
@@ -205,7 +206,7 @@ void ToolbarView::Init() {
|
||||
#endif
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
- display_mode_ != DisplayMode::NORMAL);
|
||||
+ display_mode_ != DisplayMode::NORMAL && !browser_->toolbar_overridden());
|
||||
// Make sure the toolbar shows by default.
|
||||
size_animation_.Reset(1);
|
||||
|
||||
@@ -229,6 +230,19 @@ void ToolbarView::Init() {
|
||||
browser, command, ui::DispositionFromEventFlags(event.flags()));
|
||||
};
|
||||
@@ -200,6 +201,19 @@ ToolbarView::~ToolbarView() {
|
||||
}
|
||||
|
||||
void ToolbarView::Init() {
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ using ToolbarButtonType = cef::BrowserDelegate::ToolbarButtonType;
|
||||
+ auto button_visible = [this](ToolbarButtonType type) {
|
||||
@ -736,10 +730,26 @@ index f2b0bd4099b4f..89b7520e359c3 100644
|
||||
+ #define BUTTON_VISIBLE(type) true
|
||||
+#endif
|
||||
+
|
||||
std::unique_ptr<ToolbarButton> back = std::make_unique<BackForwardButton>(
|
||||
BackForwardButton::Direction::kBack,
|
||||
base::BindRepeating(callback, browser_, IDC_BACK), browser_);
|
||||
@@ -258,8 +272,10 @@ void ToolbarView::Init() {
|
||||
#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
|
||||
@@ -209,12 +223,13 @@ void ToolbarView::Init() {
|
||||
#endif
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
- display_mode_ != DisplayMode::NORMAL);
|
||||
+ display_mode_ != DisplayMode::NORMAL && !browser_->toolbar_overridden());
|
||||
// Make sure the toolbar shows by default.
|
||||
size_animation_.Reset(1);
|
||||
|
||||
std::unique_ptr<DownloadToolbarButtonView> download_button;
|
||||
- if (download::IsDownloadBubbleEnabled(browser_->profile())) {
|
||||
+ if (download::IsDownloadBubbleEnabled(browser_->profile()) &&
|
||||
+ BUTTON_VISIBLE(kDownload)) {
|
||||
download_button =
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
}
|
||||
@@ -295,8 +310,10 @@ void ToolbarView::Init() {
|
||||
}
|
||||
}
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
@ -751,16 +761,7 @@ index f2b0bd4099b4f..89b7520e359c3 100644
|
||||
|
||||
std::unique_ptr<MediaToolbarButtonView> media_button;
|
||||
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
|
||||
@@ -268,14 +284,16 @@ void ToolbarView::Init() {
|
||||
}
|
||||
|
||||
std::unique_ptr<DownloadToolbarButtonView> download_button;
|
||||
- if (download::IsDownloadBubbleEnabled(browser_->profile())) {
|
||||
+ if (download::IsDownloadBubbleEnabled(browser_->profile()) &&
|
||||
+ BUTTON_VISIBLE(kDownload)) {
|
||||
download_button =
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
}
|
||||
@@ -306,7 +323,8 @@ void ToolbarView::Init() {
|
||||
|
||||
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
|
||||
send_tab_to_self_button;
|
||||
@ -770,15 +771,15 @@ index f2b0bd4099b4f..89b7520e359c3 100644
|
||||
send_tab_to_self_button =
|
||||
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
|
||||
browser_view_);
|
||||
@@ -283,7 +301,7 @@ void ToolbarView::Init() {
|
||||
@@ -314,7 +332,7 @@ void ToolbarView::Init() {
|
||||
|
||||
std::unique_ptr<SidePanelToolbarButton> side_panel_button;
|
||||
std::unique_ptr<SidePanelToolbarContainer> side_panel_toolbar_container;
|
||||
- if (browser_view_->unified_side_panel()) {
|
||||
+ if (browser_view_->unified_side_panel() && BUTTON_VISIBLE(kSidePanel)) {
|
||||
if (base::FeatureList::IsEnabled(features::kSidePanelCompanion)) {
|
||||
if (base::FeatureList::IsEnabled(
|
||||
companion::features::kSidePanelCompanion)) {
|
||||
side_panel_toolbar_container =
|
||||
std::make_unique<SidePanelToolbarContainer>(browser_view_);
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index b3c20d4eaf0b3..62aef2fbc752d 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
|
Reference in New Issue
Block a user