Update to Chromium version 90.0.4430.0 (#857950)

- Linux ARM builds require use_vaapi=false (see https://crbug.com/1185348)
- Windows official builds require use_thin_lto=false (see https://crbug.com/1177001)
This commit is contained in:
Marshall Greenblatt
2021-03-04 17:36:57 -05:00
parent 1587d6da03
commit 74db00fc89
134 changed files with 1245 additions and 1204 deletions

View File

@@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index 4516b3575892..db53b698a7d4 100644
index 70911a215498..52aea5cc2e70 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -34,6 +34,7 @@ import("//build/config/ui.gni")
@@ -10,7 +10,7 @@ index 4516b3575892..db53b698a7d4 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
@@ -1666,7 +1667,11 @@ component("base") {
@@ -1731,7 +1732,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@@ -23,7 +23,7 @@ index 4516b3575892..db53b698a7d4 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1867,6 +1872,12 @@ component("base") {
@@ -1938,6 +1943,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}

View File

@@ -1,5 +1,5 @@
diff --git base/strings/string_piece.h base/strings/string_piece.h
index b10707d94ef9..1bfa980cbbe6 100644
index 038165ea1e1c..a559312bba57 100644
--- base/strings/string_piece.h
+++ base/strings/string_piece.h
@@ -24,6 +24,7 @@

View File

@@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index d403f389af0d..c8ff688fd11f 100644
index 52ebdbbc7c2e..822f2e41afec 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1685,6 +1685,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
@@ -1706,6 +1706,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;

View File

@@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 5928c561b5a3..6f342bb0e036 100644
index 266b74b3b50a..f242e8b08ec1 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -1779,8 +1779,6 @@ config("thin_archive") {
@@ -1824,8 +1824,6 @@ config("thin_archive") {
# archives.
if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
arflags = [ "-T" ]

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 40c07e2d724a..1cfe14f8cd6f 100644
index 72d91d05c23a..bfa8860bcd89 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/crypto.gni")
@@ -10,7 +10,7 @@ index 40c07e2d724a..1cfe14f8cd6f 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1966,6 +1967,7 @@ static_library("browser") {
@@ -1964,6 +1965,7 @@ static_library("browser") {
"//build:chromeos_buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@@ -18,7 +18,7 @@ index 40c07e2d724a..1cfe14f8cd6f 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2489,6 +2491,10 @@ static_library("browser") {
@@ -2504,6 +2506,10 @@ static_library("browser") {
]
}
@@ -29,7 +29,7 @@ index 40c07e2d724a..1cfe14f8cd6f 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -5104,7 +5110,7 @@ static_library("browser") {
@@ -5166,7 +5172,7 @@ static_library("browser") {
]
}

View File

@@ -1,16 +1,16 @@
diff --git chrome/browser/app_controller_mac.mm chrome/browser/app_controller_mac.mm
index e2eb5c2c73d0..d08b0a9a2a54 100644
index 596eabd15f44..b9b24760b7c2 100644
--- chrome/browser/app_controller_mac.mm
+++ chrome/browser/app_controller_mac.mm
@@ -29,6 +29,7 @@
#include "base/task/thread_pool.h"
@@ -30,6 +30,7 @@
#include "base/threading/scoped_blocking_call.h"
#include "base/threading/thread_restrictions.h"
#include "build/branding_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/apps/app_shim/app_shim_manager_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_termination_manager.h"
@@ -1194,6 +1195,7 @@ - (void)commandDispatch:(id)sender {
@@ -1219,6 +1220,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// Run a (background) application in a new tab.
- (void)executeApplication:(id)sender {
@@ -18,7 +18,7 @@ index e2eb5c2c73d0..d08b0a9a2a54 100644
NSInteger tag = [sender tag];
Profile* profile = [self lastProfile];
DCHECK(profile);
@@ -1202,6 +1204,7 @@ - (void)executeApplication:(id)sender {
@@ -1227,6 +1229,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
tag < static_cast<int>(applications.size()));
const extensions::Extension* extension = applications.GetExtension(tag);
BackgroundModeManager::LaunchBackgroundApplication(profile, extension);
@@ -26,7 +26,7 @@ index e2eb5c2c73d0..d08b0a9a2a54 100644
}
// Same as |-commandDispatch:|, but executes commands using a disposition
@@ -1599,6 +1602,7 @@ - (NSMenu*)applicationDockMenu:(NSApplication*)sender {
@@ -1614,6 +1617,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// TODO(rickcam): Mock out BackgroundApplicationListModel, then add unit
// tests which use the mock in place of the profile-initialized model.
@@ -34,7 +34,7 @@ index e2eb5c2c73d0..d08b0a9a2a54 100644
// Avoid breaking unit tests which have no profile.
if (profile) {
BackgroundApplicationListModel applications(profile);
@@ -1625,6 +1629,7 @@ - (NSMenu*)applicationDockMenu:(NSApplication*)sender {
@@ -1640,6 +1644,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
}
}
}
@@ -42,7 +42,7 @@ index e2eb5c2c73d0..d08b0a9a2a54 100644
return dockMenu;
}
@@ -1835,11 +1840,13 @@ - (void)handoffActiveURLChanged:(content::WebContents*)webContents {
@@ -1850,11 +1855,13 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
namespace {
void UpdateProfileInUse(Profile* profile, Profile::CreateStatus status) {
@@ -57,69 +57,58 @@ index e2eb5c2c73d0..d08b0a9a2a54 100644
} // namespace
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index 1ea08a7ad6ae..473ebde08451 100644
index 3d634db18900..96e44ad48e5e 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -202,10 +202,12 @@ class BrowserProcess {
@@ -197,9 +197,9 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
+#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
// Returns the object that manages background applications.
virtual BackgroundModeManager* background_mode_manager() = 0;
-#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
virtual void set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) = 0;
+#endif
// Returns the StatusTray, which provides an API for displaying status icons
// in the system status tray. Returns NULL if status icons are not supported
#endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 35510d179897..79cdc358903c 100644
index 067873339ce4..4bc021eb8c9a 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -957,24 +957,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -943,18 +943,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
+#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
-BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
+BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
if (!background_mode_manager_)
CreateBackgroundModeManager();
return background_mode_manager_.get();
-#else
- NOTIMPLEMENTED();
- return NULL;
- return nullptr;
-#endif
}
-#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
void BrowserProcessImpl::set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) {
-#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
background_mode_manager_ = std::move(manager);
-#endif
}
+#endif
StatusTray* BrowserProcessImpl::status_tray() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 1d3c566cc59b..230c16644234 100644
index b4ceefbccd08..7d60206c83b1 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -166,9 +166,11 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -169,8 +169,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;
+#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
BackgroundModeManager* background_mode_manager() override;
- BackgroundModeManager* background_mode_manager() override;
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
+ BackgroundModeManager* background_mode_manager() override;
void set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) override;
+#endif
StatusTray* status_tray() override;
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
subresource_filter::RulesetService* subresource_filter_ruleset_service()
#endif
diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc
index e0cafee5eedd..06ded156be3c 100644
--- chrome/browser/lifetime/browser_close_manager.cc
@@ -140,11 +129,11 @@ index e0cafee5eedd..06ded156be3c 100644
// Make a copy of the BrowserList to simplify the case where we need to
// destroy a Browser during the loop.
diff --git chrome/browser/sessions/session_service.cc chrome/browser/sessions/session_service.cc
index cbddcc52a8f6..02ab085c481c 100644
index 867da7e78e1a..de849b67b1e3 100644
--- chrome/browser/sessions/session_service.cc
+++ chrome/browser/sessions/session_service.cc
@@ -968,12 +968,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {
if (!profile() || profile()->AsTestingProfile())
@@ -1047,12 +1047,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {
if (profile()->AsTestingProfile())
return;
+#if BUILDFLAG(ENABLE_BACKGROUND_MODE)

View File

@@ -13,10 +13,10 @@ index ba0c5c3fc044..b4df9af95ecd 100644
return false;
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 1dc23535c42a..4aae0399346f 100644
index f225525e74eb..ee5932936215 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -257,6 +257,20 @@
@@ -256,6 +256,20 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@@ -51,7 +51,7 @@ index 1dc23535c42a..4aae0399346f 100644
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
@@ -1343,6 +1364,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1310,6 +1331,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@@ -66,7 +66,7 @@ index 1dc23535c42a..4aae0399346f 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1350,8 +1379,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1317,8 +1346,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@@ -87,7 +87,7 @@ index 1dc23535c42a..4aae0399346f 100644
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1579,6 +1618,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
@@ -1538,6 +1577,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
return window->OpenURLFromTab(source, params);
}
@@ -102,7 +102,7 @@ index 1dc23535c42a..4aae0399346f 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1692,6 +1739,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1651,6 +1698,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool to_different_document) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, to_different_document);
@@ -111,7 +111,7 @@ index 1dc23535c42a..4aae0399346f 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1719,6 +1768,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1678,6 +1727,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -120,7 +120,7 @@ index 1dc23535c42a..4aae0399346f 100644
if (!GetStatusBubble())
return;
@@ -1726,6 +1777,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1685,6 +1736,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@@ -138,7 +138,7 @@ index 1dc23535c42a..4aae0399346f 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1842,6 +1904,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1801,6 +1863,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@@ -149,7 +149,7 @@ index 1dc23535c42a..4aae0399346f 100644
}
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -1878,6 +1944,8 @@ void Browser::RendererResponsive(
@@ -1837,6 +1903,8 @@ void Browser::RendererResponsive(
void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) {
if (web_contents == tab_strip_model_->GetActiveWebContents())
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
@@ -158,7 +158,7 @@ index 1dc23535c42a..4aae0399346f 100644
}
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
@@ -1924,11 +1992,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -1883,11 +1951,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@@ -174,7 +174,7 @@ index 1dc23535c42a..4aae0399346f 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2826,6 +2898,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2730,6 +2802,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
content_translate_driver->RemoveTranslationObserver(this);
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
}
@@ -184,7 +184,7 @@ index 1dc23535c42a..4aae0399346f 100644
void Browser::CloseFrame() {
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 7287ec00c3f5..93df2551fab7 100644
index 3a0202c2139b..700de9a44461 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@
@@ -206,9 +206,9 @@ index 7287ec00c3f5..93df2551fab7 100644
#if defined(OS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -269,6 +274,11 @@ class Browser : public TabStripModelObserver,
// User-set title of this browser window, if there is one.
std::string user_title;
@@ -281,6 +286,11 @@ class Browser : public TabStripModelObserver,
// maximizable.
bool can_maximize = true;
+#if BUILDFLAG(ENABLE_CEF)
+ // Opaque CEF-specific configuration. Will be propagated to new Browsers.
@@ -218,9 +218,9 @@ index 7287ec00c3f5..93df2551fab7 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -386,6 +396,12 @@ class Browser : public TabStripModelObserver,
return &signin_view_controller_;
}
@@ -403,6 +413,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
+#if BUILDFLAG(ENABLE_CEF)
+ cef::BrowserDelegate* cef_delegate() const {
@@ -231,7 +231,7 @@ index 7287ec00c3f5..93df2551fab7 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -770,6 +786,11 @@ class Browser : public TabStripModelObserver,
@@ -783,6 +799,11 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@@ -243,7 +243,7 @@ index 7287ec00c3f5..93df2551fab7 100644
void ContentsMouseEvent(content::WebContents* source,
bool motion,
bool exited) override;
@@ -1240,6 +1261,10 @@ class Browser : public TabStripModelObserver,
@@ -1242,6 +1263,10 @@ class Browser : public TabStripModelObserver,
extension_browser_window_helper_;
#endif
@@ -253,12 +253,12 @@ index 7287ec00c3f5..93df2551fab7 100644
+
const base::ElapsedTimer creation_timer_;
// Stores the list of browser windows showing via a menu.
// The following factory is used for chrome update coalescing.
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 4bf854459b2c..20e348eb9293 100644
index 019834353c02..894de692f35d 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -453,6 +453,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -454,6 +454,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index cf62b79358e1..4fe90fde38ff 100644
index c1e6c77a5726..d3c41d3dac05 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -8,6 +8,7 @@
@@ -8,9 +8,9 @@ index cf62b79358e1..4fe90fde38ff 100644
#include "build/buildflag.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h"
#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
#include "chrome/browser/profiles/profile.h"
@@ -21,6 +22,10 @@
@@ -22,6 +23,10 @@
#include "extensions/buildflags/buildflags.h"
#include "ui/webui/webui_allowlist_provider.h"
@@ -21,7 +21,7 @@ index cf62b79358e1..4fe90fde38ff 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_service.h"
#include "extensions/browser/extension_system.h"
@@ -49,8 +54,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
@@ -51,8 +56,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
#endif
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -36,7 +36,7 @@ index cf62b79358e1..4fe90fde38ff 100644
#endif
}
@@ -108,10 +119,16 @@ scoped_refptr<RefcountedKeyedService>
@@ -110,10 +121,16 @@ scoped_refptr<RefcountedKeyedService>
}
#if BUILDFLAG(ENABLE_EXTENSIONS)

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index afee70a01862..e49e769b6366 100644
index ea17679df248..fe9280cb59ce 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/features.gni")
@@ -10,7 +10,7 @@ index afee70a01862..e49e769b6366 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
@@ -327,6 +328,10 @@ static_library("ui") {
@@ -332,6 +333,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@@ -21,7 +21,7 @@ index afee70a01862..e49e769b6366 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
@@ -349,6 +354,7 @@ static_library("ui") {
@@ -355,6 +360,7 @@ static_library("ui") {
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//cc/paint",
@@ -29,7 +29,7 @@ index afee70a01862..e49e769b6366 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1553,6 +1559,7 @@ static_library("ui") {
@@ -1581,6 +1587,7 @@ static_library("ui") {
"//components/page_load_metrics/browser",
"//components/performance_manager:site_data_proto",
"//components/printing/browser",
@@ -37,7 +37,7 @@ index afee70a01862..e49e769b6366 100644
"//components/profile_metrics",
"//components/reading_list/features:flags",
"//components/safe_browsing/core/common:safe_browsing_policy_handler",
@@ -3370,7 +3377,9 @@ static_library("ui") {
@@ -3392,7 +3399,9 @@ static_library("ui") {
"views/frame/browser_desktop_window_tree_host_platform.h",
]
}

View File

@@ -1,64 +0,0 @@
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 19c5989c8b67..659e6dbebea5 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -37,6 +37,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/accessibility/caption_util.h"
@@ -1067,10 +1068,6 @@ void LaunchURL(const GURL& url,
}
}
-std::string GetProduct() {
- return version_info::GetProductNameAndVersionForUserAgent();
-}
-
void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
// |allowlist| combines pref/policy + cmdline switch in the browser process.
// For renderer and utility (e.g. NetworkService) processes the switch is the
@@ -1258,6 +1255,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
return *greased_brand_version_list;
}
+std::string GetProduct() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kProductVersion))
+ return command_line->GetSwitchValueASCII(switches::kProductVersion);
+
+ return version_info::GetProductNameAndVersionForUserAgent();
+}
+
std::string GetUserAgent() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUserAgent)) {
@@ -3610,9 +3615,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // defined(OS_ANDROID)
+#if !BUILDFLAG(ENABLE_CEF)
// chrome: & friends.
handler->AddHandlerPair(&ChromeContentBrowserClient::HandleWebUI,
&ChromeContentBrowserClient::HandleWebUIReverse);
+#endif
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index 3ef2329ac8a6..3e3ede99e042 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -108,7 +108,8 @@ class ChromeXrIntegrationClient;
}
#endif
-// Returns the user agent of Chrome.
+// Returns the product and user agent of Chrome.
+std::string GetProduct();
std::string GetUserAgent();
blink::UserAgentMetadata GetUserAgentMetadata();

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 102a4c5ce183..a6ce775156b4 100644
index 71730949d2bd..eedcde617f01 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -390,7 +390,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -397,7 +397,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());
@@ -12,10 +12,10 @@ index 102a4c5ce183..a6ce775156b4 100644
}
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index 1be24b4ee39c..4288383cb2a8 100644
index 743dccc6ddf4..204be4916f14 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -106,7 +106,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -113,7 +113,7 @@ class ProfileManager : public content::NotificationObserver,
// acceptable. Returns null if creation of the new profile fails.
// TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
// make this method private.
@@ -24,7 +24,7 @@ index 1be24b4ee39c..4288383cb2a8 100644
// Returns regular or off-the-record profile given its profile key.
static Profile* GetProfileFromProfileKey(ProfileKey* profile_key);
@@ -139,7 +139,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -146,7 +146,7 @@ class ProfileManager : public content::NotificationObserver,
// Returns true if the profile pointer is known to point to an existing
// profile.
@@ -33,7 +33,7 @@ index 1be24b4ee39c..4288383cb2a8 100644
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use.
@@ -148,7 +148,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -155,7 +155,7 @@ class ProfileManager : public content::NotificationObserver,
// Get the Profile last used (the Profile to which owns the most recently
// focused window) with this Chrome build. If no signed profile has been
// stored in Local State, hand back the Default profile.

