mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 131.0.6778.0 (#1368529)
This commit is contained in:
@@ -41,7 +41,7 @@ index 14e7065d7dbd6..b01501b4253a3 100644
|
||||
|
||||
void BrowserCommandController::InitCommandState() {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index feb6d2e1f5ab1..a65e1c938c116 100644
|
||||
index 32f5ef6e5ac36..6b82915434afe 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -717,10 +717,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
@@ -115,7 +115,7 @@ index feb6d2e1f5ab1..a65e1c938c116 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1700,7 +1753,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1701,7 +1754,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ index feb6d2e1f5ab1..a65e1c938c116 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1716,6 +1769,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1717,6 +1770,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ index feb6d2e1f5ab1..a65e1c938c116 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1872,8 +1949,10 @@ void AppMenuModel::Build() {
|
||||
@@ -1873,8 +1950,10 @@ void AppMenuModel::Build() {
|
||||
IDS_CLEAR_BROWSING_DATA,
|
||||
kTrashCanRefreshIcon);
|
||||
|
||||
@@ -166,7 +166,7 @@ index feb6d2e1f5ab1..a65e1c938c116 100644
|
||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
|
||||
@@ -1976,6 +2055,11 @@ void AppMenuModel::Build() {
|
||||
@@ -1977,6 +2056,11 @@ void AppMenuModel::Build() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@@ -397,10 +397,10 @@ index 532705a04c47b..0272f27596df6 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 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
index 8c08f4c3f10fa..721a7b1d5f136 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -367,10 +367,6 @@ constexpr base::FeatureParam<base::TimeDelta> kLoadingTabAnimationFrameDelay = {
|
||||
@@ -366,10 +366,6 @@ constexpr base::FeatureParam<base::TimeDelta> kLoadingTabAnimationFrameDelay = {
|
||||
&kChangeFrameRateOfLoadingTabAnimation, "loading_tab_animation_frame_delay",
|
||||
base::Milliseconds(30)};
|
||||
|
||||
@@ -411,7 +411,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
constexpr char kTabLoadingSmoothnessHistogramName[] =
|
||||
@@ -770,6 +766,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
@@ -769,6 +765,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
return browser_view_->frame()->GetTopInset() - browser_view_->y();
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
bool IsToolbarVisible() const override {
|
||||
return browser_view_->IsToolbarVisible();
|
||||
}
|
||||
@@ -921,11 +925,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -920,11 +924,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@@ -449,7 +449,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
SetShowIcon(
|
||||
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
|
||||
|
||||
@@ -1015,8 +1029,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -1014,8 +1028,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
|
||||
devtools_web_view_, contents_web_view_, watermark_view_));
|
||||
|
||||
@@ -467,7 +467,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1096,7 +1117,9 @@ void BrowserView::ToggleCompactModeUI() {
|
||||
@@ -1095,7 +1116,9 @@ void BrowserView::ToggleCompactModeUI() {
|
||||
}
|
||||
|
||||
BrowserView::~BrowserView() {
|
||||
@@ -477,7 +477,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
|
||||
// Destroy the top controls slide controller first as it depends on the
|
||||
// tabstrip model and the browser frame.
|
||||
@@ -1104,7 +1127,9 @@ BrowserView::~BrowserView() {
|
||||
@@ -1103,7 +1126,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.
|
||||
@@ -487,7 +487,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1113,17 +1138,18 @@ BrowserView::~BrowserView() {
|
||||
@@ -1112,17 +1137,18 @@ BrowserView::~BrowserView() {
|
||||
// Immersive mode may need to reparent views before they are removed/deleted.
|
||||
immersive_mode_controller_.reset();
|
||||
|
||||
@@ -510,7 +510,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
|
||||
// These are raw pointers to child views, so they need to be set to null
|
||||
// before `RemoveAllChildViews()` is called to avoid dangling.
|
||||
@@ -1704,6 +1730,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
@@ -1703,6 +1729,16 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
|
||||
}
|
||||
|
||||
@@ -519,12 +519,15 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
+ // since it is responsible for showing autofill related bubbles from toolbar's
|
||||
+ // child views and it is an observer for avatar toolbar button if any.
|
||||
+ autofill_bubble_handler_.reset();
|
||||
+
|
||||
+ toolbar_ = nullptr;
|
||||
+ toolbar_button_provider_ = nullptr;
|
||||
+}
|
||||
+
|
||||
// static:
|
||||
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
@@ -2118,9 +2151,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -2118,9 +2154,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
@@ -540,7 +543,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -3308,7 +3346,8 @@ views::View* BrowserView::GetTopContainer() {
|
||||
@@ -3308,7 +3349,8 @@ views::View* BrowserView::GetTopContainer() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@@ -550,7 +553,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
|
||||
return download_button->bubble_controller();
|
||||
return nullptr;
|
||||
@@ -3876,7 +3915,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -3890,7 +3932,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
@@ -560,7 +563,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4366,11 +4406,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4381,11 +4424,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
@@ -601,7 +604,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4379,7 +4446,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4394,7 +4464,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.
|
||||
@@ -610,7 +613,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4490,8 +4557,10 @@ void BrowserView::Layout(PassKey) {
|
||||
@@ -4505,8 +4575,10 @@ void BrowserView::Layout(PassKey) {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@@ -623,7 +626,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -4557,6 +4626,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4572,6 +4644,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@@ -635,7 +638,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4599,13 +4673,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4614,13 +4691,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@@ -651,7 +654,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -4967,7 +5037,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
|
||||
@@ -5006,7 +5079,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);
|
||||
@@ -661,7 +664,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
}
|
||||
|
||||
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
|
||||
@@ -5468,6 +5539,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -5512,6 +5586,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@@ -670,7 +673,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -5490,6 +5563,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
@@ -5534,6 +5610,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@@ -680,7 +683,7 @@ index 3b1fa8ba79fcb..77e681c8cbdc0 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index 6422f5dfe3e31..4412e63d411c1 100644
|
||||
index bdb273f5134b8..2750336aca016 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -139,11 +139,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -700,7 +703,7 @@ index 6422f5dfe3e31..4412e63d411c1 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -838,6 +843,10 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -841,6 +846,10 @@ class BrowserView : public BrowserWindow,
|
||||
void Copy();
|
||||
void Paste();
|
||||
|
||||
@@ -711,7 +714,7 @@ index 6422f5dfe3e31..4412e63d411c1 100644
|
||||
protected:
|
||||
// Enumerates where the devtools are docked relative to the browser's main
|
||||
// web contents.
|
||||
@@ -861,6 +870,8 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -864,6 +873,8 @@ class BrowserView : public BrowserWindow,
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
const gfx::Rect& local_webview_container_bounds);
|
||||
|
||||
@@ -1003,10 +1006,10 @@ index a80a496c99a26..7cb24bf8505de 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index 49a6e89aa17f0..e7ab5815890b8 100644
|
||||
index 1b494d20b6342..c3eb67da3c3ba 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -194,7 +194,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
@@ -193,7 +193,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
void Paint(gfx::Canvas* canvas, views::View* view) const override {
|
||||
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
|
||||
browser_view_);
|
||||
@@ -1015,7 +1018,7 @@ index 49a6e89aa17f0..e7ab5815890b8 100644
|
||||
SkColor frame_color =
|
||||
browser_view_->frame()->GetFrameView()->GetFrameColor(
|
||||
BrowserFrameActiveState::kUseCurrent);
|
||||
@@ -225,12 +225,13 @@ END_METADATA
|
||||
@@ -224,12 +224,13 @@ END_METADATA
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ToolbarView, public:
|
||||
|
||||
@@ -1031,7 +1034,7 @@ index 49a6e89aa17f0..e7ab5815890b8 100644
|
||||
SetID(VIEW_ID_TOOLBAR);
|
||||
|
||||
container_view_ = AddChildView(std::make_unique<ContainerView>());
|
||||
@@ -259,9 +260,24 @@ ToolbarView::~ToolbarView() {
|
||||
@@ -258,9 +259,24 @@ ToolbarView::~ToolbarView() {
|
||||
|
||||
for (const auto& view_and_command : GetViewCommandMap())
|
||||
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
|
||||
@@ -1056,7 +1059,7 @@ index 49a6e89aa17f0..e7ab5815890b8 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
|
||||
@@ -284,12 +300,12 @@ void ToolbarView::Init() {
|
||||
@@ -283,12 +299,12 @@ void ToolbarView::Init() {
|
||||
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
@@ -1072,9 +1075,9 @@ index 49a6e89aa17f0..e7ab5815890b8 100644
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
}
|
||||
@@ -370,7 +386,8 @@ void ToolbarView::Init() {
|
||||
}
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
if (!features::IsToolbarPinningEnabled()) {
|
||||
if (!(features::IsToolbarPinningEnabled() &&
|
||||
base::FeatureList::IsEnabled(features::kPinnedCastButton))) {
|
||||
- if (media_router::MediaRouterEnabled(browser_->profile())) {
|
||||
+ if (media_router::MediaRouterEnabled(browser_->profile()) &&
|
||||
+ BUTTON_VISIBLE(kCast)) {
|
||||
@@ -1091,7 +1094,7 @@ index 49a6e89aa17f0..e7ab5815890b8 100644
|
||||
send_tab_to_self_button =
|
||||
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
|
||||
browser_view_);
|
||||
@@ -844,7 +862,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
@@ -845,7 +863,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
LayoutCommon();
|
||||
|
Reference in New Issue
Block a user