Update to Chromium version 105.0.5176.0 (#1023155)

This commit is contained in:
Marshall Greenblatt
2022-07-21 13:26:10 -04:00
parent 5e753d211f
commit e9f29ab3d6
92 changed files with 615 additions and 700 deletions

View File

@ -13,10 +13,10 @@ index 3285e422f76c1..5f35b91897b75 100644
return false;
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 66bece3638bf5..87e059da1256c 100644
index 6f504d1acba5d..0e242d1612fc2 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@@ -10,6 +10,7 @@ import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
@ -24,7 +24,7 @@ index 66bece3638bf5..87e059da1256c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -373,6 +374,10 @@ static_library("ui") {
@@ -364,6 +365,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -35,15 +35,15 @@ index 66bece3638bf5..87e059da1256c 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -395,6 +400,7 @@ static_library("ui") {
"//build:branding_buildflags",
@@ -387,6 +392,7 @@ static_library("ui") {
"//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//cc/paint",
+ "//cef/libcef/features",
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -5461,6 +5467,7 @@ static_library("ui") {
@@ -5505,6 +5511,7 @@ static_library("ui") {
if (enable_basic_printing) {
deps += [
"//components/printing/browser",
@ -52,10 +52,10 @@ index 66bece3638bf5..87e059da1256c 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 63d64acc72318..21f0a0b81f996 100644
index ce86697e47437..4600d6a9ab701 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -264,6 +264,25 @@
@@ -262,6 +262,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@ -81,7 +81,7 @@ index 63d64acc72318..21f0a0b81f996 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -513,6 +532,13 @@ Browser::Browser(const CreateParams& params)
@@ -511,6 +530,13 @@ Browser::Browser(const CreateParams& params)
tab_strip_model_->AddObserver(this);
@ -95,7 +95,7 @@ index 63d64acc72318..21f0a0b81f996 100644
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
@@ -1329,6 +1355,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1322,6 +1348,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@ -110,7 +110,7 @@ index 63d64acc72318..21f0a0b81f996 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1336,8 +1370,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1329,8 +1363,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -131,7 +131,7 @@ index 63d64acc72318..21f0a0b81f996 100644
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1544,6 +1588,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
@@ -1537,6 +1581,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
return window->OpenURLFromTab(source, params);
}
@ -146,7 +146,7 @@ index 63d64acc72318..21f0a0b81f996 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1673,6 +1725,15 @@ void Browser::AddNewContents(WebContents* source,
@@ -1666,6 +1718,15 @@ void Browser::AddNewContents(WebContents* source,
return;
}
@ -162,7 +162,7 @@ index 63d64acc72318..21f0a0b81f996 100644
chrome::AddWebContents(this, source, std::move(new_contents), target_url,
disposition, initial_rect, window_action);
}
@@ -1691,6 +1752,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1684,6 +1745,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@ -171,7 +171,7 @@ index 63d64acc72318..21f0a0b81f996 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1718,6 +1781,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1711,6 +1774,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -180,7 +180,7 @@ index 63d64acc72318..21f0a0b81f996 100644
if (!GetStatusBubble())
return;
@@ -1725,6 +1790,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1718,6 +1783,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@ -198,7 +198,7 @@ index 63d64acc72318..21f0a0b81f996 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1749,6 +1825,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -1742,6 +1818,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false;
}
@ -218,7 +218,7 @@ index 63d64acc72318..21f0a0b81f996 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -1841,6 +1930,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1834,6 +1923,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -229,7 +229,7 @@ index 63d64acc72318..21f0a0b81f996 100644
}
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -1885,6 +1978,8 @@ void Browser::RendererResponsive(
@@ -1878,6 +1971,8 @@ void Browser::RendererResponsive(
void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) {
if (web_contents == tab_strip_model_->GetActiveWebContents())
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
@ -238,7 +238,7 @@ index 63d64acc72318..21f0a0b81f996 100644
}
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
@@ -1945,11 +2040,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -1938,11 +2033,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@ -254,7 +254,7 @@ index 63d64acc72318..21f0a0b81f996 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2127,6 +2226,15 @@ void Browser::RequestMediaAccessPermission(
@@ -2121,6 +2220,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@ -270,7 +270,7 @@ index 63d64acc72318..21f0a0b81f996 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2664,13 +2772,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -2658,13 +2766,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
@ -292,7 +292,7 @@ index 63d64acc72318..21f0a0b81f996 100644
return window_ ? window_->GetStatusBubble() : nullptr;
}
@@ -2797,6 +2912,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2791,6 +2906,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
content_translate_driver->RemoveTranslationObserver(this);
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
}
@ -302,7 +302,7 @@ index 63d64acc72318..21f0a0b81f996 100644
void Browser::TabDetachedAtImpl(content::WebContents* contents,
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 87859f4741386..1346cdb60631d 100644
index 64eeec32ac70f..10039229b4d4f 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@
@ -324,9 +324,9 @@ index 87859f4741386..1346cdb60631d 100644
#if BUILDFLAG(IS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -316,6 +321,11 @@ class Browser : public TabStripModelObserver,
// maximizable.
bool can_maximize = true;
@@ -320,6 +325,11 @@ class Browser : public TabStripModelObserver,
float initial_aspect_ratio = 1.0f;
bool lock_aspect_ratio = false;
+#if BUILDFLAG(ENABLE_CEF)
+ // Opaque CEF-specific configuration. Will be propagated to new Browsers.
@ -336,7 +336,7 @@ index 87859f4741386..1346cdb60631d 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -383,6 +393,13 @@ class Browser : public TabStripModelObserver,
@@ -387,6 +397,13 @@ class Browser : public TabStripModelObserver,
return creation_source_ == CreationSource::kSessionRestore;
}
@ -350,7 +350,7 @@ index 87859f4741386..1346cdb60631d 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -456,6 +473,12 @@ class Browser : public TabStripModelObserver,
@@ -460,6 +477,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
@ -363,7 +363,7 @@ index 87859f4741386..1346cdb60631d 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -825,11 +848,19 @@ class Browser : public TabStripModelObserver,
@@ -829,11 +852,19 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -383,7 +383,7 @@ index 87859f4741386..1346cdb60631d 100644
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
@@ -1226,6 +1257,8 @@ class Browser : public TabStripModelObserver,
@@ -1233,6 +1264,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@ -392,7 +392,7 @@ index 87859f4741386..1346cdb60631d 100644
CreationSource creation_source_ = CreationSource::kUnknown;
UnloadController unload_controller_;
@@ -1294,6 +1327,10 @@ class Browser : public TabStripModelObserver,
@@ -1301,6 +1334,10 @@ class Browser : public TabStripModelObserver,
std::unique_ptr<screen_ai::AXScreenAIAnnotator> screen_ai_annotator_;
#endif
@ -404,10 +404,10 @@ index 87859f4741386..1346cdb60631d 100644
// The following factory is used for chrome update coalescing.
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 9315a947d5cb2..0d5d14ae56026 100644
index 3c01acfca74b0..11e298c8ed15b 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -518,6 +518,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -563,6 +563,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);
@ -422,7 +422,7 @@ index 9315a947d5cb2..0d5d14ae56026 100644
// tab helpers, so the entire set of tab helpers needs to be set up
// immediately.
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
index 9d0cf64ac7dcb..b6066163d2dc3 100644
index fc41ea1501856..7e6ef189bbc51 100644
--- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc
@@ -31,9 +31,13 @@ void AddTabAt(Browser* browser,