View File

@@ -1,12 +1,12 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index ae8aef3a076c..f7e6a91047ef 100644
index a940b0d2a09b..328976b55299 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -23,6 +23,7 @@ static_library("safe_browsing") {
@@ -26,6 +26,7 @@ static_library("safe_browsing") {
"//chrome/common:constants",
"//components/browser_sync",
"//components/enterprise/common:strings",
+ "//components/gcm_driver:gcm_buildflags",
"//components/keyed_service/content",
"//components/language/core/browser",
"//components/page_info",
"//components/no_state_prefetch/browser",

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index dfa34db9255e..0a79d11c7e0c 100644
index 6de814c6ed1e..302d6dcc789a 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -18,6 +18,7 @@
@@ -56,17 +56,7 @@ index dfa34db9255e..0a79d11c7e0c 100644
}
PluginInfoHostImpl::Context::~Context() {}
@@ -207,7 +220,8 @@ void PluginInfoHostImpl::PluginsLoaded(
plugin_metadata->identifier(), &output->status);
}
- if (output->status == chrome::mojom::PluginStatus::kNotFound) {
+ if (!cef::IsAlloyRuntimeEnabled() &&
+ output->status == chrome::mojom::PluginStatus::kNotFound) {
// Check to see if the component updater can fetch an implementation.
std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info =
g_browser_process->component_updater()->GetComponentForMimeType(
@@ -228,6 +242,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
@@ -218,6 +231,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
PluginMetadata::SecurityStatus security_status,
const std::string& plugin_identifier,
chrome::mojom::PluginStatus* status) const {
@@ -82,7 +72,7 @@ index dfa34db9255e..0a79d11c7e0c 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed;
return;
@@ -344,17 +367,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
@@ -334,17 +356,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false;
}
@@ -163,7 +153,7 @@ index e547d5f00617..831d5794ecde 100644
Profile* profile = Profile::FromBrowserContext(browser_context);
const std::vector<std::string>& allowlist =
diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc
index ce40f0039fe0..c8cbecb61455 100644
index 6555dfc37d5c..d54030b6f236 100644
--- chrome/common/google_url_loader_throttle.cc
+++ chrome/common/google_url_loader_throttle.cc
@@ -7,6 +7,7 @@
@@ -174,9 +164,9 @@ index ce40f0039fe0..c8cbecb61455 100644
#include "chrome/common/chrome_features.h"
#include "chrome/common/net/safe_search_util.h"
#include "components/google/core/common/google_util.h"
@@ -14,6 +15,10 @@
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/public/mojom/x_frame_options.mojom.h"
@@ -18,6 +19,10 @@
#include "ui/base/device_form_factor.h"
#endif
+#if BUILDFLAG(ENABLE_CEF)
+#include "cef/libcef/common/extensions/extensions_util.h"
@@ -185,7 +175,7 @@ index ce40f0039fe0..c8cbecb61455 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/common/extension_urls.h"
#endif
@@ -153,6 +158,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
@@ -168,6 +173,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
const GURL& response_url,
network::mojom::URLResponseHead* response_head,
bool* defer) {
@@ -198,10 +188,10 @@ index ce40f0039fe0..c8cbecb61455 100644
// that the X-Frame-Options protection mechanism is set to either DENY or
// SAMEORIGIN.
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index a1c26dfbd5cc..aaf96b069c32 100644
index b6fe493a6ddc..bc2f6487044f 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -848,6 +848,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -858,6 +858,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@@ -209,7 +199,7 @@ index a1c26dfbd5cc..aaf96b069c32 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1046,7 +1047,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1053,7 +1054,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@@ -219,7 +209,7 @@ index a1c26dfbd5cc..aaf96b069c32 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1055,7 +1057,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1062,7 +1064,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@@ -229,7 +219,7 @@ index a1c26dfbd5cc..aaf96b069c32 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1065,7 +1068,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1072,7 +1075,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@@ -239,7 +229,7 @@ index a1c26dfbd5cc..aaf96b069c32 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1073,7 +1077,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1080,7 +1084,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));
@@ -248,7 +238,7 @@ index a1c26dfbd5cc..aaf96b069c32 100644
+ content_settings_agent->DidBlockContentType(content_type);
break;
}
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
}
diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h
index 06b6875bd37e..13c197b532ad 100644
--- content/browser/browser_plugin/browser_plugin_guest.h

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 6a837ad9df98..7abef83f2a47 100644
index a69e547cdaa1..5fde8ab27021 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@
@@ -10,7 +10,7 @@ index 6a837ad9df98..7abef83f2a47 100644
import("//chrome/common/features.gni")
import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni")
@@ -145,6 +146,7 @@ static_library("renderer") {
@@ -146,6 +147,7 @@ static_library("renderer") {
deps = [
"//base/allocator:buildflags",
"//build:chromeos_buildflags",
@@ -18,7 +18,7 @@ index 6a837ad9df98..7abef83f2a47 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -226,6 +228,10 @@ static_library("renderer") {
@@ -229,6 +231,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@@ -1,8 +1,8 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index db85b6b2fcf5..bcf6867e8f4e 100644
index 826ef32f3033..238750f1c2ba 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -28,6 +28,7 @@
@@ -29,6 +29,7 @@
#include "base/trace_event/trace_event_impl.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -10,7 +10,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
#include "chrome/browser/defaults.h"
@@ -381,6 +382,8 @@ struct MainFunction {
@@ -380,6 +381,8 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@@ -19,7 +19,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
#if defined(OS_WIN)
// Reach out to chrome_elf for the truth on the user data directory.
// Note that in tests, this links to chrome_elf_test_stubs.
@@ -658,7 +661,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
@@ -657,7 +660,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
}
#if defined(OS_WIN)
@@ -29,7 +29,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
base::sequence_manager::internal::ThreadControllerPowerMonitor::
InitializeOnMainThread();
#endif
@@ -943,6 +948,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -950,6 +955,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -37,7 +37,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
crash_reporter::InitializeCrashKeys();
#if defined(OS_POSIX)
@@ -953,6 +959,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -960,6 +966,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@@ -45,7 +45,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
#if defined(OS_WIN)
child_process_logging::Init();
@@ -1075,6 +1082,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1083,6 +1090,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
locale;
}
@@ -53,7 +53,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
#if defined(OS_POSIX) && !defined(OS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1107,6 +1115,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1115,6 +1123,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@@ -61,7 +61,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
#if BUILDFLAG(ENABLE_PDF)
MaybeInitializeGDI();
@@ -1205,6 +1214,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1213,6 +1222,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@@ -69,7 +69,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
const base::CommandLine* command_line =
@@ -1221,6 +1231,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1229,6 +1239,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@@ -78,7 +78,7 @@ index db85b6b2fcf5..bcf6867e8f4e 100644
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index fee4d5f1a8ca..2e4fb506d851 100644
index 65465803bd38..b521fd91a93b 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -49,6 +49,7 @@
@@ -89,7 +89,7 @@ index fee4d5f1a8ca..2e4fb506d851 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -902,8 +903,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -900,8 +901,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#if !defined(OS_ANDROID)
// Create the RunLoop for MainMessageLoopRun() to use, and pass a copy of
// its QuitClosure to the BrowserProcessImpl to call when it is time to exit.
@@ -101,7 +101,7 @@ index fee4d5f1a8ca..2e4fb506d851 100644
// These members must be initialized before returning from this function.
// Android doesn't use StartupBrowserCreator.
@@ -1634,11 +1637,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1633,11 +1636,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@@ -117,7 +117,7 @@ index fee4d5f1a8ca..2e4fb506d851 100644
// of lacros-chrome is complete.
#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index c30b73c2575f..5da45a243f9b 100644
index 8a33ce57766c..ca69a37eee22 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -16,6 +16,7 @@
@@ -128,7 +128,7 @@ index c30b73c2575f..5da45a243f9b 100644
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_listener.h"
#include "chrome/browser/browser_process.h"
@@ -111,6 +112,7 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
@@ -110,6 +111,7 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
}
}
@@ -136,7 +136,7 @@ index c30b73c2575f..5da45a243f9b 100644
// Create the app delegate. This object is intentionally leaked as a global
// singleton. It is accessed through -[NSApp delegate].
AppController* app_controller = [[AppController alloc] init];
@@ -119,6 +121,7 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
@@ -118,6 +120,7 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
chrome::BuildMainMenu(NSApp, app_controller,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
[app_controller mainMenuCreated];
@@ -144,7 +144,7 @@ index c30b73c2575f..5da45a243f9b 100644
PrefService* local_state = g_browser_process->local_state();
DCHECK(local_state);
@@ -175,7 +178,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit() {
@@ -170,7 +173,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit() {
}
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
@@ -154,28 +154,27 @@ index c30b73c2575f..5da45a243f9b 100644
[appController didEndMainMessageLoop];
+#endif
}
diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm
index 9e8fcb9f9f91..2a9eaca0fb0d 100644
--- chrome/browser/notifications/notification_platform_bridge_mac.mm
+++ chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -24,6 +24,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/system/sys_info.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_display_service_impl.h"
@@ -451,6 +452,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId
- (id<NotificationDelivery>)serviceProxy {
id<NotificationDelivery> proxy = [_xpcConnection remoteObjectProxy];
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 29ba5f21b38f..3ce05420eb78 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -37,6 +37,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/accessibility/caption_util.h"
@@ -3591,9 +3592,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // defined(OS_ANDROID)
+ // Skip exception port configuration when running CEF with crash reporting disabled.
+ if (!_setExceptionPort && cef::IsChromeRuntimeEnabled() &&
+ !cef::IsCrashReportingEnabled()) {
+ _setExceptionPort = YES;
+ }
+
if (!_setExceptionPort) {
base::mac::ScopedMachSendRight exceptionPort(
crash_reporter::GetCrashpadClient().GetHandlerMachPort());
+#if !BUILDFLAG(ENABLE_CEF)
// chrome: & friends.
handler->AddHandlerPair(&ChromeContentBrowserClient::HandleWebUI,
&ChromeContentBrowserClient::HandleWebUIReverse);
+#endif
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index 5c03f250e500..ecfce9c2c7c7 100644
index 7c0229c202ca..67320e907526 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -63,15 +63,23 @@ bool IsUsingGtkTheme(Profile* profile) {
@@ -64,15 +64,23 @@ bool IsUsingGtkTheme(Profile* profile) {
////////////////////////////////////////////////////////////////////////////////
// BrowserFrame, public:
@@ -28,7 +28,7 @@ index 5c03f250e500..ecfce9c2c7c7 100644
}
BrowserFrame::~BrowserFrame() {}
@@ -133,6 +141,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion(
@@ -131,6 +139,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion(
}
int BrowserFrame::GetTopInset() const {
@@ -41,7 +41,7 @@ index 5c03f250e500..ecfce9c2c7c7 100644
return browser_frame_view_->GetTopInset(false);
}
@@ -167,15 +181,21 @@ void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
@@ -165,15 +179,21 @@ void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
content::KeyboardEventProcessingResult BrowserFrame::PreHandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
@@ -63,7 +63,7 @@ index 5c03f250e500..ecfce9c2c7c7 100644
browser_frame_view_->OnBrowserViewInitViewsComplete();
}
@@ -208,7 +228,8 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const {
@@ -206,7 +226,8 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const {
}
const ui::NativeTheme* BrowserFrame::GetNativeTheme() const {
@@ -74,7 +74,7 @@ index 5c03f250e500..ecfce9c2c7c7 100644
->UsingDefaultTheme()) {
return ui::NativeTheme::GetInstanceForDarkUI();
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 3a1314f21ce4..f9464abc97a7 100644
index 050c0e05e4e3..0bbcf4af9a92 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -53,7 +53,9 @@ enum class TabDragKind {
@@ -88,12 +88,12 @@ index 3a1314f21ce4..f9464abc97a7 100644
// Initialize the frame (creates the underlying native window).
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index c4d99326bacf..3c7b45b99186 100644
index 7d93faeadd2c..9b10c7f86c5c 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -545,16 +545,26 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
// static
const char BrowserView::kViewClassName[] = "BrowserView";
@@ -557,11 +557,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
+BrowserView::BrowserView() : BrowserView(nullptr) {}
+
@@ -113,14 +113,17 @@ index c4d99326bacf..3c7b45b99186 100644
+ immersive_mode_controller_ = chrome::CreateImmersiveModeController();
+
SetShowIcon(::ShouldShowWindowIcon(browser_.get()));
SetHasWindowSizeControls(!chrome::IsRunningInForcedAppMode());
// In forced app mode, all size controls are always disabled. Otherwise, use
@@ -575,7 +586,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
- immersive_mode_controller_ = chrome::CreateImmersiveModeController();
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -1340,6 +1350,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
@@ -1368,6 +1378,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled())
return false;
@@ -129,7 +132,7 @@ index c4d99326bacf..3c7b45b99186 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -2357,7 +2369,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
@@ -2393,7 +2405,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
}
void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -139,7 +142,7 @@ index c4d99326bacf..3c7b45b99186 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -2804,7 +2817,8 @@ void BrowserView::Layout() {
@@ -2841,7 +2854,8 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
IsToolbarVisible() ? FocusBehavior::ALWAYS : FocusBehavior::NEVER);
@@ -149,7 +152,7 @@ index c4d99326bacf..3c7b45b99186 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -2907,7 +2921,8 @@ void BrowserView::AddedToWidget() {
@@ -2944,7 +2958,8 @@ void BrowserView::AddedToWidget() {
SetToolbarButtonProvider(toolbar_);
frame_->OnBrowserViewInitViewsComplete();
@@ -160,24 +163,24 @@ index c4d99326bacf..3c7b45b99186 100644
MaybeInitializeWebUITabStrip();
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 986798357dbc..2793bf7b184e 100644
index e4955ccbb929..e678754ee361 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -117,7 +117,9 @@ class BrowserView : public BrowserWindow,
// The browser view's class name.
static const char kViewClassName[];
@@ -114,7 +114,9 @@ class BrowserView : public BrowserWindow,
public webapps::AppBannerManager::Observer {
public:
METADATA_HEADER(BrowserView);
+ BrowserView();
explicit BrowserView(std::unique_ptr<Browser> browser);
+ void InitBrowser(std::unique_ptr<Browser> browser);
BrowserView(const BrowserView&) = delete;
BrowserView& operator=(const BrowserView&) = delete;
~BrowserView() override;
void set_frame(BrowserFrame* frame) { frame_ = frame; }
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 824acb2c7c8a..cd81e0e3f4d3 100644
index 975817e079eb..f77c24d294bc 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -578,37 +578,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -571,37 +571,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {

View File

@@ -1,9 +1,9 @@
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
index 71bc09b46ad6..ddf0da9b330e 100644
index e5009f30f6f5..8190a72bd450 100644
--- third_party/widevine/cdm/BUILD.gn
+++ third_party/widevine/cdm/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/buildflag_header.gni")
import("//build/config/chrome_build.gni")
@@ -7,6 +7,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
+import("//cef/libcef/features/features.gni")

View File

@@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index 36ab5d592ecb..e61236132220 100644
index 572f521ae88c..995d17a90f0d 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -12,6 +12,7 @@
@@ -20,7 +20,7 @@ index 36ab5d592ecb..e61236132220 100644
bool is_navigation,
bool is_download,
diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h
index 4dd9b2645d60..23b46ce1a43a 100644
index eef661b3e095..6c0dacfa4bc3 100644
--- content/browser/renderer_host/input/synthetic_gesture_target_base.h
+++ content/browser/renderer_host/input/synthetic_gesture_target_base.h
@@ -9,6 +9,7 @@

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
index 21ab45886df2..ee7394fd10eb 100644
index f094105ac70c..b5f4616ff821 100644
--- chrome/browser/download/download_target_determiner.cc
+++ chrome/browser/download/download_target_determiner.cc
@@ -660,7 +660,7 @@ void IsHandledBySafePlugin(int render_process_id,
@@ -672,7 +672,7 @@ void IsHandledBySafePlugin(int render_process_id,
content::PluginService* plugin_service =
content::PluginService::GetInstance();
bool plugin_found = plugin_service->GetPluginInfo(
@@ -36,7 +36,7 @@ index 937d3d5bc84f..ac327392dcf3 100644
content::WebPluginInfo* plugin) override;
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
index 5b780f8bf34c..a75d0da983b4 100644
index d0a5a12620bd..a02e13bbd815 100644
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
@@ -65,7 +65,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle,
@@ -49,10 +49,10 @@ index 5b780f8bf34c..a75d0da983b4 100644
false /* allow_wildcard */, is_stale, &plugin_info,
nullptr /* actual_mime_type */);
diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc
index 88fa7da1411e..98d0ea7650ed 100644
index c2418d12834a..6705fd4c60b3 100644
--- chrome/browser/ui/views/frame/browser_root_view.cc
+++ chrome/browser/ui/views/frame/browser_root_view.cc
@@ -77,7 +77,7 @@ void OnFindURLMimeType(const GURL& url,
@@ -81,7 +81,7 @@ void OnFindURLMimeType(const GURL& url,
#if BUILDFLAG(ENABLE_PLUGINS)
content::WebPluginInfo plugin;
result = result || content::PluginService::GetInstance()->GetPluginInfo(
@@ -75,10 +75,10 @@ index 962bb7e2de76..40fc7e92c7cb 100644
GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING);
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 2b0f1c354cf2..2d2dde9412c3 100644
index 4ff0e88bce7a..abca390b7f82 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -611,6 +611,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
@@ -628,6 +628,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
resource_request_->has_user_gesture,
resource_request_->request_initiator, &loader_factory);
@@ -92,7 +92,7 @@ index 2b0f1c354cf2..2d2dde9412c3 100644
if (loader_factory) {
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory));
@@ -814,7 +821,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
@@ -831,7 +838,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
frame_tree_node->current_frame_host()->GetProcess()->GetID();
int routing_id = frame_tree_node->current_frame_host()->GetRoutingID();
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
@@ -187,73 +187,67 @@ index 632ae86c6fd6..55b749ec1242 100644
GetPluginsCallback callback,
const std::vector<WebPluginInfo>& all_plugins);
diff --git content/browser/renderer_host/render_frame_message_filter.cc content/browser/renderer_host/render_frame_message_filter.cc
index 9cc3d077d14b..94af64f0c960 100644
--- content/browser/renderer_host/render_frame_message_filter.cc
+++ content/browser/renderer_host/render_frame_message_filter.cc
@@ -144,6 +144,7 @@ void RenderFrameMessageFilter::OverrideThreadForMessage(
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -151,8 +152,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
std::string* actual_mime_type) {
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
- render_process_id_, render_frame_id, url, main_frame_origin, mime_type,
- allow_wildcard, nullptr, info, actual_mime_type);
+ render_process_id_, render_frame_id, url, is_main_frame,
+ main_frame_origin, mime_type, allow_wildcard, nullptr, info,
+ actual_mime_type);
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index ea74ff6875fd..0c14ce034b96 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -10452,6 +10452,7 @@ void RenderFrameHostImpl::BindHungDetectorHost(
}
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/renderer_host/render_frame_message_filter.h content/browser/renderer_host/render_frame_message_filter.h
index 100c3936190c..b6a37c4220d9 100644
--- content/browser/renderer_host/render_frame_message_filter.h
+++ content/browser/renderer_host/render_frame_message_filter.h
@@ -66,6 +66,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
void OnGetPluginInfo(int render_frame_id,
const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 4bb04980b544..4e1e448a8bfc 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -249,9 +249,10 @@ IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
-IPC_SYNC_MESSAGE_CONTROL4_3(FrameHostMsg_GetPluginInfo,
+IPC_SYNC_MESSAGE_CONTROL5_3(FrameHostMsg_GetPluginInfo,
int /* render_frame_id */,
GURL /* url */,
+ bool /* is_main_frame */,
url::Origin /* main_frame_origin */,
std::string /* mime_type */,
bool /* found */,
void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
GetPluginInfoCallback callback) {
@@ -10459,7 +10460,8 @@ void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
WebPluginInfo info;
std::string actual_mime_type;
bool found = PluginServiceImpl::GetInstance()->GetPluginInfo(
- GetProcess()->GetID(), routing_id_, url, main_frame_origin, mime_type,
+ GetProcess()->GetID(), routing_id_, url, is_main_frame,
+ main_frame_origin, mime_type,
allow_wildcard, nullptr, &info, &actual_mime_type);
std::move(callback).Run(found, info, actual_mime_type);
}
diff --git content/browser/renderer_host/render_frame_host_impl.h content/browser/renderer_host/render_frame_host_impl.h
index 6f7b14d24a4d..8b34229944a8 100644
--- content/browser/renderer_host/render_frame_host_impl.h
+++ content/browser/renderer_host/render_frame_host_impl.h
@@ -2234,6 +2234,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
int32_t plugin_child_id,
const base::FilePath& path) override;
void GetPluginInfo(const GURL& url,
+ bool is_main_frame,
const url::Origin& main_frame_origin,
const std::string& mime_type,
GetPluginInfoCallback callback) override;
diff --git content/common/pepper_plugin.mojom content/common/pepper_plugin.mojom
index a415743ed665..5115a2407a8b 100644
--- content/common/pepper_plugin.mojom
+++ content/common/pepper_plugin.mojom
@@ -29,6 +29,7 @@ interface PepperHost {
// found plugin.
[Sync]
GetPluginInfo(url.mojom.Url url,
+ bool is_main_frame,
url.mojom.Origin main_frame_origin,
string mime_type) =>
(bool found,
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index 4438e0417b3c..cdc59afa7f54 100644
index c8926e0e832d..d50adb22082e 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -9,7 +9,7 @@
// declarations instead of including more headers. If that is infeasible, adjust
// the limit. For more info, see
// https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md
-#pragma clang max_tokens_here 830000
+// #pragma clang max_tokens_here 830000
-#pragma clang max_tokens_here 850000
+// #pragma clang max_tokens_here 850000
#include <utility>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index df6e463d1518..68ab6d8748eb 100644
index 3aed911c525b..1ac73a132e3c 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -32,6 +32,7 @@
@@ -264,7 +258,7 @@ index df6e463d1518..68ab6d8748eb 100644
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h"
#include "device/vr/buildflags/buildflags.h"
@@ -1686,6 +1687,14 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1731,6 +1732,14 @@ class CONTENT_EXPORT ContentBrowserClient {
const base::Optional<url::Origin>& initiating_origin,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@@ -279,7 +273,7 @@ index df6e463d1518..68ab6d8748eb 100644
// Creates an OverlayWindow to be used for Picture-in-Picture. This window
// will house the content shown when in Picture-in-Picture mode. This will
// return a new OverlayWindow.
@@ -1757,6 +1766,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1802,6 +1811,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@@ -315,10 +309,10 @@ index 98c59005599e..69752184745d 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index a4695ba832fc..3eb41cb569b1 100644
index 007e4df297a8..52017e661809 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -85,6 +85,9 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -83,6 +83,9 @@ class CONTENT_EXPORT ContentRendererClient {
// binding requests from RenderProcessHost::BindReceiver().
virtual void ExposeInterfacesToBrowser(mojo::BinderMap* binders) {}
@@ -328,7 +322,7 @@ index a4695ba832fc..3eb41cb569b1 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -301,6 +304,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -299,6 +302,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@@ -340,24 +334,24 @@ index a4695ba832fc..3eb41cb569b1 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index fcb99889673b..9d50aa58f325 100644
index 0c9fc86e80a1..6653b5de4385 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3639,7 +3639,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3564,7 +3564,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
WebPluginInfo info;
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
- routing_id_, params.url, frame_->Top()->GetSecurityOrigin(),
+ routing_id_, params.url, frame_->Parent() == nullptr,
+ frame_->Top()->GetSecurityOrigin(),
params.mime_type.Utf8(), &found, &info, &mime_type));
- GetPepperHost()->GetPluginInfo(params.url, frame_->Top()->GetSecurityOrigin(),
+ GetPepperHost()->GetPluginInfo(params.url, frame_->Parent() == nullptr,
+ frame_->Top()->GetSecurityOrigin(),
params.mime_type.Utf8(), &found, &info,
&mime_type);
if (!found)
return nullptr;
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index aa1fc3821b47..922aacc8f08e 100644
index ebc8e7006453..51f7d8044925 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -609,6 +609,8 @@ void RenderThreadImpl::Init() {
@@ -608,6 +608,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
URLLoaderThrottleProviderType::kFrame);
@@ -367,10 +361,10 @@ index aa1fc3821b47..922aacc8f08e 100644
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index d21f7e95c856..98f3739e60fc 100644
index c5974db34669..520536f76c72 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -996,6 +996,15 @@ void RendererBlinkPlatformImpl::SetActiveURL(const blink::WebURL& url,
@@ -1026,6 +1026,15 @@ void RendererBlinkPlatformImpl::SetActiveURL(const blink::WebURL& url,
//------------------------------------------------------------------------------
@@ -387,10 +381,10 @@ index d21f7e95c856..98f3739e60fc 100644
if (!code_cache_host_) {
code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index c8470ab1919a..2c000a557a0a 100644
index bd141ff762ab..857a92a35a84 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -218,6 +218,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -219,6 +219,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void SetActiveURL(const blink::WebURL& url,
const blink::WebString& top_url) override;

View File

@@ -111,18 +111,18 @@ index 2aba28d210db..00edc202e2c4 100644
return RunContentProcess(params, runner.get());
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 811017f5d455..57055727e83d 100644
index 7873fad0a61b..425c30a56699 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -48,6 +48,7 @@
#include "base/task/post_task.h"
@@ -44,6 +44,7 @@
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/hang_watcher.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include "components/download/public/common/download_task_runner.h"
@@ -1089,6 +1090,11 @@ void ContentMainRunnerImpl::Shutdown() {
#include "build/build_config.h"
@@ -1092,6 +1093,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}

View File

@@ -209,10 +209,10 @@ index 9ea80370a842..3043f7d32f33 100644
extern void InitCrashKeysForTesting();
diff --git components/crash/core/app/crash_reporter_client.cc components/crash/core/app/crash_reporter_client.cc
index 1d0fb4f2a633..8226a3d792be 100644
index 89b4bfccd5d3..7cb0a85470d2 100644
--- components/crash/core/app/crash_reporter_client.cc
+++ components/crash/core/app/crash_reporter_client.cc
@@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
@@ -87,7 +87,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
}
#endif
@@ -221,7 +221,7 @@ index 1d0fb4f2a633..8226a3d792be 100644
void CrashReporterClient::GetProductNameAndVersion(const char** product_name,
const char** version) {
}
@@ -97,6 +97,7 @@ void CrashReporterClient::GetProductNameAndVersion(std::string* product_name,
@@ -96,6 +96,7 @@ void CrashReporterClient::GetProductNameAndVersion(std::string* product_name,
std::string* version,
std::string* channel) {}
@@ -229,15 +229,15 @@ index 1d0fb4f2a633..8226a3d792be 100644
base::FilePath CrashReporterClient::GetReporterLogFilename() {
return base::FilePath();
}
@@ -106,6 +107,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
@@ -105,6 +106,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
return false;
}
#endif
+#endif
#if defined(OS_WIN)
bool CrashReporterClient::GetCrashDumpLocation(base::string16* crash_dir) {
@@ -140,6 +142,28 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
bool CrashReporterClient::GetCrashDumpLocation(std::wstring* crash_dir) {
@@ -139,6 +141,28 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false;
}
@@ -251,8 +251,8 @@ index 1d0fb4f2a633..8226a3d792be 100644
+}
+
+#if defined(OS_WIN)
+base::string16 CrashReporterClient::GetCrashExternalHandler(
+ const base::string16& exe_dir) {
+std::wstring CrashReporterClient::GetCrashExternalHandler(
+ const std::wstring& exe_dir) {
+ return exe_dir + L"\\crashpad_handler.exe";
+}
+#endif
@@ -266,7 +266,7 @@ index 1d0fb4f2a633..8226a3d792be 100644
#if defined(OS_ANDROID)
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
return 100;
@@ -202,9 +226,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
@@ -201,9 +225,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
return false;
}
@@ -282,7 +282,7 @@ index 1d0fb4f2a633..8226a3d792be 100644
} // namespace crash_reporter
diff --git components/crash/core/app/crash_reporter_client.h components/crash/core/app/crash_reporter_client.h
index aaa9ad1d58d7..14b98b2e6598 100644
index 39557cce4744..236806090021 100644
--- components/crash/core/app/crash_reporter_client.h
+++ components/crash/core/app/crash_reporter_client.h
@@ -5,7 +5,9 @@
@@ -293,9 +293,9 @@ index aaa9ad1d58d7..14b98b2e6598 100644
#include <string>
+#include <vector>
#include "base/strings/string16.h"
#include "build/build_config.h"
@@ -88,7 +90,7 @@ class CrashReporterClient {
@@ -87,7 +89,7 @@ class CrashReporterClient {
virtual int GetResultCodeRespawnFailed();
#endif
@@ -304,7 +304,7 @@ index aaa9ad1d58d7..14b98b2e6598 100644
// Returns a textual description of the product type and version to include
// in the crash report. Neither out parameter should be set to NULL.
// TODO(jperaza): Remove the 2-parameter overload of this method once all
@@ -99,6 +101,7 @@ class CrashReporterClient {
@@ -98,6 +100,7 @@ class CrashReporterClient {
std::string* version,
std::string* channel);
@@ -312,7 +312,7 @@ index aaa9ad1d58d7..14b98b2e6598 100644
virtual base::FilePath GetReporterLogFilename();
// Custom crash minidump handler after the minidump is generated.
@@ -108,6 +111,7 @@ class CrashReporterClient {
@@ -107,6 +110,7 @@ class CrashReporterClient {
// libc nor allocate memory normally.
virtual bool HandleCrashDump(const char* crashdump_filename,
uint64_t crash_pid);
@@ -320,7 +320,7 @@ index aaa9ad1d58d7..14b98b2e6598 100644
#endif
// The location where minidump files should be written. Returns true if
@@ -205,6 +209,27 @@ class CrashReporterClient {
@@ -204,6 +208,27 @@ class CrashReporterClient {
// Returns true if breakpad should run in the given process type.
virtual bool EnableBreakpadForProcess(const std::string& process_type);
@@ -330,7 +330,7 @@ index aaa9ad1d58d7..14b98b2e6598 100644
+
+#if defined(OS_WIN)
+ // Returns the absolute path to the external crash handler exe.
+ virtual base::string16 GetCrashExternalHandler(const base::string16& exe_dir);
+ virtual std::wstring GetCrashExternalHandler(const std::wstring& exe_dir);
+#endif
+
+#if defined(OS_MAC)
@@ -349,7 +349,7 @@ index aaa9ad1d58d7..14b98b2e6598 100644
} // namespace crash_reporter
diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc
index 64ca38330be7..4de20a66cd99 100644
index 5117ded1e214..0d86e0363315 100644
--- components/crash/core/app/crashpad.cc
+++ components/crash/core/app/crashpad.cc
@@ -152,7 +152,8 @@ void InitializeCrashpadImpl(bool initial_client,
@@ -463,23 +463,23 @@ index eb675321436a..4e74af742ed5 100644
handler_path, database_path, metrics_path, url,
GetProcessSimpleAnnotations(), arguments, true, false);
diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc
index c199b467ffeb..1037a285b74c 100644
index c66a6dfc6f5d..2d80782ab341 100644
--- components/crash/core/app/crashpad_win.cc
+++ components/crash/core/app/crashpad_win.cc
@@ -36,8 +36,8 @@ void GetPlatformCrashpadAnnotations(
base::string16 product_name, version, special_build, channel_name;
std::wstring product_name, version, special_build, channel_name;
crash_reporter_client->GetProductNameAndVersion(
exe_file, &product_name, &version, &special_build, &channel_name);
- (*annotations)["prod"] = base::UTF16ToUTF8(product_name);
- (*annotations)["ver"] = base::UTF16ToUTF8(version);
+ (*annotations)["product"] = base::UTF16ToUTF8(product_name);
+ (*annotations)["version"] = base::UTF16ToUTF8(version);
- (*annotations)["prod"] = base::WideToUTF8(product_name);
- (*annotations)["ver"] = base::WideToUTF8(version);
+ (*annotations)["product"] = base::WideToUTF8(product_name);
+ (*annotations)["version"] = base::WideToUTF8(version);
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Empty means stable.
const bool allow_empty_channel = true;
@@ -49,9 +49,9 @@ void GetPlatformCrashpadAnnotations(
if (!special_build.empty())
(*annotations)["special"] = base::UTF16ToUTF8(special_build);
(*annotations)["special"] = base::WideToUTF8(special_build);
#if defined(ARCH_CPU_X86)
- (*annotations)["plat"] = std::string("Win32");
+ (*annotations)["platform"] = std::string("win32");

View File

@@ -0,0 +1,23 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index cf596ae9aae8..7c1869000cf3 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/strings/strcat.h"
#include "build/branding_buildflags.h"
+#include "chrome/common/chrome_switches.h"
#include "components/embedder_support/switches.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/web_contents.h"
@@ -20,6 +21,10 @@
namespace embedder_support {
std::string GetProduct() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kProductVersion))
+ return command_line->GetSwitchValueASCII(switches::kProductVersion);
+
return version_info::GetProductNameAndVersionForUserAgent();
}

View File

@@ -1,53 +1,52 @@
diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc
index 3ce42bd3bc3c..e5bda4ae4f1f 100644
index 5c903a13a14e..d385c6c0c95c 100644
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "cef/libcef/features/features.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/prefetch/no_state_prefetch/chrome_prerender_contents_delegate.h"
#include "components/no_state_prefetch/browser/prerender_contents.h"
#include "chrome/browser/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_contents.h"
@@ -42,6 +43,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
if (!web_contents)
return;
+#if !BUILDFLAG(ENABLE_CEF)
// If the request was for a prerender, abort the prerender and do not
// continue. This is because plugins cancel prerender, see
+ if (!cef::IsAlloyRuntimeEnabled()) {
// If the request was for NoStatePrefetch, abort the prefetcher and do not
// continue. This is because plugins cancel NoStatePrefetch, see
// http://crbug.com/343590.
@@ -51,6 +53,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
@@ -52,6 +54,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
no_state_prefetch_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
return;
}
+#endif // !BUILDFLAG(ENABLE_CEF)
+ }
auto* browser_context = web_contents->GetBrowserContext();
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index 0f588c70627f..a1b9ea21cc72 100644
index b4878f7497df..8a87d04740b7 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -66,11 +66,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -61,11 +61,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
DCHECK(host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
host_type == VIEW_TYPE_EXTENSION_DIALOG ||
host_type == VIEW_TYPE_EXTENSION_POPUP);
- host_contents_ = WebContents::Create(
- WebContents::CreateParams(browser_context_, site_instance)),
- content::WebContentsObserver::Observe(host_contents_.get());
+ host_contents_owned_ = WebContents::Create(
+ WebContents::CreateParams(browser_context_, site_instance));
WebContents::CreateParams(browser_context_, site_instance)),
- content::WebContentsObserver::Observe(host_contents_.get());
+ host_contents_ = host_contents_owned_.get();
+ content::WebContentsObserver::Observe(host_contents_);
host_contents_->SetDelegate(this);
- SetViewType(host_contents_.get(), host_type);
+ SetViewType(host_contents_, host_type);
main_frame_host_ = host_contents_->GetMainFrame();
render_view_host_ = host_contents_->GetRenderViewHost();
@@ -85,6 +86,48 @@ ExtensionHost::ExtensionHost(const Extension* extension,
// Listen for when an extension is unloaded from the same profile, as it may
@@ -79,6 +80,44 @@ ExtensionHost::ExtensionHost(const Extension* extension,
dispatcher()->set_delegate(this);
}
@@ -62,10 +61,6 @@ index 0f588c70627f..a1b9ea21cc72 100644
+ extension_id_(extension->id()),
+ browser_context_(browser_context),
+ host_contents_(host_contents),
+ render_view_host_(nullptr),
+ is_render_view_creation_pending_(false),
+ has_loaded_once_(false),
+ document_element_available_(false),
+ initial_url_(url),
+ extension_host_type_(host_type) {
+ DCHECK(delegate);
@@ -80,7 +75,7 @@ index 0f588c70627f..a1b9ea21cc72 100644
+ content::WebContentsObserver::Observe(host_contents_);
+ SetViewType(host_contents_, host_type);
+
+ render_view_host_ = host_contents_->GetRenderViewHost();
+ main_frame_host_ = host_contents_->GetMainFrame();
+
+ // Listen for when an extension is unloaded from the same profile, as it may
+ // be the same extension that this points to.
@@ -97,10 +92,10 @@ index 0f588c70627f..a1b9ea21cc72 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index 11bfec21cc9f..416de61f85fa 100644
index 59798a628937..2018abb8324b 100644
--- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h
@@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost,
@@ -52,13 +52,19 @@ class ExtensionHost : public DeferredStartRenderHost,
ExtensionHost(const Extension* extension,
content::SiteInstance* site_instance,
const GURL& url, ViewType host_type);
@@ -118,10 +113,10 @@ index 11bfec21cc9f..416de61f85fa 100644
const std::string& extension_id() const { return extension_id_; }
- content::WebContents* host_contents() const { return host_contents_.get(); }
+ content::WebContents* host_contents() const { return host_contents_; }
content::RenderViewHost* render_view_host() const;
content::RenderFrameHost* main_frame_host() const { return main_frame_host_; }
content::RenderProcessHost* render_process_host() const;
bool has_loaded_once() const { return has_loaded_once_; }
@@ -178,7 +184,8 @@ class ExtensionHost : public DeferredStartRenderHost,
@@ -180,7 +186,8 @@ class ExtensionHost : public DeferredStartRenderHost,
content::BrowserContext* browser_context_;
// The host for our HTML content.
@@ -129,8 +124,8 @@ index 11bfec21cc9f..416de61f85fa 100644
+ std::unique_ptr<content::WebContents> host_contents_owned_;
+ content::WebContents* host_contents_;
// A weak pointer to the current or pending RenderViewHost. We don't access
// this through the host_contents because we want to deal with the pending
// A pointer to the current or speculative main frame in `host_contents_`. We
// can't access this frame through the `host_contents_` directly as it does
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index c2d194ec21be..3a7354f648ed 100644
--- extensions/browser/extensions_browser_client.h
@@ -167,10 +162,10 @@ index c2d194ec21be..3a7354f648ed 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index 337921842180..c78e1d114a12 100644
index 2bc2248ba920..583419786f28 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -395,9 +395,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@@ -389,9 +389,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
return true; // TODO(kalman): return false here? It might break things...
DVLOG(1) << "CreateBackgroundHost " << extension->id();
@@ -187,6 +182,6 @@ index 337921842180..c78e1d114a12 100644
+ host = new ExtensionHost(extension, GetSiteInstanceForURL(url).get(), url,
+ VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
+ }
host->CreateRenderViewSoon();
host->CreateRendererSoon();
OnBackgroundHostCreated(host);
return true;

View File

@@ -1,8 +1,8 @@
diff --git .gn .gn
index 0c25000917fb..cdaf3a6799c2 100644
index 01b2f70c1378..a14dd637774e 100644
--- .gn
+++ .gn
@@ -275,6 +275,8 @@ exec_script_whitelist =
@@ -190,6 +190,8 @@ exec_script_whitelist =
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
@@ -12,7 +12,7 @@ index 0c25000917fb..cdaf3a6799c2 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 86c82ac5cf8a..ea0959f631b4 100644
index 6df566bd7df4..d8f539493342 100644
--- BUILD.gn
+++ BUILD.gn
@@ -16,6 +16,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@@ -23,8 +23,8 @@ index 86c82ac5cf8a..ea0959f631b4 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/media/router/features.gni")
import("//components/nacl/features.gni")
@@ -244,6 +245,9 @@ group("gn_all") {
"//third_party/angle/src/tests:angle_white_box_tests",
@@ -247,6 +248,9 @@ group("gn_all") {
"//media/cast:cast_unittests",
"//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
]
+ if (enable_cef) {
@@ -79,7 +79,7 @@ index 839144aa1e9b..29c8ab32398a 100644
+_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow
+
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 6ad9c87a3adf..a47694446b9a 100644
index 63e7ca2c10c1..14f777c10cd6 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -4,6 +4,7 @@
@@ -90,8 +90,8 @@ index 6ad9c87a3adf..a47694446b9a 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/resources/pdf/ink/ink.gni")
import("//chrome/common/features.gni")
@@ -255,6 +256,10 @@ template("chrome_extra_paks") {
"//chrome/browser/resources/welcome:welcome_resources",
@@ -269,6 +270,10 @@ template("chrome_extra_paks") {
"//chrome/browser/resources/welcome:resources",
]
}
+ if (enable_cef) {
@@ -125,7 +125,7 @@ index a64a23560460..b08eee1f789a 100644
source_patterns +=
[ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 5f5cb1c752f2..ef0a01caf9cd 100644
index ae43217ef207..2f0b95687263 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni")

View File

@@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 1343d7c03b07..79843c9d7ae7 100644
index c9e9d621c730..edeaa3662ede 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -703,4 +703,13 @@
@@ -739,4 +739,13 @@
# Please read the header and find the right section above instead.
# Resource ids starting at 31000 are reserved for projects built on Chromium.

View File

@@ -0,0 +1,160 @@
diff --git cpp/src/phonenumbers/encoding_utils.h cpp/src/phonenumbers/encoding_utils.h
index d4271832..0c65d2bf 100644
--- cpp/src/phonenumbers/encoding_utils.h
+++ cpp/src/phonenumbers/encoding_utils.h
@@ -29,7 +29,7 @@ class EncodingUtils {
// the function stores 0xFFFD in the output variable and returns 1.
static inline int DecodeUTF8Char(const char* in, char32* out) {
Rune r;
- int len = chartorune(&r, in);
+ int len = _chartorune(&r, in);
*out = r;
return len;
}
diff --git cpp/src/phonenumbers/utf/rune.c cpp/src/phonenumbers/utf/rune.c
index b4aa93b5..6f7b0358 100644
--- cpp/src/phonenumbers/utf/rune.c
+++ cpp/src/phonenumbers/utf/rune.c
@@ -64,7 +64,7 @@ enum
* reasons, we return 1 instead of 0.
*/
int
-charntorune(Rune *rune, const char *str, int length)
+_charntorune(Rune *rune, const char *str, int length)
{
int c, c1, c2, c3;
long l;
@@ -167,7 +167,7 @@ badlen:
* null-terminated strings.
*/
int
-chartorune(Rune *rune, const char *str)
+_chartorune(Rune *rune, const char *str)
{
int c, c1, c2, c3;
long l;
@@ -247,12 +247,12 @@ bad:
int
isvalidcharntorune(const char* str, int length, Rune* rune, int* consumed)
{
- *consumed = charntorune(rune, str, length);
+ *consumed = _charntorune(rune, str, length);
return *rune != Runeerror || *consumed == 3;
}
int
-runetochar(char *str, const Rune *rune)
+_runetochar(char *str, const Rune *rune)
{
/* Runes are signed, so convert to unsigned for range check. */
unsigned long c;
@@ -311,15 +311,15 @@ runetochar(char *str, const Rune *rune)
}
int
-runelen(Rune rune)
+_runelen(Rune rune)
{
char str[10];
- return runetochar(str, &rune);
+ return _runetochar(str, &rune);
}
int
-runenlen(const Rune *r, int nrune)
+_runenlen(const Rune *r, int nrune)
{
int nb, c;
@@ -339,7 +339,7 @@ runenlen(const Rune *r, int nrune)
}
int
-fullrune(const char *str, int n)
+_fullrune(const char *str, int n)
{
if (n > 0) {
int c = *(uchar*)str;
diff --git cpp/src/phonenumbers/utf/unicodetext.cc cpp/src/phonenumbers/utf/unicodetext.cc
index 11f68f76..86504a31 100644
--- cpp/src/phonenumbers/utf/unicodetext.cc
+++ cpp/src/phonenumbers/utf/unicodetext.cc
@@ -362,7 +362,7 @@ void UnicodeText::push_back(char32 c) {
if (UniLib::IsValidCodepoint(c)) {
char buf[UTFmax];
Rune rune = c;
- int len = runetochar(buf, &rune);
+ int len = _runetochar(buf, &rune);
if (UniLib::IsInterchangeValid(buf, len)) {
repr_.append(buf, len);
} else {
diff --git cpp/src/phonenumbers/utf/unilib.cc cpp/src/phonenumbers/utf/unilib.cc
index e890f974..ce549363 100644
--- cpp/src/phonenumbers/utf/unilib.cc
+++ cpp/src/phonenumbers/utf/unilib.cc
@@ -50,7 +50,7 @@ int SpanInterchangeValid(const char* begin, int byte_length) {
const char* p = begin;
const char* end = begin + byte_length;
while (p < end) {
- int bytes_consumed = charntorune(&rune, p, end - p);
+ int bytes_consumed = _charntorune(&rune, p, end - p);
// We want to accept Runeerror == U+FFFD as a valid char, but it is used
// by chartorune to indicate error. Luckily, the real codepoint is size 3
// while errors return bytes_consumed <= 1.
diff --git cpp/src/phonenumbers/utf/utf.h cpp/src/phonenumbers/utf/utf.h
index 72d01ed6..35fd0ea9 100644
--- cpp/src/phonenumbers/utf/utf.h
+++ cpp/src/phonenumbers/utf/utf.h
@@ -46,7 +46,7 @@ extern "C" {
// runetochar copies (encodes) one rune, pointed to by r, to at most
// UTFmax bytes starting at s and returns the number of bytes generated.
-int runetochar(char* s, const Rune* r);
+int _runetochar(char* s, const Rune* r);
// chartorune copies (decodes) at most UTFmax bytes starting at s to
@@ -59,7 +59,7 @@ int runetochar(char* s, const Rune* r);
// Unicode value 0 (i.e., ASCII NULL). A byte value of 0 is illegal
// anywhere else in a UTF sequence.
-int chartorune(Rune* r, const char* s);
+int _chartorune(Rune* r, const char* s);
// charntorune is like chartorune, except that it will access at most
@@ -69,7 +69,7 @@ int chartorune(Rune* r, const char* s);
//
// Added 2004-09-24 by Wei-Hwa Huang
-int charntorune(Rune* r, const char* s, int n);
+int _charntorune(Rune* r, const char* s, int n);
// isvalidcharntorune(str, n, r, consumed)
// is a convenience function that calls "*consumed = charntorune(r, str, n)"
@@ -80,13 +80,13 @@ int isvalidcharntorune(const char* str, int n, Rune* r, int* consumed);
// runelen returns the number of bytes required to convert r into UTF.
-int runelen(Rune r);
+int _runelen(Rune r);
// runenlen returns the number of bytes required to convert the n
// runes pointed to by r into UTF.
-int runenlen(const Rune* r, int n);
+int _runenlen(const Rune* r, int n);
// fullrune returns 1 if the string s of length n is long enough to be
@@ -95,7 +95,7 @@ int runenlen(const Rune* r, int n);
// by programs that obtain input one byte at a time and need to know
// when a full rune has arrived.
-int fullrune(const char* s, int n);
+int _fullrune(const char* s, int n);
// The following routines are analogous to the corresponding string
// routines with "utf" substituted for "str", and "rune" substituted

View File

@@ -25,7 +25,7 @@ index 0aaed76c1dda..517c3d8b5772 100644
if (base::PathExists(sandbox_candidate))
sandbox_binary = sandbox_candidate;
diff --git ui/gl/init/gl_initializer_linux_x11.cc ui/gl/init/gl_initializer_linux_x11.cc
index fb6aab8f450c..115f88ed649e 100644
index b1f21c4bf0e0..0eea60fa82f7 100644
--- ui/gl/init/gl_initializer_linux_x11.cc
+++ ui/gl/init/gl_initializer_linux_x11.cc
@@ -82,7 +82,7 @@ bool InitializeStaticEGLInternalFromLibrary(GLImplementation implementation) {

View File

@@ -1,9 +1,9 @@
diff --git build/config/linux/atk/BUILD.gn build/config/linux/atk/BUILD.gn
index aad2efa60d6c..fe9f30b82c22 100644
index bc8e27894732..5d06ce988f25 100644
--- build/config/linux/atk/BUILD.gn
+++ build/config/linux/atk/BUILD.gn
@@ -10,7 +10,7 @@ import("//build/config/ui.gni")
assert(!is_chromeos)
@@ -12,7 +12,7 @@ import("//build/config/ui.gni")
assert(!is_chromeos_ash)
# These packages should _only_ be expected when building for a target.
-assert(current_toolchain == default_toolchain)
@@ -11,3 +11,16 @@ index aad2efa60d6c..fe9f30b82c22 100644
if (use_atk) {
assert(use_glib, "use_atk=true requires that use_glib=true")
diff --git build/config/linux/atspi2/BUILD.gn build/config/linux/atspi2/BUILD.gn
index 988a99568136..1791ea607550 100644
--- build/config/linux/atspi2/BUILD.gn
+++ build/config/linux/atspi2/BUILD.gn
@@ -6,7 +6,7 @@ import("//build/config/linux/pkg_config.gni")
import("//build/config/ui.gni")
# These packages should _only_ be expected when building for a target.
-assert(current_toolchain == default_toolchain)
+# assert(current_toolchain == default_toolchain)
if (use_atk) {
pkg_config("atspi2") {

View File

@@ -1,5 +1,5 @@
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index ef08004ce68e..8176517e8318 100644
index 9f6dfb1d1c00..b48c1d45aa11 100644
--- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc
@@ -2,6 +2,7 @@
@@ -30,7 +30,7 @@ index ef08004ce68e..8176517e8318 100644
}
if (has_msg)
diff --git base/task/current_thread.cc base/task/current_thread.cc
index 068c4f837dab..50d1e4a0b770 100644
index bc572011b138..ccb208620402 100644
--- base/task/current_thread.cc
+++ base/task/current_thread.cc
@@ -47,6 +47,8 @@ void CurrentThread::AddDestructionObserver(
@@ -43,10 +43,10 @@ index 068c4f837dab..50d1e4a0b770 100644
current_->RemoveDestructionObserver(destruction_observer);
}
diff --git base/task/current_thread.h base/task/current_thread.h
index 52c2dbec3cac..9c8d475f50ad 100644
index 3f64b403c7eb..1130936a5f1f 100644
--- base/task/current_thread.h
+++ base/task/current_thread.h
@@ -122,6 +122,12 @@ class BASE_EXPORT CurrentThread {
@@ -127,6 +127,12 @@ class BASE_EXPORT CurrentThread {
// posted tasks.
void SetAddQueueTimeToTasks(bool enable);
@@ -59,7 +59,7 @@ index 52c2dbec3cac..9c8d475f50ad 100644
// Enables nested task processing in scope of an upcoming native message loop.
// Some unwanted message loops may occur when using common controls or printer
// functions. Hence, nested task processing is disabled by default to avoid
@@ -187,6 +193,13 @@ class BASE_EXPORT CurrentThread {
@@ -192,6 +198,13 @@ class BASE_EXPORT CurrentThread {
friend class web::WebTaskEnvironment;
sequence_manager::internal::SequenceManagerImpl* current_;

View File

@@ -12,7 +12,7 @@ index 954e32c842a5..7563507d52d0 100644
virtual ~WebContentsView() {}
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 998d6d0c481f..e0f95ee4f7a0 100644
index 8f4c53f3f3ca..ecc27f3f224c 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -207,6 +207,8 @@ void MimeHandlerViewGuest::CreateWebContents(
@@ -31,10 +31,10 @@ index 998d6d0c481f..e0f95ee4f7a0 100644
+ if (delegate_)
+ delegate_->OnGuestAttached();
+
DCHECK(stream_->handler_url().SchemeIs(extensions::kExtensionScheme));
web_contents()->GetController().LoadURL(
stream_->handler_url(), content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
@@ -246,6 +251,11 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
@@ -247,6 +252,11 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true;
}
@@ -47,7 +47,7 @@ index 998d6d0c481f..e0f95ee4f7a0 100644
WebContents* source,
const content::OpenURLParams& params) {
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index a7f0b19a8ab9..dca296badbf6 100644
index d9e22ce31927..e02b791a19f1 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -129,6 +129,7 @@ class MimeHandlerViewGuest

View File

@@ -10,7 +10,7 @@ index 96d1a51ec107..e8120a818b1f 100644
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 9d993cce5e0e..bc12684c73c6 100644
index 15cacc16cfa7..d7aa30baf147 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -539,7 +539,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
@@ -24,10 +24,10 @@ index 9d993cce5e0e..bc12684c73c6 100644
request_->force_ignore_site_for_cookies();
if (cookie_store->cookie_access_delegate() &&
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index 355ca24e301c..3bdbde36de39 100644
index 61a6f05d5d70..396b495e1598 100644
--- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc
@@ -176,7 +176,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
@@ -206,7 +206,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
}
bool ResourceRequest::SendsCookies() const {

View File

@@ -41,10 +41,10 @@ index cc4b13a7b9c6..84f3b9ed7cf4 100644
} // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index e23394ae63cd..3d8e02a0b189 100644
index b8e3f8e88495..9dcc23f28781 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -2915,6 +2915,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
@@ -2892,6 +2892,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
@@ -57,10 +57,10 @@ index e23394ae63cd..3d8e02a0b189 100644
const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index 3dd95dcf37cb..024cc350fe96 100644
index dcc44adc51d8..ab20b3f355e7 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -743,6 +743,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -737,6 +737,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();

View File

@@ -34,7 +34,7 @@ index 4e04a86c2d06..6d82d55acd15 100644
}
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
index 97cae92b96fa..6acf5188e1d6 100644
index fa088bfa0019..7f00e2a2154f 100644
--- chrome/browser/printing/print_preview_dialog_controller.cc
+++ chrome/browser/printing/print_preview_dialog_controller.cc
@@ -17,6 +17,7 @@
@@ -45,7 +45,7 @@ index 97cae92b96fa..6acf5188e1d6 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/printing/print_view_manager.h"
@@ -452,8 +453,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
@@ -410,8 +411,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
content::HostZoomMap::Get(preview_dialog->GetSiteInstance())
->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0);
PrintViewManager::CreateForWebContents(preview_dialog);
@@ -58,10 +58,10 @@ index 97cae92b96fa..6acf5188e1d6 100644
// Add an entry to the map.
preview_dialog_map_[preview_dialog] = initiator;
diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc
index ae1ab34986d1..b742e9fffaf3 100644
index 81df8a2cb0c3..ae4dcf5beb16 100644
--- chrome/browser/printing/print_view_manager_base.cc
+++ chrome/browser/printing/print_view_manager_base.cc
@@ -22,6 +22,7 @@
@@ -21,6 +21,7 @@
#include "base/timer/timer.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -69,7 +69,7 @@ index ae1ab34986d1..b742e9fffaf3 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/printing/print_job.h"
@@ -61,6 +62,10 @@
@@ -58,6 +59,10 @@
#include "printing/printing_features.h"
#endif
@@ -80,7 +80,7 @@ index ae1ab34986d1..b742e9fffaf3 100644
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
#include "chrome/browser/printing/print_error_dialog.h"
#include "chrome/browser/printing/print_view_manager.h"
@@ -201,8 +206,11 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
@@ -198,8 +203,13 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::WebContents* web_contents =
GetWebContentsForRenderFrame(render_process_id, render_frame_id);
@@ -88,8 +88,10 @@ index ae1ab34986d1..b742e9fffaf3 100644
- : nullptr;
+ if (!web_contents)
+ return nullptr;
+#if BUILDFLAG(ENABLE_CEF)
+ if (cef::IsAlloyRuntimeEnabled())
+ return CefPrintViewManager::FromWebContents(web_contents);
+#endif
+ return PrintViewManager::FromWebContents(web_contents);
}
@@ -164,10 +166,10 @@ index 3d415a60d436..807ab41ee6ef 100644
ConstrainedWebDialogUI::~ConstrainedWebDialogUI() {
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
index 181a4132f1be..4344ceaf83e5 100644
index e64ac255c18f..ef40c08e3373 100644
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
@@ -21,6 +21,7 @@
@@ -22,6 +22,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -175,7 +177,7 @@ index 181a4132f1be..4344ceaf83e5 100644
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_prefs.h"
@@ -54,6 +55,10 @@
@@ -55,6 +56,10 @@
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#endif
@@ -186,7 +188,7 @@ index 181a4132f1be..4344ceaf83e5 100644
namespace printing {
namespace {
@@ -377,10 +382,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
@@ -378,10 +383,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
// If the directory is empty there is no reason to create it or use the
// default location.
if (path.empty()) {
@@ -214,7 +216,7 @@ index 181a4132f1be..4344ceaf83e5 100644
// Get default download directory. This will be used as a fallback if the
// save directory does not exist.
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile_);
@@ -388,8 +410,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
@@ -389,8 +411,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
base::BindOnce(&SelectSaveDirectory, path, default_path),
@@ -224,7 +226,7 @@ index 181a4132f1be..4344ceaf83e5 100644
}
void PdfPrinterHandler::PostPrintToPdfTask() {
@@ -430,6 +451,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
@@ -431,6 +452,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL);
}
@@ -294,7 +296,7 @@ index d796486f6b74..1a7b0d23128d 100644
base::FilePath GetSaveLocation() const;
diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 67aa6bc0d76e..0fecbd87423b 100644
index 5beb6ac1f575..56e0fca6f317 100644
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -25,6 +25,7 @@
@@ -302,10 +304,10 @@ index 67aa6bc0d76e..0fecbd87423b 100644
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/account_manager_facade_factory.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/bad_message.h"
#include "chrome/browser/browser_process.h"
@@ -1080,7 +1081,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
@@ -1081,7 +1082,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
}
return extension_printer_handler_.get();
}
@@ -314,7 +316,7 @@ index 67aa6bc0d76e..0fecbd87423b 100644
if (printer_type == PrinterType::kPrivet &&
GetPrefs()->GetBoolean(prefs::kForceEnablePrivetPrinting)) {
if (!privet_printer_handler_) {
@@ -1089,6 +1090,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
@@ -1090,6 +1091,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
}
return privet_printer_handler_.get();
}
@@ -324,7 +326,7 @@ index 67aa6bc0d76e..0fecbd87423b 100644
#endif
if (printer_type == PrinterType::kPdf) {
if (!pdf_printer_handler_) {
@@ -1151,6 +1155,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
@@ -1152,6 +1156,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
}
void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
@@ -332,7 +334,7 @@ index 67aa6bc0d76e..0fecbd87423b 100644
DCHECK(!identity_manager_);
cloud_print_enabled_ =
!base::Contains(printer_type_deny_list_, PrinterType::kCloud) &&
@@ -1167,6 +1172,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
@@ -1168,6 +1173,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
identity_manager_->AddObserver(this);
@@ -341,10 +343,10 @@ index 67aa6bc0d76e..0fecbd87423b 100644
void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index fb3328d0d75b..4dd94d59e195 100644
index 60b1fe2311c0..74ee97dbbf6d 100644
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -29,6 +29,7 @@
@@ -30,6 +30,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -352,7 +354,7 @@ index fb3328d0d75b..4dd94d59e195 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/pdf/pdf_extension_util.h"
#include "chrome/browser/printing/background_printing_manager.h"
@@ -85,12 +86,16 @@ namespace printing {
@@ -91,12 +92,16 @@ namespace printing {
namespace {
@@ -367,5 +369,5 @@ index fb3328d0d75b..4dd94d59e195 100644
#endif
+#endif // !BUILDFLAG(ENABLE_CEF)
PrintPreviewUI::TestDelegate* g_test_delegate = nullptr;
constexpr char kInvalidArgsForDidStartPreview[] =
"Invalid arguments for DidStartPreview";

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
index 255c259a9b35..c40021deb1fc 100644
index 517ee0e43e83..6c3bab2f5780 100644
--- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc
@@ -590,6 +590,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
@@ -598,6 +598,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
}
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc
index a0006aa682e7..b83d42c637a6 100644
index 794160f870d4..9caa8b6df341 100644
--- chrome/browser/renderer_preferences_util.cc
+++ chrome/browser/renderer_preferences_util.cc
@@ -35,7 +35,8 @@
@@ -38,7 +38,8 @@
#include "ui/base/cocoa/defaults_utils.h"
#endif
@@ -12,7 +12,7 @@ index a0006aa682e7..b83d42c637a6 100644
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "ui/views/linux_ui/linux_ui.h"
@@ -154,7 +155,8 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs,
@@ -167,7 +168,8 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs,
prefs->caret_blink_interval = interval;
#endif

View File

@@ -1,8 +1,8 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index 9f745407ec48..6d4ae4266371 100644
index 910662d25a4f..4323dada7c98 100644
--- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc
@@ -845,6 +845,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
@@ -832,6 +832,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
: delegate_(delegate),
locale_resources_data_lock_(new base::Lock),
max_scale_factor_(SCALE_FACTOR_100P) {
@@ -15,7 +15,7 @@ index 9f745407ec48..6d4ae4266371 100644
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMangleLocalizedStrings);
}
@@ -854,6 +860,11 @@ ResourceBundle::~ResourceBundle() {
@@ -841,6 +847,11 @@ ResourceBundle::~ResourceBundle() {
UnloadLocaleResources();
}
@@ -28,7 +28,7 @@ index 9f745407ec48..6d4ae4266371 100644
void ResourceBundle::InitSharedInstance(Delegate* delegate) {
DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice";
diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h
index 0432b8f0965f..264759c7393d 100644
index 48c329f00c3f..a1a0cbc98771 100644
--- ui/base/resource/resource_bundle.h
+++ ui/base/resource/resource_bundle.h
@@ -192,6 +192,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {

View File

@@ -1,8 +1,8 @@
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
index 47309866ca79..d27ec9b50b2b 100644
index f66de0aa63c9..98a510a6a244 100644
--- build/toolchain/win/setup_toolchain.py
+++ build/toolchain/win/setup_toolchain.py
@@ -155,13 +155,17 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
@@ -154,13 +154,17 @@ def _LoadToolchainEnv(cpu, toolchain_root, sdk_dir, target_store):
del os.environ['INCLUDE']
del os.environ['LIB']
del os.environ['LIBPATH']
@@ -26,10 +26,10 @@ index 47309866ca79..d27ec9b50b2b 100644
if (cpu != 'x64'):
# x64 is default target CPU thus any other CPU requires a target set
diff --git build/vs_toolchain.py build/vs_toolchain.py
index 6bc24a921272..24ee9a0a04a9 100755
index c3b1182b75b4..04a472b149d4 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -89,9 +89,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@@ -102,9 +102,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
elif sys.platform == 'win32' and not depot_tools_win_toolchain:
@@ -46,7 +46,7 @@ index 6bc24a921272..24ee9a0a04a9 100755
# When using an installed toolchain these files aren't needed in the output
# directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output
@@ -140,6 +147,10 @@ def _RegistryGetValue(key, value):
@@ -153,6 +160,10 @@ def _RegistryGetValue(key, value):
def GetVisualStudioVersion():
"""Return best available version of Visual Studio.
"""

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index dd16ddb90fa9..1d70818d0eff 100644
index 8e71577881b0..70b4f77fe954 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -657,10 +657,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
@@ -645,10 +645,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor());
@@ -19,7 +19,7 @@ index dd16ddb90fa9..1d70818d0eff 100644
}
base::Optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
@@ -2020,6 +2022,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -2015,6 +2017,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
// This needs to happen only after |window_| has been initialized using
// Init(), because it needs to have the layer.
window_->SetEmbedFrameSinkId(frame_sink_id_);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index 0ccb74571b85..b4785ae3e875 100644
index 33681db05353..646e875a6235 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -20,6 +20,7 @@
@@ -10,7 +10,7 @@ index 0ccb74571b85..b4785ae3e875 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -682,7 +683,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -683,7 +684,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
// Configure on-disk storage for non-OTR profiles. OTR profiles just use
// default behavior (in memory storage, default sizes).
@@ -31,7 +31,7 @@ index 0ccb74571b85..b4785ae3e875 100644
PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size.
base::FilePath base_cache_path;
@@ -695,7 +708,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -696,7 +709,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
base_cache_path.Append(chrome::kCacheDirname);
network_context_params->http_cache_max_size =
local_state->GetInteger(prefs::kDiskCacheSize);
@@ -42,10 +42,10 @@ index 0ccb74571b85..b4785ae3e875 100644
// change.
network_context_params->http_server_properties_path =
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index 9d5391e0c853..ebc6a10466fb 100644
index e8e5c326c794..9ed417d9d20d 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -471,6 +471,25 @@ void CookieMonster::SetCookieableSchemes(
@@ -475,6 +475,25 @@ void CookieMonster::SetCookieableSchemes(
MaybeRunCookieCallback(std::move(callback), true);
}
@@ -72,7 +72,7 @@ index 9d5391e0c853..ebc6a10466fb 100644
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK(thread_checker_.CalledOnValidThread());
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 990869da1c30..22c047b1ea25 100644
index 426507596516..2ae97326e653 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -184,6 +184,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
@@ -123,10 +123,10 @@ index f91ffe61dba5..f3482e68cd11 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index a75980730046..a0c104d88545 100644
index cbef8450741b..c0177e62cdc4 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2014,16 +2014,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -1987,16 +1987,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@@ -157,10 +157,10 @@ index a75980730046..a0c104d88545 100644
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index 294b04445bd3..f1f81e44986f 100644
index 5aca8515f5ce..bbbb982ae52e 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -288,6 +288,9 @@ struct NetworkContextParams {
@@ -251,6 +251,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

View File

@@ -1,5 +1,5 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 46fd3da02453..879e7a0b2275 100644
index a948dde94213..4f4b09647fdb 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -495,10 +495,6 @@ class LoginHandlerDelegate {
@@ -26,7 +26,7 @@ index 46fd3da02453..879e7a0b2275 100644
new LoginHandlerDelegate(std::move(auth_challenge_responder),
std::move(web_contents_getter), auth_info,
is_request_for_main_frame, process_id, routing_id,
@@ -2449,8 +2439,12 @@ void StoragePartitionImpl::GetQuotaSettings(
@@ -2479,8 +2469,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return;
}
@@ -40,7 +40,7 @@ index 46fd3da02453..879e7a0b2275 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
@@ -2462,6 +2456,11 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -2493,6 +2487,11 @@ void StoragePartitionImpl::InitNetworkContext() {
GetContentClient()->browser()->ConfigureNetworkContextParams(
browser_context_, is_in_memory_, relative_partition_path_,
context_params.get(), cert_verifier_creation_params.get());

View File

@@ -39,11 +39,11 @@ index ab2371857a00..8dccc190fa89 100644
};
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
index 44a8fc6ef9d0..4718e6bb94ff 100644
index 2ade47b0077d..7d64510adebb 100644
--- ui/views/controls/webview/webview.cc
+++ ui/views/controls/webview/webview.cc
@@ -127,6 +127,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
MaybeEnableAutoResize();
@@ -129,6 +129,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
MaybeEnableAutoResize(web_contents()->GetMainFrame());
}
+void WebView::SetResizeBackgroundColor(SkColor resize_background_color) {
@@ -54,7 +54,7 @@ index 44a8fc6ef9d0..4718e6bb94ff 100644
if (crashed_overlay_view_ == crashed_overlay_view)
return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index 9604515c2d5c..e51421694752 100644
index 94e25679eab8..3943f8c4866f 100644
--- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h
@@ -78,6 +78,10 @@ class WEBVIEW_EXPORT WebView : public View,

View File

@@ -13,10 +13,10 @@ index 676c2cc22bac..e6f9642e1cba 100644
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
index de8ee48c4c74..62105a814870 100644
index 8b053971dea9..170f5c1b3863 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -246,7 +246,7 @@ StoragePartition* BrowserContext::GetStoragePartition(
@@ -235,7 +235,7 @@ StoragePartition* BrowserContext::GetStoragePartition(
GetStoragePartitionMap(browser_context);
auto config_to_use = storage_partition_config;
@@ -25,7 +25,7 @@ index de8ee48c4c74..62105a814870 100644
config_to_use = storage_partition_config.CopyWithInMemorySet();
return partition_map->Get(config_to_use, can_create);
@@ -556,7 +556,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() {
@@ -540,7 +540,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() {
kUseInMemoryDBDefault);
std::unique_ptr<media::VideoDecodeStatsDB> stats_db;
@@ -35,15 +35,15 @@ index de8ee48c4c74..62105a814870 100644
std::make_unique<media::InMemoryVideoDecodeStatsDBImpl>(nullptr);
} else {
diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc
index fdf4b2466077..938df52d348e 100644
index cb40db947624..807a7c24bc6d 100644
--- storage/browser/database/database_tracker.cc
+++ storage/browser/database/database_tracker.cc
@@ -508,7 +508,7 @@ bool DatabaseTracker::LazyInit() {
@@ -495,7 +495,7 @@ bool DatabaseTracker::LazyInit() {
databases_table_.reset(new DatabasesTable(db_.get()));
meta_table_.reset(new sql::MetaTable());
is_initialized_ =
- base::CreateDirectory(db_dir_) &&
+ (is_off_the_record_ ? true : base::CreateDirectory(db_dir_)) &&
(db_->is_open() ||
(is_off_the_record_ ? db_->OpenInMemory()
: db_->Open(kTrackerDatabaseFullPath))) &&
- is_initialized_ = base::CreateDirectory(db_dir_) &&
+ is_initialized_ = (is_incognito_ ? true : base::CreateDirectory(db_dir_)) &&
(db_->is_open() ||
(is_incognito_ ? db_->OpenInMemory()
: db_->Open(kTrackerDatabaseFullPath))) &&

View File

@@ -1,8 +1,8 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index ad3e86fb45ed..61c3db8b59d1 100644
index 1a3fe9a570a1..dd7c52961464 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -58,6 +58,8 @@
@@ -59,6 +59,8 @@
X("cc") \
X("cc.debug") \
X("cdp.perf") \

View File

@@ -1,5 +1,5 @@
diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc
index 824b980f5b31..54ae5151b4fc 100644
index 78d2b362c2d6..93cff0224ce1 100644
--- ui/base/x/x11_os_exchange_data_provider.cc
+++ ui/base/x/x11_os_exchange_data_provider.cc
@@ -122,7 +122,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url,

View File

@@ -1,5 +1,5 @@
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
index c746b37d6278..b6cebc24b73e 100644
index bf7988cab13a..1c58c54bc7b6 100644
--- ui/base/models/menu_model.h
+++ ui/base/models/menu_model.h
@@ -12,8 +12,11 @@
@@ -14,7 +14,7 @@ index c746b37d6278..b6cebc24b73e 100644
}
namespace ui {
@@ -133,6 +136,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel
@@ -137,6 +140,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel
// |event_flags| is a bit mask of ui::EventFlags.
virtual void ActivatedAt(int index, int event_flags);
@@ -43,7 +43,7 @@ index c746b37d6278..b6cebc24b73e 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index 35ef45586f93..d094f34569c9 100644
index 8b6064d15996..5004292484ef 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -617,6 +617,14 @@ void RenderText::SetWhitespaceElision(base::Optional<bool> whitespace_elision) {
@@ -61,7 +61,7 @@ index 35ef45586f93..d094f34569c9 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -1993,6 +2001,19 @@ void RenderText::OnTextAttributeChanged() {
@@ -2003,6 +2011,19 @@ void RenderText::OnTextAttributeChanged() {
layout_text_up_to_date_ = false;
@@ -82,7 +82,7 @@ index 35ef45586f93..d094f34569c9 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 29c589ee9fe6..aa0029552322 100644
index bb7ce1ca82b4..a1c0d16b6fea 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -346,6 +346,10 @@ class GFX_EXPORT RenderText {
@@ -96,7 +96,7 @@ index 29c589ee9fe6..aa0029552322 100644
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -1053,6 +1057,8 @@ class GFX_EXPORT RenderText {
@@ -1054,6 +1058,8 @@ class GFX_EXPORT RenderText {
// Tell whether or not the |layout_text_| needs an update or is up to date.
mutable bool layout_text_up_to_date_ = false;
@@ -119,10 +119,10 @@ index 8c8f77fc26db..0a9f50df07c1 100644
// Size used for the default SquareInkDropRipple.
static constexpr gfx::Size kDefaultInkDropSize = gfx::Size(24, 24);
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index 66447b25c544..ea28dc3169fa 100644
index e8b6cd6b290d..3293e3f081b9 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -503,6 +503,12 @@ void LabelButton::OnThemeChanged() {
@@ -506,6 +506,12 @@ void LabelButton::OnThemeChanged() {
SchedulePaint();
}
@@ -150,7 +150,7 @@ index 39887eb2625c..727c1ff325f7 100644
ImageView* image() const { return image_; }
Label* label() const { return label_; }
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index 0381eb3769d4..7a06147d991c 100644
index d7f4226a37fe..d8fd16500b3c 100644
--- ui/views/controls/label.cc
+++ ui/views/controls/label.cc
@@ -49,12 +49,27 @@ enum LabelPropertyKey {
@@ -181,7 +181,7 @@ index 0381eb3769d4..7a06147d991c 100644
} // namespace
namespace views {
@@ -412,6 +427,15 @@ base::string16 Label::GetTooltipText() const {
@@ -413,6 +428,15 @@ base::string16 Label::GetTooltipText() const {
return tooltip_text_;
}
@@ -197,7 +197,7 @@ index 0381eb3769d4..7a06147d991c 100644
void Label::SetTooltipText(const base::string16& tooltip_text) {
DCHECK(handles_tooltips_);
if (tooltip_text_ == tooltip_text)
@@ -695,6 +719,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
@@ -706,6 +730,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SelectRange(stored_selection_range_);
}
@@ -215,10 +215,10 @@ index 0381eb3769d4..7a06147d991c 100644
}
diff --git ui/views/controls/label.h ui/views/controls/label.h
index 2426029d6733..d12bc4568203 100644
index 793189681a67..92397be97b0e 100644
--- ui/views/controls/label.h
+++ ui/views/controls/label.h
@@ -221,6 +221,10 @@ class VIEWS_EXPORT Label : public View,
@@ -225,6 +225,10 @@ class VIEWS_EXPORT Label : public View,
gfx::ElideBehavior GetElideBehavior() const;
void SetElideBehavior(gfx::ElideBehavior elide_behavior);
@@ -229,19 +229,19 @@ index 2426029d6733..d12bc4568203 100644
// Gets/Sets the tooltip text. Default behavior for a label (single-line) is
// to show the full text if it is wider than its bounds. Calling this
// overrides the default behavior and lets you set a custom tooltip. To
@@ -461,6 +465,7 @@ class VIEWS_EXPORT Label : public View,
bool collapse_when_hidden_ = false;
int fixed_width_ = 0;
@@ -471,6 +475,7 @@ class VIEWS_EXPORT Label : public View,
int max_width_ = 0;
// This is used in single-line mode.
int max_width_single_line_ = 0;
+ int draw_strings_flags_ = 0;
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 15d30255e990..745b483213cf 100644
index 3beb5516e121..36d9f5e42460 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -2744,8 +2744,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
@@ -2738,8 +2738,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@@ -256,7 +256,7 @@ index 15d30255e990..745b483213cf 100644
MenuItemView* to_select = nullptr;
if (!item->GetSubmenu()->GetMenuItems().empty())
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
@@ -2764,8 +2769,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2758,8 +2763,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@@ -269,10 +269,10 @@ index 15d30255e990..745b483213cf 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
index 158724b4752c..c82192848584 100644
index d863d6f874aa..f0310ca3b776 100644
--- ui/views/controls/menu/menu_delegate.h
+++ ui/views/controls/menu/menu_delegate.h
@@ -80,6 +80,22 @@ class VIEWS_EXPORT MenuDelegate {
@@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate {
// parts of |style| or leave it unmodified.
virtual void GetLabelStyle(int id, LabelStyle* style) const;
@@ -295,7 +295,7 @@ index 158724b4752c..c82192848584 100644
// The tooltip shown for the menu item. This is invoked when the user
// hovers over the item, and no tooltip text has been set for that item.
virtual base::string16 GetTooltipText(int id,
@@ -206,6 +222,11 @@ class VIEWS_EXPORT MenuDelegate {
@@ -209,6 +225,11 @@ class VIEWS_EXPORT MenuDelegate {
bool* has_mnemonics,
MenuButton** button);
@@ -308,10 +308,10 @@ index 158724b4752c..c82192848584 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 3c532ce679c7..b0ff9231929b 100644
index 89f6c657d0a6..6d1a0673f94f 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1051,6 +1051,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
@@ -1097,6 +1097,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@@ -327,7 +327,7 @@ index 3c532ce679c7..b0ff9231929b 100644
} else if (render_selection) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) {
@@ -1118,6 +1127,13 @@ void MenuItemView::PaintMinorIconAndText(
@@ -1164,6 +1173,13 @@ void MenuItemView::PaintMinorIconAndText(
}
SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const {
@@ -342,10 +342,10 @@ index 3c532ce679c7..b0ff9231929b 100644
GetMenuController() && GetMenuController()->use_touchable_layout()
? style::CONTEXT_TOUCH_MENU
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index b0b1cf9a7a79..17b37e84e933 100644
index 5dd4a9bbb8cf..33894ceb408f 100644
--- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc
@@ -240,6 +240,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
@@ -242,6 +242,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
return false;
}
@@ -449,10 +449,10 @@ index 78f832fd3acf..cb030c991614 100644
void WillHideMenu(MenuItemView* menu) override;
void OnMenuClosed(MenuItemView* menu) override;
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index 5881b07244d7..a2f671b73162 100644
index 8e21f427f6af..2dd8451c0fdc 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -201,6 +201,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
@@ -211,6 +211,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_down_button_ =
AddChildView(std::make_unique<MenuScrollButton>(content_view, false));
@@ -480,7 +480,7 @@ index 64e09ff4359a..714e8e9ff661 100644
x11_ui_controls_test_helper_.ButtonDownMask() == 0) {
// Move the cursor because EnterNotify/LeaveNotify are generated with the
diff --git ui/views/view.h ui/views/view.h
index 74e3010c8162..dcca72e52aa8 100644
index 0ae7efa30827..51f3ff3ebeae 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -25,6 +25,7 @@

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 7a90002e09be..6ea815bd3256 100644
index e2085913e2f4..6c6bd46cb125 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -525,6 +525,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
@@ -527,6 +527,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
return screen_info.device_scale_factor;
}
@@ -18,10 +18,10 @@ index 7a90002e09be..6ea815bd3256 100644
if (!GetMouseWheelPhaseHandler())
return;
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 63c4db6df041..4d253685cb78 100644
index cf71a09595af..49d41b5d7c52 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -64,6 +64,7 @@ class CursorManager;
@@ -65,6 +65,7 @@ class CursorManager;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
class RenderWidgetHostViewBaseObserver;
@@ -29,17 +29,7 @@ index 63c4db6df041..4d253685cb78 100644
class SyntheticGestureTarget;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -80,6 +81,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
float current_device_scale_factor() const {
return current_device_scale_factor_;
}
+ void set_current_device_scale_factor(float scale_factor) {
+ current_device_scale_factor_ = scale_factor;
+ }
// Returns the focused RenderWidgetHost inside this |view|'s RWH.
RenderWidgetHostImpl* GetFocusedWidget() const;
@@ -113,6 +117,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -114,6 +115,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Size& max_size) override;
void DisableAutoResize(const gfx::Size& new_size) override;
float GetDeviceScaleFactor() final;
@@ -48,7 +38,7 @@ index 63c4db6df041..4d253685cb78 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
void SetRecordContentToVisibleTimeRequest(
@@ -405,6 +411,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -404,6 +407,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
const gfx::Rect& bounds) = 0;
@@ -61,7 +51,7 @@ index 63c4db6df041..4d253685cb78 100644
// Sets the cursor for this view to the one associated with the specified
// cursor_type.
virtual void UpdateCursor(const WebCursor& cursor) = 0;
@@ -580,6 +592,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -579,6 +588,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
bool is_currently_scrolling_viewport_ = false;
@@ -73,7 +63,7 @@ index 63c4db6df041..4d253685cb78 100644
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index 69d909a11756..7a555229d3e5 100644
index ffa7faf1cbd0..4aefbdc37ecb 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -37,6 +37,10 @@
@@ -87,7 +77,7 @@ index 69d909a11756..7a555229d3e5 100644
#if defined(OS_WIN)
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "ui/aura/window_tree_host.h"
@@ -936,6 +940,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
@@ -944,6 +948,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
}
return;
}
@@ -102,7 +92,7 @@ index 69d909a11756..7a555229d3e5 100644
#endif
synthetic_move_position_ = center_in_screen;
}
@@ -965,6 +977,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
@@ -973,6 +985,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
}
void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
@@ -140,7 +130,7 @@ index beba7a3a40b8..941acdfbff8b 100644
// Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0;
diff --git ui/base/x/x11_window.cc ui/base/x/x11_window.cc
index 7fbc130d78df..6092964d846c 100644
index 585a09a2b6d8..d38924a42ea6 100644
--- ui/base/x/x11_window.cc
+++ ui/base/x/x11_window.cc
@@ -264,7 +264,8 @@ void XWindow::Init(const Configuration& config) {
@@ -154,7 +144,7 @@ index 7fbc130d78df..6092964d846c 100644
req.y = bounds_in_pixels_.y();
req.width = bounds_in_pixels_.width();
diff --git ui/base/x/x11_window.h ui/base/x/x11_window.h
index efed967b24dd..ec4b19e53e6f 100644
index 0a870d41a042..74401dd1635f 100644
--- ui/base/x/x11_window.h
+++ ui/base/x/x11_window.h
@@ -21,6 +21,7 @@
@@ -174,7 +164,7 @@ index efed967b24dd..ec4b19e53e6f 100644
XWindow();
diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc
index 0cfcb1cb66e3..43adab9fec65 100644
index 967dd5f1c099..7d135d890202 100644
--- ui/platform_window/x11/x11_window.cc
+++ ui/platform_window/x11/x11_window.cc
@@ -93,6 +93,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig(
@@ -263,7 +253,7 @@ index e0339379e1a8..b31f4ac179f6 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this};
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index a40975533035..9a3f60066b5c 100644
index 7476de34aa6e..1dc6eb8f12f3 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -140,8 +140,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@@ -280,7 +270,7 @@ index a40975533035..9a3f60066b5c 100644
remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
@@ -915,11 +919,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -925,11 +929,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -299,10 +289,10 @@ index a40975533035..9a3f60066b5c 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 0229c1c41502..992f89126f7f 100644
index ed3b2fe48665..20f40ec2440c 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -293,6 +293,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -292,6 +292,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
@@ -314,10 +304,10 @@ index 0229c1c41502..992f89126f7f 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 52c1d1eb59c4..ebcbd0286a7b 100644
index 494b38c5b486..8897d78097fc 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -311,7 +311,8 @@ void Widget::Init(InitParams params) {
@@ -313,7 +313,8 @@ void Widget::Init(InitParams params) {
parent_ = params.parent ? GetWidgetForNativeView(params.parent) : nullptr;
params.child |= (params.type == InitParams::TYPE_CONTROL);
@@ -327,7 +317,7 @@ index 52c1d1eb59c4..ebcbd0286a7b 100644
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
params.type != views::Widget::InitParams::TYPE_WINDOW) {
@@ -393,7 +394,12 @@ void Widget::Init(InitParams params) {
@@ -395,7 +396,12 @@ void Widget::Init(InitParams params) {
}
} else if (delegate) {
SetContentsView(delegate->TransferOwnershipOfContentsView());
@@ -340,8 +330,8 @@ index 52c1d1eb59c4..ebcbd0286a7b 100644
+ }
}
observer_manager_.Add(GetNativeTheme());
@@ -1176,10 +1182,16 @@ void Widget::OnNativeWidgetDestroyed() {
observation_.Observe(GetNativeTheme());
@@ -1191,10 +1197,16 @@ void Widget::OnNativeWidgetDestroyed() {
}
gfx::Size Widget::GetMinimumSize() const {
@@ -359,10 +349,10 @@ index 52c1d1eb59c4..ebcbd0286a7b 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 819ea9ae89cc..1cae5eda3d5f 100644
index cd0c29c10bfe..5f8f286fe17a 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -318,6 +318,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -321,6 +321,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// the concept with bubble anchoring a la BubbleDialogDelegateView.
gfx::NativeView parent = nullptr;
@@ -372,10 +362,10 @@ index 819ea9ae89cc..1cae5eda3d5f 100644
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 0fab70037a44..7409dd2c8acc 100644
index 623bbcf37780..10efeaac5686 100644
--- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h
@@ -381,6 +381,10 @@ class VIEWS_EXPORT WidgetDelegate {
@@ -385,6 +385,10 @@ class VIEWS_EXPORT WidgetDelegate {
// Returns true if the title text should be centered.
bool ShouldCenterWindowTitleText() const;
@@ -400,10 +390,10 @@ index 89f5b62f95df..8f6971929a12 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 4c9654191ddc..1b4cf20d8df5 100644
index 0a3940b75170..ad31ce630abb 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -3103,10 +3103,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3105,10 +3105,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@@ -80,12 +80,12 @@ index 1026b739d283..fe562ab60ce9 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index c66d791c7c9a..5c98ae02d8b7 100644
index 898571527429..5e31b5ceafc3 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -180,6 +180,8 @@ viz_component("service") {
"surfaces/surface_reference.cc",
"surfaces/surface_reference.h",
@@ -198,6 +198,8 @@ viz_component("service") {
"transitions/transferable_resource_tracker.cc",
"transitions/transferable_resource_tracker.h",
"viz_service_export.h",
+ "//cef/libcef/browser/osr/software_output_device_proxy.cc",
+ "//cef/libcef/browser/osr/software_output_device_proxy.h",
@@ -214,10 +214,10 @@ index 6b7fbb6cf13d..e2af75168cb9 100644
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index e1db8f745c07..6d94047788bf 100644
index e4ff4cb0a2ec..5023c6139f4e 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -27,7 +27,9 @@
@@ -28,7 +28,9 @@
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/common/surfaces/frame_sink_id.h"
#include "components/viz/common/surfaces/subtree_capture_id.h"
@@ -227,7 +227,7 @@ index e1db8f745c07..6d94047788bf 100644
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -133,6 +135,14 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -134,6 +136,14 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@@ -242,7 +242,7 @@ index e1db8f745c07..6d94047788bf 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -167,6 +177,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -169,6 +179,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -252,7 +252,7 @@ index e1db8f745c07..6d94047788bf 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -435,6 +448,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -440,6 +453,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;

View File

@@ -1,22 +1,21 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 496c36479799..ecbf2d55fe89 100644
index 588ad8311491..7aa76b084da5 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -2724,7 +2724,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
// main frame - let's do the same thing here.
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
+
@@ -2749,6 +2749,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation,
params.main_frame_name, params.is_prerendering);
+ if (params.view && params.delegate_view) {
+ view_.reset(params.view);
+ render_view_host_delegate_view_ = params.delegate_view;
+ }
+
+ if (!view_) {
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2735,6 +2741,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2759,6 +2765,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
view_.reset(CreateWebContentsView(this, delegate,
&render_view_host_delegate_view_));
}
@@ -24,7 +23,7 @@ index 496c36479799..ecbf2d55fe89 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -3550,6 +3557,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3615,6 +3622,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
// objects.
create_params.renderer_initiated_creation = !is_new_browsing_instance;
@@ -40,14 +39,13 @@ index 496c36479799..ecbf2d55fe89 100644
std::unique_ptr<WebContentsImpl> new_contents;
if (!is_guest) {
create_params.context = view_->GetNativeView();
@@ -7451,6 +7467,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -7277,6 +7293,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
// This is an outermost WebContents.
SetAsFocusedWebContentsIfNecessary();
}
+
+ observers_.ForEachObserver([&](WebContentsObserver* observer) {
+ observer->OnFrameFocused(node->current_frame_host());
+ });
+ observers_.NotifyObservers(&WebContentsObserver::OnFrameFocused,
+ node->current_frame_host());
}
void WebContentsImpl::DidCallFocus() {
@@ -64,7 +62,7 @@ index f1dcf53ea481..192f7c0ddd04 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 05efddc8d80f..29e01d78cf3c 100644
index f1bdd0c7bad8..46a33d9094e1 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -87,8 +87,10 @@ class BrowserContext;
@@ -76,9 +74,9 @@ index 05efddc8d80f..29e01d78cf3c 100644
class WebContentsDelegate;
+class WebContentsView;
class WebUI;
struct CustomContextMenuContext;
struct DropData;
@@ -222,6 +224,10 @@ class WebContents : public PageNavigator,
struct MHTMLGenerationParams;
@@ -228,6 +230,10 @@ class WebContents : public PageNavigator,
// Sandboxing flags set on the new WebContents.
network::mojom::WebSandboxFlags starting_sandbox_flags;
@@ -90,7 +88,7 @@ index 05efddc8d80f..29e01d78cf3c 100644
// the value that'll be returned by GetLastActiveTime(). If this is left
// default initialized then the value is not passed on to the WebContents
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 21d30d1b60ba..4b8eadb8fbb7 100644
index 9075cda6487f..c7deaa1c9752 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -60,10 +60,12 @@ class EyeDropperListener;
@@ -122,10 +120,10 @@ index 21d30d1b60ba..4b8eadb8fbb7 100644
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h
index 9ab0a264e9ec..ac9b1ea02aa5 100644
index adbfea805ecc..18f3f3240a08 100644
--- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h
@@ -609,6 +609,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
@@ -610,6 +610,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
// WebContents has gained/lost focus.
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}

View File

@@ -1,16 +1,16 @@
diff --git content/renderer/loader/web_url_loader_impl.h content/renderer/loader/web_url_loader_impl.h
index 883a088152d5..578f64c3bdc5 100644
--- content/renderer/loader/web_url_loader_impl.h
+++ content/renderer/loader/web_url_loader_impl.h
@@ -102,6 +102,7 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader {
std::unique_ptr<blink::ResourceLoadInfoNotifierWrapper>
resource_load_info_notifier_wrapper,
blink::WebURLLoaderClient* client) override;
+ void Cancel() override;
void SetDefersLoading(DeferType value) override;
void DidChangePriority(blink::WebURLRequest::Priority new_priority,
int intra_priority_value) override;
@@ -112,8 +113,6 @@ class CONTENT_EXPORT WebURLLoaderImpl : public blink::WebURLLoader {
diff --git third_party/blink/public/platform/web_url_loader.h third_party/blink/public/platform/web_url_loader.h
index 48b95a412fe0..569e8c750e0a 100644
--- third_party/blink/public/platform/web_url_loader.h
+++ third_party/blink/public/platform/web_url_loader.h
@@ -161,12 +161,14 @@ class BLINK_PLATFORM_EXPORT WebURLLoader {
void SetResourceRequestSenderForTesting(
std::unique_ptr<WebResourceRequestSender> resource_request_sender);
+ // Cancels an asynchronous load. This will appear as a load error to
+ // the client.
+ void Cancel();
+
private:
class Context;
class RequestPeerImpl;
@@ -18,19 +18,4 @@ index 883a088152d5..578f64c3bdc5 100644
-
scoped_refptr<Context> context_;
DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl);
diff --git third_party/blink/public/platform/web_url_loader.h third_party/blink/public/platform/web_url_loader.h
index 2db7b64b7948..fc77260fc9c0 100644
--- third_party/blink/public/platform/web_url_loader.h
+++ third_party/blink/public/platform/web_url_loader.h
@@ -94,6 +94,10 @@ class WebURLLoader {
std::unique_ptr<ResourceLoadInfoNotifierWrapper>,
WebURLLoaderClient*) = 0;
+ // Cancels an asynchronous load. This will appear as a load error to
+ // the client.
+ virtual void Cancel() {}
+
// |kDeferred| is when an asynchronous load is suspended.
// |kDeferredWithBackForwardCache| is when an asynchronous load is suspended
// with BackForwardCache, and BackForwardCache entry can be evicted when
DISALLOW_COPY_AND_ASSIGN(WebURLLoader);

View File

@@ -10,10 +10,10 @@ index ff7a8ed89e94..77f44956ff22 100644
+ GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array<PluginInfo> plugins);
};
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index e43136e0621f..59a8d59fcc64 100644
index 4b29748968bc..6d781517518c 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -773,6 +773,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -771,6 +771,11 @@ class BLINK_PLATFORM_EXPORT Platform {
// unset pass an empty WebURL and WebString.
virtual void SetActiveURL(const WebURL& url, const WebString& top_url) {}
@@ -26,10 +26,10 @@ index e43136e0621f..59a8d59fcc64 100644
static void InitializeMainThreadCommon(Platform* platform,
std::unique_ptr<Thread> main_thread);
diff --git third_party/blink/renderer/core/dom/document_init.cc third_party/blink/renderer/core/dom/document_init.cc
index 570678bc648c..42d979f2a496 100644
index a43dcce78e48..46bbd086516f 100644
--- third_party/blink/renderer/core/dom/document_init.cc
+++ third_party/blink/renderer/core/dom/document_init.cc
@@ -180,11 +180,11 @@ PluginData* DocumentInit::GetPluginData(LocalFrame* frame, const KURL& url) {
@@ -185,11 +185,11 @@ PluginData* DocumentInit::GetPluginData(LocalFrame* frame, const KURL& url) {
// frame()->tree().top()->securityContext() returns nullptr.
// For that reason, the origin must be retrieved directly from |url|.
if (frame->IsMainFrame())
@@ -44,10 +44,10 @@ index 570678bc648c..42d979f2a496 100644
DocumentInit& DocumentInit::WithTypeFrom(const String& mime_type) {
diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc
index aa8952f06c9d..1fed8c0efe80 100644
index 74d1e79e332c..6b96bf4a2543 100644
--- third_party/blink/renderer/core/frame/local_frame.cc
+++ third_party/blink/renderer/core/frame/local_frame.cc
@@ -1811,7 +1811,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
@@ -1850,7 +1850,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
PluginData* LocalFrame::GetPluginData() const {
if (!Loader().AllowPlugins())
return nullptr;
@@ -57,7 +57,7 @@ index aa8952f06c9d..1fed8c0efe80 100644
}
diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc
index 0608c4defc6d..54eaa2197957 100644
index 242653b4e723..385e4b4d3f07 100644
--- third_party/blink/renderer/core/inspector/devtools_session.cc
+++ third_party/blink/renderer/core/inspector/devtools_session.cc
@@ -8,6 +8,7 @@
@@ -85,10 +85,10 @@ index 0608c4defc6d..54eaa2197957 100644
void DevToolsSession::DispatchProtocolCommand(
diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc
index 022b95ec4ecc..ba58b796e35e 100644
index 415b29342170..5aebc6d6379a 100644
--- third_party/blink/renderer/core/page/page.cc
+++ third_party/blink/renderer/core/page/page.cc
@@ -212,7 +212,8 @@ Page::Page(PageClients& page_clients)
@@ -210,7 +210,8 @@ Page::Page(PageClients& page_clients,
MakeGarbageCollected<OverscrollController>(GetVisualViewport(),
GetChromeClient())),
link_highlight_(MakeGarbageCollected<LinkHighlight>(*this)),
@@ -98,7 +98,7 @@ index 022b95ec4ecc..ba58b796e35e 100644
// TODO(pdr): Initialize |validation_message_client_| lazily.
validation_message_client_(
MakeGarbageCollected<ValidationMessageClientImpl>(*this)),
@@ -395,21 +396,41 @@ void Page::InitialStyleChanged() {
@@ -402,21 +403,41 @@ void Page::InitialStyleChanged() {
}
}
@@ -149,7 +149,7 @@ index 022b95ec4ecc..ba58b796e35e 100644
page->NotifyPluginsChanged();
}
}
@@ -921,7 +942,8 @@ void Page::Trace(Visitor* visitor) const {
@@ -928,7 +949,8 @@ void Page::Trace(Visitor* visitor) const {
visitor->Trace(link_highlight_);
visitor->Trace(spatial_navigation_controller_);
visitor->Trace(main_frame_);
@@ -160,10 +160,10 @@ index 022b95ec4ecc..ba58b796e35e 100644
visitor->Trace(plugins_changed_observers_);
visitor->Trace(next_related_page_);
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
index e15111958f06..bfa43194b03b 100644
index d2efc89d1305..4934e23c3b08 100644
--- third_party/blink/renderer/core/page/page.h
+++ third_party/blink/renderer/core/page/page.h
@@ -152,7 +152,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
@@ -156,7 +156,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
ViewportDescription GetViewportDescription() const;
// Returns the plugin data associated with |main_frame_origin|.
@@ -173,7 +173,7 @@ index e15111958f06..bfa43194b03b 100644
// Resets the plugin data for all pages in the renderer process and notifies
// PluginsChangedObservers.
@@ -434,7 +435,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
@@ -435,7 +436,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
const Member<LinkHighlight> link_highlight_;
Member<SpatialNavigationController> spatial_navigation_controller_;

View File

@@ -11,10 +11,10 @@ index 758b0b1616ec..b35748d8180c 100644
text_track_margin_percentage(0.0f),
immersive_mode_enabled(false),
diff --git third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index ac2cb47de75e..1e38517a1544 100644
index ba1ba323ec45..10829ad5220c 100644
--- third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -155,6 +155,7 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -157,6 +157,7 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
data.accelerated_video_decode_enabled();
out->user_gesture_required_for_presentation =
data.user_gesture_required_for_presentation();
@@ -23,10 +23,10 @@ index ac2cb47de75e..1e38517a1544 100644
out->text_track_margin_percentage = data.text_track_margin_percentage();
out->immersive_mode_enabled = data.immersive_mode_enabled();
diff --git third_party/blink/public/common/web_preferences/web_preferences.h third_party/blink/public/common/web_preferences/web_preferences.h
index 64444803e75f..740d03e7eb7b 100644
index ab727750abcb..07a2418b92e1 100644
--- third_party/blink/public/common/web_preferences/web_preferences.h
+++ third_party/blink/public/common/web_preferences/web_preferences.h
@@ -175,6 +175,8 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -177,6 +177,8 @@ struct BLINK_COMMON_EXPORT WebPreferences {
bool user_gesture_required_for_presentation;
@@ -36,10 +36,10 @@ index 64444803e75f..740d03e7eb7b 100644
// These fields specify the foreground and background color for WebVTT text
diff --git third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index c071879cdc2e..9c11650a6045 100644
index 68d33ca3be29..4a0403dc0707 100644
--- third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -455,6 +455,11 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -460,6 +460,11 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.user_gesture_required_for_presentation;
}
@@ -52,10 +52,10 @@ index c071879cdc2e..9c11650a6045 100644
return r.text_tracks_enabled;
}
diff --git third_party/blink/public/mojom/webpreferences/web_preferences.mojom third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index 519b354f7a0e..103472abbb39 100644
index 5428fa6e79ed..ba5ebe0cb8ee 100644
--- third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -225,6 +225,8 @@ struct WebPreferences {
@@ -226,6 +226,8 @@ struct WebPreferences {
bool user_gesture_required_for_presentation;
@@ -65,7 +65,7 @@ index 519b354f7a0e..103472abbb39 100644
// These fields specify the foreground and background color for WebVTT text
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index fb648cda4e1a..15bb56c8ae4f 100644
index e8212d456666..1a151bb18c59 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -310,6 +310,7 @@ class WebView {
@@ -77,10 +77,10 @@ index fb648cda4e1a..15bb56c8ae4f 100644
// Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0;
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index 68688f094a68..9eaabb3431e2 100644
index a8e1730397b7..4ac6f472ea11 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -238,8 +238,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -240,8 +240,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@@ -96,7 +96,7 @@ index 68688f094a68..9eaabb3431e2 100644
}
namespace {
@@ -541,6 +546,7 @@ WebViewImpl::WebViewImpl(
@@ -545,6 +550,7 @@ WebViewImpl::WebViewImpl(
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
@@ -104,7 +104,7 @@ index 68688f094a68..9eaabb3431e2 100644
does_composite_(does_composite),
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
receiver_(this,
@@ -1752,6 +1758,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1763,6 +1769,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
prefs.translate_service_available);
@@ -114,10 +114,10 @@ index 68688f094a68..9eaabb3431e2 100644
void WebViewImpl::ThemeChanged() {
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index 83a2e96325de..48af36ac385a 100644
index 297d3e515abe..c61105a13fc0 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -126,7 +126,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -127,7 +127,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@@ -127,7 +127,7 @@ index 83a2e96325de..48af36ac385a 100644
// Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; }
@@ -721,6 +722,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -726,6 +727,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_ = 0.f;
bool fake_page_scale_animation_use_anchor_ = false;
@@ -137,10 +137,10 @@ index 83a2e96325de..48af36ac385a 100644
TransformationMatrix device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index d31dd9eb8419..3014c9223aef 100644
index ae4d460aaeea..4b325fb82793 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -802,7 +802,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
@@ -808,7 +808,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
index b001aa3db63f..dd2743ca0afc 100644
index 44e96c687520..cb81d3f0bb92 100644
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
@@ -10,6 +10,7 @@
@@ -26,7 +26,7 @@ index b001aa3db63f..dd2743ca0afc 100644
#include "components/prefs/pref_service.h"
#include "components/sync/driver/sync_internals_util.h"
#include "components/sync/driver/sync_service.h"
@@ -342,7 +345,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
@@ -335,7 +338,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
response->emplace(kOsVersionTag, os_version);
#endif
@@ -39,7 +39,7 @@ index b001aa3db63f..dd2743ca0afc 100644
PopulateExtensionInfoLogs(response.get());
PopulatePowerApiLogs(response.get());
PopulateDataReductionProxyLogs(response.get());
@@ -417,6 +424,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
@@ -410,6 +417,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
if (!profile)
return;
@@ -52,7 +52,7 @@ index b001aa3db63f..dd2743ca0afc 100644
extensions::ExtensionRegistry* extension_registry =
extensions::ExtensionRegistry::Get(profile);
std::string extensions_list;
@@ -524,6 +537,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
@@ -517,6 +530,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
#if defined(OS_WIN)
void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
SystemLogsResponse* response) {

View File

@@ -1,8 +1,8 @@
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
index 3a1f50cb713c..e915ab4ee03a 100644
index dabe252bb0f9..17f696e06a1c 100644
--- chrome/app/generated_resources.grd
+++ chrome/app/generated_resources.grd
@@ -5083,7 +5083,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -5119,7 +5119,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
</if>
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">

View File

@@ -1,17 +0,0 @@
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
index 8ae341c38aac..c67b5acc89e7 100644
--- sandbox/policy/win/sandbox_win.cc
+++ sandbox/policy/win/sandbox_win.cc
@@ -1004,8 +1004,11 @@ ResultCode SandboxWin::StartSandboxedProcess(
}
// TODO(wfh): Relax strict handle checks for network process until root cause
// for this crash can be resolved. See https://crbug.com/939590.
- if (sandbox_type != SandboxType::kNetwork)
+ if (!launcher_process_command_line.HasSwitch("win-rt-app") &&
+ sandbox_type != SandboxType::kNetwork) {
+ // Don't enable this mitigation in WinRT apps. See issue #2274.
mitigations |= MITIGATION_STRICT_HANDLE_CHECKS;
+ }
result = policy->SetDelayedProcessMitigations(mitigations);
if (result != SBOX_ALL_OK)