mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 117.0.5938.0 (#1181205)
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 02cc754da4225..58b21e3918231 100644
|
||||
index 38fe556ecb2f7..86e38031e026a 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -401,6 +401,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 02cc754da4225..58b21e3918231 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -416,6 +417,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -417,6 +418,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
DCHECK(command_updater_.IsCommandEnabled(id))
|
||||
<< "Invalid/disabled command " << id;
|
||||
|
||||
@ -24,7 +24,7 @@ index 02cc754da4225..58b21e3918231 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1147,11 +1155,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1148,11 +1156,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@ -41,10 +41,10 @@ index 02cc754da4225..58b21e3918231 100644
|
||||
|
||||
bool BrowserCommandController::IsWebAppOrCustomTab() const {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index 1e7083240e30c..dcac39ae73469 100644
|
||||
index 499c6aef7b3be..507a95d177980 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -585,6 +585,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -590,6 +590,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ index 1e7083240e30c..dcac39ae73469 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1315,7 +1366,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1370,7 +1421,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 1e7083240e30c..dcac39ae73469 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1330,6 +1381,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1385,6 +1436,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ index 1e7083240e30c..dcac39ae73469 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if ((command_id == IDC_RECENT_TABS_MENU) ||
|
||||
(command_id == AppMenuModel::kMinRecentTabsCommandId)) {
|
||||
@@ -1497,11 +1572,15 @@ void AppMenuModel::Build() {
|
||||
@@ -1555,11 +1630,15 @@ void AppMenuModel::Build() {
|
||||
kDefaultIconSize));
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ index 1e7083240e30c..dcac39ae73469 100644
|
||||
|
||||
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
|
||||
|
||||
@@ -1572,9 +1651,13 @@ void AppMenuModel::Build() {
|
||||
@@ -1640,9 +1719,13 @@ void AppMenuModel::Build() {
|
||||
kMoreToolsMenuItem);
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@ -180,7 +180,7 @@ index 1e7083240e30c..dcac39ae73469 100644
|
||||
}
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@@ -1656,6 +1739,11 @@ void AppMenuModel::Build() {
|
||||
@@ -1724,6 +1807,11 @@ void AppMenuModel::Build() {
|
||||
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
|
||||
}
|
||||
|
||||
@ -193,10 +193,10 @@ index 1e7083240e30c..dcac39ae73469 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index 4d50034fc658d..a23a871f7f17d 100644
|
||||
index fe6f250d169a3..606cbd2e248b3 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.h
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.h
|
||||
@@ -195,6 +195,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -202,6 +202,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,7 +204,7 @@ index 4d50034fc658d..a23a871f7f17d 100644
|
||||
bool IsCommandIdAlerted(int command_id) const override;
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
ui::Accelerator* accelerator) const override;
|
||||
@@ -227,6 +228,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -234,6 +235,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
// took to select the command.
|
||||
void LogMenuMetrics(int command_id);
|
||||
|
||||
@ -231,10 +231,10 @@ index 59024587ef6b7..0c30aa71768cf 100644
|
||||
|
||||
void FindBarHost::RegisterAccelerators() {
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
|
||||
index 235307773037f..56a5af5e44bd6 100644
|
||||
index dad33e7ccfaa8..d1a644672d8e2 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_frame.cc
|
||||
@@ -90,15 +90,23 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
|
||||
@@ -91,15 +91,23 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserFrame, public:
|
||||
|
||||
@ -260,7 +260,7 @@ index 235307773037f..56a5af5e44bd6 100644
|
||||
}
|
||||
|
||||
BrowserFrame::~BrowserFrame() {}
|
||||
@@ -193,6 +201,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
@@ -194,6 +202,12 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
}
|
||||
|
||||
int BrowserFrame::GetTopInset() const {
|
||||
@ -273,7 +273,7 @@ index 235307773037f..56a5af5e44bd6 100644
|
||||
return browser_frame_view_->GetTopInset(false);
|
||||
}
|
||||
|
||||
@@ -209,6 +223,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
@@ -210,6 +224,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
}
|
||||
|
||||
bool BrowserFrame::UseCustomFrame() const {
|
||||
@ -282,7 +282,7 @@ index 235307773037f..56a5af5e44bd6 100644
|
||||
return native_browser_frame_->UseCustomFrame();
|
||||
}
|
||||
|
||||
@@ -222,20 +238,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
@@ -223,20 +239,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
|
||||
void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
|
||||
ui::WindowShowState* show_state) const {
|
||||
@ -313,7 +313,7 @@ index 235307773037f..56a5af5e44bd6 100644
|
||||
browser_frame_view_->OnBrowserViewInitViewsComplete();
|
||||
}
|
||||
|
||||
@@ -315,6 +341,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
@@ -316,6 +342,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
}
|
||||
|
||||
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
|
||||
@ -322,16 +322,16 @@ index 235307773037f..56a5af5e44bd6 100644
|
||||
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
|
||||
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
|
||||
IsVisibleOnAllWorkspaces());
|
||||
@@ -426,6 +454,8 @@ void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
|
||||
@@ -427,6 +455,8 @@ void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
|
||||
|
||||
ui::ColorProviderKey BrowserFrame::GetColorProviderKey() const {
|
||||
auto key = Widget::GetColorProviderKey();
|
||||
+ if (!browser_view_)
|
||||
+ return key;
|
||||
|
||||
// color_mode.
|
||||
[this, &key]() {
|
||||
@@ -580,5 +610,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
key.app_controller = browser_view_->browser()->app_controller();
|
||||
|
||||
@@ -584,5 +614,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
}
|
||||
|
||||
bool BrowserFrame::IsIncognitoBrowser() const {
|
||||
@ -355,10 +355,10 @@ index 77ca1dbf118f9..c60711991d093 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 7005d2c0be663..8d55893627837 100644
|
||||
index 261dfb8562dbd..650a2847fb6c8 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -327,11 +327,10 @@ using content::NativeWebKeyboardEvent;
|
||||
@@ -336,11 +336,10 @@ using content::NativeWebKeyboardEvent;
|
||||
using content::WebContents;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
|
||||
@ -373,7 +373,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
@@ -800,11 +799,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -838,11 +837,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@ -397,7 +397,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
SetShowIcon(
|
||||
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
|
||||
|
||||
@@ -848,7 +858,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -886,7 +896,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
}
|
||||
|
||||
browser_->tab_strip_model()->AddObserver(this);
|
||||
@ -405,7 +405,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
|
||||
// Top container holds tab strip region and toolbar and lives at the front of
|
||||
// the view hierarchy.
|
||||
@@ -904,8 +913,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -942,8 +951,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
|
||||
devtools_web_view_, contents_web_view_));
|
||||
|
||||
@ -423,7 +423,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1089,12 +1105,14 @@ gfx::Size BrowserView::GetWebAppFrameToolbarPreferredSize() const {
|
||||
@@ -1129,12 +1145,14 @@ gfx::Size BrowserView::GetWebAppFrameToolbarPreferredSize() const {
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
bool BrowserView::UsesImmersiveFullscreenMode() const {
|
||||
@ -440,7 +440,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
}
|
||||
|
||||
bool BrowserView::UsesImmersiveFullscreenTabbedMode() const {
|
||||
@@ -1820,6 +1838,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
@@ -1884,6 +1902,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
if (immersive_mode_controller_->IsEnabled())
|
||||
return false;
|
||||
|
||||
@ -449,7 +449,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -2817,7 +2837,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
@@ -2887,7 +2907,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@ -459,7 +459,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
|
||||
return download_button->bubble_controller();
|
||||
return nullptr;
|
||||
@@ -3353,7 +3374,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -3423,7 +3444,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
@ -469,7 +469,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -3928,8 +3950,10 @@ void BrowserView::Layout() {
|
||||
@@ -3994,8 +4016,10 @@ void BrowserView::Layout() {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@ -480,9 +480,9 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
+ if (frame()->GetFrameView())
|
||||
+ frame()->GetFrameView()->UpdateMinimumSize();
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -3995,6 +4019,11 @@ void BrowserView::AddedToWidget() {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// In chromeOS ash we round the bottom two corners of the browser frame by
|
||||
@@ -4073,6 +4097,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@ -494,7 +494,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4042,13 +4071,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4120,13 +4149,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@ -510,7 +510,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -4453,7 +4478,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
@@ -4544,7 +4569,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
// Undo our anti-jankiness hacks and force a re-layout.
|
||||
in_process_fullscreen_ = false;
|
||||
ToolbarSizeChanged(false);
|
||||
@ -520,7 +520,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
}
|
||||
|
||||
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
|
||||
@@ -4822,6 +4848,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -4915,6 +4941,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@ -529,7 +529,7 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -4844,6 +4872,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
@@ -4937,6 +4965,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@ -539,13 +539,13 @@ index 7005d2c0be663..8d55893627837 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index e149a732b5d06..b8ae00f1e44b8 100644
|
||||
index 58f128d2217a0..c8dd2a4a5a940 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,
|
||||
public webapps::AppBannerManager::Observer {
|
||||
public:
|
||||
METADATA_HEADER(BrowserView);
|
||||
@@ -136,11 +136,16 @@ class BrowserView : public BrowserWindow,
|
||||
kUnknown
|
||||
};
|
||||
|
||||
+ BrowserView();
|
||||
explicit BrowserView(std::unique_ptr<Browser> browser);
|
||||
+ void InitBrowser(std::unique_ptr<Browser> browser);
|
||||
@ -559,7 +559,7 @@ index e149a732b5d06..b8ae00f1e44b8 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -788,6 +793,12 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -810,6 +815,12 @@ class BrowserView : public BrowserWindow,
|
||||
return web_app_frame_toolbar();
|
||||
}
|
||||
|
||||
@ -618,10 +618,10 @@ index 8267a265a8e10..ee08f18e96a34 100644
|
||||
|
||||
ContentsWebView::~ContentsWebView() {
|
||||
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 09e828d1e079e..7f42618d67e77 100644
|
||||
index 723a2840bd988..975152c988917 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -94,6 +94,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
@@ -96,6 +96,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
};
|
||||
|
||||
for (PageActionIconType type : params.types_enabled) {
|
||||
@ -681,9 +681,18 @@ index dc792bea0ab88..e02cdd3214b1d 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index c9e50271f2716..063e5b353f0a3 100644
|
||||
index 55c2762426eaa..d2a6f69ad70aa 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -182,7 +182,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
void Paint(gfx::Canvas* canvas, views::View* view) const override {
|
||||
bool painted = TopContainerBackground::PaintThemeCustomImage(
|
||||
canvas, view, browser_view_, /*translate_view_coordinates=*/false);
|
||||
- if (!painted) {
|
||||
+ if (!painted && browser_view_->frame()->GetFrameView()) {
|
||||
SkColor frame_color =
|
||||
browser_view_->frame()->GetFrameView()->GetFrameColor(
|
||||
BrowserFrameActiveState::kUseCurrent);
|
||||
@@ -208,12 +208,13 @@ class ToolbarView::ContainerView : public views::View {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ToolbarView, public:
|
||||
|
Reference in New Issue
Block a user