mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 87.0.4280.0 (#812852)
- Windows: VS2015 Update 2 is now the minimum version requirement for linking cef_sandbox from official build binary distributions.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index b2a25c8c376c..c21bc286abf7 100644
|
||||
index 1d449b35bf40..0b859084ba1c 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -33,6 +33,7 @@ import("//build/config/ui.gni")
|
||||
@@ -10,7 +10,7 @@ index b2a25c8c376c..c21bc286abf7 100644
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//third_party/icu/config.gni")
|
||||
@@ -1641,7 +1642,11 @@ component("base") {
|
||||
@@ -1646,7 +1647,11 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
@@ -23,6 +23,19 @@ index b2a25c8c376c..c21bc286abf7 100644
|
||||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1841,6 +1846,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
+ if (!use_custom_libcxx) {
|
||||
+ # Enable the VS 2015 Update 2 fix when building with the MSVC standard
|
||||
+ # library.
|
||||
+ defines += [ "_ENABLE_ATOMIC_ALIGNMENT_FIX" ]
|
||||
+ }
|
||||
+
|
||||
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
|
||||
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
||||
|
||||
diff --git base/hash/md5.h base/hash/md5.h
|
||||
index 8a49f08dcb04..2f03d7a6d1b3 100644
|
||||
--- base/hash/md5.h
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/strings/string_piece.h base/strings/string_piece.h
|
||||
index c650cfa84d59..0d6ff1ab5684 100644
|
||||
index b10707d94ef9..1bfa980cbbe6 100644
|
||||
--- base/strings/string_piece.h
|
||||
+++ base/strings/string_piece.h
|
||||
@@ -24,6 +24,7 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
index 5d8eae87ed64..427c11ceb549 100644
|
||||
index 202bd7aa0d57..20067b203d96 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -58,6 +58,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
|
||||
@@ -12,10 +12,10 @@ index 5d8eae87ed64..427c11ceb549 100644
|
||||
// Force a new surface id to be allocated. Returns true if the
|
||||
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index 07e91e20d4c1..565e98f015eb 100644
|
||||
index c9885b773743..dbd06e177d96 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -85,6 +85,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
||||
@@ -86,6 +86,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
||||
return delegated_frame_host_.get();
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index df3ab602e8b8..fa864443fe35 100644
|
||||
index 82801d316d76..4616c1caf493 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -240,7 +240,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() {
|
||||
@@ -10,4 +10,4 @@ index df3ab602e8b8..fa864443fe35 100644
|
||||
+ if (!g_browser_task_executor || !g_browser_task_executor->ui_thread_executor_)
|
||||
return;
|
||||
|
||||
DCHECK(g_browser_task_executor->ui_thread_executor_);
|
||||
DCHECK(Get()->ui_thread_executor_);
|
||||
|
@@ -1,21 +1,21 @@
|
||||
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
|
||||
index 9cd1ff2b9222..2f5264de68c4 100644
|
||||
index dfa87d00c03b..d04b6dd692dd 100644
|
||||
--- content/browser/child_process_security_policy_impl.cc
|
||||
+++ content/browser/child_process_security_policy_impl.cc
|
||||
@@ -1548,6 +1548,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
|
||||
// DeclarativeApiTest.PersistRules.
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme))
|
||||
return true;
|
||||
@@ -1680,6 +1680,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
|
||||
// DeclarativeApiTest.PersistRules.
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme))
|
||||
return true;
|
||||
+
|
||||
+ // Allow other schemes that are non-standard, non-local and WebSafe.
|
||||
+ if (lock_url.is_valid() &&
|
||||
+ !lock_url.IsStandard() &&
|
||||
+ !base::Contains(url::GetLocalSchemes(),
|
||||
+ lock_url.scheme_piece()) &&
|
||||
+ base::Contains(schemes_okay_to_request_in_any_process_,
|
||||
+ lock_url.scheme_piece())) {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
+ // Allow other schemes that are non-standard, non-local and WebSafe.
|
||||
+ if (lock_url.is_valid() &&
|
||||
+ !lock_url.IsStandard() &&
|
||||
+ !base::Contains(url::GetLocalSchemes(),
|
||||
+ lock_url.scheme_piece()) &&
|
||||
+ base::Contains(schemes_okay_to_request_in_any_process_,
|
||||
+ lock_url.scheme_piece())) {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
|
||||
// TODO(wjmaclean): We should update the ProcessLock comparison API to
|
||||
// TODO(wjmaclean): We should update the ProcessLock comparison API to
|
||||
|
@@ -1,10 +1,10 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index 8166e38ceda5..178099b1ac62 100644
|
||||
index 4f6461b6b5f5..58bb48800898 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -1767,8 +1767,6 @@ config("thin_archive") {
|
||||
@@ -1766,8 +1766,6 @@ config("thin_archive") {
|
||||
# archive names to 16 characters, which is not what we want).
|
||||
if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
|
||||
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
|
||||
arflags = [ "-T" ]
|
||||
- } else if (is_win && use_lld) {
|
||||
- arflags = [ "/llvmlibthin" ]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 6cb9ee1f0764..8109a134907e 100644
|
||||
index e462f7d8bef1..6c1c686f161c 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -12,6 +12,7 @@ import("//build/config/crypto.gni")
|
||||
@@ -10,15 +10,15 @@ index 6cb9ee1f0764..8109a134907e 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
@@ -1870,6 +1871,7 @@ static_library("browser") {
|
||||
@@ -1876,6 +1877,7 @@ static_library("browser") {
|
||||
"//build:branding_buildflags",
|
||||
"//build:lacros_buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
"//cc",
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2221,6 +2223,10 @@ static_library("browser") {
|
||||
@@ -2354,6 +2356,10 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -29,75 +29,12 @@ index 6cb9ee1f0764..8109a134907e 100644
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"after_startup_task_utils_android.cc",
|
||||
@@ -3422,8 +3428,6 @@ static_library("browser") {
|
||||
"nearby_sharing/outgoing_share_target_info.h",
|
||||
"nearby_sharing/paired_key_verification_runner.cc",
|
||||
"nearby_sharing/paired_key_verification_runner.h",
|
||||
- "nearby_sharing/share_target.cc",
|
||||
- "nearby_sharing/share_target.h",
|
||||
"nearby_sharing/share_target_discovered_callback.h",
|
||||
"nearby_sharing/share_target_info.cc",
|
||||
"nearby_sharing/share_target_info.h",
|
||||
@@ -3617,13 +3621,6 @@ static_library("browser") {
|
||||
"serial/serial_chooser_context_factory.cc",
|
||||
"serial/serial_chooser_context_factory.h",
|
||||
"serial/serial_chooser_histograms.h",
|
||||
- "sharesheet/sharesheet_controller.h",
|
||||
- "sharesheet/sharesheet_service.cc",
|
||||
- "sharesheet/sharesheet_service.h",
|
||||
- "sharesheet/sharesheet_service_delegate.cc",
|
||||
- "sharesheet/sharesheet_service_delegate.h",
|
||||
- "sharesheet/sharesheet_service_factory.cc",
|
||||
- "sharesheet/sharesheet_service_factory.h",
|
||||
"sharing/click_to_call/click_to_call_context_menu_observer.cc",
|
||||
"sharing/click_to_call/click_to_call_context_menu_observer.h",
|
||||
"sharing/click_to_call/click_to_call_metrics.cc",
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index 7ccd06a9b0fe..183da2c7238d 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -232,8 +232,8 @@ void ToolbarView::Init() {
|
||||
media_button = std::make_unique<MediaToolbarButtonView>(browser_);
|
||||
}
|
||||
@@ -4821,7 +4827,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
- std::unique_ptr<SharesheetButton> sharesheet_button;
|
||||
#if defined(OS_CHROMEOS)
|
||||
+ std::unique_ptr<SharesheetButton> sharesheet_button;
|
||||
if (base::FeatureList::IsEnabled(features::kSharesheet)) {
|
||||
sharesheet_button = std::make_unique<SharesheetButton>(browser_);
|
||||
}
|
||||
@@ -276,8 +276,10 @@ void ToolbarView::Init() {
|
||||
if (media_button)
|
||||
media_button_ = AddChildView(std::move(media_button));
|
||||
|
||||
+#if defined(OS_CHROMEOS)
|
||||
if (sharesheet_button)
|
||||
sharesheet_button_ = AddChildView(std::move(sharesheet_button));
|
||||
+#endif
|
||||
|
||||
if (toolbar_account_icon_container) {
|
||||
toolbar_account_icon_container_ =
|
||||
@@ -966,3 +968,4 @@ void ToolbarView::OnTouchUiChanged() {
|
||||
PreferredSizeChanged();
|
||||
}
|
||||
}
|
||||
+
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index f4af66fa98b3..3c4d171c091e 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -273,7 +273,9 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
media_router::CastToolbarButton* cast_ = nullptr;
|
||||
ToolbarAccountIconContainerView* toolbar_account_icon_container_ = nullptr;
|
||||
AvatarToolbarButton* avatar_ = nullptr;
|
||||
+#if defined(OS_CHROMEOS)
|
||||
SharesheetButton* sharesheet_button_ = nullptr;
|
||||
+#endif
|
||||
MediaToolbarButtonView* media_button_ = nullptr;
|
||||
BrowserAppMenuButton* app_menu_button_ = nullptr;
|
||||
|
||||
@@ -302,3 +304,4 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_VIEW_H_
|
||||
+
|
||||
- if (use_ozone) {
|
||||
+ if (use_ozone && !use_x11) {
|
||||
sources += [
|
||||
"fullscreen_ozone.cc",
|
||||
"media/webrtc/window_icon_util_ozone.cc",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/app_controller_mac.mm chrome/browser/app_controller_mac.mm
|
||||
index 8493d1b2233b..69efa5114c6f 100644
|
||||
index ce66d73e0fa4..cc62e05ba3ba 100644
|
||||
--- chrome/browser/app_controller_mac.mm
|
||||
+++ chrome/browser/app_controller_mac.mm
|
||||
@@ -1141,6 +1141,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||
@@ -35,10 +35,10 @@ index 8493d1b2233b..69efa5114c6f 100644
|
||||
return dockMenu;
|
||||
}
|
||||
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
|
||||
index 132f2a8d15fd..1262f31d39db 100644
|
||||
index b6fe1fee2cbb..84a75c6070d6 100644
|
||||
--- chrome/browser/browser_process.h
|
||||
+++ chrome/browser/browser_process.h
|
||||
@@ -201,10 +201,12 @@ class BrowserProcess {
|
||||
@@ -202,10 +202,12 @@ class BrowserProcess {
|
||||
virtual DownloadStatusUpdater* download_status_updater() = 0;
|
||||
virtual DownloadRequestLimiter* download_request_limiter() = 0;
|
||||
|
||||
@@ -52,10 +52,10 @@ index 132f2a8d15fd..1262f31d39db 100644
|
||||
// Returns the StatusTray, which provides an API for displaying status icons
|
||||
// in the system status tray. Returns NULL if status icons are not supported
|
||||
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
|
||||
index 254173b22652..93f0eb216cc7 100644
|
||||
index 443348c2de00..7486628a9912 100644
|
||||
--- chrome/browser/browser_process_impl.cc
|
||||
+++ chrome/browser/browser_process_impl.cc
|
||||
@@ -955,24 +955,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
@@ -951,24 +951,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
return download_request_limiter_.get();
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ index 254173b22652..93f0eb216cc7 100644
|
||||
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 124ebbf06ea2..c47e6b6cf24c 100644
|
||||
index 8a8d8a820690..c06d97c65ec2 100644
|
||||
--- chrome/browser/browser_process_impl.h
|
||||
+++ chrome/browser/browser_process_impl.h
|
||||
@@ -163,9 +163,11 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -99,10 +99,10 @@ index 124ebbf06ea2..c47e6b6cf24c 100644
|
||||
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
||||
subresource_filter::RulesetService* subresource_filter_ruleset_service()
|
||||
diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc
|
||||
index d20c93b35f39..badf57a88d90 100644
|
||||
index 845abd9ea9ab..29a5cfb36448 100644
|
||||
--- chrome/browser/lifetime/browser_close_manager.cc
|
||||
+++ chrome/browser/lifetime/browser_close_manager.cc
|
||||
@@ -148,12 +148,14 @@ void BrowserCloseManager::CloseBrowsers() {
|
||||
@@ -147,12 +147,14 @@ void BrowserCloseManager::CloseBrowsers() {
|
||||
// exit can restore all browsers open before exiting.
|
||||
ProfileManager::ShutdownSessionServices();
|
||||
#endif
|
||||
@@ -118,10 +118,10 @@ index d20c93b35f39..badf57a88d90 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 73d97b1da62a..eec9c645366f 100644
|
||||
index 1ed498e97be4..56e56b4d765a 100644
|
||||
--- chrome/browser/sessions/session_service.cc
|
||||
+++ chrome/browser/sessions/session_service.cc
|
||||
@@ -939,12 +939,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {
|
||||
@@ -954,12 +954,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {
|
||||
if (!profile() || profile()->AsTestingProfile())
|
||||
return;
|
||||
|
||||
|
@@ -13,7 +13,7 @@ index af2282034336..c49d920f73b5 100644
|
||||
return false;
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
index 24954ee7e0e8..2b883c5316c6 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -257,6 +257,20 @@
|
||||
@@ -37,7 +37,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -470,6 +484,13 @@ Browser::Browser(const CreateParams& params)
|
||||
@@ -474,6 +488,13 @@ Browser::Browser(const CreateParams& params)
|
||||
|
||||
CHECK(CanCreateBrowserForProfile(profile_));
|
||||
|
||||
@@ -51,7 +51,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
tab_strip_model_->AddObserver(this);
|
||||
|
||||
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
|
||||
@@ -1318,6 +1339,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1346,6 +1367,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
|
||||
@@ -66,7 +66,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1325,8 +1354,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1353,8 +1382,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
@@ -87,7 +87,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() {
|
||||
@@ -1601,6 +1640,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
@@ -1609,6 +1648,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
return window->OpenURLFromTab(source, params);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -1713,6 +1760,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -1721,6 +1768,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 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -1740,6 +1789,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -1748,6 +1797,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -120,7 +120,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
if (!GetStatusBubble())
|
||||
return;
|
||||
|
||||
@@ -1747,6 +1798,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -1755,6 +1806,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
GetStatusBubble()->SetURL(url);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
void Browser::ContentsMouseEvent(WebContents* source,
|
||||
bool motion,
|
||||
bool exited) {
|
||||
@@ -1863,6 +1925,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -1871,6 +1933,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 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
}
|
||||
|
||||
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
|
||||
@@ -1899,6 +1965,8 @@ void Browser::RendererResponsive(
|
||||
@@ -1907,6 +1973,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 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
}
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
@@ -1949,11 +2017,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -1957,11 +2025,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 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2814,6 +2886,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -2822,6 +2894,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
content_translate_driver->RemoveObserver(this);
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ index 71ec3bbbf1b6..10d47a4f021e 100644
|
||||
|
||||
void Browser::CloseFrame() {
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index ab2a03e6e878..aef94abf4fd8 100644
|
||||
index c67b79ec647a..532bb064b080 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -206,9 +206,9 @@ index ab2a03e6e878..aef94abf4fd8 100644
|
||||
#if defined(OS_ANDROID)
|
||||
#error This file should only be included on desktop.
|
||||
#endif
|
||||
@@ -241,6 +246,11 @@ class Browser : public TabStripModelObserver,
|
||||
// default. Intended for testing.
|
||||
BrowserWindow* window = nullptr;
|
||||
@@ -247,6 +252,11 @@ class Browser : public TabStripModelObserver,
|
||||
// User-set title of this browser window, if there is one.
|
||||
std::string user_title;
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ // Opaque CEF-specific configuration. Will be propagated to new Browsers.
|
||||
@@ -218,7 +218,7 @@ index ab2a03e6e878..aef94abf4fd8 100644
|
||||
private:
|
||||
friend class Browser;
|
||||
friend class WindowSizerChromeOSTest;
|
||||
@@ -358,6 +368,12 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -365,6 +375,12 @@ class Browser : public TabStripModelObserver,
|
||||
return &signin_view_controller_;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ index ab2a03e6e878..aef94abf4fd8 100644
|
||||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -742,6 +758,11 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -755,6 +771,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 ab2a03e6e878..aef94abf4fd8 100644
|
||||
void ContentsMouseEvent(content::WebContents* source,
|
||||
bool motion,
|
||||
bool exited) override;
|
||||
@@ -1206,6 +1227,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1221,6 +1242,10 @@ class Browser : public TabStripModelObserver,
|
||||
extension_browser_window_helper_;
|
||||
#endif
|
||||
|
||||
@@ -255,7 +255,7 @@ index ab2a03e6e878..aef94abf4fd8 100644
|
||||
|
||||
// Stores the list of browser windows showing via a menu.
|
||||
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
||||
index 6d6a3b90dcad..fbfe4a0c959c 100644
|
||||
index 675dae9023fe..770a85a45f8f 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -435,6 +435,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
@@ -273,10 +273,10 @@ index 6d6a3b90dcad..fbfe4a0c959c 100644
|
||||
// tab helpers, so the entire set of tab helpers needs to be set up
|
||||
// immediately.
|
||||
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
|
||||
index c8df2ade2443..0e350adda289 100644
|
||||
index f5134591c3dd..8d0211b43791 100644
|
||||
--- chrome/browser/ui/browser_tabstrip.cc
|
||||
+++ chrome/browser/ui/browser_tabstrip.cc
|
||||
@@ -28,9 +28,13 @@ void AddTabAt(Browser* browser,
|
||||
@@ -30,9 +30,13 @@ void AddTabAt(Browser* browser,
|
||||
// Time new tab page creation time. We keep track of the timing data in
|
||||
// WebContents, but we want to include the time it takes to create the
|
||||
// WebContents object too.
|
||||
|
@@ -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 3e2d1221d91e..4fbf30796bdb 100644
|
||||
index f3b51e20cb9c..b479022f1d3b 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 @@
|
||||
@@ -36,7 +36,7 @@ index 3e2d1221d91e..4fbf30796bdb 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -98,10 +109,16 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -97,10 +108,16 @@ scoped_refptr<RefcountedKeyedService>
|
||||
std::move(allowlist_provider));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -54,10 +54,10 @@ index 3e2d1221d91e..4fbf30796bdb 100644
|
||||
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
SupervisedUserSettingsService* supervised_service =
|
||||
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
index 450005f9fc0b..13fca8b3e2d2 100644
|
||||
index 20ae512af806..e03946e7ce80 100644
|
||||
--- components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -183,7 +183,7 @@ ContentSetting GetContentSettingFromRulesImpl(
|
||||
@@ -176,7 +176,7 @@ ContentSetting GetContentSettingFromRulesImpl(
|
||||
return rule.GetContentSetting();
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index c7bd97a32af1..311f2c52af8d 100644
|
||||
index bf4ca6cdccc4..1b9607765313 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -10,6 +10,7 @@ import("//build/config/crypto.gni")
|
||||
@@ -10,7 +10,7 @@ index c7bd97a32af1..311f2c52af8d 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/assistant/assistant.gni")
|
||||
@@ -334,6 +335,10 @@ static_library("ui") {
|
||||
@@ -330,6 +331,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@@ -21,7 +21,7 @@ index c7bd97a32af1..311f2c52af8d 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
|
||||
@@ -355,6 +360,7 @@ static_library("ui") {
|
||||
@@ -351,6 +356,7 @@ static_library("ui") {
|
||||
"//base/allocator:buildflags",
|
||||
"//build:branding_buildflags",
|
||||
"//cc/paint",
|
||||
@@ -29,23 +29,25 @@ index c7bd97a32af1..311f2c52af8d 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -1532,6 +1538,7 @@ static_library("ui") {
|
||||
"//components/network_session_configurator/common",
|
||||
@@ -1525,6 +1531,7 @@ static_library("ui") {
|
||||
"//components/page_load_metrics/browser",
|
||||
"//components/performance_manager:site_data_proto",
|
||||
"//components/printing/browser",
|
||||
+ "//components/printing/common:mojo_interfaces",
|
||||
"//components/profile_metrics",
|
||||
"//components/safety_check",
|
||||
"//components/search_provider_logos",
|
||||
@@ -3905,8 +3912,6 @@ static_library("ui") {
|
||||
"views/toolbar/home_button.h",
|
||||
"views/toolbar/reload_button.cc",
|
||||
"views/toolbar/reload_button.h",
|
||||
- "views/toolbar/sharesheet_button.cc",
|
||||
- "views/toolbar/sharesheet_button.h",
|
||||
"views/toolbar/toolbar_account_icon_container_view.cc",
|
||||
"views/toolbar/toolbar_account_icon_container_view.h",
|
||||
"views/toolbar/toolbar_action_view.cc",
|
||||
@@ -3243,7 +3250,9 @@ static_library("ui") {
|
||||
"views/frame/browser_desktop_window_tree_host_platform.h",
|
||||
]
|
||||
}
|
||||
- sources += [ "views/frame/native_browser_frame_factory_ozone.cc" ]
|
||||
+ if (!use_x11) {
|
||||
+ sources += [ "views/frame/native_browser_frame_factory_ozone.cc" ]
|
||||
+ }
|
||||
}
|
||||
if (is_desktop_linux) {
|
||||
sources += [
|
||||
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
|
||||
index f27414c41891..5ff3bfa8f724 100644
|
||||
--- chrome/browser/ui/webui/net_export_ui.cc
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index e520e957ddea..34c402af6d35 100644
|
||||
index c5c7a662232d..c1d9e8c5434d 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -1022,10 +1022,6 @@ void LaunchURL(const GURL& url,
|
||||
@@ -1035,10 +1035,6 @@ void LaunchURL(const GURL& url,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ index e520e957ddea..34c402af6d35 100644
|
||||
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
|
||||
@@ -1204,6 +1200,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
||||
@@ -1217,6 +1213,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
||||
return *greased_brand_version_list;
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ index e520e957ddea..34c402af6d35 100644
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(switches::kUserAgent)) {
|
||||
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
|
||||
index a47818dc2f0f..08148534aeea 100644
|
||||
index ef7da4343581..93ad5e8b1d9b 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -91,7 +91,8 @@ class ChromeXrIntegrationClient;
|
||||
@@ -98,7 +98,8 @@ class ChromeXrIntegrationClient;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 9b9335369a4f..fea76956bd41 100644
|
||||
index 670a33244287..9c13775f385d 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -374,7 +374,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -373,7 +373,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 9b9335369a4f..fea76956bd41 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index 93571e419253..bc77bebce943 100644
|
||||
index 8d0793739a72..8f5097889fcb 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -101,7 +101,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -99,7 +99,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 93571e419253..bc77bebce943 100644
|
||||
|
||||
// Returns regular or off-the-record profile given its profile key.
|
||||
static Profile* GetProfileFromProfileKey(ProfileKey* profile_key);
|
||||
@@ -134,7 +134,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -132,7 +132,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 93571e419253..bc77bebce943 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -143,7 +143,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -141,7 +141,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.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 7f54cacab005..b4f509b766ca 100644
|
||||
index 8d48495d450e..eea8b9c41e54 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -251,6 +251,7 @@ static_library("safe_browsing") {
|
||||
@@ -260,6 +260,7 @@ static_library("safe_browsing") {
|
||||
"//chrome/common/safe_browsing:download_type_util",
|
||||
"//chrome/services/file_util/public/cpp",
|
||||
"//components/content_settings/core/browser",
|
||||
|
70
patch/patches/chrome_browser_sharesheet_1123388.patch
Normal file
70
patch/patches/chrome_browser_sharesheet_1123388.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.cc chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
||||
index ceea6a38ca79..6e8e335222bc 100644
|
||||
--- chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
||||
+++ chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
||||
@@ -21,8 +21,10 @@ SharesheetServiceDelegate::SharesheetServiceDelegate(
|
||||
content::WebContents* web_contents,
|
||||
SharesheetService* sharesheet_service)
|
||||
: id_(id),
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_(
|
||||
std::make_unique<SharesheetBubbleView>(web_contents, this)),
|
||||
+#endif
|
||||
sharesheet_service_(sharesheet_service) {}
|
||||
|
||||
SharesheetServiceDelegate::~SharesheetServiceDelegate() = default;
|
||||
@@ -31,18 +33,24 @@ void SharesheetServiceDelegate::ShowBubble(
|
||||
std::vector<TargetInfo> targets,
|
||||
apps::mojom::IntentPtr intent,
|
||||
sharesheet::CloseCallback close_callback) {
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_->ShowBubble(std::move(targets), std::move(intent),
|
||||
std::move(close_callback));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::OnBubbleClosed(
|
||||
const base::string16& active_action) {
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_.release();
|
||||
+#endif
|
||||
sharesheet_service_->OnBubbleClosed(id_, active_action);
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::OnActionLaunched() {
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_->ShowActionView();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::OnTargetSelected(
|
||||
@@ -66,11 +74,15 @@ void SharesheetServiceDelegate::SetSharesheetSize(const int& width,
|
||||
const int& height) {
|
||||
DCHECK_GT(width, 0);
|
||||
DCHECK_GT(height, 0);
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_->ResizeBubble(width, height);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::CloseSharesheet() {
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_->CloseBubble();
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace sharesheet
|
||||
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.h chrome/browser/sharesheet/sharesheet_service_delegate.h
|
||||
index 47f15a6b4093..71189bfee8b9 100644
|
||||
--- chrome/browser/sharesheet/sharesheet_service_delegate.h
|
||||
+++ chrome/browser/sharesheet/sharesheet_service_delegate.h
|
||||
@@ -59,7 +59,9 @@ class SharesheetServiceDelegate : public SharesheetController {
|
||||
private:
|
||||
const uint32_t id_;
|
||||
base::string16 active_action_;
|
||||
+#if defined(OS_CHROMEOS)
|
||||
std::unique_ptr<SharesheetBubbleView> sharesheet_bubble_view_;
|
||||
+#endif
|
||||
SharesheetService* sharesheet_service_;
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
|
||||
index e49552e272e4..b935ef2d47b9 100644
|
||||
index a63433f6a77c..ad603df13e79 100644
|
||||
--- chrome/browser/themes/theme_service.cc
|
||||
+++ chrome/browser/themes/theme_service.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -21,7 +21,7 @@ index e49552e272e4..b935ef2d47b9 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "base/scoped_observer.h"
|
||||
#include "extensions/browser/extension_registry_observer.h"
|
||||
@@ -271,11 +276,19 @@ void ThemeService::Init() {
|
||||
@@ -275,11 +280,19 @@ void ThemeService::Init() {
|
||||
// OnExtensionServiceReady. Otherwise, the ThemeObserver won't be
|
||||
// constructed in time to observe the corresponding events.
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@@ -197,10 +197,10 @@ index c1870b0f56ef..d32b8d54fb3f 100644
|
||||
GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
|
||||
if (response_url.SchemeIsHTTPOrHTTPS() &&
|
||||
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
|
||||
index eb6e5d353b33..62994a141421 100644
|
||||
index c9852764a59c..ffe26ef879b9 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -823,6 +823,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -825,6 +825,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@@ -208,7 +208,7 @@ index eb6e5d353b33..62994a141421 100644
|
||||
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
|
||||
identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
@@ -1026,7 +1027,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1028,7 +1029,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
plugin_auth_host.BindNewEndpointAndPassReceiver());
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@@ -218,7 +218,7 @@ index eb6e5d353b33..62994a141421 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -1035,7 +1037,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1037,7 +1039,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
@@ -228,7 +228,7 @@ index eb6e5d353b33..62994a141421 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -1045,7 +1048,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1047,7 +1050,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
@@ -238,7 +238,7 @@ index eb6e5d353b33..62994a141421 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -1053,7 +1057,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1055,7 +1059,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
@@ -267,17 +267,14 @@ index 4e883820f752..267c6af2af6b 100644
|
||||
|
||||
std::string message = base::StringPrintf(
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h
|
||||
index c44044339647..3cdb3fb4bb63 100644
|
||||
index 4e1cf0118cb7..af941abfe235 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.h
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.h
|
||||
@@ -130,6 +130,11 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
@@ -127,6 +127,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
void EmbedderSystemDragEnded();
|
||||
void EndSystemDragIfApplicable();
|
||||
|
||||
+ // Returns the embedder frame for this guest.
|
||||
+ RenderFrameHost* GetEmbedderFrame() const {
|
||||
+ return delegate_->GetEmbedderFrame();
|
||||
+ }
|
||||
+ WebContentsImpl* owner_web_contents() const { return owner_web_contents_; }
|
||||
+
|
||||
protected:
|
||||
// BrowserPluginGuest is a WebContentsObserver of |web_contents| and
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index cbf9a60c385e..06146091eb43 100644
|
||||
index ce49b5924986..596069095d86 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -4,6 +4,7 @@
|
||||
@@ -10,7 +10,7 @@ index cbf9a60c385e..06146091eb43 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -134,6 +135,7 @@ static_library("renderer") {
|
||||
@@ -141,6 +142,7 @@ static_library("renderer") {
|
||||
public_deps = [ "//components/contextual_search:buildflags" ]
|
||||
|
||||
deps = [
|
||||
@@ -18,7 +18,7 @@ index cbf9a60c385e..06146091eb43 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -199,6 +201,10 @@ static_library("renderer") {
|
||||
@@ -206,6 +208,10 @@ static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index 313975f42c0d..ee7f27dab6b7 100644
|
||||
index 8b7b6f492b3e..1085e4b1e23d 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -19,7 +19,7 @@ index 313975f42c0d..ee7f27dab6b7 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.
|
||||
@@ -624,7 +627,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
|
||||
@@ -640,7 +643,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
|
||||
}
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -29,7 +29,7 @@ index 313975f42c0d..ee7f27dab6b7 100644
|
||||
base::sequence_manager::internal::ThreadControllerPowerMonitor::
|
||||
InitializeOnMainThread();
|
||||
#endif
|
||||
@@ -906,6 +911,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -922,6 +927,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
@@ -37,7 +37,7 @@ index 313975f42c0d..ee7f27dab6b7 100644
|
||||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
@@ -916,6 +922,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -932,6 +938,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
InitMacCrashReporter(command_line, process_type);
|
||||
SetUpInstallerPreferences(command_line);
|
||||
#endif
|
||||
@@ -45,15 +45,15 @@ index 313975f42c0d..ee7f27dab6b7 100644
|
||||
|
||||
#if defined(OS_WIN)
|
||||
child_process_logging::Init();
|
||||
@@ -1040,6 +1047,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1056,6 +1063,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
locale;
|
||||
}
|
||||
|
||||
+ if (!cef::IsChromeRuntimeEnabled()) {
|
||||
#if defined(OS_POSIX) && !defined(OS_MAC)
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != service_manager::switches::kZygoteProcess) {
|
||||
@@ -1072,6 +1080,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
if (process_type != switches::kZygoteProcess) {
|
||||
@@ -1088,6 +1096,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 313975f42c0d..ee7f27dab6b7 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
MaybeInitializeGDI();
|
||||
@@ -1170,6 +1179,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1186,6 +1195,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
SetUpProfilingShutdownHandler();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ index 313975f42c0d..ee7f27dab6b7 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 =
|
||||
@@ -1186,6 +1196,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1202,6 +1212,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
|
||||
// Reset the command line for the newly spawned process.
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
@@ -78,18 +78,18 @@ index 313975f42c0d..ee7f27dab6b7 100644
|
||||
|
||||
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index 68a92d3924f0..280ef9019551 100644
|
||||
index c9bf19474a2a..3c1d5eec82fa 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/lacros_buildflags.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "cc/base/switches.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/active_use_util.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
@@ -892,8 +893,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -893,8 +894,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 68a92d3924f0..280ef9019551 100644
|
||||
|
||||
// These members must be initialized before returning from this function.
|
||||
// Android doesn't use StartupBrowserCreator.
|
||||
@@ -1608,11 +1611,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1613,11 +1616,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,18 +117,18 @@ index 68a92d3924f0..280ef9019551 100644
|
||||
// Initialize autoupdate timer. Timer callback costs basically nothing
|
||||
// when browser is not in persistent mode, so it's OK to let it ride on
|
||||
diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm
|
||||
index ad52e63ed83a..6b16ee3ccc96 100644
|
||||
index c2905bfd0df7..09bfcf942a7c 100644
|
||||
--- chrome/browser/notifications/notification_platform_bridge_mac.mm
|
||||
+++ chrome/browser/notifications/notification_platform_bridge_mac.mm
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -25,6 +25,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_process.h"
|
||||
#include "chrome/browser/browser_features.h"
|
||||
#include "chrome/browser/notifications/notification_common.h"
|
||||
#include "chrome/browser/notifications/notification_display_service_impl.h"
|
||||
@@ -651,6 +652,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId
|
||||
@@ -449,6 +450,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId
|
||||
- (id<NotificationDelivery>)serviceProxy {
|
||||
id<NotificationDelivery> proxy = [_xpcConnection remoteObjectProxy];
|
||||
|
||||
@@ -141,16 +141,3 @@ index ad52e63ed83a..6b16ee3ccc96 100644
|
||||
if (!_setExceptionPort) {
|
||||
base::mac::ScopedMachSendRight exceptionPort(
|
||||
crash_reporter::GetCrashpadClient().GetHandlerMachPort());
|
||||
diff --git ui/gtk/select_file_dialog_impl_kde.cc ui/gtk/select_file_dialog_impl_kde.cc
|
||||
index 464aa72e1d47..30a621dea6fc 100644
|
||||
--- ui/gtk/select_file_dialog_impl_kde.cc
|
||||
+++ ui/gtk/select_file_dialog_impl_kde.cc
|
||||
@@ -6,6 +6,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <stddef.h>
|
||||
|
||||
+#undef Success
|
||||
+
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
|
||||
index 6225a610f11b..693f75b4bb1f 100644
|
||||
index 4a6b5bb81c17..de8c4e03a9c9 100644
|
||||
--- third_party/widevine/cdm/BUILD.gn
|
||||
+++ third_party/widevine/cdm/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@@ -42,7 +42,7 @@ index 4dd9b2645d60..23b46ce1a43a 100644
|
||||
explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
|
||||
~SyntheticGestureTargetBase() override;
|
||||
diff --git content/common/content_switches_internal.h content/common/content_switches_internal.h
|
||||
index 886bdf0edf8f..1d714000cce5 100644
|
||||
index 57072bf1263a..0a93446e4d21 100644
|
||||
--- content/common/content_switches_internal.h
|
||||
+++ content/common/content_switches_internal.h
|
||||
@@ -15,7 +15,7 @@ class CommandLine;
|
||||
@@ -55,7 +55,7 @@ index 886bdf0edf8f..1d714000cce5 100644
|
||||
blink::mojom::V8CacheOptions GetV8CacheOptions();
|
||||
|
||||
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 9cfeb73eb397..de5bc486f204 100644
|
||||
index 87c15e50b7f0..8f42ae4da8de 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -25,6 +25,7 @@ component("controller") {
|
||||
@@ -66,22 +66,22 @@ index 9cfeb73eb397..de5bc486f204 100644
|
||||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
@@ -45,6 +46,8 @@ component("controller") {
|
||||
"memory_usage_monitor.h",
|
||||
"performance_manager/renderer_resource_coordinator_impl.cc",
|
||||
"performance_manager/renderer_resource_coordinator_impl.h",
|
||||
+ "//cef/libcef/renderer/blink_glue.cc",
|
||||
+ "//cef/libcef/renderer/blink_glue.h",
|
||||
@@ -49,6 +50,8 @@ component("controller") {
|
||||
"performance_manager/v8_detailed_memory_reporter_impl.h",
|
||||
"performance_manager/v8_worker_memory_reporter.cc",
|
||||
"performance_manager/v8_worker_memory_reporter.h",
|
||||
+ "//cef/libcef/renderer/blink_glue.cc",
|
||||
+ "//cef/libcef/renderer/blink_glue.h",
|
||||
]
|
||||
|
||||
if (is_linux || is_chromeos) {
|
||||
diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn
|
||||
index 12f3abf92434..d73901dece01 100644
|
||||
index 4aae406b9ace..40ca74281b78 100644
|
||||
--- ui/events/keycodes/BUILD.gn
|
||||
+++ ui/events/keycodes/BUILD.gn
|
||||
@@ -16,6 +16,8 @@ source_set("xkb") {
|
||||
|
||||
public_deps = [ "//ui/base:buildflags" ]
|
||||
@@ -19,6 +19,8 @@ source_set("xkb") {
|
||||
"//ui/gfx/x/keysyms",
|
||||
]
|
||||
|
||||
+ defines = [ "KEYCODES_X_IMPLEMENTATION" ]
|
||||
+
|
||||
@@ -109,25 +109,3 @@ index a1f9b78704fb..c7d3558251d9 100644
|
||||
|
||||
} // namespace ui
|
||||
|
||||
diff --git ui/events/keycodes/keysym_to_unicode.h ui/events/keycodes/keysym_to_unicode.h
|
||||
index a7983d179832..2bbee48e57ac 100644
|
||||
--- ui/events/keycodes/keysym_to_unicode.h
|
||||
+++ ui/events/keycodes/keysym_to_unicode.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef UI_EVENTS_KEYCODES_KEYSYM_TO_UNICODE_H_
|
||||
#define UI_EVENTS_KEYCODES_KEYSYM_TO_UNICODE_H_
|
||||
|
||||
+#include "ui/events/keycodes/keycodes_x_export.h"
|
||||
+
|
||||
#include <stdint.h>
|
||||
|
||||
namespace ui {
|
||||
@@ -13,7 +15,7 @@ namespace ui {
|
||||
// |keysym| doesn't represent a printable character, returns zero. We don't
|
||||
// support characters outside the Basic Plane, and this function returns zero
|
||||
// in that case.
|
||||
-uint16_t GetUnicodeCharacterFromXKeySym(unsigned long keysym);
|
||||
+KEYCODES_X_EXPORT uint16_t GetUnicodeCharacterFromXKeySym(unsigned long keysym);
|
||||
|
||||
} // namespace ui
|
||||
|
||||
|
@@ -74,47 +74,11 @@ index f66e6bca5e2b..c99998449b6b 100644
|
||||
version.SetString("User-Agent",
|
||||
GetContentClient()->browser()->GetUserAgent());
|
||||
version.SetString("V8-Version", V8_VERSION_STRING);
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index caa2c1d4d0ab..f20dfe7ca7fe 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -300,6 +300,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame(
|
||||
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,
|
||||
@@ -307,8 +308,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);
|
||||
}
|
||||
|
||||
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
|
||||
index 8d1c932e9f3a..e6a2c525da06 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.h
|
||||
+++ content/browser/frame_host/render_frame_message_filter.h
|
||||
@@ -83,6 +83,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
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/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
|
||||
index 2b94b8b2839e..36506642484c 100644
|
||||
index 3a0f7d0a3a26..fd32c77e58cb 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -632,6 +632,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
|
||||
@@ -638,6 +638,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
|
||||
resource_request_->has_user_gesture,
|
||||
resource_request_->request_initiator, &loader_factory);
|
||||
|
||||
@@ -128,7 +92,7 @@ index 2b94b8b2839e..36506642484c 100644
|
||||
if (loader_factory) {
|
||||
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
|
||||
std::move(loader_factory));
|
||||
@@ -833,7 +840,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
|
||||
@@ -839,7 +846,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(
|
||||
@@ -223,11 +187,47 @@ 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 17729c56fa29..84a14a89306f 100644
|
||||
--- content/browser/renderer_host/render_frame_message_filter.cc
|
||||
+++ content/browser/renderer_host/render_frame_message_filter.cc
|
||||
@@ -300,6 +300,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame(
|
||||
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,
|
||||
@@ -307,8 +308,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);
|
||||
}
|
||||
|
||||
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
|
||||
diff --git content/browser/renderer_host/render_frame_message_filter.h content/browser/renderer_host/render_frame_message_filter.h
|
||||
index 0f197c63c11c..20d046827f56 100644
|
||||
--- content/browser/renderer_host/render_frame_message_filter.h
|
||||
+++ content/browser/renderer_host/render_frame_message_filter.h
|
||||
@@ -83,6 +83,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
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 33db23c32723..acde4d008de3 100644
|
||||
index 65116e483c65..c97f731cef9a 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -502,9 +502,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -495,9 +495,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
// type. If there is no matching plugin, |found| is false.
|
||||
// |actual_mime_type| is the actual mime type supported by the
|
||||
// found plugin.
|
||||
@@ -240,20 +240,20 @@ index 33db23c32723..acde4d008de3 100644
|
||||
std::string /* mime_type */,
|
||||
bool /* found */,
|
||||
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
|
||||
index e112645811cb..7758de1bf201 100644
|
||||
index da3aceed75b1..e88601502e28 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 880000
|
||||
+// #pragma clang max_tokens_here 880000
|
||||
-#pragma clang max_tokens_here 890000
|
||||
+// #pragma clang max_tokens_here 890000
|
||||
|
||||
#include <utility>
|
||||
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 428ec871deba..16ac7abd2f04 100644
|
||||
index 27b7e117b531..80c92eed565d 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -264,7 +264,7 @@ index 428ec871deba..16ac7abd2f04 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"
|
||||
@@ -1664,6 +1665,14 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1685,6 +1686,14 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const base::Optional<url::Origin>& initiating_origin,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
@@ -279,7 +279,7 @@ index 428ec871deba..16ac7abd2f04 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.
|
||||
@@ -1735,6 +1744,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1756,6 +1765,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
@@ -315,7 +315,7 @@ index 98c59005599e..69752184745d 100644
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index 5b0784c844bd..a7b6d3f3c237 100644
|
||||
index 12e091c7c13d..513db858b8fa 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -84,6 +84,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -328,7 +328,7 @@ index 5b0784c844bd..a7b6d3f3c237 100644
|
||||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -325,6 +328,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -312,6 +315,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -340,10 +340,10 @@ index 5b0784c844bd..a7b6d3f3c237 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index 16a16b1f075d..94942f76489c 100644
|
||||
index 3b2626c3ef9d..c0acde278d5a 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3853,7 +3853,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -3896,7 +3896,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@@ -354,20 +354,20 @@ index 16a16b1f075d..94942f76489c 100644
|
||||
if (!found)
|
||||
return nullptr;
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index a6118f1f5ce1..7ae0e25160bb 100644
|
||||
index 91daa69bf55a..40f79ddf47b9 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -632,6 +632,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -636,6 +636,8 @@ void RenderThreadImpl::Init() {
|
||||
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
|
||||
URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
+ GetContentClient()->renderer()->RenderThreadConnected();
|
||||
+
|
||||
GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating(
|
||||
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
|
||||
|
||||
&RenderThreadImpl::OnRouteProviderReceiver, base::Unretained(this)));
|
||||
GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating(
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index d6375e9d16dc..b9e33ebe62d1 100644
|
||||
index ca435bda981b..274c460a151e 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -915,6 +915,15 @@ void RendererBlinkPlatformImpl::SetRenderingColorSpace(
|
||||
@@ -387,10 +387,10 @@ index d6375e9d16dc..b9e33ebe62d1 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 cfced914c88d..a8f1ffc14cb7 100644
|
||||
index 30af7f4fed5f..3bea58414d5b 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -210,6 +210,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -211,6 +211,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
media::GpuVideoAcceleratorFactories* GetGpuFactories() override;
|
||||
void SetRenderingColorSpace(const gfx::ColorSpace& color_space) override;
|
||||
|
||||
|
@@ -1,73 +0,0 @@
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index 1dec904333df..e1f2ec06d93f 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "base/task/post_task.h"
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/threading/hang_watcher.h"
|
||||
+#include "base/threading/thread_restrictions.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"
|
||||
@@ -1028,6 +1029,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
+void ContentMainRunnerImpl::ShutdownOnUIThread() {
|
||||
+ base::ScopedAllowBaseSyncPrimitivesForTesting allow_wait;
|
||||
+ discardable_shared_memory_manager_.reset();
|
||||
+}
|
||||
+
|
||||
// static
|
||||
ContentMainRunner* ContentMainRunner::Create() {
|
||||
return ContentMainRunnerImpl::Create();
|
||||
diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h
|
||||
index 50797fdcea18..33acf1f35429 100644
|
||||
--- content/app/content_main_runner_impl.h
|
||||
+++ content/app/content_main_runner_impl.h
|
||||
@@ -51,6 +51,8 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
int Run(bool start_service_manager_only) override;
|
||||
void Shutdown() override;
|
||||
|
||||
+ void ShutdownOnUIThread();
|
||||
+
|
||||
private:
|
||||
int RunServiceManager(MainFunctionParams& main_function_params,
|
||||
bool start_service_manager_only);
|
||||
diff --git content/app/content_service_manager_main_delegate.cc content/app/content_service_manager_main_delegate.cc
|
||||
index 1e6ad316bc67..e11e443ae694 100644
|
||||
--- content/app/content_service_manager_main_delegate.cc
|
||||
+++ content/app/content_service_manager_main_delegate.cc
|
||||
@@ -174,4 +174,8 @@ void ContentServiceManagerMainDelegate::SetStartServiceManagerOnly(
|
||||
start_service_manager_only_ = start_service_manager_only;
|
||||
}
|
||||
|
||||
+void ContentServiceManagerMainDelegate::ShutdownOnUIThread() {
|
||||
+ content_main_runner_->ShutdownOnUIThread();
|
||||
+}
|
||||
+
|
||||
} // namespace content
|
||||
diff --git content/app/content_service_manager_main_delegate.h content/app/content_service_manager_main_delegate.h
|
||||
index ae9796957e51..f26a578d60ed 100644
|
||||
--- content/app/content_service_manager_main_delegate.h
|
||||
+++ content/app/content_service_manager_main_delegate.h
|
||||
@@ -18,7 +18,8 @@ namespace content {
|
||||
|
||||
class ContentMainRunnerImpl;
|
||||
|
||||
-class ContentServiceManagerMainDelegate : public service_manager::MainDelegate {
|
||||
+class CONTENT_EXPORT ContentServiceManagerMainDelegate :
|
||||
+ public service_manager::MainDelegate {
|
||||
public:
|
||||
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
|
||||
~ContentServiceManagerMainDelegate() override;
|
||||
@@ -46,6 +47,8 @@ class ContentServiceManagerMainDelegate : public service_manager::MainDelegate {
|
||||
// full browser.
|
||||
void SetStartServiceManagerOnly(bool start_service_manager_only);
|
||||
|
||||
+ void ShutdownOnUIThread();
|
||||
+
|
||||
private:
|
||||
ContentMainParams content_main_params_;
|
||||
std::unique_ptr<ContentMainRunnerImpl> content_main_runner_;
|
215
patch/patches/content_main_654986.patch
Normal file
215
patch/patches/content_main_654986.patch
Normal file
@@ -0,0 +1,215 @@
|
||||
diff --git content/app/content_main.cc content/app/content_main.cc
|
||||
index e463c4d677b1..5fbc0a732dee 100644
|
||||
--- content/app/content_main.cc
|
||||
+++ content/app/content_main.cc
|
||||
@@ -206,15 +206,10 @@ void InitializeMojo(mojo::core::Configuration* config) {
|
||||
|
||||
} // namespace
|
||||
|
||||
-int RunContentProcess(const ContentMainParams& params,
|
||||
- ContentMainRunner* content_main_runner) {
|
||||
- ContentMainParams content_main_params(params);
|
||||
-
|
||||
+int ContentMainInitialize(ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner) {
|
||||
int exit_code = -1;
|
||||
base::debug::GlobalActivityTracker* tracker = nullptr;
|
||||
-#if defined(OS_MAC)
|
||||
- std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool;
|
||||
-#endif
|
||||
|
||||
// A flag to indicate whether Main() has been called before. On Android, we
|
||||
// may re-run Main() without restarting the browser process. This flag
|
||||
@@ -300,8 +295,7 @@ int RunContentProcess(const ContentMainParams& params,
|
||||
// loop, but we don't want to leave them hanging around until the app quits.
|
||||
// Each "main" needs to flush this pool right before it goes into its main
|
||||
// event loop to get rid of the cruft.
|
||||
- autorelease_pool = std::make_unique<base::mac::ScopedNSAutoreleasePool>();
|
||||
- content_main_params.autorelease_pool = autorelease_pool.get();
|
||||
+ params.autorelease_pool = std::make_unique<base::mac::ScopedNSAutoreleasePool>();
|
||||
InitializeMac();
|
||||
#endif
|
||||
|
||||
@@ -311,7 +305,7 @@ int RunContentProcess(const ContentMainParams& params,
|
||||
|
||||
ui::RegisterPathProvider();
|
||||
tracker = base::debug::GlobalActivityTracker::Get();
|
||||
- exit_code = content_main_runner->Initialize(content_main_params);
|
||||
+ exit_code = content_main_runner->Initialize(params);
|
||||
|
||||
if (exit_code >= 0) {
|
||||
if (tracker) {
|
||||
@@ -370,8 +364,16 @@ int RunContentProcess(const ContentMainParams& params,
|
||||
|
||||
if (IsSubprocess())
|
||||
CommonSubprocessInit();
|
||||
- exit_code = content_main_runner->Run(params.minimal_browser_mode);
|
||||
|
||||
+ return exit_code;
|
||||
+}
|
||||
+
|
||||
+int ContentMainRun(ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner) {
|
||||
+ int exit_code = content_main_runner->Run(params.minimal_browser_mode);
|
||||
+
|
||||
+ base::debug::GlobalActivityTracker* tracker =
|
||||
+ base::debug::GlobalActivityTracker::Get();
|
||||
if (tracker) {
|
||||
if (exit_code == 0) {
|
||||
tracker->SetProcessPhaseIfEnabled(
|
||||
@@ -382,19 +384,33 @@ int RunContentProcess(const ContentMainParams& params,
|
||||
tracker->process_data().SetInt("exit-code", exit_code);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ return exit_code;
|
||||
+}
|
||||
|
||||
+void ContentMainShutdown(ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner) {
|
||||
#if defined(OS_MAC)
|
||||
- autorelease_pool.reset();
|
||||
+ params.autorelease_pool.reset();
|
||||
#endif
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
content_main_runner->Shutdown();
|
||||
#endif
|
||||
+}
|
||||
+
|
||||
+int RunContentProcess(ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner) {
|
||||
+ int exit_code = ContentMainInitialize(params, content_main_runner);
|
||||
+ if (exit_code >= 0)
|
||||
+ return exit_code;
|
||||
+ exit_code = ContentMainRun(params, content_main_runner);
|
||||
+ ContentMainShutdown(params, content_main_runner);
|
||||
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
-int ContentMain(const ContentMainParams& params) {
|
||||
+int ContentMain(ContentMainParams& params) {
|
||||
auto runner = ContentMainRunner::Create();
|
||||
return RunContentProcess(params, runner.get());
|
||||
}
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index a85c25303dfc..8fdc214608fc 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "base/task/post_task.h"
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/threading/hang_watcher.h"
|
||||
+#include "base/threading/thread_restrictions.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"
|
||||
@@ -571,7 +572,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
#else // !OS_WIN
|
||||
|
||||
#if defined(OS_MAC)
|
||||
- autorelease_pool_ = params.autorelease_pool;
|
||||
+ autorelease_pool_ = params.autorelease_pool.get();
|
||||
#endif // defined(OS_MAC)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -1010,6 +1011,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
+void ContentMainRunnerImpl::ShutdownOnUIThread() {
|
||||
+ base::ScopedAllowBaseSyncPrimitivesForTesting allow_wait;
|
||||
+ discardable_shared_memory_manager_.reset();
|
||||
+}
|
||||
+
|
||||
// static
|
||||
std::unique_ptr<ContentMainRunner> ContentMainRunner::Create() {
|
||||
return ContentMainRunnerImpl::Create();
|
||||
diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h
|
||||
index 3eb986f3c7d4..58d1883f7948 100644
|
||||
--- content/app/content_main_runner_impl.h
|
||||
+++ content/app/content_main_runner_impl.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "base/threading/hang_watcher.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/browser/startup_data_impl.h"
|
||||
+#include "content/common/content_export.h"
|
||||
#include "content/public/app/content_main.h"
|
||||
#include "content/public/app/content_main_runner.h"
|
||||
#include "content/public/common/main_function_params.h"
|
||||
@@ -37,7 +38,7 @@ class ContentMainDelegate;
|
||||
struct ContentMainParams;
|
||||
class ServiceManagerEnvironment;
|
||||
|
||||
-class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
+class CONTENT_EXPORT ContentMainRunnerImpl : public ContentMainRunner {
|
||||
public:
|
||||
static std::unique_ptr<ContentMainRunnerImpl> Create();
|
||||
|
||||
@@ -51,6 +52,8 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
int Run(bool start_service_manager_only) override;
|
||||
void Shutdown() override;
|
||||
|
||||
+ void ShutdownOnUIThread();
|
||||
+
|
||||
private:
|
||||
int RunServiceManager(MainFunctionParams& main_function_params,
|
||||
bool start_service_manager_only);
|
||||
diff --git content/common/set_process_title.cc content/common/set_process_title.cc
|
||||
index 8b829a488773..a69a08869728 100644
|
||||
--- content/common/set_process_title.cc
|
||||
+++ content/common/set_process_title.cc
|
||||
@@ -54,7 +54,7 @@ void SetProcessTitleFromCommandLine(const char** main_argv) {
|
||||
bool have_argv0 = false;
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
- DCHECK_EQ(base::PlatformThread::CurrentId(), getpid());
|
||||
+ // DCHECK_EQ(base::PlatformThread::CurrentId(), getpid());
|
||||
|
||||
if (main_argv)
|
||||
setproctitle_init(main_argv);
|
||||
diff --git content/public/app/content_main.h content/public/app/content_main.h
|
||||
index 7384f3276f38..b84127a62b81 100644
|
||||
--- content/public/app/content_main.h
|
||||
+++ content/public/app/content_main.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_H_
|
||||
#define CONTENT_PUBLIC_APP_CONTENT_MAIN_H_
|
||||
|
||||
+#include <memory>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "base/callback_forward.h"
|
||||
@@ -64,11 +65,20 @@ struct ContentMainParams {
|
||||
|
||||
#if defined(OS_MAC)
|
||||
// The outermost autorelease pool to pass to main entry points.
|
||||
- base::mac::ScopedNSAutoreleasePool* autorelease_pool = nullptr;
|
||||
+ std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool;
|
||||
#endif
|
||||
};
|
||||
|
||||
-CONTENT_EXPORT int RunContentProcess(const ContentMainParams& params,
|
||||
+// Split RunContentProcess() into separate stages.
|
||||
+CONTENT_EXPORT int ContentMainInitialize(
|
||||
+ ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner);
|
||||
+CONTENT_EXPORT int ContentMainRun(ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner);
|
||||
+CONTENT_EXPORT void ContentMainShutdown(ContentMainParams& params,
|
||||
+ ContentMainRunner* content_main_runner);
|
||||
+
|
||||
+CONTENT_EXPORT int RunContentProcess(ContentMainParams& params,
|
||||
ContentMainRunner* content_main_runner);
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -88,7 +98,7 @@ CONTENT_EXPORT ContentMainDelegate* GetContentMainDelegateForTesting();
|
||||
// initial setup for every process. The embedder has a chance to customize
|
||||
// startup using the ContentMainDelegate interface. The embedder can also pass
|
||||
// in null for |delegate| if they don't want to override default startup.
|
||||
-CONTENT_EXPORT int ContentMain(const ContentMainParams& params);
|
||||
+CONTENT_EXPORT int ContentMain(ContentMainParams& params);
|
||||
#endif
|
||||
|
||||
} // namespace content
|
@@ -127,7 +127,7 @@ index bcf172e645a2..f879aa745adf 100644
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git components/crash/core/app/breakpad_linux.cc components/crash/core/app/breakpad_linux.cc
|
||||
index 9b07ab4667e6..07b61ac63e9d 100644
|
||||
index 9d8370ef035f..9950cd16660e 100644
|
||||
--- components/crash/core/app/breakpad_linux.cc
|
||||
+++ components/crash/core/app/breakpad_linux.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
@@ -138,7 +138,7 @@ index 9b07ab4667e6..07b61ac63e9d 100644
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/linux_util.h"
|
||||
@@ -719,7 +720,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -718,7 +719,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
info.process_type_length = 7;
|
||||
info.distro = base::g_linux_distro;
|
||||
info.distro_length = my_strlen(base::g_linux_distro);
|
||||
@@ -147,7 +147,7 @@ index 9b07ab4667e6..07b61ac63e9d 100644
|
||||
info.process_start_time = g_process_start_time;
|
||||
info.oom_size = base::g_oom_size;
|
||||
info.pid = g_pid;
|
||||
@@ -1733,10 +1734,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1732,10 +1733,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||
|
||||
writer.AddBoundary();
|
||||
@@ -169,7 +169,7 @@ index 9b07ab4667e6..07b61ac63e9d 100644
|
||||
if (info.pid > 0) {
|
||||
char pid_value_buf[kUint64StringSize];
|
||||
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||
@@ -1853,6 +1863,9 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1852,6 +1862,9 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
crash_reporter::internal::TransitionalCrashKeyStorage;
|
||||
CrashKeyStorage::Iterator crash_key_iterator(*info.crash_keys);
|
||||
const CrashKeyStorage::Entry* entry;
|
||||
@@ -179,7 +179,7 @@ index 9b07ab4667e6..07b61ac63e9d 100644
|
||||
while ((entry = crash_key_iterator.Next())) {
|
||||
size_t key_size, value_size;
|
||||
// Check for malformed messages.
|
||||
@@ -1863,7 +1876,13 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1862,7 +1875,13 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
? CrashKeyStorage::value_size - 1
|
||||
: my_strlen(entry->value);
|
||||
|
||||
|
@@ -146,7 +146,7 @@ index 5761c6b965b5..aee4e6c96033 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index 54af69767c8a..8b659955db3e 100644
|
||||
index 332117d78126..e7babc8f1764 100644
|
||||
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -248,7 +248,7 @@ index 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
//! \brief Calls ProcessPendingReports() in response to ReportPending() having
|
||||
//! been called on any thread, as well as periodically on a timer.
|
||||
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
index c8001f457199..6c64610c69d4 100644
|
||||
index 33649291e253..1bb3c8dc5ac9 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -36,8 +36,10 @@
|
||||
@@ -262,8 +262,8 @@ index c8001f457199..6c64610c69d4 100644
|
||||
#include "client/crash_report_database.h"
|
||||
#include "client/crashpad_client.h"
|
||||
#include "client/crashpad_info.h"
|
||||
@@ -91,6 +93,10 @@
|
||||
#include "handler/linux/exception_handler_server.h"
|
||||
@@ -88,6 +90,10 @@
|
||||
#include "util/win/session_end_watcher.h"
|
||||
#endif // OS_APPLE
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@@ -273,7 +273,7 @@ index c8001f457199..6c64610c69d4 100644
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
@@ -215,6 +221,9 @@ struct Options {
|
||||
@@ -212,6 +218,9 @@ struct Options {
|
||||
bool periodic_tasks;
|
||||
bool rate_limit;
|
||||
bool upload_gzip;
|
||||
@@ -283,7 +283,7 @@ index c8001f457199..6c64610c69d4 100644
|
||||
#if defined(OS_CHROMEOS)
|
||||
bool use_cros_crash_reporter = false;
|
||||
base::FilePath minidump_dir_for_tests;
|
||||
@@ -568,6 +577,9 @@ int HandlerMain(int argc,
|
||||
@@ -566,6 +575,9 @@ int HandlerMain(int argc,
|
||||
kOptionTraceParentWithException,
|
||||
#endif
|
||||
kOptionURL,
|
||||
@@ -293,7 +293,7 @@ index c8001f457199..6c64610c69d4 100644
|
||||
#if defined(OS_CHROMEOS)
|
||||
kOptionUseCrosCrashReporter,
|
||||
kOptionMinidumpDirForTests,
|
||||
@@ -669,6 +681,9 @@ int HandlerMain(int argc,
|
||||
@@ -667,6 +679,9 @@ int HandlerMain(int argc,
|
||||
#endif // OS_ANDROID
|
||||
{"help", no_argument, nullptr, kOptionHelp},
|
||||
{"version", no_argument, nullptr, kOptionVersion},
|
||||
@@ -303,7 +303,7 @@ index c8001f457199..6c64610c69d4 100644
|
||||
{nullptr, 0, nullptr, 0},
|
||||
};
|
||||
|
||||
@@ -824,6 +839,27 @@ int HandlerMain(int argc,
|
||||
@@ -822,6 +837,27 @@ int HandlerMain(int argc,
|
||||
options.url = optarg;
|
||||
break;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ index c8001f457199..6c64610c69d4 100644
|
||||
#if defined(OS_CHROMEOS)
|
||||
case kOptionUseCrosCrashReporter: {
|
||||
options.use_cros_crash_reporter = true;
|
||||
@@ -973,8 +1009,14 @@ int HandlerMain(int argc,
|
||||
@@ -971,8 +1007,14 @@ int HandlerMain(int argc,
|
||||
upload_thread_options.upload_gzip = options.upload_gzip;
|
||||
upload_thread_options.watch_pending_reports = options.periodic_tasks;
|
||||
|
||||
@@ -346,7 +346,7 @@ index c8001f457199..6c64610c69d4 100644
|
||||
upload_thread.Get()->Start();
|
||||
}
|
||||
|
||||
@@ -1044,7 +1086,8 @@ int HandlerMain(int argc,
|
||||
@@ -1042,7 +1084,8 @@ int HandlerMain(int argc,
|
||||
ScopedStoppable prune_thread;
|
||||
if (options.periodic_tasks) {
|
||||
prune_thread.Reset(new PruneCrashReportThread(
|
||||
|
@@ -132,10 +132,10 @@ index 11bfec21cc9f..416de61f85fa 100644
|
||||
// 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
|
||||
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
|
||||
index 829941a3f095..dd6d5334c692 100644
|
||||
index 1832f5e9acd6..059cb2a43578 100644
|
||||
--- extensions/browser/extensions_browser_client.h
|
||||
+++ extensions/browser/extensions_browser_client.h
|
||||
@@ -57,6 +57,7 @@ class ComponentExtensionResourceManager;
|
||||
@@ -62,6 +62,7 @@ class ComponentExtensionResourceManager;
|
||||
class Extension;
|
||||
class ExtensionCache;
|
||||
class ExtensionError;
|
||||
@@ -143,7 +143,7 @@ index 829941a3f095..dd6d5334c692 100644
|
||||
class ExtensionHostDelegate;
|
||||
class ExtensionSet;
|
||||
class ExtensionSystem;
|
||||
@@ -197,6 +198,14 @@ class ExtensionsBrowserClient {
|
||||
@@ -204,6 +205,14 @@ class ExtensionsBrowserClient {
|
||||
virtual std::unique_ptr<ExtensionHostDelegate>
|
||||
CreateExtensionHostDelegate() = 0;
|
||||
|
||||
@@ -159,7 +159,7 @@ index 829941a3f095..dd6d5334c692 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 fc25df40852a..5f14f04835bb 100644
|
||||
index 5c593b03d84e..c9588c09f23f 100644
|
||||
--- extensions/browser/process_manager.cc
|
||||
+++ extensions/browser/process_manager.cc
|
||||
@@ -385,9 +385,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/font_family_cache.h chrome/browser/font_family_cache.h
|
||||
index a99372e6744c..ce40a8448868 100644
|
||||
index 3e15bc56d69a..c398bfec8583 100644
|
||||
--- chrome/browser/font_family_cache.h
|
||||
+++ chrome/browser/font_family_cache.h
|
||||
@@ -19,6 +19,8 @@ class Profile;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index aff8517d72f4..6ad4c7aefdff 100644
|
||||
index c5c73f805e8f..449ad9eaaf5e 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -385,6 +385,8 @@ exec_script_whitelist =
|
||||
@@ -350,6 +350,8 @@ exec_script_whitelist =
|
||||
|
||||
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
|
||||
|
||||
@@ -12,10 +12,10 @@ index aff8517d72f4..6ad4c7aefdff 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 4e74a1d6948f..044f4016a2b6 100644
|
||||
index 39b9075b1267..f25586e6cb72 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -226,6 +226,7 @@ group("gn_all") {
|
||||
@@ -230,6 +230,7 @@ group("gn_all") {
|
||||
|
||||
if (!is_ios && !is_fuchsia) {
|
||||
deps += [
|
||||
@@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644
|
||||
+ "studio path")
|
||||
}
|
||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 5a7d02d80a89..dcc77f0e8b33 100644
|
||||
index 9323a774a565..913b5cdc6be4 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -3,6 +3,7 @@
|
||||
@@ -67,7 +67,7 @@ index 5a7d02d80a89..dcc77f0e8b33 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/components/media_app_ui/media_app_ui.gni")
|
||||
@@ -315,6 +316,7 @@ template("chrome_paks") {
|
||||
@@ -325,6 +326,7 @@ template("chrome_paks") {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ index 5a7d02d80a89..dcc77f0e8b33 100644
|
||||
chrome_repack_locales("${target_name}_locales") {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
@@ -337,14 +339,17 @@ template("chrome_paks") {
|
||||
@@ -347,14 +349,17 @@ template("chrome_paks") {
|
||||
output_locales = locales
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index 0818d6986440..90d0d4df9c85 100644
|
||||
index a411c2a5788d..5001def6b476 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -663,4 +663,13 @@
|
||||
@@ -685,4 +685,13 @@
|
||||
# Please read the header and find the right section above instead.
|
||||
|
||||
# Resource ids starting at 31000 are reserved for projects built on Chromium.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
|
||||
index a155534f66d2..7a29f910be79 100644
|
||||
index 8068e573cbd4..2fc10cf03bc5 100644
|
||||
--- third_party/libxml/BUILD.gn
|
||||
+++ third_party/libxml/BUILD.gn
|
||||
@@ -142,6 +142,7 @@ static_library("libxml") {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc
|
||||
index c1b5d30fd927..2e1811fc6af5 100644
|
||||
index f3d40b628ec2..7efc41048b3c 100644
|
||||
--- content/browser/child_process_launcher_helper_linux.cc
|
||||
+++ content/browser/child_process_launcher_helper_linux.cc
|
||||
@@ -162,7 +162,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 2a286b4d269b..55ee14d93545 100644
|
||||
index 2ba623bd01aa..b7049ead1f69 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -2,6 +2,7 @@
|
||||
@@ -10,10 +10,10 @@ index 2a286b4d269b..55ee14d93545 100644
|
||||
#include "base/message_loop/message_pump_win.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -486,7 +487,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
TRACE_EVENT1("base",
|
||||
"MessagePumpForUI::ProcessNextWindowsMessage PeekMessage",
|
||||
"sent_messages_in_queue", more_work_is_plausible);
|
||||
@@ -495,7 +496,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
ctx.event()->set_chrome_message_pump();
|
||||
msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible);
|
||||
});
|
||||
- has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE;
|
||||
+
|
||||
+ // We should not process all window messages if we are in the context of an
|
||||
|
@@ -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 60c4fe742d7e..e47f7daa6414 100644
|
||||
index 998d6d0c481f..e0f95ee4f7a0 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(
|
||||
@@ -47,7 +47,7 @@ index 60c4fe742d7e..e47f7daa6414 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 3e287fd18fee..4d5fca9bc322 100644
|
||||
index a7f0b19a8ab9..dca296badbf6 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
|
||||
|
39
patch/patches/net_cookie_flags.patch
Normal file
39
patch/patches/net_cookie_flags.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
diff --git net/base/load_flags_list.h net/base/load_flags_list.h
|
||||
index 96d1a51ec107..e8120a818b1f 100644
|
||||
--- net/base/load_flags_list.h
|
||||
+++ net/base/load_flags_list.h
|
||||
@@ -101,3 +101,6 @@ LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 15)
|
||||
// is considered privileged, and therefore this flag must only be set from a
|
||||
// trusted process.
|
||||
LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 16)
|
||||
+
|
||||
+// 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 f5e754f4ea02..5dd6fc5ca061 100644
|
||||
--- net/url_request/url_request_http_job.cc
|
||||
+++ net/url_request/url_request_http_job.cc
|
||||
@@ -567,7 +567,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
|
||||
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode
|
||||
// is being overridden by NetworkDelegate and will eventually block them, as
|
||||
// blocked cookies still need to be logged in that case.
|
||||
- if (cookie_store && request_->allow_credentials()) {
|
||||
+ if (cookie_store && request_->allow_credentials() &&
|
||||
+ !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES)) {
|
||||
CookieOptions options;
|
||||
options.set_return_excluded_cookies();
|
||||
options.set_include_httponly();
|
||||
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
||||
index 8f1b36b6befd..979874409d23 100644
|
||||
--- services/network/public/cpp/resource_request.cc
|
||||
+++ services/network/public/cpp/resource_request.cc
|
||||
@@ -126,7 +126,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
}
|
||||
|
||||
bool ResourceRequest::SendsCookies() const {
|
||||
- return credentials_mode == network::mojom::CredentialsMode::kInclude;
|
||||
+ return credentials_mode == network::mojom::CredentialsMode::kInclude &&
|
||||
+ !(load_flags & net::LOAD_DO_NOT_SEND_COOKIES);
|
||||
}
|
||||
|
||||
bool ResourceRequest::SavesCookies() const {
|
@@ -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 ec8d2a0697de..d1adc797ebc5 100644
|
||||
index 529a5b71b998..dcc5eeda89d3 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2870,6 +2870,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
||||
@@ -2831,6 +2831,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
||||
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
|
||||
}
|
||||
|
||||
@@ -57,10 +57,10 @@ index ec8d2a0697de..d1adc797ebc5 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 ffeeca6e6165..9773d91492ff 100644
|
||||
index 9d7d10136a68..eb989750dd5f 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -726,6 +726,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -730,6 +730,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
||||
void StopFling();
|
||||
|
@@ -1,49 +0,0 @@
|
||||
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
|
||||
index 8e810871066b..107f15b92829 100644
|
||||
--- content/public/common/common_param_traits_macros.h
|
||||
+++ content/public/common/common_param_traits_macros.h
|
||||
@@ -174,6 +174,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
||||
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
||||
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
||||
+ IPC_STRUCT_TRAITS_MEMBER(base_background_color)
|
||||
IPC_STRUCT_TRAITS_MEMBER(cookie_enabled)
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
|
||||
index 839e3cbde987..ef1b0d7be31f 100644
|
||||
--- content/public/common/web_preferences.cc
|
||||
+++ content/public/common/web_preferences.cc
|
||||
@@ -181,6 +181,7 @@ WebPreferences::WebPreferences()
|
||||
#endif
|
||||
spatial_navigation_enabled(false),
|
||||
navigate_on_drag_drop(true),
|
||||
+ base_background_color(0xFFFFFFFF), // Color::white
|
||||
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
|
||||
record_whole_document(false),
|
||||
cookie_enabled(true),
|
||||
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
|
||||
index 700b47b5f521..4cd1cdceaf42 100644
|
||||
--- content/public/common/web_preferences.h
|
||||
+++ content/public/common/web_preferences.h
|
||||
@@ -179,6 +179,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
bool smart_insert_delete_enabled;
|
||||
bool spatial_navigation_enabled;
|
||||
bool navigate_on_drag_drop;
|
||||
+ uint32_t base_background_color;
|
||||
blink::mojom::V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
||||
index 49619a9b5683..52e09111aad3 100644
|
||||
--- content/renderer/render_view_impl.cc
|
||||
+++ content/renderer/render_view_impl.cc
|
||||
@@ -950,6 +950,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
#endif
|
||||
|
||||
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);
|
||||
+
|
||||
+ web_view->SetBaseBackgroundColor(prefs.base_background_color);
|
||||
}
|
||||
|
||||
/*static*/
|
@@ -57,6 +57,26 @@ index 3fadaba3336f..5ef67b35883d 100644
|
||||
|
||||
// Add an entry to the map.
|
||||
preview_dialog_map_[preview_dialog] = initiator;
|
||||
diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h
|
||||
index 1498facaafea..b5ef086b88b5 100644
|
||||
--- chrome/browser/printing/print_view_manager_base.h
|
||||
+++ chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -115,7 +115,6 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// Manages the low-level talk to the printer.
|
||||
scoped_refptr<PrintJob> print_job_;
|
||||
|
||||
- private:
|
||||
// content::NotificationObserver implementation.
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
@@ -127,6 +126,7 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// Cancels the print job.
|
||||
void NavigationStopped() override;
|
||||
|
||||
+ private:
|
||||
// printing::PrintManager:
|
||||
void OnDidPrintDocument(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
index bc7f30dba388..2cc53441f17d 100644
|
||||
--- chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
@@ -112,7 +132,7 @@ index b59728f623e3..6fd443962836 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 bb362bbd321e..24e94cfd4211 100644
|
||||
index c48314e52e83..f0a64a0be931 100644
|
||||
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
@@ -123,7 +143,7 @@ index bb362bbd321e..24e94cfd4211 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 @@
|
||||
@@ -53,6 +54,10 @@
|
||||
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
|
||||
#endif
|
||||
|
||||
@@ -134,7 +154,7 @@ index bb362bbd321e..24e94cfd4211 100644
|
||||
namespace printing {
|
||||
|
||||
namespace {
|
||||
@@ -380,10 +385,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
@@ -376,10 +381,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()) {
|
||||
@@ -162,7 +182,7 @@ index bb362bbd321e..24e94cfd4211 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_);
|
||||
@@ -391,8 +413,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
@@ -387,8 +409,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),
|
||||
@@ -172,7 +192,7 @@ index bb362bbd321e..24e94cfd4211 100644
|
||||
}
|
||||
|
||||
void PdfPrinterHandler::PostPrintToPdfTask() {
|
||||
@@ -433,6 +454,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
@@ -429,6 +450,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL);
|
||||
}
|
||||
|
||||
@@ -242,7 +262,7 @@ index 26954aeae08f..48afeb608f83 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 ba451b6c854d..0f062e69fd47 100644
|
||||
index 2cea700c8279..03d086e4fa65 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -253,7 +273,7 @@ index ba451b6c854d..0f062e69fd47 100644
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/bad_message.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -1254,7 +1255,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
@@ -1265,7 +1266,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
}
|
||||
return extension_printer_handler_.get();
|
||||
}
|
||||
@@ -262,7 +282,7 @@ index ba451b6c854d..0f062e69fd47 100644
|
||||
if (printer_type == PrinterType::kPrivet) {
|
||||
if (!privet_printer_handler_) {
|
||||
privet_printer_handler_ =
|
||||
@@ -1262,6 +1263,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
@@ -1273,6 +1274,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
}
|
||||
return privet_printer_handler_.get();
|
||||
}
|
||||
@@ -272,7 +292,7 @@ index ba451b6c854d..0f062e69fd47 100644
|
||||
#endif
|
||||
if (printer_type == PrinterType::kPdf) {
|
||||
if (!pdf_printer_handler_) {
|
||||
@@ -1334,6 +1338,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
|
||||
@@ -1345,6 +1349,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
|
||||
}
|
||||
|
||||
void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
@@ -280,7 +300,7 @@ index ba451b6c854d..0f062e69fd47 100644
|
||||
DCHECK(!identity_manager_);
|
||||
cloud_print_enabled_ =
|
||||
!base::Contains(printer_type_deny_list_, PrinterType::kCloud) &&
|
||||
@@ -1350,6 +1355,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
@@ -1361,6 +1366,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
|
||||
identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
||||
identity_manager_->AddObserver(this);
|
||||
@@ -289,10 +309,10 @@ index ba451b6c854d..0f062e69fd47 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 48dfc6e95863..5b80d64f4b47 100644
|
||||
index 5999318f3620..d4ab6b034f73 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -300,7 +320,7 @@ index 48dfc6e95863..5b80d64f4b47 100644
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/pdf/pdf_extension_util.h"
|
||||
#include "chrome/browser/printing/background_printing_manager.h"
|
||||
@@ -80,12 +81,16 @@ namespace printing {
|
||||
@@ -81,12 +82,16 @@ namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
||||
index 17788cb2b506..9014f48ed0dd 100644
|
||||
index 89c7798d8ddf..63a1770d7b4e 100644
|
||||
--- chrome/browser/printing/print_job_worker.cc
|
||||
+++ chrome/browser/printing/print_job_worker.cc
|
||||
@@ -133,6 +133,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
|
||||
@@ -134,6 +134,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
|
||||
PrintingContext::Create(printing_context_delegate_.get())),
|
||||
thread_("Printing_Worker") {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||
|
@@ -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 4f914119d21b..5be76fbbda36 100644
|
||||
index 5326b36457f2..694aff3c7144 100644
|
||||
--- content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -522,6 +522,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
|
||||
@@ -584,6 +584,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
|
||||
}
|
||||
|
||||
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc
|
||||
index 0acace592ca4..66cc3c360b79 100644
|
||||
index ddc3c1d4bdc4..8b5618a2b9b5 100644
|
||||
--- chrome/browser/renderer_preferences_util.cc
|
||||
+++ chrome/browser/renderer_preferences_util.cc
|
||||
@@ -33,7 +33,8 @@
|
||||
@@ -34,7 +34,8 @@
|
||||
#include "ui/base/cocoa/defaults_utils.h"
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@ index 0acace592ca4..66cc3c360b79 100644
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
@@ -155,7 +156,8 @@ void UpdateFromSystemSettings(blink::mojom::RendererPreferences* prefs,
|
||||
@@ -164,7 +165,8 @@ void UpdateFromSystemSettings(blink::mojom::RendererPreferences* prefs,
|
||||
prefs->caret_blink_interval = interval;
|
||||
#endif
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
|
||||
index df4b0a7c9bb0..140574fe2886 100644
|
||||
index d14bc858f566..0c9e50916bb1 100644
|
||||
--- ui/base/resource/resource_bundle.cc
|
||||
+++ ui/base/resource/resource_bundle.cc
|
||||
@@ -868,6 +868,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
@@ -28,10 +28,10 @@ index df4b0a7c9bb0..140574fe2886 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 9cbc1d512acb..26b5f99f5214 100644
|
||||
index 317ad685e414..1d3935b2ae3d 100644
|
||||
--- ui/base/resource/resource_bundle.h
|
||||
+++ ui/base/resource/resource_bundle.h
|
||||
@@ -160,6 +160,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
@@ -161,6 +161,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
// Return the global resource loader instance.
|
||||
static ResourceBundle& GetSharedInstance();
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
||||
index d9cd61297548..9bfbc5212ed6 100644
|
||||
index 58bf3e8caf4e..c224432e8af2 100644
|
||||
--- build/toolchain/win/setup_toolchain.py
|
||||
+++ build/toolchain/win/setup_toolchain.py
|
||||
@@ -149,13 +149,17 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
|
||||
@@ -155,13 +155,17 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
|
||||
del os.environ['INCLUDE']
|
||||
del os.environ['LIB']
|
||||
del os.environ['LIBPATH']
|
||||
|
@@ -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 8eeff7b2af9d..be36b6b265b9 100644
|
||||
index f6cd4515bf8f..ba8da481274e 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -675,10 +675,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
@@ -678,10 +678,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
|
||||
DCHECK(GetBackgroundColor());
|
||||
|
||||
@@ -19,7 +19,7 @@ index 8eeff7b2af9d..be36b6b265b9 100644
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewAura::WindowTitleChanged() {
|
||||
@@ -2040,6 +2042,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -2046,6 +2048,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
// Init(), because it needs to have the layer.
|
||||
if (frame_sink_id_.is_valid())
|
||||
window_->SetEmbedFrameSinkId(frame_sink_id_);
|
||||
|
@@ -1,193 +0,0 @@
|
||||
diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc
|
||||
index 607618c0fad8..d55d1c2d4046 100644
|
||||
--- services/service_manager/embedder/main.cc
|
||||
+++ services/service_manager/embedder/main.cc
|
||||
@@ -244,22 +244,36 @@ int RunService(MainDelegate* delegate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ProcessType GetProcessType(MainDelegate* delegate,
|
||||
+ const base::CommandLine& command_line) {
|
||||
+ ProcessType process_type = delegate->OverrideProcessType();
|
||||
+ if (process_type == ProcessType::kDefault) {
|
||||
+ const std::string& type_switch =
|
||||
+ command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
+ if (type_switch == switches::kProcessTypeServiceManager) {
|
||||
+ process_type = ProcessType::kServiceManager;
|
||||
+ } else if (type_switch == switches::kProcessTypeService) {
|
||||
+ process_type = ProcessType::kService;
|
||||
+ } else {
|
||||
+ process_type = ProcessType::kEmbedder;
|
||||
+ }
|
||||
+ }
|
||||
+ return process_type;
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
MainParams::MainParams(MainDelegate* delegate) : delegate(delegate) {}
|
||||
|
||||
MainParams::~MainParams() {}
|
||||
|
||||
-int Main(const MainParams& params) {
|
||||
+int MainInitialize(MainParams& params) {
|
||||
MainDelegate* delegate = params.delegate;
|
||||
DCHECK(delegate);
|
||||
|
||||
int exit_code = -1;
|
||||
base::debug::GlobalActivityTracker* tracker = nullptr;
|
||||
ProcessType process_type = delegate->OverrideProcessType();
|
||||
-#if defined(OS_MAC)
|
||||
- std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool;
|
||||
-#endif
|
||||
|
||||
// A flag to indicate whether Main() has been called before. On Android, we
|
||||
// may re-run Main() without restarting the browser process. This flag
|
||||
@@ -345,12 +359,7 @@ int Main(const MainParams& params) {
|
||||
MainDelegate::InitializeParams init_params;
|
||||
|
||||
#if defined(OS_MAC)
|
||||
- // We need this pool for all the objects created before we get to the event
|
||||
- // loop, but we don't want to leave them hanging around until the app quits.
|
||||
- // Each "main" needs to flush this pool right before it goes into its main
|
||||
- // event loop to get rid of the cruft.
|
||||
- autorelease_pool = std::make_unique<base::mac::ScopedNSAutoreleasePool>();
|
||||
- init_params.autorelease_pool = autorelease_pool.get();
|
||||
+ init_params.autorelease_pool = params.autorelease_pool.get();
|
||||
InitializeMac();
|
||||
#endif
|
||||
|
||||
@@ -421,18 +430,16 @@ int Main(const MainParams& params) {
|
||||
}
|
||||
}
|
||||
|
||||
+ return exit_code;
|
||||
+}
|
||||
+
|
||||
+int MainRun(MainParams& params) {
|
||||
+ MainDelegate* delegate = params.delegate;
|
||||
+ DCHECK(delegate);
|
||||
+
|
||||
+ int exit_code = 0;
|
||||
const auto& command_line = *base::CommandLine::ForCurrentProcess();
|
||||
- if (process_type == ProcessType::kDefault) {
|
||||
- std::string type_switch =
|
||||
- command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
- if (type_switch == switches::kProcessTypeServiceManager) {
|
||||
- process_type = ProcessType::kServiceManager;
|
||||
- } else if (type_switch == switches::kProcessTypeService) {
|
||||
- process_type = ProcessType::kService;
|
||||
- } else {
|
||||
- process_type = ProcessType::kEmbedder;
|
||||
- }
|
||||
- }
|
||||
+ const ProcessType process_type = GetProcessType(delegate, command_line);
|
||||
switch (process_type) {
|
||||
case ProcessType::kDefault:
|
||||
NOTREACHED();
|
||||
@@ -454,6 +461,8 @@ int Main(const MainParams& params) {
|
||||
break;
|
||||
}
|
||||
|
||||
+ base::debug::GlobalActivityTracker* tracker =
|
||||
+ base::debug::GlobalActivityTracker::Get();
|
||||
if (tracker) {
|
||||
if (exit_code == 0) {
|
||||
tracker->SetProcessPhaseIfEnabled(
|
||||
@@ -465,12 +474,38 @@ int Main(const MainParams& params) {
|
||||
}
|
||||
}
|
||||
|
||||
+ return exit_code;
|
||||
+}
|
||||
+
|
||||
+void MainShutdown(MainParams& params) {
|
||||
+ MainDelegate* delegate = params.delegate;
|
||||
+ DCHECK(delegate);
|
||||
+
|
||||
#if defined(OS_MAC)
|
||||
- autorelease_pool.reset();
|
||||
+ params.autorelease_pool.reset();
|
||||
#endif
|
||||
|
||||
+ const ProcessType process_type =
|
||||
+ GetProcessType(delegate, *base::CommandLine::ForCurrentProcess());
|
||||
if (process_type == ProcessType::kEmbedder)
|
||||
delegate->ShutDownEmbedderProcess();
|
||||
+}
|
||||
+
|
||||
+int Main(MainParams& params) {
|
||||
+#if defined(OS_MAC)
|
||||
+ // We need this pool for all the objects created before we get to the event
|
||||
+ // loop, but we don't want to leave them hanging around until the app quits.
|
||||
+ // Each "main" needs to flush this pool right before it goes into its main
|
||||
+ // event loop to get rid of the cruft.
|
||||
+ params.autorelease_pool =
|
||||
+ std::make_unique<base::mac::ScopedNSAutoreleasePool>();
|
||||
+#endif
|
||||
+
|
||||
+ int exit_code = MainInitialize(params);
|
||||
+ if (exit_code >= 0)
|
||||
+ return exit_code;
|
||||
+ exit_code = MainRun(params);
|
||||
+ MainShutdown(params);
|
||||
|
||||
return exit_code;
|
||||
}
|
||||
diff --git services/service_manager/embedder/main.h services/service_manager/embedder/main.h
|
||||
index 57e88aa85dfe..f28c9ef4c0ea 100644
|
||||
--- services/service_manager/embedder/main.h
|
||||
+++ services/service_manager/embedder/main.h
|
||||
@@ -5,9 +5,15 @@
|
||||
#ifndef SERVICES_SERVICE_MANAGER_EMBEDDER_MAIN_H_
|
||||
#define SERVICES_SERVICE_MANAGER_EMBEDDER_MAIN_H_
|
||||
|
||||
+#include <memory>
|
||||
+
|
||||
#include "base/component_export.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
+#if defined(OS_MAC)
|
||||
+#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
+#endif // defined(OS_MAC)
|
||||
+
|
||||
namespace service_manager {
|
||||
|
||||
class MainDelegate;
|
||||
@@ -22,11 +28,22 @@ struct COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER) MainParams {
|
||||
int argc = 0;
|
||||
const char** argv = nullptr;
|
||||
#endif
|
||||
+
|
||||
+#if defined(OS_MAC)
|
||||
+ std::unique_ptr<base::mac::ScopedNSAutoreleasePool> autorelease_pool;
|
||||
+#endif
|
||||
};
|
||||
|
||||
+// Split Main() into separate stages.
|
||||
+int COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER)
|
||||
+ MainInitialize(MainParams& params);
|
||||
+int COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER) MainRun(MainParams& params);
|
||||
+void COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER)
|
||||
+ MainShutdown(MainParams& params);
|
||||
+
|
||||
// Main function which should be called as early as possible by any executable
|
||||
// embedding the service manager.
|
||||
-int COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER) Main(const MainParams& params);
|
||||
+int COMPONENT_EXPORT(SERVICE_MANAGER_EMBEDDER) Main(MainParams& params);
|
||||
|
||||
} // namespace service_manager
|
||||
|
||||
diff --git services/service_manager/embedder/set_process_title.cc services/service_manager/embedder/set_process_title.cc
|
||||
index a2ced5316c78..96946a2168aa 100644
|
||||
--- services/service_manager/embedder/set_process_title.cc
|
||||
+++ services/service_manager/embedder/set_process_title.cc
|
||||
@@ -53,7 +53,7 @@ void SetProcessTitleFromCommandLine(const char** main_argv) {
|
||||
bool have_argv0 = false;
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
- DCHECK_EQ(base::PlatformThread::CurrentId(), getpid());
|
||||
+ // DCHECK_EQ(base::PlatformThread::CurrentId(), getpid());
|
||||
|
||||
if (main_argv)
|
||||
setproctitle_init(main_argv);
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
|
||||
index e5160aa3ff1a..f0ca556ed9e4 100644
|
||||
index 082cff368d80..7d7c2fe02646 100644
|
||||
--- chrome/browser/net/profile_network_context_service.cc
|
||||
+++ chrome/browser/net/profile_network_context_service.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -10,7 +10,7 @@ index e5160aa3ff1a..f0ca556ed9e4 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"
|
||||
@@ -670,7 +671,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
@@ -666,7 +667,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 e5160aa3ff1a..f0ca556ed9e4 100644
|
||||
PrefService* local_state = g_browser_process->local_state();
|
||||
// Configure the HTTP cache path and size.
|
||||
base::FilePath base_cache_path;
|
||||
@@ -683,7 +696,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
@@ -679,7 +692,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
base_cache_path.Append(chrome::kCacheDirname);
|
||||
network_context_params->http_cache_max_size =
|
||||
local_state->GetInteger(prefs::kDiskCacheSize);
|
||||
@@ -42,7 +42,7 @@ index e5160aa3ff1a..f0ca556ed9e4 100644
|
||||
// change.
|
||||
network_context_params->http_server_properties_path =
|
||||
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
|
||||
index 265deed0e52e..89d37ae6218a 100644
|
||||
index 140b61a81dcd..bdad9d468e57 100644
|
||||
--- net/cookies/cookie_monster.cc
|
||||
+++ net/cookies/cookie_monster.cc
|
||||
@@ -479,6 +479,25 @@ void CookieMonster::SetCookieableSchemes(
|
||||
@@ -123,7 +123,7 @@ index 1d988375b00a..e71cbc3b612f 100644
|
||||
|
||||
void CookieManager::SetForceKeepSessionState() {
|
||||
diff --git services/network/network_context.cc services/network/network_context.cc
|
||||
index 5b4588fadf4b..1f685c4d6700 100644
|
||||
index 4de2f631d4d6..e9c066b50a07 100644
|
||||
--- services/network/network_context.cc
|
||||
+++ services/network/network_context.cc
|
||||
@@ -1906,6 +1906,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -165,10 +165,10 @@ index 5b4588fadf4b..1f685c4d6700 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 87b26150440e..60c9eee375bb 100644
|
||||
index dfeaf3c49e33..434e88d1cc0e 100644
|
||||
--- services/network/public/mojom/network_context.mojom
|
||||
+++ services/network/public/mojom/network_context.mojom
|
||||
@@ -274,6 +274,9 @@ struct NetworkContextParams {
|
||||
@@ -275,6 +275,9 @@ struct NetworkContextParams {
|
||||
// cookies. Otherwise it should be false.
|
||||
bool persist_session_cookies = false;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
|
||||
index eead3ac6a092..372c511b6c77 100644
|
||||
index 9b5a44b6dd99..e90a651f6fba 100644
|
||||
--- content/browser/storage_partition_impl.cc
|
||||
+++ content/browser/storage_partition_impl.cc
|
||||
@@ -487,10 +487,6 @@ class LoginHandlerDelegate {
|
||||
@@ -26,7 +26,7 @@ index eead3ac6a092..372c511b6c77 100644
|
||||
new LoginHandlerDelegate(std::move(auth_challenge_responder),
|
||||
std::move(web_contents_getter), auth_info,
|
||||
is_request_for_main_frame, process_id, routing_id,
|
||||
@@ -2412,8 +2402,12 @@ void StoragePartitionImpl::GetQuotaSettings(
|
||||
@@ -2421,8 +2411,12 @@ void StoragePartitionImpl::GetQuotaSettings(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index eead3ac6a092..372c511b6c77 100644
|
||||
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
|
||||
}
|
||||
|
||||
@@ -2425,6 +2419,11 @@ void StoragePartitionImpl::InitNetworkContext() {
|
||||
@@ -2434,6 +2428,11 @@ void StoragePartitionImpl::InitNetworkContext() {
|
||||
GetContentClient()->browser()->ConfigureNetworkContextParams(
|
||||
browser_context_, is_in_memory_, relative_partition_path_,
|
||||
context_params.get(), cert_verifier_creation_params.get());
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git ui/views/controls/native/native_view_host.cc ui/views/controls/native/native_view_host.cc
|
||||
index 4779e4f07d92..13b98f8cc6a7 100644
|
||||
index d8e5cf4ddb62..59db8f266312 100644
|
||||
--- ui/views/controls/native/native_view_host.cc
|
||||
+++ ui/views/controls/native/native_view_host.cc
|
||||
@@ -154,7 +154,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
|
||||
@@ -152,7 +152,7 @@ void NativeViewHost::OnPaint(gfx::Canvas* canvas) {
|
||||
// It would be nice if this used some approximation of the page's
|
||||
// current background color.
|
||||
if (native_wrapper_->HasInstalledClip())
|
||||
@@ -12,10 +12,10 @@ index 4779e4f07d92..13b98f8cc6a7 100644
|
||||
|
||||
void NativeViewHost::VisibilityChanged(View* starting_from, bool is_visible) {
|
||||
diff --git ui/views/controls/native/native_view_host.h ui/views/controls/native/native_view_host.h
|
||||
index f92961e9f79b..f1ff80b244ef 100644
|
||||
index 71cba0d714bd..82d3d6baa909 100644
|
||||
--- ui/views/controls/native/native_view_host.h
|
||||
+++ ui/views/controls/native/native_view_host.h
|
||||
@@ -86,6 +86,12 @@ class VIEWS_EXPORT NativeViewHost : public View {
|
||||
@@ -92,6 +92,12 @@ class VIEWS_EXPORT NativeViewHost : public View {
|
||||
void set_fast_resize(bool fast_resize) { fast_resize_ = fast_resize; }
|
||||
bool fast_resize() const { return fast_resize_; }
|
||||
|
||||
@@ -28,7 +28,7 @@ index f92961e9f79b..f1ff80b244ef 100644
|
||||
gfx::NativeView native_view() const { return native_view_; }
|
||||
|
||||
void NativeViewDestroyed();
|
||||
@@ -132,6 +138,9 @@ class VIEWS_EXPORT NativeViewHost : public View {
|
||||
@@ -138,6 +144,9 @@ class VIEWS_EXPORT NativeViewHost : public View {
|
||||
// in the setter/accessor above.
|
||||
bool fast_resize_ = false;
|
||||
|
||||
@@ -39,7 +39,7 @@ index f92961e9f79b..f1ff80b244ef 100644
|
||||
};
|
||||
|
||||
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
|
||||
index 639ba0b04bed..538147e3fcbc 100644
|
||||
index 61e127ee3f2b..1efc22bfcc65 100644
|
||||
--- ui/views/controls/webview/webview.cc
|
||||
+++ ui/views/controls/webview/webview.cc
|
||||
@@ -139,6 +139,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
index d0318111b239..bcc733af5ddb 100644
|
||||
index 676c2cc22bac..e6f9642e1cba 100644
|
||||
--- content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
+++ content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
@@ -117,7 +117,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
|
||||
@@ -120,7 +120,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
|
||||
|
||||
// If we're not incognito mode, schedule all of our file tasks to enable
|
||||
// disk on the storage context.
|
||||
@@ -13,10 +13,10 @@ index d0318111b239..bcc733af5ddb 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 18cb0f6c588d..93ef44e197fc 100644
|
||||
index 13837eb391ce..e3a15a7158b2 100644
|
||||
--- content/browser/browser_context.cc
|
||||
+++ content/browser/browser_context.cc
|
||||
@@ -253,7 +253,7 @@ StoragePartition* BrowserContext::GetStoragePartition(
|
||||
@@ -251,7 +251,7 @@ StoragePartition* BrowserContext::GetStoragePartition(
|
||||
GetStoragePartitionMap(browser_context);
|
||||
|
||||
auto config_to_use = storage_partition_config;
|
||||
@@ -25,7 +25,7 @@ index 18cb0f6c588d..93ef44e197fc 100644
|
||||
config_to_use = storage_partition_config.CopyWithInMemorySet();
|
||||
|
||||
return partition_map->Get(config_to_use, can_create);
|
||||
@@ -575,7 +575,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() {
|
||||
@@ -573,7 +573,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() {
|
||||
kUseInMemoryDBDefault);
|
||||
|
||||
std::unique_ptr<media::VideoDecodeStatsDB> stats_db;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
|
||||
index b94597784004..35e977e0d88a 100644
|
||||
index 97830615a4e2..63efe4c35ecb 100644
|
||||
--- base/trace_event/builtin_categories.h
|
||||
+++ base/trace_event/builtin_categories.h
|
||||
@@ -58,6 +58,8 @@
|
||||
|
@@ -1,13 +0,0 @@
|
||||
diff --git ui/gl/gl_utils.cc ui/gl/gl_utils.cc
|
||||
index 2f0832c0ae75..f8a494b05e42 100644
|
||||
--- ui/gl/gl_utils.cc
|
||||
+++ ui/gl/gl_utils.cc
|
||||
@@ -130,7 +130,7 @@ bool ShouldForceDirectCompositionRootSurfaceFullDamage() {
|
||||
if ((brga_flags & kSupportBits) == 0)
|
||||
return false;
|
||||
return true;
|
||||
- };
|
||||
+ }();
|
||||
return should_force;
|
||||
}
|
||||
#endif // OS_WIN
|
@@ -106,10 +106,10 @@ index 4b39abb9d16c..c3b5debf995b 100644
|
||||
};
|
||||
|
||||
diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h
|
||||
index e6062daf0f1b..64aefc152a81 100644
|
||||
index 7a6dda99623b..7476e8966285 100644
|
||||
--- ui/views/animation/ink_drop_host_view.h
|
||||
+++ ui/views/animation/ink_drop_host_view.h
|
||||
@@ -149,6 +149,8 @@ class VIEWS_EXPORT InkDropHostView : public View {
|
||||
@@ -142,6 +142,8 @@ class VIEWS_EXPORT InkDropHostView : public View {
|
||||
// changes, to trigger the corresponding property change notification here.
|
||||
void OnInkDropHighlightedChanged();
|
||||
|
||||
@@ -119,10 +119,10 @@ index e6062daf0f1b..64aefc152a81 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 77c7f6830f9c..3a683e178668 100644
|
||||
index b8dada677222..87d790657722 100644
|
||||
--- ui/views/controls/button/label_button.cc
|
||||
+++ ui/views/controls/button/label_button.cc
|
||||
@@ -508,6 +508,12 @@ void LabelButton::OnThemeChanged() {
|
||||
@@ -513,6 +513,12 @@ void LabelButton::OnThemeChanged() {
|
||||
SchedulePaint();
|
||||
}
|
||||
|
||||
@@ -136,10 +136,10 @@ index 77c7f6830f9c..3a683e178668 100644
|
||||
Button::StateChanged(old_state);
|
||||
ResetLabelEnabledColor();
|
||||
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
|
||||
index 45692ab8b7c3..f4484c069137 100644
|
||||
index 4990f7e6ee48..c111e11f5100 100644
|
||||
--- ui/views/controls/button/label_button.h
|
||||
+++ ui/views/controls/button/label_button.h
|
||||
@@ -130,6 +130,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
|
||||
@@ -134,6 +134,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
|
||||
ui::NativeTheme::State GetForegroundThemeState(
|
||||
ui::NativeTheme::ExtraParams* params) const override;
|
||||
|
||||
@@ -150,7 +150,7 @@ index 45692ab8b7c3..f4484c069137 100644
|
||||
ImageView* image() const { return image_; }
|
||||
Label* label() const { return label_; }
|
||||
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
|
||||
index d0b00369f1a9..920df6ad1988 100644
|
||||
index 66ce6e76618b..ac584d47cea9 100644
|
||||
--- ui/views/controls/label.cc
|
||||
+++ ui/views/controls/label.cc
|
||||
@@ -47,12 +47,27 @@ enum LabelPropertyKey {
|
||||
@@ -197,7 +197,7 @@ index d0b00369f1a9..920df6ad1988 100644
|
||||
void Label::SetTooltipText(const base::string16& tooltip_text) {
|
||||
DCHECK(handles_tooltips_);
|
||||
if (tooltip_text_ == tooltip_text)
|
||||
@@ -617,7 +641,19 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
|
||||
@@ -619,7 +643,19 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
|
||||
render_text->SetFontList(font_list());
|
||||
render_text->set_shadows(GetShadows());
|
||||
render_text->SetCursorEnabled(false);
|
||||
@@ -219,10 +219,10 @@ index d0b00369f1a9..920df6ad1988 100644
|
||||
render_text->SetMultiline(multiline);
|
||||
render_text->SetMaxLines(multiline ? GetMaxLines() : 0);
|
||||
diff --git ui/views/controls/label.h ui/views/controls/label.h
|
||||
index 6cb286abd747..d05356e9caee 100644
|
||||
index f5b59c83c526..da238ea0a4ae 100644
|
||||
--- ui/views/controls/label.h
|
||||
+++ ui/views/controls/label.h
|
||||
@@ -198,6 +198,10 @@ class VIEWS_EXPORT Label : public View,
|
||||
@@ -199,6 +199,10 @@ class VIEWS_EXPORT Label : public View,
|
||||
gfx::ElideBehavior GetElideBehavior() const;
|
||||
void SetElideBehavior(gfx::ElideBehavior elide_behavior);
|
||||
|
||||
@@ -233,7 +233,7 @@ index 6cb286abd747..d05356e9caee 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
|
||||
@@ -432,6 +436,7 @@ class VIEWS_EXPORT Label : public View,
|
||||
@@ -433,6 +437,7 @@ class VIEWS_EXPORT Label : public View,
|
||||
bool collapse_when_hidden_ = false;
|
||||
int fixed_width_ = 0;
|
||||
int max_width_ = 0;
|
||||
@@ -242,10 +242,10 @@ index 6cb286abd747..d05356e9caee 100644
|
||||
std::unique_ptr<SelectionController> selection_controller_;
|
||||
|
||||
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
|
||||
index bad1730e19a0..2054d3b48e41 100644
|
||||
index e6a96689ef60..5dd54e402ce8 100644
|
||||
--- ui/views/controls/menu/menu_controller.cc
|
||||
+++ ui/views/controls/menu/menu_controller.cc
|
||||
@@ -2668,8 +2668,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
|
||||
@@ -2689,8 +2689,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
|
||||
|
||||
void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
MenuItemView* item = pending_state_.item;
|
||||
@@ -260,7 +260,7 @@ index bad1730e19a0..2054d3b48e41 100644
|
||||
MenuItemView* to_select = nullptr;
|
||||
if (!item->GetSubmenu()->GetMenuItems().empty())
|
||||
to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN);
|
||||
@@ -2688,8 +2693,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
@@ -2709,8 +2714,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
void MenuController::CloseSubmenu() {
|
||||
MenuItemView* item = state_.item;
|
||||
DCHECK(item);
|
||||
@@ -312,10 +312,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 f14eb8069141..98b1fca6c190 100644
|
||||
index aaaddc97e057..2a335d26c3f9 100644
|
||||
--- ui/views/controls/menu/menu_item_view.cc
|
||||
+++ ui/views/controls/menu/menu_item_view.cc
|
||||
@@ -1070,6 +1070,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
|
||||
@@ -1075,6 +1075,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);
|
||||
@@ -331,7 +331,7 @@ index f14eb8069141..98b1fca6c190 100644
|
||||
} else if (render_selection) {
|
||||
gfx::Rect item_bounds = GetLocalBounds();
|
||||
if (type_ == Type::kActionableSubMenu) {
|
||||
@@ -1137,6 +1146,13 @@ void MenuItemView::PaintMinorIconAndText(
|
||||
@@ -1142,6 +1151,13 @@ void MenuItemView::PaintMinorIconAndText(
|
||||
}
|
||||
|
||||
SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const {
|
||||
@@ -453,10 +453,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 3ba6950690e3..f500022cc083 100644
|
||||
index 979e2222ad7c..3644db9f087d 100644
|
||||
--- ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
+++ ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
@@ -199,6 +199,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
|
||||
@@ -200,6 +200,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
|
||||
scroll_down_button_ =
|
||||
AddChildView(std::make_unique<MenuScrollButton>(content_view, false));
|
||||
|
||||
@@ -469,10 +469,10 @@ index 3ba6950690e3..f500022cc083 100644
|
||||
content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition());
|
||||
|
||||
diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
index 2d80939961d7..ef2299910d75 100644
|
||||
index 82135658e188..53674f44d5d1 100644
|
||||
--- ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
+++ ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
@@ -154,10 +154,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
|
||||
@@ -135,10 +135,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
|
||||
aura::test::QueryLatestMousePositionRequestInHost(host);
|
||||
host->ConvertPixelsToDIP(&root_current_location);
|
||||
|
||||
@@ -484,7 +484,7 @@ index 2d80939961d7..ef2299910d75 100644
|
||||
// Move the cursor because EnterNotify/LeaveNotify are generated with the
|
||||
// current mouse position as a result of XGrabPointer()
|
||||
diff --git ui/views/view.h ui/views/view.h
|
||||
index 1990d29fcae1..dcfaaa7f6f3f 100644
|
||||
index ff42e9282492..b1f65d8e2c4d 100644
|
||||
--- ui/views/view.h
|
||||
+++ ui/views/view.h
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -495,7 +495,7 @@ index 1990d29fcae1..dcfaaa7f6f3f 100644
|
||||
#include "build/build_config.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
#include "ui/accessibility/ax_enums.mojom-forward.h"
|
||||
@@ -275,6 +276,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
@@ -274,6 +275,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
public ui::EventTarget,
|
||||
public ui::EventHandler,
|
||||
public ui::PropertyHandler,
|
||||
|
@@ -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 934195fd77d2..8aec87d4a448 100644
|
||||
index b2139c2e9ee8..555121d711bb 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -560,6 +560,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
|
||||
@@ -532,6 +532,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() {
|
||||
return screen_info.device_scale_factor;
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@ index 934195fd77d2..8aec87d4a448 100644
|
||||
+ return has_external_parent_;
|
||||
+}
|
||||
+
|
||||
uint32_t RenderWidgetHostViewBase::RendererFrameNumber() {
|
||||
return renderer_frame_number_;
|
||||
}
|
||||
void RenderWidgetHostViewBase::OnAutoscrollStart() {
|
||||
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 af80b343dcd9..507618362acd 100644
|
||||
index 5b2aa87a53fa..302626b947c6 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -65,6 +65,7 @@ class CursorManager;
|
||||
@@ -66,6 +66,7 @@ class CursorManager;
|
||||
class MouseWheelPhaseHandler;
|
||||
class RenderWidgetHostImpl;
|
||||
class RenderWidgetHostViewBaseObserver;
|
||||
@@ -29,7 +29,7 @@ index af80b343dcd9..507618362acd 100644
|
||||
class SyntheticGestureTarget;
|
||||
class TextInputManager;
|
||||
class TouchSelectionControllerClientManager;
|
||||
@@ -82,6 +83,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -79,6 +80,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
float current_device_scale_factor() const {
|
||||
return current_device_scale_factor_;
|
||||
}
|
||||
@@ -39,16 +39,16 @@ index af80b343dcd9..507618362acd 100644
|
||||
|
||||
// Returns the focused RenderWidgetHost inside this |view|'s RWH.
|
||||
RenderWidgetHostImpl* GetFocusedWidget() const;
|
||||
@@ -116,6 +120,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -112,6 +116,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
const gfx::Size& max_size) override;
|
||||
void DisableAutoResize(const gfx::Size& new_size) override;
|
||||
bool IsScrollOffsetAtTop() override;
|
||||
float GetDeviceScaleFactor() final;
|
||||
+ void SetHasExternalParent(bool val) override;
|
||||
+ bool HasExternalParent() const override;
|
||||
TouchSelectionControllerClientManager*
|
||||
GetTouchSelectionControllerClientManager() override;
|
||||
void SetRecordContentToVisibleTimeRequest(
|
||||
@@ -439,6 +445,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -418,6 +424,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
// helps to position the full screen widget on the correct monitor.
|
||||
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
|
||||
|
||||
@@ -61,9 +61,9 @@ index af80b343dcd9..507618362acd 100644
|
||||
// Sets the cursor for this view to the one associated with the specified
|
||||
// cursor_type.
|
||||
virtual void UpdateCursor(const WebCursor& cursor) = 0;
|
||||
@@ -620,6 +632,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
// specific RenderWidgetHostView.
|
||||
base::Optional<DisplayFeature> display_feature_;
|
||||
@@ -598,6 +610,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
protected:
|
||||
~RenderWidgetHostViewBase() override;
|
||||
|
||||
+ // True if the widget has a external parent view/window outside of the
|
||||
+ // Chromium-controlled view/window hierarchy.
|
||||
@@ -73,7 +73,7 @@ index af80b343dcd9..507618362acd 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 44586cc1789a..18705ef4e6e7 100644
|
||||
index b49d2f96efec..080a49940263 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 @@
|
||||
@@ -85,9 +85,9 @@ index 44586cc1789a..18705ef4e6e7 100644
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_WIN)
|
||||
#include "content/browser/frame_host/render_frame_host_impl.h"
|
||||
#include "content/browser/renderer_host/render_frame_host_impl.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
@@ -954,6 +958,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
|
||||
@@ -956,6 +960,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -103,10 +103,10 @@ index 44586cc1789a..18705ef4e6e7 100644
|
||||
synthetic_move_position_ = center_in_screen;
|
||||
}
|
||||
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
|
||||
index a7222155f4ea..77ac1f864161 100644
|
||||
index beba7a3a40b8..941acdfbff8b 100644
|
||||
--- content/public/browser/render_widget_host_view.h
|
||||
+++ content/public/browser/render_widget_host_view.h
|
||||
@@ -243,6 +243,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
@@ -241,6 +241,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
// This must always return the same device scale factor as GetScreenInfo.
|
||||
virtual float GetDeviceScaleFactor() = 0;
|
||||
|
||||
@@ -122,10 +122,10 @@ index a7222155f4ea..77ac1f864161 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 24dbb60257bb..59e731f9ba0b 100644
|
||||
index 7d151df864f4..b8f58d9294d5 100644
|
||||
--- ui/base/x/x11_window.cc
|
||||
+++ ui/base/x/x11_window.cc
|
||||
@@ -272,7 +272,8 @@ void XWindow::Init(const Configuration& config) {
|
||||
@@ -264,7 +264,8 @@ void XWindow::Init(const Configuration& config) {
|
||||
req.border_pixel = 0;
|
||||
|
||||
bounds_in_pixels_ = SanitizeBounds(config.bounds);
|
||||
@@ -156,7 +156,7 @@ index af282d4190dd..147a2cd9ac4c 100644
|
||||
|
||||
XWindow();
|
||||
diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc
|
||||
index c0ba5c3a156e..c12372d6e435 100644
|
||||
index 7941edf6d3cb..520af3c90e97 100644
|
||||
--- ui/platform_window/x11/x11_window.cc
|
||||
+++ ui/platform_window/x11/x11_window.cc
|
||||
@@ -93,6 +93,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig(
|
||||
@@ -245,7 +245,7 @@ index 4b6a5a4476a3..c9881d4a716c 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 e9e61a24dc87..7687ded2a82e 100644
|
||||
index 3b132d4d7618..bcb17600d7fa 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) {
|
||||
@@ -296,10 +296,10 @@ index 0229c1c41502..992f89126f7f 100644
|
||||
// a reference.
|
||||
corewm::TooltipWin* tooltip_;
|
||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||
index f02508580d16..a2be2ed6aa2d 100644
|
||||
index 710d52bcc34f..25608ba3d188 100644
|
||||
--- ui/views/widget/widget.cc
|
||||
+++ ui/views/widget/widget.cc
|
||||
@@ -285,7 +285,8 @@ void Widget::Init(InitParams params) {
|
||||
@@ -283,7 +283,8 @@ void Widget::Init(InitParams params) {
|
||||
params.name = params.delegate->GetContentsView()->GetClassName();
|
||||
|
||||
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
||||
@@ -309,10 +309,10 @@ index f02508580d16..a2be2ed6aa2d 100644
|
||||
|
||||
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
|
||||
params.type != views::Widget::InitParams::TYPE_WINDOW) {
|
||||
@@ -369,7 +370,12 @@ void Widget::Init(InitParams params) {
|
||||
@@ -365,7 +366,12 @@ void Widget::Init(InitParams params) {
|
||||
}
|
||||
} else if (delegate) {
|
||||
SetContentsView(delegate->GetContentsView());
|
||||
SetContentsView(delegate->TransferOwnershipOfContentsView());
|
||||
- SetInitialBoundsForFramelessWindow(bounds);
|
||||
+ if (params.parent_widget != gfx::kNullAcceleratedWidget) {
|
||||
+ // Set the bounds directly instead of applying an inset.
|
||||
@@ -323,7 +323,7 @@ index f02508580d16..a2be2ed6aa2d 100644
|
||||
}
|
||||
|
||||
observer_manager_.Add(GetNativeTheme());
|
||||
@@ -1153,10 +1159,16 @@ void Widget::OnNativeWidgetDestroyed() {
|
||||
@@ -1149,10 +1155,16 @@ void Widget::OnNativeWidgetDestroyed() {
|
||||
}
|
||||
|
||||
gfx::Size Widget::GetMinimumSize() const {
|
||||
@@ -341,10 +341,10 @@ index f02508580d16..a2be2ed6aa2d 100644
|
||||
}
|
||||
|
||||
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
|
||||
index 032f77d5738a..085c4df9fa8c 100644
|
||||
index bb19a2cceb28..d62b6dbbecc9 100644
|
||||
--- ui/views/widget/widget.h
|
||||
+++ ui/views/widget/widget.h
|
||||
@@ -315,6 +315,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -317,6 +317,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// the concept with bubble anchoring a la BubbleDialogDelegateView.
|
||||
gfx::NativeView parent = nullptr;
|
||||
|
||||
@@ -354,10 +354,10 @@ index 032f77d5738a..085c4df9fa8c 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 fdf697d54693..d21effca6422 100644
|
||||
index ce51f9d0f350..1121f523be23 100644
|
||||
--- ui/views/widget/widget_delegate.h
|
||||
+++ ui/views/widget/widget_delegate.h
|
||||
@@ -301,6 +301,10 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
@@ -332,6 +332,10 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
// Returns true if the title text should be centered.
|
||||
bool ShouldCenterWindowTitleText() const;
|
||||
|
||||
@@ -366,8 +366,8 @@ index fdf697d54693..d21effca6422 100644
|
||||
+ virtual bool MaybeGetMaximumSize(gfx::Size* size) const { return false; }
|
||||
+
|
||||
bool focus_traverses_out() const { return params_.focus_traverses_out; }
|
||||
bool owned_by_widget() const { return params_.owned_by_widget; }
|
||||
|
||||
private:
|
||||
diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc
|
||||
index 89f5b62f95df..8f6971929a12 100644
|
||||
--- ui/views/widget/widget_hwnd_utils.cc
|
||||
@@ -382,10 +382,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 5e8d267d868d..414e20ad8203 100644
|
||||
index 754528f7d280..c929712cbd0d 100644
|
||||
--- ui/views/win/hwnd_message_handler.cc
|
||||
+++ ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3071,10 +3071,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3074,10 +3074,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.
|
||||
|
@@ -80,18 +80,18 @@ index 1026b739d283..fe562ab60ce9 100644
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
|
||||
index d991c2126b23..cc51bb326e86 100644
|
||||
index 3d3fc4f52270..a9c9c5324a62 100644
|
||||
--- components/viz/service/BUILD.gn
|
||||
+++ components/viz/service/BUILD.gn
|
||||
@@ -14,6 +14,8 @@ config("viz_service_implementation") {
|
||||
|
||||
viz_component("service") {
|
||||
sources = [
|
||||
@@ -183,6 +183,8 @@ viz_component("service") {
|
||||
"surfaces/surface_reference.cc",
|
||||
"surfaces/surface_reference.h",
|
||||
"viz_service_export.h",
|
||||
+ "//cef/libcef/browser/osr/software_output_device_proxy.cc",
|
||||
+ "//cef/libcef/browser/osr/software_output_device_proxy.h",
|
||||
"display/bsp_tree.cc",
|
||||
"display/bsp_tree.h",
|
||||
"display/bsp_walk_action.cc",
|
||||
]
|
||||
|
||||
defines = [ "VIZ_SERVICE_IMPLEMENTATION" ]
|
||||
diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
index 2da653cc9c3c..e536a34dca33 100644
|
||||
--- components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
@@ -214,7 +214,7 @@ index 6b7fbb6cf13d..e2af75168cb9 100644
|
||||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||
};
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 13665946e08a..ceea7b60d44f 100644
|
||||
index 32cdffd116b7..d0303c7e79d9 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -25,7 +25,9 @@
|
||||
@@ -252,7 +252,7 @@ index 13665946e08a..ceea7b60d44f 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,
|
||||
@@ -430,6 +443,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
|
||||
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
||||
|
||||
|
@@ -1,39 +1,30 @@
|
||||
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||
index 4dca843104ac..63020b374688 100644
|
||||
index c3a2e5c241e3..4f746c94f316 100644
|
||||
--- content/browser/web_contents/web_contents_impl.cc
|
||||
+++ content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -2561,15 +2561,22 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -2763,7 +2763,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);
|
||||
|
||||
- WebContentsViewDelegate* delegate =
|
||||
- GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
+
|
||||
+ if (params.view && params.delegate_view) {
|
||||
+ view_.reset(params.view);
|
||||
+ render_view_host_delegate_view_ = params.delegate_view;
|
||||
+ }
|
||||
|
||||
- if (browser_plugin_guest_) {
|
||||
- view_.reset(new WebContentsViewChildFrame(
|
||||
- this, delegate, &render_view_host_delegate_view_));
|
||||
- } else {
|
||||
- view_.reset(CreateWebContentsView(this, delegate,
|
||||
- &render_view_host_delegate_view_));
|
||||
+ if (!view_) {
|
||||
+ WebContentsViewDelegate* delegate =
|
||||
+ GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
+
|
||||
+ if (browser_plugin_guest_) {
|
||||
+ view_.reset(new WebContentsViewChildFrame(
|
||||
+ this, delegate, &render_view_host_delegate_view_));
|
||||
+ } else {
|
||||
+ view_.reset(CreateWebContentsView(this, delegate,
|
||||
+ &render_view_host_delegate_view_));
|
||||
+ }
|
||||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -2774,6 +2780,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
view_.reset(CreateWebContentsView(this, delegate,
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
+ }
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
@@ -3368,6 +3375,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
@@ -3645,6 +3652,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
// objects.
|
||||
create_params.renderer_initiated_creation = !is_new_browsing_instance;
|
||||
|
||||
@@ -49,7 +40,7 @@ index 4dca843104ac..63020b374688 100644
|
||||
std::unique_ptr<WebContentsImpl> new_contents;
|
||||
if (!is_guest) {
|
||||
create_params.context = view_->GetNativeView();
|
||||
@@ -6850,6 +6866,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
|
||||
@@ -7586,6 +7602,10 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
|
||||
// This is an outermost WebContents.
|
||||
SetAsFocusedWebContentsIfNecessary();
|
||||
}
|
||||
@@ -73,10 +64,10 @@ 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 f1c25ed4cf62..8bb6e9a374c7 100644
|
||||
index 0426cc1550f1..2c56fccadd2d 100644
|
||||
--- content/public/browser/web_contents.h
|
||||
+++ content/public/browser/web_contents.h
|
||||
@@ -82,8 +82,10 @@ class BrowserContext;
|
||||
@@ -86,8 +86,10 @@ class BrowserContext;
|
||||
class BrowserPluginGuestDelegate;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
@@ -87,7 +78,7 @@ index f1c25ed4cf62..8bb6e9a374c7 100644
|
||||
class WebUI;
|
||||
struct CustomContextMenuContext;
|
||||
struct DropData;
|
||||
@@ -212,6 +214,10 @@ class WebContents : public PageNavigator,
|
||||
@@ -221,6 +223,10 @@ class WebContents : public PageNavigator,
|
||||
// Sandboxing flags set on the new WebContents.
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags;
|
||||
|
||||
@@ -99,7 +90,7 @@ index f1c25ed4cf62..8bb6e9a374c7 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 a10c5caf5a4b..ef8d3c3c1056 100644
|
||||
index ee6b87d40496..338064935cc4 100644
|
||||
--- content/public/browser/web_contents_delegate.h
|
||||
+++ content/public/browser/web_contents_delegate.h
|
||||
@@ -62,10 +62,12 @@ class EyeDropperListener;
|
||||
@@ -131,10 +122,10 @@ index a10c5caf5a4b..ef8d3c3c1056 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 3666e0357038..b82c54816894 100644
|
||||
index 301fa10bcc3e..37ec8ddd4583 100644
|
||||
--- content/public/browser/web_contents_observer.h
|
||||
+++ content/public/browser/web_contents_observer.h
|
||||
@@ -610,6 +610,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
|
||||
@@ -613,6 +613,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
|
||||
// WebContents has gained/lost focus.
|
||||
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}
|
||||
|
||||
|
@@ -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 abfcd20b8941..634173c64a16 100644
|
||||
index 4c05fb9099e2..fadbb37d97ef 100644
|
||||
--- third_party/blink/public/platform/platform.h
|
||||
+++ third_party/blink/public/platform/platform.h
|
||||
@@ -696,6 +696,11 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -697,6 +697,11 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
// runs during Chromium's build step).
|
||||
virtual bool IsTakingV8ContextSnapshot() { return false; }
|
||||
|
||||
@@ -26,10 +26,10 @@ index abfcd20b8941..634173c64a16 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 ba112d79de9a..83f5bd971bc9 100644
|
||||
index d49dc7cb85d5..dc4af48a458d 100644
|
||||
--- third_party/blink/renderer/core/dom/document_init.cc
|
||||
+++ third_party/blink/renderer/core/dom/document_init.cc
|
||||
@@ -176,11 +176,11 @@ PluginData* DocumentInit::GetPluginData(LocalFrame* frame, const KURL& url) {
|
||||
@@ -182,11 +182,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 ba112d79de9a..83f5bd971bc9 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 11b7b4a63f2e..c2714178a4a4 100644
|
||||
index c00d6f81db12..17c54cd0ca08 100644
|
||||
--- third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -1641,7 +1641,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
@@ -1698,7 +1698,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
PluginData* LocalFrame::GetPluginData() const {
|
||||
if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin))
|
||||
return nullptr;
|
||||
@@ -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 45ef79f88b4d..074d5ea48b12 100644
|
||||
index c87fcbaaa194..2baae5c3bc64 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)
|
||||
@@ -211,7 +211,8 @@ Page::Page(PageClients& page_clients)
|
||||
MakeGarbageCollected<OverscrollController>(GetVisualViewport(),
|
||||
GetChromeClient())),
|
||||
link_highlight_(MakeGarbageCollected<LinkHighlight>(*this)),
|
||||
@@ -98,7 +98,7 @@ index 45ef79f88b4d..074d5ea48b12 100644
|
||||
// TODO(pdr): Initialize |validation_message_client_| lazily.
|
||||
validation_message_client_(
|
||||
MakeGarbageCollected<ValidationMessageClientImpl>(*this)),
|
||||
@@ -395,21 +396,41 @@ void Page::InitialStyleChanged() {
|
||||
@@ -391,21 +392,41 @@ void Page::InitialStyleChanged() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ index 45ef79f88b4d..074d5ea48b12 100644
|
||||
page->NotifyPluginsChanged();
|
||||
}
|
||||
}
|
||||
@@ -919,7 +940,8 @@ void Page::Trace(Visitor* visitor) const {
|
||||
@@ -911,7 +932,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 45ef79f88b4d..074d5ea48b12 100644
|
||||
visitor->Trace(agent_metrics_collector_);
|
||||
visitor->Trace(plugins_changed_observers_);
|
||||
diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h
|
||||
index b6a1caadf7b7..95fafb720083 100644
|
||||
index 4e4e496eb088..ed2ded8a397b 100644
|
||||
--- third_party/blink/renderer/core/page/page.h
|
||||
+++ third_party/blink/renderer/core/page/page.h
|
||||
@@ -150,7 +150,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
|
||||
@@ -149,7 +149,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 b6a1caadf7b7..95fafb720083 100644
|
||||
|
||||
// Resets the plugin data for all pages in the renderer process and notifies
|
||||
// PluginsChangedObservers.
|
||||
@@ -431,7 +432,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
|
||||
@@ -426,7 +427,8 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>,
|
||||
const Member<LinkHighlight> link_highlight_;
|
||||
Member<SpatialNavigationController> spatial_navigation_controller_;
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc
|
||||
index 8d8f25e2f57a..5aa055ce855f 100644
|
||||
--- third_party/blink/renderer/core/input/pointer_event_manager.cc
|
||||
+++ third_party/blink/renderer/core/input/pointer_event_manager.cc
|
||||
@@ -304,7 +304,7 @@ void PointerEventManager::HandlePointerInterruption(
|
||||
for (auto pointer_event : canceled_pointer_events) {
|
||||
// If we are sending a pointercancel we have sent the pointerevent to some
|
||||
// target before.
|
||||
- CHECK(element_under_pointer_.Contains(pointer_event->pointerId()));
|
||||
+ // CHECK(element_under_pointer_.Contains(pointer_event->pointerId()));
|
||||
Element* target =
|
||||
element_under_pointer_.at(pointer_event->pointerId())->target;
|
||||
|
@@ -1,76 +0,0 @@
|
||||
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
|
||||
index 4d55813fed92..f41bd4b5590e 100644
|
||||
--- third_party/blink/public/web/web_view.h
|
||||
+++ third_party/blink/public/web/web_view.h
|
||||
@@ -371,6 +371,7 @@ class WebView {
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
|
||||
+ virtual void SetUseExternalPopupMenusThisInstance(bool) = 0;
|
||||
|
||||
// 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 4b42cd80d5c1..cafb43ea03f1 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -216,8 +216,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
||||
g_should_use_external_popup_menus = use_external_popup_menus;
|
||||
}
|
||||
|
||||
-bool WebViewImpl::UseExternalPopupMenus() {
|
||||
- return g_should_use_external_popup_menus;
|
||||
+void WebViewImpl::SetUseExternalPopupMenusThisInstance(
|
||||
+ bool use_external_popup_menus) {
|
||||
+ should_use_external_popup_menus_ = use_external_popup_menus;
|
||||
+}
|
||||
+
|
||||
+bool WebViewImpl::UseExternalPopupMenus() const {
|
||||
+ return should_use_external_popup_menus_;
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -323,6 +328,7 @@ WebViewImpl::WebViewImpl(
|
||||
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
|
||||
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
|
||||
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
|
||||
+ should_use_external_popup_menus_(g_should_use_external_popup_menus),
|
||||
does_composite_(does_composite),
|
||||
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
|
||||
receiver_(this, std::move(page_handle)) {
|
||||
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 510c555ca5af..242a208b7328 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -125,7 +125,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).
|
||||
- static bool UseExternalPopupMenus();
|
||||
+ void SetUseExternalPopupMenusThisInstance(bool) override;
|
||||
+ bool UseExternalPopupMenus() const;
|
||||
|
||||
// Returns whether frames under this WebView are backed by a compositor.
|
||||
bool does_composite() const { return does_composite_; }
|
||||
@@ -645,6 +646,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;
|
||||
|
||||
+ bool should_use_external_popup_menus_;
|
||||
+
|
||||
float compositor_device_scale_factor_override_ = 0.f;
|
||||
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 a923d3b27d36..d9d5b6200d31 100644
|
||||
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
@@ -839,7 +839,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
|
||||
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
HTMLSelectElement& select) {
|
||||
NotifyPopupOpeningObservers();
|
||||
- if (WebViewImpl::UseExternalPopupMenus())
|
||||
+ if (web_view_->UseExternalPopupMenus())
|
||||
return MakeGarbageCollected<ExternalPopupMenu>(frame, select);
|
||||
|
||||
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|
151
patch/patches/webkit_popups_and_background.patch
Normal file
151
patch/patches/webkit_popups_and_background.patch
Normal file
@@ -0,0 +1,151 @@
|
||||
diff --git third_party/blink/common/web_preferences/web_preferences.cc third_party/blink/common/web_preferences/web_preferences.cc
|
||||
index 980bd49381eb..d84817bd0388 100644
|
||||
--- third_party/blink/common/web_preferences/web_preferences.cc
|
||||
+++ third_party/blink/common/web_preferences/web_preferences.cc
|
||||
@@ -145,6 +145,7 @@ WebPreferences::WebPreferences()
|
||||
accelerated_video_decode_enabled(false),
|
||||
animation_policy(kImageAnimationPolicyAllowed),
|
||||
user_gesture_required_for_presentation(true),
|
||||
+ base_background_color(0xFFFFFFFF), // Color::kWhite
|
||||
text_tracks_enabled(false),
|
||||
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 4cbfb72c25d1..2e5261e4d714 100644
|
||||
--- third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -465,6 +465,7 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
data.accelerated_video_decode_enabled();
|
||||
out->user_gesture_required_for_presentation =
|
||||
data.user_gesture_required_for_presentation();
|
||||
+ out->base_background_color = data.base_background_color();
|
||||
out->text_tracks_enabled = data.text_tracks_enabled();
|
||||
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 842d902e040f..81f6f226966c 100644
|
||||
--- third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -172,6 +172,8 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
|
||||
bool user_gesture_required_for_presentation;
|
||||
|
||||
+ uint32_t base_background_color;
|
||||
+
|
||||
bool text_tracks_enabled;
|
||||
|
||||
// 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 50c48c07228b..37c447ef1e12 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
|
||||
@@ -522,6 +522,11 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.user_gesture_required_for_presentation;
|
||||
}
|
||||
|
||||
+ static uint32_t base_background_color(
|
||||
+ const blink::web_pref::WebPreferences& r) {
|
||||
+ return r.base_background_color;
|
||||
+ }
|
||||
+
|
||||
static bool text_tracks_enabled(const blink::web_pref::WebPreferences& r) {
|
||||
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 d8a9421a1764..9e1e5d632c46 100644
|
||||
--- third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -209,6 +209,8 @@ struct WebPreferences {
|
||||
|
||||
bool user_gesture_required_for_presentation;
|
||||
|
||||
+ uint32 base_background_color;
|
||||
+
|
||||
bool text_tracks_enabled;
|
||||
|
||||
// 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 3bcd1065f3dc..a8123397fde6 100644
|
||||
--- third_party/blink/public/web/web_view.h
|
||||
+++ third_party/blink/public/web/web_view.h
|
||||
@@ -382,6 +382,7 @@ class WebView {
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
|
||||
+ virtual void SetUseExternalPopupMenusThisInstance(bool) = 0;
|
||||
|
||||
// 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 9c1a8efc3516..9645dc78ebe2 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -228,8 +228,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
||||
g_should_use_external_popup_menus = use_external_popup_menus;
|
||||
}
|
||||
|
||||
-bool WebViewImpl::UseExternalPopupMenus() {
|
||||
- return g_should_use_external_popup_menus;
|
||||
+void WebViewImpl::SetUseExternalPopupMenusThisInstance(
|
||||
+ bool use_external_popup_menus) {
|
||||
+ should_use_external_popup_menus_ = use_external_popup_menus;
|
||||
+}
|
||||
+
|
||||
+bool WebViewImpl::UseExternalPopupMenus() const {
|
||||
+ return should_use_external_popup_menus_;
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -477,6 +482,7 @@ WebViewImpl::WebViewImpl(
|
||||
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
|
||||
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
|
||||
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
|
||||
+ should_use_external_popup_menus_(g_should_use_external_popup_menus),
|
||||
does_composite_(does_composite),
|
||||
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
|
||||
receiver_(this, std::move(page_handle)) {
|
||||
@@ -2254,6 +2260,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#endif
|
||||
|
||||
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);
|
||||
+
|
||||
+ web_view->SetBaseBackgroundColor(prefs.base_background_color);
|
||||
}
|
||||
|
||||
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 64c52801dbfc..b57b61e609d2 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -125,7 +125,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).
|
||||
- static bool UseExternalPopupMenus();
|
||||
+ void SetUseExternalPopupMenusThisInstance(bool) override;
|
||||
+ bool UseExternalPopupMenus() const;
|
||||
|
||||
// Returns whether frames under this WebView are backed by a compositor.
|
||||
bool does_composite() const { return does_composite_; }
|
||||
@@ -694,6 +695,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;
|
||||
|
||||
+ bool should_use_external_popup_menus_;
|
||||
+
|
||||
float compositor_device_scale_factor_override_ = 0.f;
|
||||
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 46e116800e5a..1c0ff3ba815f 100644
|
||||
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
@@ -811,7 +811,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
|
||||
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
HTMLSelectElement& select) {
|
||||
NotifyPopupOpeningObservers();
|
||||
- if (WebViewImpl::UseExternalPopupMenus())
|
||||
+ if (web_view_->UseExternalPopupMenus())
|
||||
return MakeGarbageCollected<ExternalPopupMenu>(frame, select);
|
||||
|
||||
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|
@@ -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 0a144a99349f..c673f09e5652 100644
|
||||
index 227e5b2618c1..7e7b32264b80 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 0a144a99349f..c673f09e5652 100644
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/sync/driver/about_sync_util.h"
|
||||
#include "components/sync/driver/sync_service.h"
|
||||
@@ -277,7 +280,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 0a144a99349f..c673f09e5652 100644
|
||||
PopulateExtensionInfoLogs(response.get());
|
||||
PopulatePowerApiLogs(response.get());
|
||||
PopulateDataReductionProxyLogs(response.get());
|
||||
@@ -368,6 +375,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
|
||||
@@ -430,6 +437,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
|
||||
if (!profile)
|
||||
return;
|
||||
|
||||
@@ -52,7 +52,7 @@ index 0a144a99349f..c673f09e5652 100644
|
||||
extensions::ExtensionRegistry* extension_registry =
|
||||
extensions::ExtensionRegistry::Get(profile);
|
||||
std::string extensions_list;
|
||||
@@ -474,6 +487,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
|
||||
@@ -536,6 +549,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
|
||||
#if defined(OS_WIN)
|
||||
void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
|
||||
SystemLogsResponse* response) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
|
||||
index 4d07574af45c..56299e99f49e 100644
|
||||
index 54ad1ca860fa..f0981120284b 100644
|
||||
--- chrome/app/generated_resources.grd
|
||||
+++ chrome/app/generated_resources.grd
|
||||
@@ -5068,7 +5068,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
|
||||
@@ -5081,7 +5081,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.">
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
|
||||
index d63d942c7e3e..a100fb4d685f 100644
|
||||
index 8c1e3aa58b6d..a51f5f10c9e9 100644
|
||||
--- sandbox/policy/win/sandbox_win.cc
|
||||
+++ sandbox/policy/win/sandbox_win.cc
|
||||
@@ -953,8 +953,11 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
@@ -1001,8 +1001,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.
|
||||
|
Reference in New Issue
Block a user