mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 127.0.6533.0 (#1313161)
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 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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user