mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 121.0.6167.0 (#1233107)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
|
||||
index 6fa2a2fdfe48f..eadee5fa295e6 100644
|
||||
index 7d57988659286..576550dd75111 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@ -24,7 +24,7 @@ index 6fa2a2fdfe48f..eadee5fa295e6 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1169,11 +1177,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1172,11 +1180,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@ -41,10 +41,10 @@ index 6fa2a2fdfe48f..eadee5fa295e6 100644
|
||||
|
||||
bool BrowserCommandController::IsWebAppOrCustomTab() const {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
index 6ce427cb564af..8a59dc84c75ec 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -593,6 +593,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -596,6 +596,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1397,7 +1448,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1481,7 +1532,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1412,6 +1463,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1496,6 +1547,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1593,11 +1668,15 @@ void AppMenuModel::Build() {
|
||||
@@ -1689,11 +1764,15 @@ void AppMenuModel::Build() {
|
||||
kDefaultIconSize));
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
|
||||
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
|
||||
|
||||
@@ -1686,9 +1765,13 @@ void AppMenuModel::Build() {
|
||||
@@ -1799,9 +1878,13 @@ void AppMenuModel::Build() {
|
||||
kMoreToolsMenuItem);
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@ -180,7 +180,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
}
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@@ -1775,6 +1858,11 @@ void AppMenuModel::Build() {
|
||||
@@ -1889,6 +1972,11 @@ void AppMenuModel::Build() {
|
||||
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
|
||||
}
|
||||
|
||||
@ -193,10 +193,10 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index c942243e8a63f..278a0bdc89856 100644
|
||||
index 55425f15d49fa..06cb8ed2acaa1 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.h
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.h
|
||||
@@ -209,6 +209,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -215,6 +215,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 c942243e8a63f..278a0bdc89856 100644
|
||||
bool IsCommandIdAlerted(int command_id) const override;
|
||||
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
@@ -242,6 +243,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
// took to select the command.
|
||||
void LogMenuMetrics(int command_id);
|
||||
@@ -256,6 +257,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
absl::optional<safety_hub::SafetyHubModuleType> expected_module =
|
||||
absl::nullopt);
|
||||
|
||||
+ bool IsCommandIdEnabledInternal(int command_id) const;
|
||||
+
|
||||
@ -363,7 +363,7 @@ index 0c231b6ac5b01..6b5af98e18e42 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 5ad7ca507f70c..1d195633a21db 100644
|
||||
index c74a820ce00ad..55267b61c15af 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -342,11 +342,10 @@ using content::NativeWebKeyboardEvent;
|
||||
@ -381,7 +381,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
@@ -861,11 +860,23 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -861,11 +860,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@ -400,21 +400,11 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
+void BrowserView::InitBrowser(std::unique_ptr<Browser> browser) {
|
||||
+ DCHECK(!browser_);
|
||||
+ browser_ = std::move(browser);
|
||||
+
|
||||
+ immersive_mode_controller_ = chrome::CreateImmersiveModeController(this);
|
||||
+
|
||||
// Store the actions so that the access is available for other classes.
|
||||
if (base::FeatureList::IsEnabled(features::kSidePanelPinning)) {
|
||||
browser_->SetUserData(BrowserActions::UserDataKey(),
|
||||
@@ -925,7 +936,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
}
|
||||
|
||||
browser_->tab_strip_model()->AddObserver(this);
|
||||
- immersive_mode_controller_ = chrome::CreateImmersiveModeController(this);
|
||||
|
||||
// Top container holds tab strip region and toolbar and lives at the front of
|
||||
// the view hierarchy.
|
||||
@@ -985,8 +995,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -962,8 +971,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
|
||||
devtools_web_view_, contents_web_view_));
|
||||
|
||||
@ -432,7 +422,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1060,7 +1077,9 @@ BrowserView::~BrowserView() {
|
||||
@@ -1037,7 +1053,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.
|
||||
@ -442,7 +432,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1074,12 +1093,14 @@ BrowserView::~BrowserView() {
|
||||
@@ -1051,12 +1069,14 @@ BrowserView::~BrowserView() {
|
||||
// child views and it is an observer for avatar toolbar button if any.
|
||||
autofill_bubble_handler_.reset();
|
||||
|
||||
@ -457,7 +447,7 @@ index 5ad7ca507f70c..1d195633a21db 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.
|
||||
@@ -1097,7 +1118,9 @@ BrowserView::~BrowserView() {
|
||||
@@ -1074,7 +1094,9 @@ BrowserView::~BrowserView() {
|
||||
|
||||
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
|
||||
// SidePanelCoordinator.
|
||||
@ -467,7 +457,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1972,9 +1995,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -1949,9 +1971,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
@ -483,7 +473,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -3063,7 +3091,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
@@ -3060,7 +3087,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@ -493,7 +483,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
|
||||
return download_button->bubble_controller();
|
||||
return nullptr;
|
||||
@@ -3611,7 +3640,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -3611,7 +3639,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
@ -503,7 +493,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4073,11 +4103,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4073,11 +4102,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
@ -544,7 +534,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4086,7 +4143,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4086,7 +4142,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.
|
||||
@ -553,7 +543,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4194,8 +4251,10 @@ void BrowserView::Layout() {
|
||||
@@ -4194,8 +4250,10 @@ void BrowserView::Layout() {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@ -566,7 +556,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// In chromeOS ash we round the bottom two corners of the browser frame by
|
||||
@@ -4273,6 +4332,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4273,6 +4331,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@ -578,7 +568,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4321,13 +4385,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4321,13 +4384,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@ -594,7 +584,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -4747,7 +4807,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
@@ -4744,7 +4803,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
// Undo our anti-jankiness hacks and force a re-layout.
|
||||
in_process_fullscreen_ = false;
|
||||
ToolbarSizeChanged(false);
|
||||
@ -604,7 +594,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
}
|
||||
|
||||
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
|
||||
@@ -5136,6 +5197,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -5133,6 +5193,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@ -613,7 +603,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -5158,6 +5221,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
@@ -5155,6 +5217,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@ -623,10 +613,10 @@ index 5ad7ca507f70c..1d195633a21db 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index d6d8db2ed2341..c200381042cc9 100644
|
||||
index 2e4054890db75..1a518ba936fd1 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -137,11 +137,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow,
|
||||
kUnknown
|
||||
};
|
||||
|
||||
@ -643,7 +633,7 @@ index d6d8db2ed2341..c200381042cc9 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -826,6 +831,9 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -832,6 +837,9 @@ class BrowserView : public BrowserWindow,
|
||||
// TopContainerBackground::PaintThemeCustomImage for details.
|
||||
gfx::Point GetThemeOffsetFromBrowserView() const;
|
||||
|
||||
@ -654,7 +644,7 @@ index d6d8db2ed2341..c200381042cc9 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 b358a30764051..5c67244a43251 100644
|
||||
index 5e39a622e391e..e0b67a6902182 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -48,6 +48,10 @@
|
||||
@ -668,7 +658,7 @@ index b358a30764051..5c67244a43251 100644
|
||||
using views::View;
|
||||
using web_modal::ModalDialogHostObserver;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
@@ -579,6 +583,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
@@ -583,6 +587,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
|
||||
int BrowserViewLayout::LayoutToolbar(int top) {
|
||||
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
|
||||
@ -699,10 +689,10 @@ index 8267a265a8e10..ee08f18e96a34 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 4730d2459c324..714809151a0bd 100644
|
||||
index 84e2a84c15907..3f010beb931b6 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
|
||||
@@ -575,6 +575,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
@@ -585,6 +585,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
frame->GetNativeWindow()->SetEventTargeter(
|
||||
std::make_unique<chromeos::InteriorResizeHandleTargeter>());
|
||||
#endif
|
||||
@ -714,7 +704,7 @@ index 4730d2459c324..714809151a0bd 100644
|
||||
}
|
||||
|
||||
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
|
||||
@@ -671,18 +676,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
@@ -681,18 +686,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
|
||||
int PictureInPictureBrowserFrameView::NonClientHitTest(
|
||||
const gfx::Point& point) {
|
||||
@ -765,7 +755,7 @@ index 4730d2459c324..714809151a0bd 100644
|
||||
|
||||
// Allow dragging and resizing the window.
|
||||
int window_component = GetHTComponentForFrame(
|
||||
@@ -749,7 +778,8 @@ void PictureInPictureBrowserFrameView::Layout() {
|
||||
@@ -759,7 +788,8 @@ void PictureInPictureBrowserFrameView::Layout() {
|
||||
gfx::Rect content_area = GetLocalBounds();
|
||||
content_area.Inset(FrameBorderInsets());
|
||||
gfx::Rect top_bar = content_area;
|
||||
@ -775,7 +765,7 @@ index 4730d2459c324..714809151a0bd 100644
|
||||
top_bar_container_view_->SetBoundsRect(top_bar);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (auto_pip_setting_overlay_) {
|
||||
@@ -1213,7 +1243,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
@@ -1234,7 +1264,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
}
|
||||
|
||||
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
|
||||
@ -785,11 +775,25 @@ index 4730d2459c324..714809151a0bd 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
|
||||
--- 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)
|
||||
OmniboxPopupCloser::~OmniboxPopupCloser() = default;
|
||||
|
||||
void OmniboxPopupCloser::OnMouseEvent(ui::MouseEvent* event) {
|
||||
- if (!browser_view_->browser()->is_delete_scheduled() &&
|
||||
+ if (browser_view_->browser() &&
|
||||
+ !browser_view_->browser()->is_delete_scheduled() &&
|
||||
event->type() == ui::ET_MOUSE_PRESSED) {
|
||||
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 ca602db58de3a..1db448a2526a4 100644
|
||||
index 0e24efef68ace..f1cda2809f398 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
};
|
||||
|
||||
for (PageActionIconType type : params.types_enabled) {
|
||||
@ -803,7 +807,7 @@ index ca602db58de3a..1db448a2526a4 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 50c887cc242fd..99428cb8eeda2 100644
|
||||
index 9536b049aeb9d..30f3091939675 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -558,29 +558,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@ -849,10 +853,10 @@ index 50c887cc242fd..99428cb8eeda2 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
index f7f763cac17f4..788185cc57cae 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_);
|
||||
@ -861,7 +865,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
SkColor frame_color =
|
||||
browser_view_->frame()->GetFrameView()->GetFrameColor(
|
||||
BrowserFrameActiveState::kUseCurrent);
|
||||
@@ -221,12 +221,13 @@ END_METADATA
|
||||
@@ -219,12 +219,13 @@ END_METADATA
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ToolbarView, public:
|
||||
|
||||
@ -877,7 +881,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
SetID(VIEW_ID_TOOLBAR);
|
||||
|
||||
container_view_ = AddChildView(std::make_unique<ContainerView>());
|
||||
@@ -251,6 +252,19 @@ ToolbarView::~ToolbarView() {
|
||||
@@ -249,6 +250,19 @@ ToolbarView::~ToolbarView() {
|
||||
}
|
||||
|
||||
void ToolbarView::Init() {
|
||||
@ -897,7 +901,7 @@ index 503fe3b9c17ec..9c3be45b4699b 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
|
||||
@@ -275,12 +289,13 @@ void ToolbarView::Init() {
|
||||
@@ -273,12 +287,12 @@ void ToolbarView::Init() {
|
||||
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
@ -907,13 +911,12 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
size_animation_.Reset(1);
|
||||
|
||||
std::unique_ptr<DownloadToolbarButtonView> download_button;
|
||||
- if (download::IsDownloadBubbleEnabled(browser_->profile())) {
|
||||
+ if (download::IsDownloadBubbleEnabled(browser_->profile()) &&
|
||||
+ BUTTON_VISIBLE(kDownload)) {
|
||||
- if (download::IsDownloadBubbleEnabled()) {
|
||||
+ if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload)) {
|
||||
download_button =
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
}
|
||||
@@ -362,8 +377,10 @@ void ToolbarView::Init() {
|
||||
@@ -360,8 +374,10 @@ void ToolbarView::Init() {
|
||||
}
|
||||
}
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
@ -925,7 +928,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
|
||||
std::unique_ptr<MediaToolbarButtonView> media_button;
|
||||
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
|
||||
@@ -373,7 +390,8 @@ void ToolbarView::Init() {
|
||||
@@ -371,7 +387,8 @@ void ToolbarView::Init() {
|
||||
|
||||
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
|
||||
send_tab_to_self_button;
|
||||
@ -935,7 +938,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
send_tab_to_self_button =
|
||||
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
|
||||
browser_view_);
|
||||
@@ -444,7 +462,8 @@ void ToolbarView::Init() {
|
||||
@@ -443,7 +460,8 @@ void ToolbarView::Init() {
|
||||
send_tab_to_self_button_ =
|
||||
container_view_->AddChildView(std::move(send_tab_to_self_button));
|
||||
|
||||
@ -946,7 +949,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
|
||||
side_panel_container_ = container_view_->AddChildView(
|
||||
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 8411945c45330..0d50479ec2cdc 100644
|
||||
index 3bfe52cff3511..11373de4c2a3a 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,
|
||||
|
Reference in New Issue
Block a user