Update to Chromium version 121.0.6167.0 (#1233107)

This commit is contained in:
Marshall Greenblatt 2023-12-06 15:16:15 -05:00
parent 2f0b00f8f5
commit 80c65f25a3
122 changed files with 1044 additions and 986 deletions

View File

@ -390,10 +390,14 @@ source_set("libcef_static_unittested") {
] ]
deps = [ deps = [
"//base",
"//ui/gfx/geometry", "//ui/gfx/geometry",
] ]
public_deps = [
# Support relative include paths.
"//base",
]
configs += [ configs += [
"libcef/features:config", "libcef/features:config",
"//build/config:precompiled_headers", "//build/config:precompiled_headers",
@ -964,6 +968,7 @@ source_set("libcef_static") {
# Bring in feature flag defines. # Bring in feature flag defines.
"//cef/libcef/features", "//cef/libcef/features",
# Support relative include paths. # Support relative include paths.
"//base",
"//third_party/abseil-cpp:absl", "//third_party/abseil-cpp:absl",
] ]
@ -981,7 +986,6 @@ source_set("libcef_static") {
"libcef/common/extensions/api:extensions_features", "libcef/common/extensions/api:extensions_features",
# Normal build dependencies. Should be sorted alphabetically. # Normal build dependencies. Should be sorted alphabetically.
"//base",
"//base:base_static", "//base:base_static",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//cc", "//cc",

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{ {
'chromium_checkout': 'refs/tags/120.0.6099.0' 'chromium_checkout': 'refs/tags/121.0.6167.0'
} }

View File

@ -232,19 +232,19 @@
// Type detection for wchar_t. // Type detection for wchar_t.
#if defined(OS_WIN) #if defined(OS_WIN)
#define WCHAR_T_IS_UTF16 #define WCHAR_T_IS_16_BIT
#elif defined(OS_FUCHSIA) #elif defined(OS_FUCHSIA)
#define WCHAR_T_IS_UTF32 #define WCHAR_T_IS_32_BIT
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \ #elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
#define WCHAR_T_IS_UTF32 #define WCHAR_T_IS_32_BIT
#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \ #elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \
(__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff) (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)
// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to // On Posix, we'll detect short wchar_t, but projects aren't guaranteed to
// compile in this mode (in particular, Chrome doesn't). This is intended for // compile in this mode (in particular, Chrome doesn't). This is intended for
// other projects using base who manage their own dependencies and make sure // other projects using base who manage their own dependencies and make sure
// short wchar works for them. // short wchar works for them.
#define WCHAR_T_IS_UTF16 #define WCHAR_T_IS_16_BIT
#else #else
#error Please add support for your compiler in include/base/cef_build.h #error Please add support for your compiler in include/base/cef_build.h
#endif #endif

View File

@ -723,9 +723,9 @@ std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
return out << wstr.c_str(); return out << wstr.c_str();
} }
#if defined(WCHAR_T_IS_UTF32) #if defined(WCHAR_T_IS_32_BIT)
std::ostream& operator<<(std::ostream& out, const char16_t* wstr); std::ostream& operator<<(std::ostream& out, const char16_t* wstr);
#elif defined(WCHAR_T_IS_UTF16) #elif defined(WCHAR_T_IS_16_BIT)
inline std::ostream& operator<<(std::ostream& out, const char16_t* wstr) { inline std::ostream& operator<<(std::ostream& out, const char16_t* wstr) {
return operator<<(out, reinterpret_cast<const wchar_t*>(wstr)); return operator<<(out, reinterpret_cast<const wchar_t*>(wstr));
} }

View File

@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal // way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash // hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected. // values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "bbdc07e7c5ed2ae5398efdebdd1ed08801bc91ab" #define CEF_API_HASH_UNIVERSAL "69a7afd400063d0f991bf5cb849d09f78d9d46a2"
#if defined(OS_WIN) #if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "002e3391fd68b0a444dbb6cd1b2a19a4c181d935" #define CEF_API_HASH_PLATFORM "d78cbef49838e5693b0a975f66524c2081fafd1d"
#elif defined(OS_MAC) #elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "3e4f2433692dc8bb779314dce84b81d81d39d2c2" #define CEF_API_HASH_PLATFORM "aa42d428bf206f59341c995d51c67e2de0e0b1c2"
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "4e707370d08d4639c41e7c8aa8027c4a6090eace" #define CEF_API_HASH_PLATFORM "1f039256db5c820543540263202520b667825d6a"
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -99,7 +99,7 @@ struct CefStringTraitsWide {
static inline bool from_wstring(const std::wstring& str, struct_type* s) { static inline bool from_wstring(const std::wstring& str, struct_type* s) {
return from_wstring(str.data(), str.length(), s); return from_wstring(str.data(), str.length(), s);
} }
#if defined(WCHAR_T_IS_UTF32) #if defined(WCHAR_T_IS_32_BIT)
static inline std::u16string to_string16(const struct_type* s) { static inline std::u16string to_string16(const struct_type* s) {
cef_string_utf16_t cstr; cef_string_utf16_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
@ -120,7 +120,7 @@ struct CefStringTraitsWide {
? true ? true
: false; : false;
} }
#else // WCHAR_T_IS_UTF32 #elif defined(WCHAR_T_IS_16_BIT)
static inline std::u16string to_string16(const struct_type* s) { static inline std::u16string to_string16(const struct_type* s) {
return std::u16string( return std::u16string(
reinterpret_cast<const std::u16string::value_type*>(s->str), s->length); reinterpret_cast<const std::u16string::value_type*>(s->str), s->length);
@ -133,7 +133,7 @@ struct CefStringTraitsWide {
? true ? true
: false; : false;
} }
#endif // WCHAR_T_IS_UTF32 #endif // WCHAR_T_IS_16_BIT
static inline bool from_string16(const std::u16string& str, struct_type* s) { static inline bool from_string16(const std::u16string& str, struct_type* s) {
return from_string16(str.data(), str.length(), s); return from_string16(str.data(), str.length(), s);
} }
@ -271,7 +271,7 @@ struct CefStringTraitsUTF16 {
static inline bool from_string(const std::string& str, struct_type* s) { static inline bool from_string(const std::string& str, struct_type* s) {
return from_string(str.data(), str.length(), s); return from_string(str.data(), str.length(), s);
} }
#if defined(WCHAR_T_IS_UTF32) #if defined(WCHAR_T_IS_32_BIT)
static inline std::wstring to_wstring(const struct_type* s) { static inline std::wstring to_wstring(const struct_type* s) {
cef_string_wide_t cstr; cef_string_wide_t cstr;
memset(&cstr, 0, sizeof(cstr)); memset(&cstr, 0, sizeof(cstr));
@ -288,7 +288,7 @@ struct CefStringTraitsUTF16 {
struct_type* s) { struct_type* s) {
return cef_string_wide_to_utf16(data, length, s) ? true : false; return cef_string_wide_to_utf16(data, length, s) ? true : false;
} }
#else // WCHAR_T_IS_UTF32 #elif defined(WCHAR_T_IS_16_BIT)
static inline std::wstring to_wstring(const struct_type* s) { static inline std::wstring to_wstring(const struct_type* s) {
return std::wstring(reinterpret_cast<wchar_t*>(s->str), s->length); return std::wstring(reinterpret_cast<wchar_t*>(s->str), s->length);
} }
@ -300,7 +300,7 @@ struct CefStringTraitsUTF16 {
? true ? true
: false; : false;
} }
#endif // WCHAR_T_IS_UTF32 #endif // WCHAR_T_IS_16_BIT
static inline bool from_wstring(const std::wstring& str, struct_type* s) { static inline bool from_wstring(const std::wstring& str, struct_type* s) {
return from_wstring(str.data(), str.length(), s); return from_wstring(str.data(), str.length(), s);
} }

View File

@ -2708,6 +2708,11 @@ typedef struct _cef_pdf_print_settings_t {
/// Set to true (1) to generate tagged (accessible) PDF. /// Set to true (1) to generate tagged (accessible) PDF.
/// ///
int generate_tagged_pdf; int generate_tagged_pdf;
///
/// Set to true (1) to generate a document outline.
///
int generate_document_outline;
} cef_pdf_print_settings_t; } cef_pdf_print_settings_t;
/// ///
@ -3416,7 +3421,8 @@ typedef enum {
CEF_CPAIT_SAVE_IBAN, CEF_CPAIT_SAVE_IBAN,
CEF_CPAIT_MANDATORY_REAUTH, CEF_CPAIT_MANDATORY_REAUTH,
CEF_CPAIT_PRICE_INSIGHTS, CEF_CPAIT_PRICE_INSIGHTS,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_INSIGHTS, CEF_CPAIT_PRICE_READ_ANYTHING,
CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_READ_ANYTHING,
} cef_chrome_page_action_icon_type_t; } cef_chrome_page_action_icon_type_t;
/// ///

View File

@ -251,8 +251,7 @@ typedef enum {
/// use by the File System Access API. /// use by the File System Access API.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY, CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY,
/// Controls access to the getDisplayMedia API when {preferCurrentTab: true} /// Controls access to the getDisplayMedia API.
/// is specified.
CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE, CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE,
/// Website setting to store permissions metadata granted to paths on the /// Website setting to store permissions metadata granted to paths on the
@ -289,7 +288,8 @@ typedef enum {
/// a specified account. When this is present it allows access to session /// a specified account. When this is present it allows access to session
/// management capabilities between the sites. This setting is associated /// management capabilities between the sites. This setting is associated
/// with the relying party's origin. /// with the relying party's origin.
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION, // Obsolete on Nov 2023.
CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION,
/// Setting to indicate whether Chrome should automatically apply darkening to /// Setting to indicate whether Chrome should automatically apply darkening to
/// web content. /// web content.
@ -384,6 +384,10 @@ typedef enum {
/// heuristics. /// heuristics.
CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS, CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS,
/// Whether the FSA Persistent Permissions restore prompt is eligible to be
/// shown to the user, for a given origin.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION,
CEF_CONTENT_SETTING_TYPE_NUM_TYPES, CEF_CONTENT_SETTING_TYPE_NUM_TYPES,
} cef_content_setting_types_t; } cef_content_setting_types_t;

View File

@ -683,6 +683,7 @@ struct CefPdfPrintSettingsTraits {
&target->footer_template, copy); &target->footer_template, copy);
target->generate_tagged_pdf = src->generate_tagged_pdf; target->generate_tagged_pdf = src->generate_tagged_pdf;
target->generate_document_outline = src->generate_document_outline;
} }
}; };

View File

@ -1273,7 +1273,7 @@ void AlloyBrowserHostImpl::RequestMediaAccessPermission(
bool AlloyBrowserHostImpl::CheckMediaAccessPermission( bool AlloyBrowserHostImpl::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& security_origin, const url::Origin& security_origin,
blink::mojom::MediaStreamType type) { blink::mojom::MediaStreamType type) {
return media_access_query::CheckMediaAccessPermission(this, render_frame_host, return media_access_query::CheckMediaAccessPermission(this, render_frame_host,
security_origin, type); security_origin, type);

View File

@ -262,7 +262,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
const content::MediaStreamRequest& request, const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) override; content::MediaResponseCallback callback) override;
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host, bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
const GURL& security_origin, const url::Origin& security_origin,
blink::mojom::MediaStreamType type) override; blink::mojom::MediaStreamType type) override;
bool IsNeverComposited(content::WebContents* web_contents) override; bool IsNeverComposited(content::WebContents* web_contents) override;
content::PictureInPictureResult EnterPictureInPicture( content::PictureInPictureResult EnterPictureInPicture(

View File

@ -69,7 +69,6 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/renderer_updater.h" #include "chrome/browser/profiles/renderer_updater.h"
#include "chrome/browser/profiles/renderer_updater_factory.h" #include "chrome/browser/profiles/renderer_updater_factory.h"
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
#include "chrome/browser/spellchecker/spell_check_host_chrome_impl.h" #include "chrome/browser/spellchecker/spell_check_host_chrome_impl.h"
#include "chrome/browser/ui/chrome_select_file_policy.h" #include "chrome/browser/ui/chrome_select_file_policy.h"
#include "chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h" #include "chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h"
@ -98,7 +97,6 @@
#include "content/browser/plugin_service_impl.h" #include "content/browser/plugin_service_impl.h"
#include "content/browser/renderer_host/render_frame_host_impl.h" #include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/client_certificate_delegate.h" #include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
@ -134,7 +132,6 @@
#include "net/ssl/ssl_cert_request_info.h" #include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_private_key.h" #include "net/ssl/ssl_private_key.h"
#include "pdf/pdf_features.h" #include "pdf/pdf_features.h"
#include "ppapi/host/ppapi_host.h"
#include "sandbox/policy/switches.h" #include "sandbox/policy/switches.h"
#include "services/network/public/cpp/network_switches.h" #include "services/network/public/cpp/network_switches.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
@ -561,17 +558,13 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
// Propagate the following switches to all command lines (along with any // Propagate the following switches to all command lines (along with any
// associated values) if present in the browser command line. // associated values) if present in the browser command line.
static const char* const kSwitchNames[] = { static const char* const kSwitchNames[] = {
switches::kDisablePackLoading, switches::kDisablePackLoading,
#if BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC)
switches::kFrameworkDirPath, switches::kFrameworkDirPath, switches::kMainBundlePath,
switches::kMainBundlePath,
#endif #endif
switches::kLocalesDirPath, switches::kLocalesDirPath, switches::kLogItems,
switches::kLogItems, switches::kLogSeverity, switches::kResourcesDirPath,
switches::kLogSeverity, embedder_support::kUserAgent, switches::kUserAgentProductAndVersion,
switches::kResourcesDirPath,
embedder_support::kUserAgent,
switches::kUserAgentProductAndVersion,
}; };
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames); command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames);
} }
@ -832,13 +825,6 @@ std::string AlloyContentBrowserClient::GetDefaultDownloadName() {
return "download"; return "download";
} }
void AlloyContentBrowserClient::DidCreatePpapiPlugin(
content::BrowserPpapiHost* browser_host) {
browser_host->GetPpapiHost()->AddHostFactoryFilter(
std::unique_ptr<ppapi::host::HostFactory>(
new ChromeBrowserPepperHostFactory(browser_host)));
}
std::unique_ptr<content::DevToolsManagerDelegate> std::unique_ptr<content::DevToolsManagerDelegate>
AlloyContentBrowserClient::CreateDevToolsManagerDelegate() { AlloyContentBrowserClient::CreateDevToolsManagerDelegate() {
return std::make_unique<CefDevToolsManagerDelegate>(); return std::make_unique<CefDevToolsManagerDelegate>();
@ -848,16 +834,6 @@ void AlloyContentBrowserClient::
RegisterAssociatedInterfaceBindersForRenderFrameHost( RegisterAssociatedInterfaceBindersForRenderFrameHost(
content::RenderFrameHost& render_frame_host, content::RenderFrameHost& render_frame_host,
blink::AssociatedInterfaceRegistry& associated_registry) { blink::AssociatedInterfaceRegistry& associated_registry) {
associated_registry.AddInterface<extensions::mojom::LocalFrameHost>(
base::BindRepeating(
[](content::RenderFrameHost* render_frame_host,
mojo::PendingAssociatedReceiver<extensions::mojom::LocalFrameHost>
receiver) {
extensions::ExtensionWebContentsObserver::BindLocalFrameHost(
std::move(receiver), render_frame_host);
},
&render_frame_host));
associated_registry.AddInterface<printing::mojom::PrintManagerHost>( associated_registry.AddInterface<printing::mojom::PrintManagerHost>(
base::BindRepeating( base::BindRepeating(
[](content::RenderFrameHost* render_frame_host, [](content::RenderFrameHost* render_frame_host,
@ -876,6 +852,37 @@ void AlloyContentBrowserClient::
std::make_unique<ChromePDFDocumentHelperClient>()); std::make_unique<ChromePDFDocumentHelperClient>());
}, },
&render_frame_host)); &render_frame_host));
associated_registry.AddInterface<chrome::mojom::PluginInfoHost>(
base::BindRepeating(&BindPluginInfoHost,
render_frame_host.GetProcess()->GetID()));
if (extensions::ExtensionsEnabled()) {
int render_process_id = render_frame_host.GetProcess()->GetID();
associated_registry.AddInterface<extensions::mojom::EventRouter>(
base::BindRepeating(&extensions::EventRouter::BindForRenderer,
render_process_id));
associated_registry.AddInterface<extensions::mojom::RendererHost>(
base::BindRepeating(&extensions::RendererStartupHelper::BindForRenderer,
render_process_id));
associated_registry.AddInterface<extensions::mojom::LocalFrameHost>(
base::BindRepeating(
[](content::RenderFrameHost* render_frame_host,
mojo::PendingAssociatedReceiver<
extensions::mojom::LocalFrameHost> receiver) {
extensions::ExtensionWebContentsObserver::BindLocalFrameHost(
std::move(receiver), render_frame_host);
},
&render_frame_host));
associated_registry.AddInterface<guest_view::mojom::GuestViewHost>(
base::BindRepeating(
&extensions::ExtensionsGuestView::CreateForComponents,
render_frame_host.GetGlobalId()));
associated_registry.AddInterface<extensions::mojom::GuestView>(
base::BindRepeating(
&extensions::ExtensionsGuestView::CreateForExtensions,
render_frame_host.GetGlobalId()));
}
} }
std::vector<std::unique_ptr<content::NavigationThrottle>> std::vector<std::unique_ptr<content::NavigationThrottle>>
@ -980,26 +987,6 @@ void AlloyContentBrowserClient::ExposeInterfacesToRenderer(
service_manager::BinderRegistry* registry, service_manager::BinderRegistry* registry,
blink::AssociatedInterfaceRegistry* associated_registry, blink::AssociatedInterfaceRegistry* associated_registry,
content::RenderProcessHost* host) { content::RenderProcessHost* host) {
associated_registry->AddInterface<chrome::mojom::PluginInfoHost>(
base::BindRepeating(&BindPluginInfoHost, host->GetID()));
if (extensions::ExtensionsEnabled()) {
associated_registry->AddInterface<extensions::mojom::EventRouter>(
base::BindRepeating(&extensions::EventRouter::BindForRenderer,
host->GetID()));
associated_registry->AddInterface<guest_view::mojom::GuestViewHost>(
base::BindRepeating(
&extensions::ExtensionsGuestView::CreateForComponents,
host->GetID()));
associated_registry->AddInterface<extensions::mojom::GuestView>(
base::BindRepeating(
&extensions::ExtensionsGuestView::CreateForExtensions,
host->GetID()));
associated_registry->AddInterface<extensions::mojom::RendererHost>(
base::BindRepeating(&extensions::RendererStartupHelper::BindForRenderer,
host->GetID()));
}
CefBrowserManager::ExposeInterfacesToRenderer(registry, associated_registry, CefBrowserManager::ExposeInterfacesToRenderer(registry, associated_registry,
host); host);
} }
@ -1038,7 +1025,6 @@ AlloyContentBrowserClient::CreateLoginDelegate(
void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories( void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
int frame_tree_node_id, int frame_tree_node_id,
ukm::SourceIdObj ukm_source_id,
NonNetworkURLLoaderFactoryMap* factories) { NonNetworkURLLoaderFactoryMap* factories) {
if (!extensions::ExtensionsEnabled()) { if (!extensions::ExtensionsEnabled()) {
return; return;
@ -1049,7 +1035,7 @@ void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
factories->emplace( factories->emplace(
extensions::kExtensionScheme, extensions::kExtensionScheme,
extensions::CreateExtensionNavigationURLLoaderFactory( extensions::CreateExtensionNavigationURLLoaderFactory(
web_contents->GetBrowserContext(), ukm_source_id, web_contents->GetBrowserContext(),
!!extensions::WebViewGuest::FromWebContents(web_contents))); !!extensions::WebViewGuest::FromWebContents(web_contents)));
} }
@ -1116,7 +1102,7 @@ bool AlloyContentBrowserClient::WillCreateURLLoaderFactory(
int render_process_id, int render_process_id,
URLLoaderFactoryType type, URLLoaderFactoryType type,
const url::Origin& request_initiator, const url::Origin& request_initiator,
absl::optional<int64_t> navigation_id, std::optional<int64_t> navigation_id,
ukm::SourceIdObj ukm_source_id, ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver, mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>* mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
@ -1205,7 +1191,7 @@ bool AlloyContentBrowserClient::HandleExternalProtocol(
network::mojom::WebSandboxFlags sandbox_flags, network::mojom::WebSandboxFlags sandbox_flags,
ui::PageTransition page_transition, ui::PageTransition page_transition,
bool has_user_gesture, bool has_user_gesture,
const absl::optional<url::Origin>& initiating_origin, const std::optional<url::Origin>& initiating_origin,
content::RenderFrameHost* initiator_document, content::RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) { mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
// Call the other HandleExternalProtocol variant. // Call the other HandleExternalProtocol variant.
@ -1220,7 +1206,7 @@ bool AlloyContentBrowserClient::HandleExternalProtocol(
bool is_in_fenced_frame_tree, bool is_in_fenced_frame_tree,
network::mojom::WebSandboxFlags sandbox_flags, network::mojom::WebSandboxFlags sandbox_flags,
const network::ResourceRequest& resource_request, const network::ResourceRequest& resource_request,
const absl::optional<url::Origin>& initiating_origin, const std::optional<url::Origin>& initiating_origin,
content::RenderFrameHost* initiator_document, content::RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) { mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver = mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver =
@ -1326,7 +1312,7 @@ base::FilePath AlloyContentBrowserClient::GetFirstPartySetsDirectory() {
return GetUserDataPath(); return GetUserDataPath();
} }
absl::optional<base::FilePath> std::optional<base::FilePath>
AlloyContentBrowserClient::GetLocalTracesDirectory() { AlloyContentBrowserClient::GetLocalTracesDirectory() {
return GetUserDataPath(); return GetUserDataPath();
} }

View File

@ -114,7 +114,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
blink::web_pref::WebPreferences* prefs) override; blink::web_pref::WebPreferences* prefs) override;
void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) override; void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) override;
std::string GetDefaultDownloadName() override; std::string GetDefaultDownloadName() override;
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
std::unique_ptr<content::DevToolsManagerDelegate> std::unique_ptr<content::DevToolsManagerDelegate>
CreateDevToolsManagerDelegate() override; CreateDevToolsManagerDelegate() override;
void RegisterAssociatedInterfaceBindersForRenderFrameHost( void RegisterAssociatedInterfaceBindersForRenderFrameHost(
@ -168,7 +167,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
LoginAuthRequiredCallback auth_required_callback) override; LoginAuthRequiredCallback auth_required_callback) override;
void RegisterNonNetworkNavigationURLLoaderFactories( void RegisterNonNetworkNavigationURLLoaderFactories(
int frame_tree_node_id, int frame_tree_node_id,
ukm::SourceIdObj ukm_source_id,
NonNetworkURLLoaderFactoryMap* factories) override; NonNetworkURLLoaderFactoryMap* factories) override;
void RegisterNonNetworkSubresourceURLLoaderFactories( void RegisterNonNetworkSubresourceURLLoaderFactories(
int render_process_id, int render_process_id,
@ -181,7 +179,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
int render_process_id, int render_process_id,
URLLoaderFactoryType type, URLLoaderFactoryType type,
const url::Origin& request_initiator, const url::Origin& request_initiator,
absl::optional<int64_t> navigation_id, std::optional<int64_t> navigation_id,
ukm::SourceIdObj ukm_source_id, ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver, mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>* mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
@ -211,7 +209,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
network::mojom::WebSandboxFlags sandbox_flags, network::mojom::WebSandboxFlags sandbox_flags,
ui::PageTransition page_transition, ui::PageTransition page_transition,
bool has_user_gesture, bool has_user_gesture,
const absl::optional<url::Origin>& initiating_origin, const std::optional<url::Origin>& initiating_origin,
content::RenderFrameHost* initiator_document, content::RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory)
override; override;
@ -223,7 +221,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
bool is_in_fenced_frame_tree, bool is_in_fenced_frame_tree,
network::mojom::WebSandboxFlags sandbox_flags, network::mojom::WebSandboxFlags sandbox_flags,
const network::ResourceRequest& request, const network::ResourceRequest& request,
const absl::optional<url::Origin>& initiating_origin, const std::optional<url::Origin>& initiating_origin,
content::RenderFrameHost* initiator_document, content::RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory)
override; override;
@ -244,7 +242,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
base::FilePath GetGraphiteDawnDiskCacheDirectory() override; base::FilePath GetGraphiteDawnDiskCacheDirectory() override;
base::FilePath GetNetLogDefaultDirectory() override; base::FilePath GetNetLogDefaultDirectory() override;
base::FilePath GetFirstPartySetsDirectory() override; base::FilePath GetFirstPartySetsDirectory() override;
absl::optional<base::FilePath> GetLocalTracesDirectory() override; std::optional<base::FilePath> GetLocalTracesDirectory() override;
std::string GetProduct() override; std::string GetProduct() override;
std::string GetChromeProduct() override; std::string GetChromeProduct() override;
std::string GetUserAgent() override; std::string GetUserAgent() override;

View File

@ -15,14 +15,12 @@
#include "content/public/browser/keyboard_event_processing_result.h" #include "content/public/browser/keyboard_event_processing_result.h"
#include "content/public/browser/navigation_entry.h" #include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_observer.h" #include "content/public/browser/render_widget_host_observer.h"
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/input/native_web_keyboard_event.h" #include "content/public/common/input/native_web_keyboard_event.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h" #include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h" #include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
#include "third_party/blink/public/mojom/widget/platform_widget.mojom-test-utils.h" #include "third_party/blink/public/mojom/widget/platform_widget.mojom-test-utils.h"
@ -86,17 +84,6 @@ void CefBrowserContentsDelegate::ObserveWebContents(
WebContentsObserver::Observe(new_contents); WebContentsObserver::Observe(new_contents);
if (new_contents) { if (new_contents) {
registrar_.reset(new content::NotificationRegistrar);
// When navigating through the history, the restored NavigationEntry's title
// will be used. If the entry ends up having the same title after we return
// to it, as will usually be the case, the
// NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED will then be suppressed, since
// the NavigationEntry's title hasn't changed.
registrar_->Add(this, content::NOTIFICATION_LOAD_STOP,
content::Source<content::NavigationController>(
&new_contents->GetController()));
// Make sure MaybeCreateFrame is called at least one time. // Make sure MaybeCreateFrame is called at least one time.
// Create the frame representation before OnAfterCreated is called for a new // Create the frame representation before OnAfterCreated is called for a new
// browser. // browser.
@ -106,8 +93,6 @@ void CefBrowserContentsDelegate::ObserveWebContents(
// Make sure RenderWidgetCreated is called at least one time. This Observer // Make sure RenderWidgetCreated is called at least one time. This Observer
// is registered too late to catch the initial creation. // is registered too late to catch the initial creation.
RenderWidgetCreated(new_contents->GetRenderViewHost()->GetWidget()); RenderWidgetCreated(new_contents->GetRenderViewHost()->GetWidget());
} else {
registrar_.reset();
} }
} }
@ -443,6 +428,8 @@ void CefBrowserContentsDelegate::DidStopLoading() {
for (const auto& frame : browser_info_->GetAllFrames()) { for (const auto& frame : browser_info_->GetAllFrames()) {
frame->MaybeSendDidStopLoading(); frame->MaybeSendDidStopLoading();
} }
OnTitleChange(web_contents()->GetTitle());
} }
void CefBrowserContentsDelegate::DidFinishNavigation( void CefBrowserContentsDelegate::DidFinishNavigation(
@ -532,8 +519,10 @@ void CefBrowserContentsDelegate::DidFinishLoad(
frame->RefreshAttributes(); frame->RefreshAttributes();
int http_status_code = 0; int http_status_code = 0;
if (auto response_headers = render_frame_host->GetLastResponseHeaders()) { if (auto response_head = render_frame_host->GetLastResponseHead()) {
http_status_code = response_headers->response_code(); if (response_head->headers) {
http_status_code = response_head->headers->response_code();
}
} }
OnLoadEnd(frame, validated_url, http_status_code); OnLoadEnd(frame, validated_url, http_status_code);
@ -591,17 +580,6 @@ void CefBrowserContentsDelegate::WebContentsDestroyed() {
} }
} }
void CefBrowserContentsDelegate::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK_EQ(type, content::NOTIFICATION_LOAD_STOP);
if (type == content::NOTIFICATION_LOAD_STOP) {
OnTitleChange(web_contents()->GetTitle());
}
}
bool CefBrowserContentsDelegate::OnSetFocus(cef_focus_source_t source) { bool CefBrowserContentsDelegate::OnSetFocus(cef_focus_source_t source) {
// SetFocus() might be called while inside the OnSetFocus() callback. If // SetFocus() might be called while inside the OnSetFocus() callback. If
// so, don't re-enter the callback. // so, don't re-enter the callback.

View File

@ -12,8 +12,6 @@
#include "base/callback_list.h" #include "base/callback_list.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_observer.h"
@ -49,8 +47,7 @@ constexpr inline CefBrowserContentsState operator|(
// Includes functionality that is shared by the alloy and chrome runtimes. // Includes functionality that is shared by the alloy and chrome runtimes.
// Only accessed on the UI thread. // Only accessed on the UI thread.
class CefBrowserContentsDelegate : public content::WebContentsDelegate, class CefBrowserContentsDelegate : public content::WebContentsDelegate,
public content::WebContentsObserver, public content::WebContentsObserver {
public content::NotificationObserver {
public: public:
using State = CefBrowserContentsState; using State = CefBrowserContentsState;
@ -143,11 +140,6 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
void OnFocusChangedInPage(content::FocusedNodeDetails* details) override; void OnFocusChangedInPage(content::FocusedNodeDetails* details) override;
void WebContentsDestroyed() override; void WebContentsDestroyed() override;
// NotificationObserver methods.
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
// Accessors for state information. Changes will be signaled to // Accessors for state information. Changes will be signaled to
// Observer::OnStateChanged. // Observer::OnStateChanged.
bool is_loading() const { return is_loading_; } bool is_loading() const { return is_loading_; }
@ -196,9 +188,6 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
// Observers that want to be notified of changes to this object. // Observers that want to be notified of changes to this object.
base::ObserverList<Observer> observers_; base::ObserverList<Observer> observers_;
// Used for managing notification subscriptions.
std::unique_ptr<content::NotificationRegistrar> registrar_;
// True if the focus is currently on an editable field on the page. // True if the focus is currently on an editable field on the page.
bool focus_on_editable_field_ = false; bool focus_on_editable_field_ = false;
}; };

View File

@ -235,7 +235,8 @@ void ChromeBrowserHostImpl::ShowDevToolsOnUIThread(
DevToolsWindow::InspectElement(web_contents->GetPrimaryMainFrame(), DevToolsWindow::InspectElement(web_contents->GetPrimaryMainFrame(),
inspect_element_at.x, inspect_element_at.y); inspect_element_at.x, inspect_element_at.y);
} else { } else {
DevToolsWindow::OpenDevToolsWindow(web_contents, profile); DevToolsWindow::OpenDevToolsWindow(web_contents, profile,
DevToolsOpenedByAction::kUnknown);
} }
// The DevTools browser host should now exist. // The DevTools browser host should now exist.

View File

@ -10,6 +10,7 @@
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/functional/bind.h" #include "base/functional/bind.h"
#include "base/functional/callback.h" #include "base/functional/callback.h"
#include "base/hash/md5.h"
#include "base/json/json_writer.h" #include "base/json/json_writer.h"
#include "base/json/values_util.h" #include "base/json/values_util.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"

View File

@ -38,24 +38,24 @@ namespace {
const char kNotImplementedError[] = "Not implemented"; const char kNotImplementedError[] = "Not implemented";
void ZoomModeToZoomSettings(zoom::ZoomController::ZoomMode zoom_mode, void ZoomModeToZoomSettings(zoom::ZoomController::ZoomMode zoom_mode,
api::tabs::ZoomSettings* zoom_settings) { tabs::ZoomSettings* zoom_settings) {
DCHECK(zoom_settings); DCHECK(zoom_settings);
switch (zoom_mode) { switch (zoom_mode) {
case zoom::ZoomController::ZOOM_MODE_DEFAULT: case zoom::ZoomController::ZOOM_MODE_DEFAULT:
zoom_settings->mode = api::tabs::ZOOM_SETTINGS_MODE_AUTOMATIC; zoom_settings->mode = tabs::ZoomSettingsMode::kAutomatic;
zoom_settings->scope = api::tabs::ZOOM_SETTINGS_SCOPE_PER_ORIGIN; zoom_settings->scope = tabs::ZoomSettingsScope::kPerOrigin;
break; break;
case zoom::ZoomController::ZOOM_MODE_ISOLATED: case zoom::ZoomController::ZOOM_MODE_ISOLATED:
zoom_settings->mode = api::tabs::ZOOM_SETTINGS_MODE_AUTOMATIC; zoom_settings->mode = tabs::ZoomSettingsMode::kAutomatic;
zoom_settings->scope = api::tabs::ZOOM_SETTINGS_SCOPE_PER_TAB; zoom_settings->scope = tabs::ZoomSettingsScope::kPerTab;
break; break;
case zoom::ZoomController::ZOOM_MODE_MANUAL: case zoom::ZoomController::ZOOM_MODE_MANUAL:
zoom_settings->mode = api::tabs::ZOOM_SETTINGS_MODE_MANUAL; zoom_settings->mode = tabs::ZoomSettingsMode::kManual;
zoom_settings->scope = api::tabs::ZOOM_SETTINGS_SCOPE_PER_TAB; zoom_settings->scope = tabs::ZoomSettingsScope::kPerTab;
break; break;
case zoom::ZoomController::ZOOM_MODE_DISABLED: case zoom::ZoomController::ZOOM_MODE_DISABLED:
zoom_settings->mode = api::tabs::ZOOM_SETTINGS_MODE_DISABLED; zoom_settings->mode = tabs::ZoomSettingsMode::kDisabled;
zoom_settings->scope = api::tabs::ZOOM_SETTINGS_SCOPE_PER_TAB; zoom_settings->scope = tabs::ZoomSettingsScope::kPerTab;
break; break;
} }
} }
@ -271,8 +271,8 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
if (!details_value.is_dict()) { if (!details_value.is_dict()) {
return set_init_result(VALIDATION_FAILURE); return set_init_result(VALIDATION_FAILURE);
} }
std::unique_ptr<InjectDetails> details(new InjectDetails()); auto details = InjectDetails::FromValue(details_value.GetDict());
if (!InjectDetails::Populate(details_value.GetDict(), *details)) { if (!details) {
return set_init_result(VALIDATION_FAILURE); return set_init_result(VALIDATION_FAILURE);
} }
@ -463,7 +463,7 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
} }
ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() { ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
using api::tabs::ZoomSettings; using tabs::ZoomSettings;
absl::optional<tabs::SetZoomSettings::Params> params = absl::optional<tabs::SetZoomSettings::Params> params =
tabs::SetZoomSettings::Params::Create(args()); tabs::SetZoomSettings::Params::Create(args());
@ -482,9 +482,9 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
} }
// "per-origin" scope is only available in "automatic" mode. // "per-origin" scope is only available in "automatic" mode.
if (params->zoom_settings.scope == tabs::ZOOM_SETTINGS_SCOPE_PER_ORIGIN && if (params->zoom_settings.scope == tabs::ZoomSettingsScope::kPerOrigin &&
params->zoom_settings.mode != tabs::ZOOM_SETTINGS_MODE_AUTOMATIC && params->zoom_settings.mode != tabs::ZoomSettingsMode::kAutomatic &&
params->zoom_settings.mode != tabs::ZOOM_SETTINGS_MODE_NONE) { params->zoom_settings.mode != tabs::ZoomSettingsMode::kNone) {
return RespondNow(Error(tabs_constants::kPerOriginOnlyInAutomaticError)); return RespondNow(Error(tabs_constants::kPerOriginOnlyInAutomaticError));
} }
@ -492,21 +492,21 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
// user-specified |zoom_settings|. // user-specified |zoom_settings|.
ZoomController::ZoomMode zoom_mode = ZoomController::ZOOM_MODE_DEFAULT; ZoomController::ZoomMode zoom_mode = ZoomController::ZOOM_MODE_DEFAULT;
switch (params->zoom_settings.mode) { switch (params->zoom_settings.mode) {
case tabs::ZOOM_SETTINGS_MODE_NONE: case tabs::ZoomSettingsMode::kNone:
case tabs::ZOOM_SETTINGS_MODE_AUTOMATIC: case tabs::ZoomSettingsMode::kAutomatic:
switch (params->zoom_settings.scope) { switch (params->zoom_settings.scope) {
case tabs::ZOOM_SETTINGS_SCOPE_NONE: case tabs::ZoomSettingsScope::kNone:
case tabs::ZOOM_SETTINGS_SCOPE_PER_ORIGIN: case tabs::ZoomSettingsScope::kPerOrigin:
zoom_mode = ZoomController::ZOOM_MODE_DEFAULT; zoom_mode = ZoomController::ZOOM_MODE_DEFAULT;
break; break;
case tabs::ZOOM_SETTINGS_SCOPE_PER_TAB: case tabs::ZoomSettingsScope::kPerTab:
zoom_mode = ZoomController::ZOOM_MODE_ISOLATED; zoom_mode = ZoomController::ZOOM_MODE_ISOLATED;
} }
break; break;
case tabs::ZOOM_SETTINGS_MODE_MANUAL: case tabs::ZoomSettingsMode::kManual:
zoom_mode = ZoomController::ZOOM_MODE_MANUAL; zoom_mode = ZoomController::ZOOM_MODE_MANUAL;
break; break;
case tabs::ZOOM_SETTINGS_MODE_DISABLED: case tabs::ZoomSettingsMode::kDisabled:
zoom_mode = ZoomController::ZOOM_MODE_DISABLED; zoom_mode = ZoomController::ZOOM_MODE_DISABLED;
} }
@ -529,13 +529,13 @@ ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
ZoomController::FromWebContents(web_contents); ZoomController::FromWebContents(web_contents);
ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode();
api::tabs::ZoomSettings zoom_settings; tabs::ZoomSettings zoom_settings;
ZoomModeToZoomSettings(zoom_mode, &zoom_settings); ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
zoom_settings.default_zoom_factor = zoom_settings.default_zoom_factor =
blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()); blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel());
return RespondNow( return RespondNow(
ArgumentList(api::tabs::GetZoomSettings::Results::Create(zoom_settings))); ArgumentList(tabs::GetZoomSettings::Results::Create(zoom_settings)));
} }
} // namespace cef } // namespace cef

View File

@ -25,22 +25,15 @@
namespace extensions { namespace extensions {
namespace {
bool InsertWebContents(std::vector<content::WebContents*>* vector,
content::WebContents* web_contents) {
vector->push_back(web_contents);
return false; // Continue iterating.
}
} // namespace
void GetAllGuestsForOwnerContents(content::WebContents* owner, void GetAllGuestsForOwnerContents(content::WebContents* owner,
std::vector<content::WebContents*>* guests) { std::vector<content::WebContents*>* guests) {
content::BrowserPluginGuestManager* plugin_guest_manager = content::BrowserPluginGuestManager* plugin_guest_manager =
owner->GetBrowserContext()->GetGuestManager(); owner->GetBrowserContext()->GetGuestManager();
plugin_guest_manager->ForEachGuest( plugin_guest_manager->ForEachGuest(
owner, base::BindRepeating(InsertWebContents, guests)); owner, [guests](content::WebContents* web_contents) {
guests->push_back(web_contents);
return false; // Continue iterating.
});
} }
content::WebContents* GetOwnerForGuestContents(content::WebContents* guest) { content::WebContents* GetOwnerForGuestContents(content::WebContents* guest) {

View File

@ -421,13 +421,11 @@ api::tabs::Tab CefExtensionFunctionDetails::CreateTabObject(
int index) const { int index) const {
content::WebContents* contents = new_browser->web_contents(); content::WebContents* contents = new_browser->web_contents();
bool is_loading = contents->IsLoading();
api::tabs::Tab tab_object; api::tabs::Tab tab_object;
tab_object.id = new_browser->GetIdentifier(); tab_object.id = new_browser->GetIdentifier();
tab_object.index = index; tab_object.index = index;
tab_object.window_id = *tab_object.id; tab_object.window_id = *tab_object.id;
tab_object.status = is_loading ? api::tabs::TAB_STATUS_LOADING tab_object.status = ExtensionTabUtil::GetLoadingStatus(contents);
: api::tabs::TAB_STATUS_COMPLETE;
tab_object.active = active; tab_object.active = active;
tab_object.selected = true; tab_object.selected = true;
tab_object.highlighted = true; tab_object.highlighted = true;

View File

@ -51,7 +51,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
bool CefExtensionHostDelegate::CheckMediaAccessPermission( bool CefExtensionHostDelegate::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& security_origin, const url::Origin& security_origin,
blink::mojom::MediaStreamType type, blink::mojom::MediaStreamType type,
const Extension* extension) { const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl. // Never routed here from AlloyBrowserHostImpl.

View File

@ -34,7 +34,7 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
content::MediaResponseCallback callback, content::MediaResponseCallback callback,
const Extension* extension) override; const Extension* extension) override;
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host, bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
const GURL& security_origin, const url::Origin& security_origin,
blink::mojom::MediaStreamType type, blink::mojom::MediaStreamType type,
const Extension* extension) override; const Extension* extension) override;
content::PictureInPictureResult EnterPictureInPicture( content::PictureInPictureResult EnterPictureInPicture(

View File

@ -296,7 +296,7 @@ bool CheckCommandLinePermission() {
bool CheckMediaAccessPermission(CefBrowserHostBase* browser, bool CheckMediaAccessPermission(CefBrowserHostBase* browser,
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& security_origin, const url::Origin& security_origin,
blink::mojom::MediaStreamType type) { blink::mojom::MediaStreamType type) {
// Always allowed here. RequestMediaAccessPermission will be called. // Always allowed here. RequestMediaAccessPermission will be called.
return true; return true;

View File

@ -12,15 +12,18 @@ namespace content {
class RenderFrameHost; class RenderFrameHost;
} }
namespace url {
class Origin;
}
class CefBrowserHostBase; class CefBrowserHostBase;
class GURL;
namespace media_access_query { namespace media_access_query {
// Called from WebContentsDelegate::CheckMediaAccessPermission. // Called from WebContentsDelegate::CheckMediaAccessPermission.
bool CheckMediaAccessPermission(CefBrowserHostBase* browser, bool CheckMediaAccessPermission(CefBrowserHostBase* browser,
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& security_origin, const url::Origin& security_origin,
blink::mojom::MediaStreamType type); blink::mojom::MediaStreamType type);
// Called from WebContentsDelegate::RequestMediaAccessPermission. // Called from WebContentsDelegate::RequestMediaAccessPermission.

View File

@ -17,9 +17,9 @@
#include "ui/events/platform/x11/x11_event_source.h" #include "ui/events/platform/x11/x11_event_source.h"
#include "ui/events/x/x11_event_translation.h" #include "ui/events/x/x11_event_translation.h"
#include "ui/gfx/x/connection.h" #include "ui/gfx/x/connection.h"
#include "ui/gfx/x/x11_window_event_manager.h" #include "ui/gfx/x/visual_manager.h"
#include "ui/gfx/x/window_event_manager.h"
#include "ui/gfx/x/xinput.h" #include "ui/gfx/x/xinput.h"
#include "ui/gfx/x/xproto_util.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
namespace { namespace {
@ -34,8 +34,10 @@ const char kXdndProxy[] = "XdndProxy";
// Return true if |window| has any property with |property_name|. // Return true if |window| has any property with |property_name|.
// Deleted from ui/base/x/x11_util.h in https://crrev.com/62fc260067. // Deleted from ui/base/x/x11_util.h in https://crrev.com/62fc260067.
bool PropertyExists(x11::Window window, x11::Atom property) { bool PropertyExists(x11::Connection* connection,
auto response = x11::Connection::Get() x11::Window window,
x11::Atom property) {
auto response = connection
->GetProperty(x11::GetPropertyRequest{ ->GetProperty(x11::GetPropertyRequest{
.window = window, .window = window,
.property = property, .property = property,
@ -47,16 +49,16 @@ bool PropertyExists(x11::Window window, x11::Atom property) {
// Returns true if |window| is visible. // Returns true if |window| is visible.
// Deleted from ui/base/x/x11_util.h in https://crrev.com/62fc260067. // Deleted from ui/base/x/x11_util.h in https://crrev.com/62fc260067.
bool IsWindowVisible(x11::Window window) { bool IsWindowVisible(x11::Connection* connection, x11::Window window) {
auto response = x11::Connection::Get()->GetWindowAttributes({window}).Sync(); auto response = connection->GetWindowAttributes({window}).Sync();
if (!response || response->map_state != x11::MapState::Viewable) { if (!response || response->map_state != x11::MapState::Viewable) {
return false; return false;
} }
// Minimized windows are not visible. // Minimized windows are not visible.
std::vector<x11::Atom> wm_states; std::vector<x11::Atom> wm_states;
if (x11::GetArrayProperty(window, x11::GetAtom("_NET_WM_STATE"), if (connection->GetArrayProperty(window, x11::GetAtom("_NET_WM_STATE"),
&wm_states)) { &wm_states)) {
x11::Atom hidden_atom = x11::GetAtom("_NET_WM_STATE_HIDDEN"); x11::Atom hidden_atom = x11::GetAtom("_NET_WM_STATE_HIDDEN");
if (base::Contains(wm_states, hidden_atom)) { if (base::Contains(wm_states, hidden_atom)) {
return false; return false;
@ -70,8 +72,8 @@ bool IsWindowVisible(x11::Window window) {
return true; return true;
} }
x11::Window FindChild(x11::Window window) { x11::Window FindChild(x11::Connection* connection, x11::Window window) {
auto query_tree = x11::Connection::Get()->QueryTree({window}).Sync(); auto query_tree = connection->QueryTree({window}).Sync();
if (query_tree && query_tree->children.size() == 1U) { if (query_tree && query_tree->children.size() == 1U) {
return query_tree->children[0]; return query_tree->children[0];
} }
@ -79,17 +81,19 @@ x11::Window FindChild(x11::Window window) {
return x11::Window::None; return x11::Window::None;
} }
x11::Window FindToplevelParent(x11::Window window) { x11::Window FindToplevelParent(x11::Connection* connection,
x11::Window window) {
x11::Window top_level_window = window; x11::Window top_level_window = window;
do { do {
auto query_tree = x11::Connection::Get()->QueryTree({window}).Sync(); auto query_tree = connection->QueryTree({window}).Sync();
if (!query_tree) { if (!query_tree) {
break; break;
} }
top_level_window = window; top_level_window = window;
if (!PropertyExists(query_tree->parent, x11::GetAtom(kNetWMPid)) || if (!PropertyExists(connection, query_tree->parent,
x11::GetAtom(kNetWMPid)) ||
query_tree->parent == query_tree->root) { query_tree->parent == query_tree->root) {
break; break;
} }
@ -125,7 +129,7 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
x11::VisualId visual; x11::VisualId visual;
uint8_t depth; uint8_t depth;
x11::ColorMap colormap; x11::ColorMap colormap;
ui::XVisualManager::GetInstance()->ChooseVisualForWindow( connection_->GetOrCreateVisualManager().ChooseVisualForWindow(
/*want_argb_visual=*/false, &visual, &depth, &colormap, /*want_argb_visual=*/false, &visual, &depth, &colormap,
/*visual_has_alpha=*/nullptr); /*visual_has_alpha=*/nullptr);
@ -150,8 +154,7 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
auto event_mask = x11::EventMask::FocusChange | auto event_mask = x11::EventMask::FocusChange |
x11::EventMask::StructureNotify | x11::EventMask::StructureNotify |
x11::EventMask::PropertyChange; x11::EventMask::PropertyChange;
xwindow_events_ = xwindow_events_ = connection_->ScopedSelectEvent(xwindow_, event_mask);
std::make_unique<x11::XScopedEventSelector>(xwindow_, event_mask);
connection_->Flush(); connection_->Flush();
@ -163,13 +166,13 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
x11::GetAtom(kWMDeleteWindow), x11::GetAtom(kWMDeleteWindow),
x11::GetAtom(kNetWMPing), x11::GetAtom(kNetWMPing),
}; };
x11::SetArrayProperty(xwindow_, x11::GetAtom(kWMProtocols), x11::Atom::ATOM, connection_->SetArrayProperty(xwindow_, x11::GetAtom(kWMProtocols),
protocols); x11::Atom::ATOM, protocols);
// We need a WM_CLIENT_MACHINE value so we integrate with the desktop // We need a WM_CLIENT_MACHINE value so we integrate with the desktop
// environment. // environment.
x11::SetStringProperty(xwindow_, x11::Atom::WM_CLIENT_MACHINE, connection_->SetStringProperty(xwindow_, x11::Atom::WM_CLIENT_MACHINE,
x11::Atom::STRING, net::GetHostName()); x11::Atom::STRING, net::GetHostName());
// Likewise, the X server needs to know this window's pid so it knows which // Likewise, the X server needs to know this window's pid so it knows which
// program to kill if the window hangs. // program to kill if the window hangs.
@ -177,14 +180,15 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
static_assert(sizeof(uint32_t) >= sizeof(pid_t), static_assert(sizeof(uint32_t) >= sizeof(pid_t),
"pid_t should not be larger than uint32_t"); "pid_t should not be larger than uint32_t");
uint32_t pid = getpid(); uint32_t pid = getpid();
x11::SetProperty(xwindow_, x11::GetAtom(kNetWMPid), x11::Atom::CARDINAL, pid); connection_->SetProperty(xwindow_, x11::GetAtom(kNetWMPid),
x11::Atom::CARDINAL, pid);
// Set the initial window name, if provided. // Set the initial window name, if provided.
if (!title.empty()) { if (!title.empty()) {
x11::SetStringProperty(xwindow_, x11::Atom::WM_NAME, x11::Atom::STRING, connection_->SetStringProperty(xwindow_, x11::Atom::WM_NAME,
title); x11::Atom::STRING, title);
x11::SetStringProperty(xwindow_, x11::Atom::WM_ICON_NAME, x11::Atom::STRING, connection_->SetStringProperty(xwindow_, x11::Atom::WM_ICON_NAME,
title); x11::Atom::STRING, title);
} }
} }
@ -220,13 +224,13 @@ void CefWindowX11::Show() {
if (!window_mapped_) { if (!window_mapped_) {
// Before we map the window, set size hints. Otherwise, some window managers // Before we map the window, set size hints. Otherwise, some window managers
// will ignore toplevel XMoveWindow commands. // will ignore toplevel XMoveWindow commands.
ui::SizeHints size_hints; x11::SizeHints size_hints;
memset(&size_hints, 0, sizeof(size_hints)); memset(&size_hints, 0, sizeof(size_hints));
ui::GetWmNormalHints(xwindow_, &size_hints); connection_->GetWmNormalHints(xwindow_, &size_hints);
size_hints.flags |= ui::SIZE_HINT_P_POSITION; size_hints.flags |= x11::SIZE_HINT_P_POSITION;
size_hints.x = bounds_.x(); size_hints.x = bounds_.x();
size_hints.y = bounds_.y(); size_hints.y = bounds_.y();
ui::SetWmNormalHints(xwindow_, size_hints); connection_->SetWmNormalHints(xwindow_, size_hints);
connection_->MapWindow({xwindow_}); connection_->MapWindow({xwindow_});
@ -236,8 +240,8 @@ void CefWindowX11::Show() {
// Setup the drag and drop proxy on the top level window of the application // Setup the drag and drop proxy on the top level window of the application
// to be the child of this window. // to be the child of this window.
auto child = FindChild(xwindow_); auto child = FindChild(connection_, xwindow_);
auto toplevel_window = FindToplevelParent(xwindow_); auto toplevel_window = FindToplevelParent(connection_, xwindow_);
DCHECK_NE(toplevel_window, x11::Window::None); DCHECK_NE(toplevel_window, x11::Window::None);
if (child != x11::Window::None && toplevel_window != x11::Window::None) { if (child != x11::Window::None && toplevel_window != x11::Window::None) {
// Configure the drag&drop proxy property for the top-most window so // Configure the drag&drop proxy property for the top-most window so
@ -246,14 +250,15 @@ void CefWindowX11::Show() {
// DesktopDragDropClientAuraX11::FindWindowFor. // DesktopDragDropClientAuraX11::FindWindowFor.
x11::Window window = x11::Window::None; x11::Window window = x11::Window::None;
auto dndproxy_atom = x11::GetAtom(kXdndProxy); auto dndproxy_atom = x11::GetAtom(kXdndProxy);
x11::GetProperty(toplevel_window, dndproxy_atom, &window); connection_->GetPropertyAs(toplevel_window, dndproxy_atom, &window);
if (window != child) { if (window != child) {
// Set the proxy target for the top-most window. // Set the proxy target for the top-most window.
x11::SetProperty(toplevel_window, dndproxy_atom, x11::Atom::WINDOW, connection_->SetProperty(toplevel_window, dndproxy_atom,
child); x11::Atom::WINDOW, child);
// Do the same for the proxy target per the spec. // Do the same for the proxy target per the spec.
x11::SetProperty(child, dndproxy_atom, x11::Atom::WINDOW, child); connection_->SetProperty(child, dndproxy_atom, x11::Atom::WINDOW,
child);
} }
} }
} }
@ -265,7 +270,7 @@ void CefWindowX11::Hide() {
} }
if (window_mapped_) { if (window_mapped_) {
ui::WithdrawWindow(xwindow_); connection_->WithdrawWindow(xwindow_);
window_mapped_ = false; window_mapped_ = false;
} }
} }
@ -278,8 +283,8 @@ void CefWindowX11::Focus() {
x11::Window focus_target = xwindow_; x11::Window focus_target = xwindow_;
if (browser_.get()) { if (browser_.get()) {
auto child = FindChild(xwindow_); auto child = FindChild(connection_, xwindow_);
if (child != x11::Window::None && IsWindowVisible(child)) { if (child != x11::Window::None && IsWindowVisible(connection_, child)) {
// Give focus to the child DesktopWindowTreeHostLinux. // Give focus to the child DesktopWindowTreeHostLinux.
focus_target = child; focus_target = child;
} }
@ -331,7 +336,7 @@ gfx::Rect CefWindowX11::GetBoundsInScreen() {
views::DesktopWindowTreeHostLinux* CefWindowX11::GetHost() { views::DesktopWindowTreeHostLinux* CefWindowX11::GetHost() {
if (browser_.get()) { if (browser_.get()) {
auto child = FindChild(xwindow_); auto child = FindChild(connection_, xwindow_);
if (child != x11::Window::None) { if (child != x11::Window::None) {
return static_cast<views::DesktopWindowTreeHostLinux*>( return static_cast<views::DesktopWindowTreeHostLinux*>(
views::DesktopWindowTreeHostLinux::GetHostForWidget( views::DesktopWindowTreeHostLinux::GetHostForWidget(
@ -373,14 +378,14 @@ void CefWindowX11::ContinueFocus() {
} }
bool CefWindowX11::TopLevelAlwaysOnTop() const { bool CefWindowX11::TopLevelAlwaysOnTop() const {
auto toplevel_window = FindToplevelParent(xwindow_); auto toplevel_window = FindToplevelParent(connection_, xwindow_);
if (toplevel_window == x11::Window::None) { if (toplevel_window == x11::Window::None) {
return false; return false;
} }
std::vector<x11::Atom> wm_states; std::vector<x11::Atom> wm_states;
if (x11::GetArrayProperty(toplevel_window, x11::GetAtom(kNetWMState), if (connection_->GetArrayProperty(toplevel_window, x11::GetAtom(kNetWMState),
&wm_states)) { &wm_states)) {
x11::Atom keep_above_atom = x11::GetAtom(kNetWMStateKeepAbove); x11::Atom keep_above_atom = x11::GetAtom(kNetWMStateKeepAbove);
if (base::Contains(wm_states, keep_above_atom)) { if (base::Contains(wm_states, keep_above_atom)) {
return true; return true;
@ -399,7 +404,7 @@ void CefWindowX11::ProcessXEvent(const x11::Event& event) {
configure->height); configure->height);
if (browser_.get()) { if (browser_.get()) {
auto child = FindChild(xwindow_); auto child = FindChild(connection_, xwindow_);
if (child != x11::Window::None) { if (child != x11::Window::None) {
// Resize the child DesktopWindowTreeHostLinux to match this window. // Resize the child DesktopWindowTreeHostLinux to match this window.
x11::ConfigureWindowRequest req{ x11::ConfigureWindowRequest req{
@ -434,9 +439,9 @@ void CefWindowX11::ProcessXEvent(const x11::Event& event) {
} else if (protocol == x11::GetAtom(kNetWMPing)) { } else if (protocol == x11::GetAtom(kNetWMPing)) {
x11::ClientMessageEvent reply_event = *client; x11::ClientMessageEvent reply_event = *client;
reply_event.window = parent_xwindow_; reply_event.window = parent_xwindow_;
x11::SendEvent(reply_event, reply_event.window, connection_->SendEvent(reply_event, reply_event.window,
x11::EventMask::SubstructureNotify | x11::EventMask::SubstructureNotify |
x11::EventMask::SubstructureRedirect); x11::EventMask::SubstructureRedirect);
} }
} }
} else if (auto* focus = event.As<x11::FocusEvent>()) { } else if (auto* focus = event.As<x11::FocusEvent>()) {
@ -466,15 +471,15 @@ void CefWindowX11::ProcessXEvent(const x11::Event& event) {
if (property->atom == wm_state_atom) { if (property->atom == wm_state_atom) {
// State change event like minimize/maximize. // State change event like minimize/maximize.
if (browser_.get()) { if (browser_.get()) {
auto child = FindChild(xwindow_); auto child = FindChild(connection_, xwindow_);
if (child != x11::Window::None) { if (child != x11::Window::None) {
// Forward the state change to the child DesktopWindowTreeHostLinux // Forward the state change to the child DesktopWindowTreeHostLinux
// window so that resource usage will be reduced while the window is // window so that resource usage will be reduced while the window is
// minimized. |atom_list| may be empty. // minimized. |atom_list| may be empty.
std::vector<x11::Atom> atom_list; std::vector<x11::Atom> atom_list;
x11::GetArrayProperty(xwindow_, wm_state_atom, &atom_list); connection_->GetArrayProperty(xwindow_, wm_state_atom, &atom_list);
x11::SetArrayProperty(child, wm_state_atom, x11::Atom::ATOM, connection_->SetArrayProperty(child, wm_state_atom, x11::Atom::ATOM,
atom_list); atom_list);
} }
} }
} }

View File

@ -7,19 +7,13 @@
#define CEF_LIBCEF_BROWSER_NATIVE_WINDOW_X11_H_ #define CEF_LIBCEF_BROWSER_NATIVE_WINDOW_X11_H_
#pragma once #pragma once
#include <memory>
#include "include/internal/cef_ptr.h" #include "include/internal/cef_ptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "ui/events/platform/platform_event_dispatcher.h" #include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/connection.h" #include "ui/gfx/x/connection.h"
#include "ui/gfx/x/x11_atom_cache.h"
namespace x11 {
class XScopedEventSelector;
}
namespace views { namespace views {
class DesktopWindowTreeHostLinux; class DesktopWindowTreeHostLinux;
@ -82,7 +76,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
x11::Window xwindow_; x11::Window xwindow_;
// Events selected on |xwindow_|. // Events selected on |xwindow_|.
std::unique_ptr<x11::XScopedEventSelector> xwindow_events_; x11::ScopedEventSelector xwindow_events_;
// Is the window mapped to the screen? // Is the window mapped to the screen?
bool window_mapped_ = false; bool window_mapped_ = false;

View File

@ -300,11 +300,10 @@ bool CefCookieManagerImpl::SetCookieInternal(
auto canonical_cookie = net::CanonicalCookie::CreateSanitizedCookie( auto canonical_cookie = net::CanonicalCookie::CreateSanitizedCookie(
url, name, value, domain, path, url, name, value, domain, path,
base::Time(), // Creation time. /*creation_time=*/base::Time(), expiration_time,
expiration_time, /*last_access_time=*/base::Time(), cookie.secure ? true : false,
base::Time(), // Last access time. cookie.httponly ? true : false, same_site, priority,
cookie.secure ? true : false, cookie.httponly ? true : false, same_site, /*partition_key=*/absl::nullopt);
priority, /*same_party=*/false, /*partition_key=*/absl::nullopt);
if (!canonical_cookie) { if (!canonical_cookie) {
SetCookieCallbackImpl( SetCookieCallbackImpl(

View File

@ -895,6 +895,13 @@ const viz::LocalSurfaceId& CefRenderWidgetHostViewOSR::GetLocalSurfaceId()
->GetOrCreateLocalSurfaceId(); ->GetOrCreateLocalSurfaceId();
} }
void CefRenderWidgetHostViewOSR::UpdateFrameSinkIdRegistration() {
RenderWidgetHostViewBase::UpdateFrameSinkIdRegistration();
if (delegated_frame_host_) {
delegated_frame_host_->SetIsFrameSinkIdOwner(is_frame_sink_id_owner());
}
}
const viz::FrameSinkId& CefRenderWidgetHostViewOSR::GetFrameSinkId() const { const viz::FrameSinkId& CefRenderWidgetHostViewOSR::GetFrameSinkId() const {
return delegated_frame_host_ return delegated_frame_host_
? delegated_frame_host_->frame_sink_id() ? delegated_frame_host_->frame_sink_id()

View File

@ -196,6 +196,7 @@ class CefRenderWidgetHostViewOSR
size_t offset, size_t offset,
const gfx::Range& range) override; const gfx::Range& range) override;
const viz::LocalSurfaceId& GetLocalSurfaceId() const override; const viz::LocalSurfaceId& GetLocalSurfaceId() const override;
void UpdateFrameSinkIdRegistration() override;
const viz::FrameSinkId& GetFrameSinkId() const override; const viz::FrameSinkId& GetFrameSinkId() const override;
viz::FrameSinkId GetRootFrameSinkId() override; viz::FrameSinkId GetRootFrameSinkId() override;
void NotifyHostAndDelegateOnWasShown( void NotifyHostAndDelegateOnWasShown(

View File

@ -62,6 +62,7 @@
#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_search_api/safe_search_util.h" #include "components/safe_search_api/safe_search_util.h"
#include "components/spellcheck/browser/pref_names.h" #include "components/spellcheck/browser/pref_names.h"
#include "components/supervised_user/core/common/buildflags.h"
#include "components/sync_preferences/pref_service_syncable.h" #include "components/sync_preferences/pref_service_syncable.h"
#include "components/sync_preferences/pref_service_syncable_factory.h" #include "components/sync_preferences/pref_service_syncable_factory.h"
#include "components/unified_consent/unified_consent_service.h" #include "components/unified_consent/unified_consent_service.h"
@ -245,7 +246,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
// Based on chrome/browser/ui/browser_ui_prefs.cc RegisterBrowserUserPrefs. // Based on chrome/browser/ui/browser_ui_prefs.cc RegisterBrowserUserPrefs.
registry->RegisterBooleanPref(prefs::kPrintPreviewUseSystemDefaultPrinter, registry->RegisterBooleanPref(prefs::kPrintPreviewUseSystemDefaultPrinter,
false); false);
registry->RegisterBooleanPref(prefs::kWebRTCAllowLegacyTLSProtocols, false);
// Profile preferences. // Profile preferences.
// Based on chrome/browser/profiles/profiles_state.cc RegisterPrefs. // Based on chrome/browser/profiles/profiles_state.cc RegisterPrefs.

View File

@ -118,7 +118,7 @@ void PrintToPDF(content::WebContents* web_contents,
margin_top, margin_bottom, margin_left, margin_right, margin_top, margin_bottom, margin_left, margin_right,
CefString(&settings.header_template), CefString(&settings.header_template),
CefString(&settings.footer_template), !!settings.prefer_css_page_size, CefString(&settings.footer_template), !!settings.prefer_css_page_size,
!!settings.generate_tagged_pdf); !!settings.generate_tagged_pdf, !!settings.generate_document_outline);
if (absl::holds_alternative<std::string>(print_pages_params)) { if (absl::holds_alternative<std::string>(print_pages_params)) {
LOG(ERROR) << "PrintToPDF failed with error: " LOG(ERROR) << "PrintToPDF failed with error: "

View File

@ -76,8 +76,8 @@ void CefSSLHostStateDelegate::SetHttpsEnforcementForHost(
// Intentional no-op. // Intentional no-op.
} }
bool CefSSLHostStateDelegate::IsHttpsEnforcedForHost( bool CefSSLHostStateDelegate::IsHttpsEnforcedForUrl(
const std::string& host, const GURL& url,
content::StoragePartition* storage_partition) { content::StoragePartition* storage_partition) {
// Intentional no-op. Return value does not matter as HTTPS-First Mode is not // Intentional no-op. Return value does not matter as HTTPS-First Mode is not
// enabled. // enabled.

View File

@ -77,8 +77,8 @@ class CefSSLHostStateDelegate : public content::SSLHostStateDelegate {
const std::string& host, const std::string& host,
bool enforce, bool enforce,
content::StoragePartition* storage_partition) override; content::StoragePartition* storage_partition) override;
bool IsHttpsEnforcedForHost( bool IsHttpsEnforcedForUrl(
const std::string& host, const GURL& url,
content::StoragePartition* storage_partition) override; content::StoragePartition* storage_partition) override;
void RevokeUserAllowExceptions(const std::string& host) override; void RevokeUserAllowExceptions(const std::string& host) override;
bool HasAllowException(const std::string& host, bool HasAllowException(const std::string& host,

View File

@ -80,8 +80,9 @@ CEF_LABEL_BUTTON_IMPL_T void CEF_LABEL_BUTTON_IMPL_D::SetImage(
if (image) { if (image) {
image_skia = static_cast<CefImageImpl*>(image.get())->AsImageSkia(); image_skia = static_cast<CefImageImpl*>(image.get())->AsImageSkia();
} }
ParentClass::root_view()->SetImage( ParentClass::root_view()->SetImageModel(
static_cast<views::Button::ButtonState>(button_state), image_skia); static_cast<views::Button::ButtonState>(button_state),
ui::ImageModel::FromImageSkia(image_skia));
} }
CEF_LABEL_BUTTON_IMPL_T CefRefPtr<CefImage> CEF_LABEL_BUTTON_IMPL_D::GetImage( CEF_LABEL_BUTTON_IMPL_T CefRefPtr<CefImage> CEF_LABEL_BUTTON_IMPL_D::GetImage(

View File

@ -25,8 +25,7 @@
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
#if BUILDFLAG(OZONE_PLATFORM_X11) #if BUILDFLAG(OZONE_PLATFORM_X11)
#include "ui/gfx/x/x11_atom_cache.h" #include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/xproto_util.h"
#include "ui/linux/linux_ui_delegate.h" #include "ui/linux/linux_ui_delegate.h"
#endif #endif
#endif #endif
@ -547,12 +546,14 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) {
view_util::GetWindowHandle(host_widget)); view_util::GetWindowHandle(host_widget));
CHECK(parent); CHECK(parent);
auto connection = x11::Connection::Get();
if (cef_delegate() && cef_delegate()->IsWindowModalDialog(GetCefWindow())) { if (cef_delegate() && cef_delegate()->IsWindowModalDialog(GetCefWindow())) {
// The presence of _NET_WM_STATE_MODAL in _NET_SUPPORTED indicates // The presence of _NET_WM_STATE_MODAL in _NET_SUPPORTED indicates
// possible window manager support. However, some window managers still // possible window manager support. However, some window managers still
// don't support this properly. // don't support this properly.
x11::Atom modal_atom = x11::GetAtom("_NET_WM_STATE_MODAL"); x11::Atom modal_atom = x11::GetAtom("_NET_WM_STATE_MODAL");
if (ui::WmSupportsHint(modal_atom)) { if (connection->WmSupportsHint(modal_atom)) {
ui::SetWMSpecState(x11window, true, modal_atom, x11::Atom::None); ui::SetWMSpecState(x11window, true, modal_atom, x11::Atom::None);
} else { } else {
LOG(ERROR) LOG(ERROR)
@ -561,11 +562,11 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) {
} }
// From GtkUiPlatformX11::SetGtkWidgetTransientFor: // From GtkUiPlatformX11::SetGtkWidgetTransientFor:
x11::SetProperty(x11window, x11::Atom::WM_TRANSIENT_FOR, x11::Atom::WINDOW, connection->SetProperty(x11window, x11::Atom::WM_TRANSIENT_FOR,
parent); x11::Atom::WINDOW, parent);
x11::SetProperty(x11window, x11::GetAtom("_NET_WM_WINDOW_TYPE"), connection->SetProperty(x11window, x11::GetAtom("_NET_WM_WINDOW_TYPE"),
x11::Atom::ATOM, x11::Atom::ATOM,
x11::GetAtom("_NET_WM_WINDOW_TYPE_DIALOG")); x11::GetAtom("_NET_WM_WINDOW_TYPE_DIALOG"));
ui::LinuxUiDelegate::GetInstance()->SetTransientWindowForParent( ui::LinuxUiDelegate::GetInstance()->SetTransientWindowForParent(
parent, static_cast<gfx::AcceleratedWidget>(x11window)); parent, static_cast<gfx::AcceleratedWidget>(x11window));

View File

@ -80,7 +80,8 @@ void XMLCALL xml_error_callback(void* arg,
* Signature of the function to use when there is an error and * Signature of the function to use when there is an error and
* the module handles the new error reporting mechanism. * the module handles the new error reporting mechanism.
*/ */
void XMLCALL xml_structured_error_callback(void* userData, xmlErrorPtr error) { void XMLCALL xml_structured_error_callback(void* userData,
const xmlError* error) {
if (!error->message) { if (!error->message) {
return; return;
} }

View File

@ -77,7 +77,7 @@ const char* const kNonWildcardDomainNonPortSchemes[] = {
const size_t kNonWildcardDomainNonPortSchemesSize = const size_t kNonWildcardDomainNonPortSchemesSize =
std::size(kNonWildcardDomainNonPortSchemes); std::size(kNonWildcardDomainNonPortSchemes);
absl::optional<int> AcquireProcessSingleton( std::optional<int> AcquireProcessSingleton(
const base::FilePath& user_data_dir) { const base::FilePath& user_data_dir) {
// Take the Chrome process singleton lock. The process can become the // Take the Chrome process singleton lock. The process can become the
// Browser process if it succeed to take the lock. Otherwise, the // Browser process if it succeed to take the lock. Otherwise, the
@ -114,7 +114,7 @@ absl::optional<int> AcquireProcessSingleton(
return chrome::RESULT_CODE_PROFILE_IN_USE; return chrome::RESULT_CODE_PROFILE_IN_USE;
} }
return absl::nullopt; return std::nullopt;
} }
} // namespace } // namespace
@ -130,17 +130,17 @@ AlloyMainDelegate::AlloyMainDelegate(CefMainRunnerHandler* runner,
AlloyMainDelegate::~AlloyMainDelegate() {} AlloyMainDelegate::~AlloyMainDelegate() {}
absl::optional<int> AlloyMainDelegate::PreBrowserMain() { std::optional<int> AlloyMainDelegate::PreBrowserMain() {
runner_->PreBrowserMain(); runner_->PreBrowserMain();
return absl::nullopt; return std::nullopt;
} }
absl::optional<int> AlloyMainDelegate::PostEarlyInitialization( std::optional<int> AlloyMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) { InvokedIn invoked_in) {
const auto* invoked_in_browser = const auto* invoked_in_browser =
absl::get_if<InvokedInBrowserProcess>(&invoked_in); absl::get_if<InvokedInBrowserProcess>(&invoked_in);
if (!invoked_in_browser) { if (!invoked_in_browser) {
return absl::nullopt; return std::nullopt;
} }
// Based on ChromeMainDelegate::PostEarlyInitialization. // Based on ChromeMainDelegate::PostEarlyInitialization.
@ -161,10 +161,10 @@ absl::optional<int> AlloyMainDelegate::PostEarlyInitialization(
return process_singleton_result; return process_singleton_result;
} }
return absl::nullopt; return std::nullopt;
} }
absl::optional<int> AlloyMainDelegate::BasicStartupComplete() { std::optional<int> AlloyMainDelegate::BasicStartupComplete() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
std::string process_type = std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType); command_line->GetSwitchValueASCII(switches::kProcessType);
@ -510,7 +510,7 @@ absl::optional<int> AlloyMainDelegate::BasicStartupComplete() {
util_mac::BasicStartupComplete(); util_mac::BasicStartupComplete();
#endif #endif
return absl::nullopt; return std::nullopt;
} }
void AlloyMainDelegate::PreSandboxStartup() { void AlloyMainDelegate::PreSandboxStartup() {

View File

@ -46,9 +46,9 @@ class AlloyMainDelegate : public content::ContentMainDelegate,
~AlloyMainDelegate() override; ~AlloyMainDelegate() override;
// content::ContentMainDelegate overrides. // content::ContentMainDelegate overrides.
absl::optional<int> PreBrowserMain() override; std::optional<int> PreBrowserMain() override;
absl::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override; std::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
absl::optional<int> BasicStartupComplete() override; std::optional<int> BasicStartupComplete() override;
void PreSandboxStartup() override; void PreSandboxStartup() override;
absl::variant<int, content::MainFunctionParams> RunProcess( absl::variant<int, content::MainFunctionParams> RunProcess(
const std::string& process_type, const std::string& process_type,

View File

@ -56,7 +56,7 @@ ChromeMainDelegateCef::ChromeMainDelegateCef(CefMainRunnerHandler* runner,
ChromeMainDelegateCef::~ChromeMainDelegateCef() = default; ChromeMainDelegateCef::~ChromeMainDelegateCef() = default;
absl::optional<int> ChromeMainDelegateCef::BasicStartupComplete() { std::optional<int> ChromeMainDelegateCef::BasicStartupComplete() {
// Returns no value if startup should proceed. // Returns no value if startup should proceed.
auto result = ChromeMainDelegate::BasicStartupComplete(); auto result = ChromeMainDelegate::BasicStartupComplete();
if (result.has_value()) { if (result.has_value()) {
@ -165,7 +165,7 @@ absl::optional<int> ChromeMainDelegateCef::BasicStartupComplete() {
util_mac::BasicStartupComplete(); util_mac::BasicStartupComplete();
#endif #endif
return absl::nullopt; return std::nullopt;
} }
void ChromeMainDelegateCef::PreSandboxStartup() { void ChromeMainDelegateCef::PreSandboxStartup() {
@ -195,15 +195,15 @@ void ChromeMainDelegateCef::PreSandboxStartup() {
crash_reporting::PreSandboxStartup(*command_line, process_type); crash_reporting::PreSandboxStartup(*command_line, process_type);
} }
absl::optional<int> ChromeMainDelegateCef::PreBrowserMain() { std::optional<int> ChromeMainDelegateCef::PreBrowserMain() {
// The parent ChromeMainDelegate implementation creates the NSApplication // The parent ChromeMainDelegate implementation creates the NSApplication
// instance on macOS, and we intentionally don't want to do that here. // instance on macOS, and we intentionally don't want to do that here.
// TODO(macos): Do we need l10n_util::OverrideLocaleWithCocoaLocale()? // TODO(macos): Do we need l10n_util::OverrideLocaleWithCocoaLocale()?
runner_->PreBrowserMain(); runner_->PreBrowserMain();
return absl::nullopt; return std::nullopt;
} }
absl::optional<int> ChromeMainDelegateCef::PostEarlyInitialization( std::optional<int> ChromeMainDelegateCef::PostEarlyInitialization(
InvokedIn invoked_in) { InvokedIn invoked_in) {
// Configure this before ChromeMainDelegate::PostEarlyInitialization triggers // Configure this before ChromeMainDelegate::PostEarlyInitialization triggers
// ChromeBrowserPolicyConnector creation. // ChromeBrowserPolicyConnector creation.

View File

@ -36,10 +36,10 @@ class ChromeMainDelegateCef : public ChromeMainDelegate,
~ChromeMainDelegateCef() override; ~ChromeMainDelegateCef() override;
// ChromeMainDelegate overrides. // ChromeMainDelegate overrides.
absl::optional<int> BasicStartupComplete() override; std::optional<int> BasicStartupComplete() override;
void PreSandboxStartup() override; void PreSandboxStartup() override;
absl::optional<int> PreBrowserMain() override; std::optional<int> PreBrowserMain() override;
absl::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override; std::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
absl::variant<int, content::MainFunctionParams> RunProcess( absl::variant<int, content::MainFunctionParams> RunProcess(
const std::string& process_type, const std::string& process_type,
content::MainFunctionParams main_function_params) override; content::MainFunctionParams main_function_params) override;

View File

@ -10,7 +10,7 @@
#include "include/cef_version.h" #include "include/cef_version.h"
#include "base/strings/string_piece_forward.h" #include "base/strings/string_piece.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/crash/core/app/crash_reporter_client.h" #include "components/crash/core/app/crash_reporter_client.h"

View File

@ -4,7 +4,7 @@
#include <string> #include <string>
#include "base/strings/string_piece_forward.h" #include "base/strings/string_piece.h"
#include "build/build_config.h" #include "build/build_config.h"
namespace base { namespace base {

View File

@ -6,7 +6,7 @@
#include "include/internal/cef_string_list.h" #include "include/internal/cef_string_list.h"
#include "base/logging.h" #include "base/check_op.h"
namespace { namespace {
using StringList = std::vector<CefString>; using StringList = std::vector<CefString>;

View File

@ -7,7 +7,7 @@
#include "include/internal/cef_string_map.h" #include "include/internal/cef_string_map.h"
#include "base/logging.h" #include "base/check_op.h"
namespace { namespace {

View File

@ -7,7 +7,7 @@
#include "include/internal/cef_string_multimap.h" #include "include/internal/cef_string_multimap.h"
#include "base/logging.h" #include "base/check_op.h"
namespace { namespace {

View File

@ -180,16 +180,10 @@ CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,
if (str1->length == 0 && str2->length == 0) { if (str1->length == 0 && str2->length == 0) {
return 0; return 0;
} }
#if defined(WCHAR_T_IS_UTF32)
int r = std::char_traits<std::u16string::value_type>::compare( int r = std::char_traits<std::u16string::value_type>::compare(
reinterpret_cast<std::u16string::value_type*>(str1->str), reinterpret_cast<std::u16string::value_type*>(str1->str),
reinterpret_cast<std::u16string::value_type*>(str2->str), reinterpret_cast<std::u16string::value_type*>(str2->str),
std::min(str1->length, str2->length)); std::min(str1->length, str2->length));
#else
int r = wcsncmp(reinterpret_cast<wchar_t*>(str1->str),
reinterpret_cast<wchar_t*>(str2->str),
std::min(str1->length, str2->length));
#endif
if (r == 0) { if (r == 0) {
if (str1->length > str2->length) { if (str1->length > str2->length) {
return 1; return 1;

View File

@ -227,7 +227,8 @@ void AlloyContentRendererClient::RenderThreadStarted() {
value.reset(base::SysUTF8ToCFStringRef("false")); value.reset(base::SysUTF8ToCFStringRef("false"));
} }
CFPreferencesSetAppValue(key, value, kCFPreferencesCurrentApplication); CFPreferencesSetAppValue(key.get(), value.get(),
kCFPreferencesCurrentApplication);
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
} }
#endif // BUILDFLAG(IS_MAC) #endif // BUILDFLAG(IS_MAC)
@ -282,7 +283,7 @@ void AlloyContentRendererClient::RenderFrameCreated(
->AddInterface<extensions::mojom::MimeHandlerViewContainerManager>( ->AddInterface<extensions::mojom::MimeHandlerViewContainerManager>(
base::BindRepeating( base::BindRepeating(
&extensions::MimeHandlerViewContainerManager::BindReceiver, &extensions::MimeHandlerViewContainerManager::BindReceiver,
render_frame->GetRoutingID())); base::Unretained(render_frame)));
} }
const base::CommandLine* command_line = const base::CommandLine* command_line =
@ -335,7 +336,10 @@ bool AlloyContentRendererClient::IsPluginHandledExternally(
// not supported. Here it suffices to return false but there should perhaps be // not supported. Here it suffices to return false but there should perhaps be
// a more unified approach to avoid sending the IPC twice. // a more unified approach to avoid sending the IPC twice.
chrome::mojom::PluginInfoPtr plugin_info = chrome::mojom::PluginInfo::New(); chrome::mojom::PluginInfoPtr plugin_info = chrome::mojom::PluginInfo::New();
ChromeContentRendererClient::GetPluginInfoHost()->GetPluginInfo( mojo::AssociatedRemote<chrome::mojom::PluginInfoHost> plugin_info_host;
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_info_host);
plugin_info_host->GetPluginInfo(
original_url, render_frame->GetWebFrame()->Top()->GetSecurityOrigin(), original_url, render_frame->GetWebFrame()->Top()->GetSecurityOrigin(),
mime_type, &plugin_info); mime_type, &plugin_info);
// TODO(ekaramad): Not continuing here due to a disallowed status should take // TODO(ekaramad): Not continuing here due to a disallowed status should take
@ -379,7 +383,10 @@ bool AlloyContentRendererClient::OverrideCreatePlugin(
GURL url(params.url); GURL url(params.url);
chrome::mojom::PluginInfoPtr plugin_info = chrome::mojom::PluginInfo::New(); chrome::mojom::PluginInfoPtr plugin_info = chrome::mojom::PluginInfo::New();
ChromeContentRendererClient::GetPluginInfoHost()->GetPluginInfo( mojo::AssociatedRemote<chrome::mojom::PluginInfoHost> plugin_info_host;
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
&plugin_info_host);
plugin_info_host->GetPluginInfo(
url, render_frame->GetWebFrame()->Top()->GetSecurityOrigin(), url, render_frame->GetWebFrame()->Top()->GetSecurityOrigin(),
orig_mime_type, &plugin_info); orig_mime_type, &plugin_info);
*plugin = ChromeContentRendererClient::CreatePlugin(render_frame, params, *plugin = ChromeContentRendererClient::CreatePlugin(render_frame, params,

View File

@ -50,8 +50,8 @@ void AlloyRenderThreadObserver::SetInitialConfiguration(
chromeos_listener_receiver, chromeos_listener_receiver,
mojo::PendingRemote<content_settings::mojom::ContentSettingsManager> mojo::PendingRemote<content_settings::mojom::ContentSettingsManager>
content_settings_manager, content_settings_manager,
mojo::PendingRemote<chrome::mojom::BoundSessionRequestThrottledListener> mojo::PendingRemote<chrome::mojom::BoundSessionRequestThrottledHandler>
bound_session_request_throttled_listener) { bound_session_request_throttled_handler) {
is_incognito_process_ = is_incognito_process; is_incognito_process_ = is_incognito_process;
} }

View File

@ -47,8 +47,8 @@ class AlloyRenderThreadObserver : public content::RenderThreadObserver,
chromeos_listener_receiver, chromeos_listener_receiver,
mojo::PendingRemote<content_settings::mojom::ContentSettingsManager> mojo::PendingRemote<content_settings::mojom::ContentSettingsManager>
content_settings_manager, content_settings_manager,
mojo::PendingRemote<chrome::mojom::BoundSessionRequestThrottledListener> mojo::PendingRemote<chrome::mojom::BoundSessionRequestThrottledHandler>
bound_session_request_throttled_listener) override; bound_session_request_throttled_handler) override;
void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override; void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override;
void OnRendererConfigurationAssociatedRequest( void OnRendererConfigurationAssociatedRequest(

View File

@ -46,7 +46,7 @@ CefURLLoaderThrottleProviderImpl::Clone() {
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
CefURLLoaderThrottleProviderImpl::CreateThrottles( CefURLLoaderThrottleProviderImpl::CreateThrottles(
int render_frame_id, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const blink::WebURLRequest& request) { const blink::WebURLRequest& request) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

View File

@ -30,7 +30,7 @@ class CefURLLoaderThrottleProviderImpl
// blink::URLLoaderThrottleProvider implementation. // blink::URLLoaderThrottleProvider implementation.
std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override; std::unique_ptr<blink::URLLoaderThrottleProvider> Clone() override;
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles( blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> CreateThrottles(
int render_frame_id, base::optional_ref<const blink::LocalFrameToken> local_frame_token,
const blink::WebURLRequest& request) override; const blink::WebURLRequest& request) override;
void SetOnline(bool is_online) override; void SetOnline(bool is_online) override;

View File

@ -71,7 +71,7 @@ void CefRenderFrameObserver::DidFinishLoad() {
} }
} }
void CefRenderFrameObserver::WillDetach() { void CefRenderFrameObserver::WillDetach(blink::DetachReason detach_reason) {
if (frame_) { if (frame_) {
frame_->OnDetached(); frame_->OnDetached();
frame_ = nullptr; frame_ = nullptr;

View File

@ -31,7 +31,7 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
void DidCommitProvisionalLoad(ui::PageTransition transition) override; void DidCommitProvisionalLoad(ui::PageTransition transition) override;
void DidFailProvisionalLoad() override; void DidFailProvisionalLoad() override;
void DidFinishLoad() override; void DidFinishLoad() override;
void WillDetach() override; void WillDetach(blink::DetachReason detach_reason) override;
void FocusedElementChanged(const blink::WebElement& element) override; void FocusedElementChanged(const blink::WebElement& element) override;
void DraggableRegionsChanged() override; void DraggableRegionsChanged() override;
void DidCreateScriptContext(v8::Handle<v8::Context> context, void DidCreateScriptContext(v8::Handle<v8::Context> context,

View File

@ -266,7 +266,7 @@ std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
return out; return out;
} }
#if defined(WCHAR_T_IS_UTF32) #if defined(WCHAR_T_IS_32_BIT)
std::ostream& operator<<(std::ostream& out, const char16_t* wstr) { std::ostream& operator<<(std::ostream& out, const char16_t* wstr) {
const auto length = wstr ? std::char_traits<char16_t>::length(wstr) : 0U; const auto length = wstr ? std::char_traits<char16_t>::length(wstr) : 0U;
if (length > 0) { if (length > 0) {

View File

@ -134,8 +134,6 @@ patches = [
# #
# Add WebContentsObserver::RenderWidgetCreated. # Add WebContentsObserver::RenderWidgetCreated.
# https://github.com/chromiumembedded/cef/issues/3308 # https://github.com/chromiumembedded/cef/issues/3308
#
# Avoid crash in WebContentsImpl::GetWindowShowState with OSR.
'name': 'web_contents_1257_1565', 'name': 'web_contents_1257_1565',
}, },
{ {
@ -677,8 +675,6 @@ patches = [
{ {
# Fix NOTREACHED() in RenderFrameHostImpl::CommitNavigation() with # Fix NOTREACHED() in RenderFrameHostImpl::CommitNavigation() with
# CorsTest.IframeNoneServerToCustomUnregisteredScheme. # CorsTest.IframeNoneServerToCustomUnregisteredScheme.
# Fix bad optional access in VerifyInitiatorOrigin() with
# RequestHandlerTest.NotificationsCrossOriginDelayedRenderer.
# Partially reverts the below changes. # Partially reverts the below changes.
# https://chromium-review.googlesource.com/c/chromium/src/+/4829483 # https://chromium-review.googlesource.com/c/chromium/src/+/4829483
# https://bugs.chromium.org/p/chromium/issues/detail?id=1470837#c22 # https://bugs.chromium.org/p/chromium/issues/detail?id=1470837#c22
@ -699,5 +695,16 @@ patches = [
# linux: Disable compiler TLS in libxml2. # linux: Disable compiler TLS in libxml2.
# https://github.com/chromiumembedded/cef/issues/3616 # https://github.com/chromiumembedded/cef/issues/3616
'name': 'linux_libxml_tls_3616' 'name': 'linux_libxml_tls_3616'
},
{
# linux: Fix crash after x11::Connection destruction with
# multi-threaded-message-loop.
# https://chromium-review.googlesource.com/c/chromium/src/+/5115482
'name': 'linux_connection_5115482'
},
{
# windows: Fix implicit conversion error when building cef_sandbox.
# https://chromium-review.googlesource.com/c/chromium/src/+/5120035
'name': 'base_allocator_5120035'
} }
] ]

View File

@ -0,0 +1,13 @@
diff --git base/allocator/partition_allocator/src/partition_alloc/thread_cache.h base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
index 381245c374382..c98aed1663517 100644
--- base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
+++ base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
@@ -184,7 +184,7 @@ class PA_COMPONENT_EXPORT(PARTITION_ALLOC) ThreadCacheRegistry {
internal::base::TimeDelta periodic_purge_next_interval_;
bool is_purging_configured_ = false;
- uint8_t largest_active_bucket_index_ = internal::BucketIndexLookup::GetIndex(
+ uint16_t largest_active_bucket_index_ = internal::BucketIndexLookup::GetIndex(
ThreadCacheLimits::kDefaultSizeThreshold);
};

View File

@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn diff --git base/BUILD.gn base/BUILD.gn
index 24f2397278ccb..e511ec4aedd97 100644 index 3d538b3370caa..5a4ba79e0af64 100644
--- base/BUILD.gn --- base/BUILD.gn
+++ base/BUILD.gn +++ base/BUILD.gn
@@ -40,6 +40,7 @@ import("//build/config/ui.gni") @@ -40,6 +40,7 @@ import("//build/config/ui.gni")
@ -10,7 +10,7 @@ index 24f2397278ccb..e511ec4aedd97 100644
import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni") import("//testing/test.gni")
@@ -1497,7 +1498,11 @@ component("base") { @@ -1483,7 +1484,11 @@ component("base") {
"hash/md5_constexpr_internal.h", "hash/md5_constexpr_internal.h",
"hash/sha1.h", "hash/sha1.h",
] ]
@ -23,7 +23,7 @@ index 24f2397278ccb..e511ec4aedd97 100644
sources += [ sources += [
"hash/md5_nacl.cc", "hash/md5_nacl.cc",
"hash/md5_nacl.h", "hash/md5_nacl.h",
@@ -1919,6 +1924,12 @@ component("base") { @@ -1907,6 +1912,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
} }
@ -88,10 +88,10 @@ index 29626e5853c6e..2fb1c61504c5d 100644
#else #else
#include "base/hash/sha1_boringssl.h" #include "base/hash/sha1_boringssl.h"
diff --git base/rand_util.h base/rand_util.h diff --git base/rand_util.h base/rand_util.h
index 47e7917f785f7..42fe89f3ded27 100644 index 8387bc9596ad7..c3dafe80e33b7 100644
--- base/rand_util.h --- base/rand_util.h
+++ base/rand_util.h +++ base/rand_util.h
@@ -15,8 +15,9 @@ @@ -16,8 +16,9 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "build/build_config.h" #include "build/build_config.h"
@ -102,7 +102,7 @@ index 47e7917f785f7..42fe89f3ded27 100644
#include "third_party/boringssl/src/include/openssl/rand.h" #include "third_party/boringssl/src/include/openssl/rand.h"
#endif #endif
@@ -112,7 +113,7 @@ class RandomBitGenerator { @@ -122,7 +123,7 @@ class RandomBitGenerator {
~RandomBitGenerator() = default; ~RandomBitGenerator() = default;
}; };
@ -164,7 +164,7 @@ index 549f4362af8b6..f08b1b2e7f061 100644
static decltype(&ProcessPrng) process_prng_fn = GetProcessPrng(); static decltype(&ProcessPrng) process_prng_fn = GetProcessPrng();
BOOL success = process_prng_fn(static_cast<BYTE*>(output), output_length); BOOL success = process_prng_fn(static_cast<BYTE*>(output), output_length);
diff --git base/unguessable_token.cc base/unguessable_token.cc diff --git base/unguessable_token.cc base/unguessable_token.cc
index aa7423f88d278..1b2c7d3e3c4a0 100644 index 44bfc3e2624d5..cccb306a383ce 100644
--- base/unguessable_token.cc --- base/unguessable_token.cc
+++ base/unguessable_token.cc +++ base/unguessable_token.cc
@@ -10,8 +10,9 @@ @@ -10,8 +10,9 @@
@ -181,11 +181,11 @@ index aa7423f88d278..1b2c7d3e3c4a0 100644
@@ -46,7 +47,7 @@ absl::optional<UnguessableToken> UnguessableToken::Deserialize(uint64_t high, @@ -46,7 +47,7 @@ absl::optional<UnguessableToken> UnguessableToken::Deserialize(uint64_t high,
} }
bool UnguessableToken::operator==(const UnguessableToken& other) const { bool operator==(const UnguessableToken& lhs, const UnguessableToken& rhs) {
-#if BUILDFLAG(IS_NACL) -#if BUILDFLAG(IS_NACL)
+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
// BoringSSL is unavailable for NaCl builds so it remains timing dependent. // BoringSSL is unavailable for NaCl builds so it remains timing dependent.
return token_ == other.token_; return lhs.token_ == rhs.token_;
#else #else
diff --git base/win/sid.cc base/win/sid.cc diff --git base/win/sid.cc base/win/sid.cc
index 0f1a2ec79aa4b..7f92778a4a776 100644 index 0f1a2ec79aa4b..7f92778a4a776 100644

View File

@ -1,5 +1,5 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn diff --git base/test/BUILD.gn base/test/BUILD.gn
index d6d708d9871ed..d7a2d2fee007e 100644 index f2026e17e6638..aec8bd2743f3a 100644
--- base/test/BUILD.gn --- base/test/BUILD.gn
+++ base/test/BUILD.gn +++ base/test/BUILD.gn
@@ -189,11 +189,6 @@ static_library("test_support") { @@ -189,11 +189,6 @@ static_library("test_support") {
@ -14,7 +14,7 @@ index d6d708d9871ed..d7a2d2fee007e 100644
deps += [ deps += [
":amalgamated_perfetto_sql_stdlib", ":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor", ":gen_cc_chrome_track_event_descriptor",
@@ -556,7 +551,7 @@ if (enable_base_tracing) { @@ -559,7 +554,7 @@ if (enable_base_tracing) {
# processor depends on dev_sqlite. The two share the same symbols but have # processor depends on dev_sqlite. The two share the same symbols but have
# different implementations, so we need to hide dev_sqlite in this shared # different implementations, so we need to hide dev_sqlite in this shared
# library even in non-component builds to prevent duplicate symbols. # library even in non-component builds to prevent duplicate symbols.
@ -23,7 +23,7 @@ index d6d708d9871ed..d7a2d2fee007e 100644
if (is_ios) { if (is_ios) {
_target_type = "ios_framework_bundle" _target_type = "ios_framework_bundle"
} }
@@ -565,6 +560,8 @@ if (enable_base_tracing) { @@ -568,6 +563,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ] defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true testonly = true
sources = [ sources = [
@ -32,7 +32,7 @@ index d6d708d9871ed..d7a2d2fee007e 100644
"test_trace_processor_export.h", "test_trace_processor_export.h",
"test_trace_processor_impl.cc", "test_trace_processor_impl.cc",
"test_trace_processor_impl.h", "test_trace_processor_impl.h",
@@ -582,33 +579,6 @@ if (enable_base_tracing) { @@ -585,33 +582,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor" output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ] bundle_deps_filter = [ "//third_party/icu:icudata" ]
} }
@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
+ +
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_ #endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
diff --git content/shell/BUILD.gn content/shell/BUILD.gn diff --git content/shell/BUILD.gn content/shell/BUILD.gn
index 098c17ec80f92..cec62843d6d38 100644 index c27c82e1753df..0007879aa0a15 100644
--- content/shell/BUILD.gn --- content/shell/BUILD.gn
+++ content/shell/BUILD.gn +++ content/shell/BUILD.gn
@@ -840,7 +840,6 @@ if (is_mac) { @@ -844,7 +844,6 @@ if (is_mac) {
# Specify a sensible install_name for static builds. The library is # Specify a sensible install_name for static builds. The library is
# dlopen()ed so this is not used to resolve the module. # dlopen()ed so this is not used to resolve the module.
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ] ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]

View File

@ -1,5 +1,5 @@
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
index 68855feea1605..69e5d1e064601 100644 index 02fa305524694..29e77bafa710c 100644
--- third_party/blink/public/web/web_element.h --- third_party/blink/public/web/web_element.h
+++ third_party/blink/public/web/web_element.h +++ third_party/blink/public/web/web_element.h
@@ -81,6 +81,9 @@ class BLINK_EXPORT WebElement : public WebNode { @@ -81,6 +81,9 @@ class BLINK_EXPORT WebElement : public WebNode {
@ -13,10 +13,10 @@ index 68855feea1605..69e5d1e064601 100644
// Returns true if the element's contenteditable attribute is in the true // Returns true if the element's contenteditable attribute is in the true
// state or in the plaintext-only state: // state or in the plaintext-only state:
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
index 214c3196b1fb2..ca2c35b1edecb 100644 index e8c7cb3cdb29f..1cf10e52779e1 100644
--- third_party/blink/renderer/core/exported/web_element.cc --- third_party/blink/renderer/core/exported/web_element.cc
+++ third_party/blink/renderer/core/exported/web_element.cc +++ third_party/blink/renderer/core/exported/web_element.cc
@@ -115,6 +115,24 @@ void WebElement::SetAttribute(const WebString& attr_name, @@ -116,6 +116,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
IGNORE_EXCEPTION_FOR_TESTING); IGNORE_EXCEPTION_FOR_TESTING);
} }

View File

@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 401eb0cd40ee2..5e7ac0b6d9d0a 100644 index 0f781fe1c2b2e..6456de7ad1c39 100644
--- content/browser/child_process_security_policy_impl.cc --- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc
@@ -1866,6 +1866,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( @@ -1878,6 +1878,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
// DeclarativeApiTest.PersistRules. // DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme)) if (actual_process_lock.matches_scheme(url::kDataScheme))
return true; return true;
@ -20,10 +20,10 @@ index 401eb0cd40ee2..5e7ac0b6d9d0a 100644
// Make an exception to allow most visited tiles to commit in // Make an exception to allow most visited tiles to commit in
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index 159a0e1c17214..0a65b3b75b158 100644 index 64248db4bfc64..ea5037256498f 100644
--- content/browser/renderer_host/navigation_request.cc --- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc
@@ -7457,10 +7457,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( @@ -7610,10 +7610,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin = bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin; network::mojom::WebSandboxFlags::kOrigin;
@ -47,7 +47,7 @@ index 159a0e1c17214..0a65b3b75b158 100644
} }
return origin_and_debug_info; return origin_and_debug_info;
@@ -7565,6 +7577,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { @@ -7721,6 +7733,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
DetermineInitiatorRelationship(initiator_rfh, DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host())); frame_tree_node_->current_frame_host()));

View File

@ -13,12 +13,12 @@ index 9d9c17ffd6474..4eb79c65369af 100644
}; };
diff --git content/public/browser/webui_config_map.h content/public/browser/webui_config_map.h diff --git content/public/browser/webui_config_map.h content/public/browser/webui_config_map.h
index a80034506bf45..4bda477df0558 100644 index e7b6a9b841abb..1c98be86c0db1 100644
--- content/public/browser/webui_config_map.h --- content/public/browser/webui_config_map.h
+++ content/public/browser/webui_config_map.h +++ content/public/browser/webui_config_map.h
@@ -61,6 +61,10 @@ class CONTENT_EXPORT WebUIConfigMap { @@ -68,6 +68,10 @@ class CONTENT_EXPORT WebUIConfigMap {
// Returns the size of the map, i.e. how many WebUIConfigs are registered. std::vector<WebUIConfigInfo> GetWebUIConfigList(
size_t GetSizeForTesting() { return configs_map_.size(); } BrowserContext* browser_context);
+ WebUIControllerFactory* controller_factory() const { + WebUIControllerFactory* controller_factory() const {
+ return webui_controller_factory_.get(); + return webui_controller_factory_.get();

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 80bc79e5fb350..cc49ce7d592f5 100644 index de1cd6efc67b4..956d45892f31c 100644
--- build/config/compiler/BUILD.gn --- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn
@@ -2161,8 +2161,6 @@ config("thin_archive") { @@ -2160,8 +2160,6 @@ config("thin_archive") {
# confuses lldb. # confuses lldb.
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ] arflags = [ "-T" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index bce36d7ffb408..3e8fd566a375c 100644 index 6572022524828..f39800b4a7da2 100644
--- chrome/browser/BUILD.gn --- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@ -10,7 +10,7 @@ index bce36d7ffb408..3e8fd566a375c 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
@@ -2073,6 +2074,7 @@ static_library("browser") { @@ -2043,6 +2044,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags", "//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags", "//build/config/compiler:compiler_buildflags",
"//cc", "//cc",
@ -18,7 +18,7 @@ index bce36d7ffb408..3e8fd566a375c 100644
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
@@ -2729,6 +2731,10 @@ static_library("browser") { @@ -2700,6 +2702,10 @@ static_library("browser") {
] ]
} }

View File

@ -14,10 +14,10 @@ index e50822a2c8d5f..b44dd9191ed08 100644
std::unique_ptr<BackgroundModeManager> manager) = 0; std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif #endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 228c377a1bec5..d296c7e46591f 100644 index 15e4fdcda89d2..66d26abb33af5 100644
--- chrome/browser/browser_process_impl.cc --- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc
@@ -1059,18 +1059,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { @@ -1063,18 +1063,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get(); return download_request_limiter_.get();
} }
@ -38,10 +38,10 @@ index 228c377a1bec5..d296c7e46591f 100644
std::unique_ptr<BackgroundModeManager> manager) { std::unique_ptr<BackgroundModeManager> manager) {
background_mode_manager_ = std::move(manager); background_mode_manager_ = std::move(manager);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 906ec958256ef..f7c6973bcad3b 100644 index af96779d25b87..4ef9f7945136c 100644
--- chrome/browser/browser_process_impl.h --- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h
@@ -189,8 +189,8 @@ class BrowserProcessImpl : public BrowserProcess, @@ -191,8 +191,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override; void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override; DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override; DownloadRequestLimiter* download_request_limiter() override;

View File

@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644
return false; return false;
} }
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
index 169b2041595fe..a5d3ec34d36bd 100644 index d64ccdc765368..5e8f892ff793d 100644
--- chrome/browser/devtools/devtools_window.cc --- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc +++ chrome/browser/devtools/devtools_window.cc
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
@ -24,7 +24,7 @@ index 169b2041595fe..a5d3ec34d36bd 100644
#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/browser_window.h"
@@ -1176,6 +1177,13 @@ DevToolsWindow* DevToolsWindow::Create( @@ -1189,6 +1190,13 @@ DevToolsWindow* DevToolsWindow::Create(
!browser->is_type_normal()) { !browser->is_type_normal()) {
can_dock = false; can_dock = false;
} }
@ -38,7 +38,7 @@ index 169b2041595fe..a5d3ec34d36bd 100644
} }
// Create WebContents with devtools. // Create WebContents with devtools.
@@ -1752,12 +1760,29 @@ void DevToolsWindow::CreateDevToolsBrowser() { @@ -1760,12 +1768,29 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) { Browser::CreationStatus::kOk) {
return; return;
} }
@ -75,7 +75,7 @@ index 169b2041595fe..a5d3ec34d36bd 100644
} }
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 83bb8314906d5..0970f80bf9ae8 100644 index fc880e0dd1eb8..d8b3e4e21d092 100644
--- chrome/browser/ui/BUILD.gn --- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni") @@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@ -86,7 +86,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
import("//chrome/browser/buildflags.gni") import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni") import("//chromeos/ash/components/assistant/assistant.gni")
@@ -378,6 +379,10 @@ static_library("ui") { @@ -382,6 +383,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wexit_time_destructors",
] ]
@ -97,7 +97,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
# Since browser and browser_ui actually depend on each other, # Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser. # we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less # However, this means browser_ui and browser should more or less
@@ -403,6 +408,7 @@ static_library("ui") { @@ -407,6 +412,7 @@ static_library("ui") {
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags", "//build/config/chromebox_for_meetings:buildflags",
"//cc/paint", "//cc/paint",
@ -105,7 +105,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
@@ -2810,6 +2816,8 @@ static_library("ui") { @@ -2863,6 +2869,8 @@ static_library("ui") {
"views/apps/app_dialog/app_block_dialog_view.h", "views/apps/app_dialog/app_block_dialog_view.h",
"views/apps/app_dialog/app_pause_dialog_view.cc", "views/apps/app_dialog/app_pause_dialog_view.cc",
"views/apps/app_dialog/app_pause_dialog_view.h", "views/apps/app_dialog/app_pause_dialog_view.h",
@ -114,7 +114,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
"views/apps/app_info_dialog/arc_app_info_links_panel.cc", "views/apps/app_info_dialog/arc_app_info_links_panel.cc",
"views/apps/app_info_dialog/arc_app_info_links_panel.h", "views/apps/app_info_dialog/arc_app_info_links_panel.h",
"views/apps/chrome_app_window_client_views_chromeos.cc", "views/apps/chrome_app_window_client_views_chromeos.cc",
@@ -4768,8 +4776,6 @@ static_library("ui") { @@ -4874,8 +4882,6 @@ static_library("ui") {
"views/accessibility/theme_tracking_non_accessible_image_view.h", "views/accessibility/theme_tracking_non_accessible_image_view.h",
"views/apps/app_dialog/app_dialog_view.cc", "views/apps/app_dialog/app_dialog_view.cc",
"views/apps/app_dialog/app_dialog_view.h", "views/apps/app_dialog/app_dialog_view.h",
@ -123,7 +123,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
"views/apps/app_info_dialog/app_info_dialog_container.cc", "views/apps/app_info_dialog/app_info_dialog_container.cc",
"views/apps/app_info_dialog/app_info_dialog_container.h", "views/apps/app_info_dialog/app_info_dialog_container.h",
"views/apps/app_info_dialog/app_info_dialog_views.cc", "views/apps/app_info_dialog/app_info_dialog_views.cc",
@@ -6494,6 +6500,7 @@ static_library("ui") { @@ -6605,6 +6611,7 @@ static_library("ui") {
if (enable_printing) { if (enable_printing) {
deps += [ deps += [
"//components/printing/browser", "//components/printing/browser",
@ -132,10 +132,10 @@ index 83bb8314906d5..0970f80bf9ae8 100644
] ]
} }
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index bd2f3d64f3f38..7f70339454e16 100644 index aa28c2ec1efb2..7ad06de961e9d 100644
--- chrome/browser/ui/browser.cc --- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc
@@ -264,6 +264,25 @@ @@ -262,6 +262,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h" #include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif #endif
@ -161,7 +161,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h" #include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif #endif
@@ -459,6 +478,10 @@ Browser::Browser(const CreateParams& params) @@ -458,6 +477,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type), type_(params.type),
profile_(params.profile), profile_(params.profile),
window_(nullptr), window_(nullptr),
@ -172,7 +172,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
tab_strip_model_delegate_( tab_strip_model_delegate_(
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)), std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
tab_strip_model_(std::make_unique<TabStripModel>( tab_strip_model_(std::make_unique<TabStripModel>(
@@ -654,6 +677,12 @@ Browser::~Browser() { @@ -653,6 +676,12 @@ Browser::~Browser() {
// away so they don't try and call back to us. // away so they don't try and call back to us.
if (select_file_dialog_.get()) if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed(); select_file_dialog_->ListenerDestroyed();
@ -185,7 +185,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@@ -1058,6 +1087,8 @@ void Browser::WindowFullscreenStateChanged() { @@ -1061,6 +1090,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged(); ->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged(); command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@ -194,7 +194,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
void Browser::FullscreenTopUIStateChanged() { void Browser::FullscreenTopUIStateChanged() {
@@ -1397,6 +1428,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( @@ -1400,6 +1431,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event)) if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED; return content::KeyboardEventProcessingResult::HANDLED;
@ -209,7 +209,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
return window()->PreHandleKeyboardEvent(event); return window()->PreHandleKeyboardEvent(event);
} }
@@ -1404,8 +1443,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, @@ -1407,8 +1446,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) { const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window = DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source); DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -230,7 +230,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
bool Browser::TabsNeedBeforeUnloadFired() { bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1616,6 +1665,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, @@ -1610,6 +1659,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
} }
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -245,7 +245,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
NavigateParams nav_params(this, params.url, params.transition); NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source; nav_params.source_contents = source;
@@ -1773,6 +1830,8 @@ void Browser::LoadingStateChanged(WebContents* source, @@ -1767,6 +1824,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) { bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@ -254,7 +254,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
void Browser::CloseContents(WebContents* source) { void Browser::CloseContents(WebContents* source) {
@@ -1801,6 +1860,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { @@ -1795,6 +1854,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
} }
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -263,7 +263,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
if (!GetStatusBubble()) if (!GetStatusBubble())
return; return;
@@ -1808,6 +1869,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -1802,6 +1863,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url); GetStatusBubble()->SetURL(url);
} }
@ -281,7 +281,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
void Browser::ContentsMouseEvent(WebContents* source, void Browser::ContentsMouseEvent(WebContents* source,
bool motion, bool motion,
bool exited) { bool exited) {
@@ -1832,6 +1904,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { @@ -1826,6 +1898,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false; return false;
} }
@ -301,7 +301,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
void Browser::BeforeUnloadFired(WebContents* web_contents, void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) { bool* proceed_to_fire_unload) {
@@ -1924,6 +2009,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, @@ -1925,6 +2010,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager. // Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents); task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -311,8 +311,8 @@ index bd2f3d64f3f38..7f70339454e16 100644
+ frame_name, target_url, new_contents); + frame_name, target_url, new_contents);
} }
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { void Browser::RendererUnresponsive(
@@ -2080,11 +2169,15 @@ void Browser::EnterFullscreenModeForTab( @@ -2069,11 +2158,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) { const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id); requesting_frame, options.display_id);
@ -328,7 +328,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2277,6 +2370,15 @@ void Browser::RequestMediaAccessPermission( @@ -2266,6 +2359,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents, content::WebContents* web_contents,
const content::MediaStreamRequest& request, const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) { content::MediaResponseCallback callback) {
@ -344,7 +344,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
const extensions::Extension* extension = const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin); GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2828,9 +2930,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { @@ -2808,9 +2910,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private): // Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() { StatusBubble* Browser::GetStatusBubble() {
@ -357,7 +357,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
// We hide the status bar for web apps windows as this matches native // We hide the status bar for web apps windows as this matches native
@@ -2838,6 +2942,12 @@ StatusBubble* Browser::GetStatusBubble() { @@ -2818,6 +2922,12 @@ StatusBubble* Browser::GetStatusBubble() {
// mode, as the minimal browser UI includes the status bar. // mode, as the minimal browser UI includes the status bar.
if (web_app::AppBrowserController::IsWebApp(this) && if (web_app::AppBrowserController::IsWebApp(this) &&
!app_controller()->HasMinimalUiButtons()) { !app_controller()->HasMinimalUiButtons()) {
@ -370,7 +370,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
return nullptr; return nullptr;
} }
@@ -2974,6 +3084,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { @@ -2954,6 +3064,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents); web_contents_collection_.StopObserving(web_contents);
} }
@ -379,7 +379,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
} }
void Browser::TabDetachedAtImpl(content::WebContents* contents, void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3128,6 +3240,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( @@ -3108,6 +3220,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const { bool check_can_support) const {
@ -395,7 +395,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
case TYPE_NORMAL: case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support); return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 6544740362683..976a0e375a1f1 100644 index 91ff945f74fd3..bdf661d7fdfc9 100644
--- chrome/browser/ui/browser.h --- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@ -447,9 +447,9 @@ index 6544740362683..976a0e375a1f1 100644
// Accessors //////////////////////////////////////////////////////////////// // Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; } const CreateParams& create_params() const { return create_params_; }
@@ -485,6 +506,12 @@ class Browser : public TabStripModelObserver, @@ -486,6 +507,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr(); base::WeakPtr<Browser> AsWeakPtr();
base::WeakPtr<const Browser> AsWeakPtr() const;
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)
+ cef::BrowserDelegate* cef_delegate() const { + cef::BrowserDelegate* cef_delegate() const {
@ -460,7 +460,7 @@ index 6544740362683..976a0e375a1f1 100644
// Get the FindBarController for this browser, creating it if it does not // Get the FindBarController for this browser, creating it if it does not
// yet exist. // yet exist.
FindBarController* GetFindBarController(); FindBarController* GetFindBarController();
@@ -877,11 +904,19 @@ class Browser : public TabStripModelObserver, @@ -875,11 +902,19 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source, void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override; const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -480,7 +480,7 @@ index 6544740362683..976a0e375a1f1 100644
void BeforeUnloadFired(content::WebContents* source, void BeforeUnloadFired(content::WebContents* source,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) override; bool* proceed_to_fire_unload) override;
@@ -1227,6 +1262,10 @@ class Browser : public TabStripModelObserver, @@ -1220,6 +1255,10 @@ class Browser : public TabStripModelObserver,
// This Browser's window. // This Browser's window.
raw_ptr<BrowserWindow, DanglingUntriaged> window_; raw_ptr<BrowserWindow, DanglingUntriaged> window_;
@ -491,7 +491,7 @@ index 6544740362683..976a0e375a1f1 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_; std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_; std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1296,6 +1335,8 @@ class Browser : public TabStripModelObserver, @@ -1289,6 +1328,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_; const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_; bool initial_visible_on_all_workspaces_state_;
@ -501,10 +501,10 @@ index 6544740362683..976a0e375a1f1 100644
UnloadController unload_controller_; UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index b046f80bf68d9..038d217d9f29e 100644 index 3e4f480c35ea3..7dd7609b36367 100644
--- chrome/browser/ui/browser_navigator.cc --- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc
@@ -291,6 +291,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition( @@ -296,6 +296,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
: 1.0; : 1.0;
browser_params.pip_options = pip_options; browser_params.pip_options = pip_options;
@ -515,7 +515,7 @@ index b046f80bf68d9..038d217d9f29e 100644
const BrowserWindow* const browser_window = params.browser->window(); const BrowserWindow* const browser_window = params.browser->window();
const gfx::NativeWindow native_window = const gfx::NativeWindow native_window =
browser_window ? browser_window->GetNativeWindow() browser_window ? browser_window->GetNativeWindow()
@@ -561,6 +565,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents( @@ -581,6 +585,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents = std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params); WebContents::Create(create_params);
@ -530,10 +530,10 @@ index b046f80bf68d9..038d217d9f29e 100644
// tab helpers, so the entire set of tab helpers needs to be set up // tab helpers, so the entire set of tab helpers needs to be set up
// immediately. // immediately.
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
index 535d038f7023b..f861a0f37bf85 100644 index 8154aaa9c2aff..1e88bfed111ee 100644
--- chrome/browser/ui/browser_tabstrip.cc --- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc +++ chrome/browser/ui/browser_tabstrip.cc
@@ -32,9 +32,13 @@ void AddTabAt(Browser* browser, @@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(
// Time new tab page creation time. We keep track of the timing data in // 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, but we want to include the time it takes to create the
// WebContents object too. // WebContents object too.
@ -548,7 +548,7 @@ index 535d038f7023b..f861a0f37bf85 100644
params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB
: WindowOpenDisposition::NEW_BACKGROUND_TAB; : WindowOpenDisposition::NEW_BACKGROUND_TAB;
params.tabstrip_index = idx; params.tabstrip_index = idx;
@@ -70,6 +74,16 @@ void AddWebContents(Browser* browser, @@ -81,6 +85,16 @@ void AddWebContents(Browser* browser,
// Can't create a new contents for the current tab - invalid case. // Can't create a new contents for the current tab - invalid case.
DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB); DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB);

View File

@ -56,10 +56,10 @@ index 6f842a7535a56..faaee032e82bd 100644
#if BUILDFLAG(ENABLE_SUPERVISED_USERS) #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
supervised_user::SupervisedUserSettingsService* supervised_service = supervised_user::SupervisedUserSettingsService* supervised_service =
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
index c65b17d8ee9e2..1c6e91858ba9e 100644 index c62382c00a48b..a560eafc3ec80 100644
--- components/content_settings/renderer/content_settings_agent_impl.cc --- components/content_settings/renderer/content_settings_agent_impl.cc
+++ components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc
@@ -144,7 +144,7 @@ ContentSetting GetContentSettingFromRules( @@ -145,7 +145,7 @@ ContentSetting GetContentSettingFromRules(
return rule.GetContentSetting(); return rule.GetContentSetting();
} }
} }

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 0aa9c67c292a6..bbc8e6900a494 100644 index 331f5dc64de39..803b471e9764a 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc --- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -352,6 +352,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() { @@ -355,6 +355,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get(); return callback.get();
} }
@ -16,7 +16,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
enum class UmaEnumIdLookupType { enum class UmaEnumIdLookupType {
GeneralEnumId, GeneralEnumId,
ContextSpecificEnumId, ContextSpecificEnumId,
@@ -604,6 +611,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { @@ -609,6 +616,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1; return 1;
@ -27,7 +27,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
id = CollapseCommandsForUMA(id); id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type); const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id); auto it = map.find(id);
@@ -829,6 +840,14 @@ RenderViewContextMenu::RenderViewContextMenu( @@ -833,6 +844,14 @@ RenderViewContextMenu::RenderViewContextMenu(
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this); pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
@ -42,7 +42,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
observers_.AddObserver(&autofill_context_menu_manager_); observers_.AddObserver(&autofill_context_menu_manager_);
} }
@@ -1289,6 +1308,12 @@ void RenderViewContextMenu::InitMenu() { @@ -1300,6 +1319,12 @@ void RenderViewContextMenu::InitMenu() {
autofill::PopupHidingReason::kContextMenuOpened); autofill::PopupHidingReason::kContextMenuOpened);
} }
} }
@ -55,7 +55,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
} }
Profile* RenderViewContextMenu::GetProfile() const { Profile* RenderViewContextMenu::GetProfile() const {
@@ -3376,6 +3401,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( @@ -3452,6 +3477,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb); execute_plugin_action_callback_ = std::move(cb);
} }
@ -69,7 +69,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
RenderViewContextMenu::GetHandlersForLinkUrl() { RenderViewContextMenu::GetHandlersForLinkUrl() {
custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers = custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers =
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
index 6f56f3b01c6b7..7af069d5e930a 100644 index efd9049faacfd..8a75cdb0dfcfa 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h --- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -157,6 +157,12 @@ class RenderViewContextMenu @@ -157,6 +157,12 @@ class RenderViewContextMenu
@ -85,7 +85,7 @@ index 6f56f3b01c6b7..7af069d5e930a 100644
protected: protected:
Profile* GetProfile() const; Profile* GetProfile() const;
@@ -454,6 +460,9 @@ class RenderViewContextMenu @@ -465,6 +471,9 @@ class RenderViewContextMenu
// built. // built.
bool is_protocol_submenu_valid_ = false; bool is_protocol_submenu_valid_ = false;

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index 7f54e0403b6f2..a6f785d529aca 100644 index 391482bbfa815..0dbd682dd35a3 100644
--- chrome/browser/file_select_helper.cc --- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
@ -10,7 +10,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/connectors/common.h" #include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/platform_util.h" #include "chrome/browser/platform_util.h"
@@ -257,6 +258,13 @@ void FileSelectHelper::OnListFile( @@ -258,6 +259,13 @@ void FileSelectHelper::OnListFile(
void FileSelectHelper::LaunchConfirmationDialog( void FileSelectHelper::LaunchConfirmationDialog(
const base::FilePath& path, const base::FilePath& path,
std::vector<ui::SelectedFileInfo> selected_files) { std::vector<ui::SelectedFileInfo> selected_files) {
@ -24,7 +24,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
ShowFolderUploadConfirmationDialog( ShowFolderUploadConfirmationDialog(
path, path,
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this), base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
@@ -341,6 +349,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded( @@ -342,6 +350,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
if (AbortIfWebContentsDestroyed()) if (AbortIfWebContentsDestroyed())
return; return;
@ -37,7 +37,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS) #if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
enterprise_connectors::ContentAnalysisDelegate::Data data; enterprise_connectors::ContentAnalysisDelegate::Data data;
if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled( if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
@@ -471,7 +485,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() { @@ -472,7 +486,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo> std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>
FileSelectHelper::GetFileTypesFromAcceptType( FileSelectHelper::GetFileTypesFromAcceptType(
@ -47,7 +47,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
auto base_file_type = std::make_unique<ui::SelectFileDialog::FileTypeInfo>(); auto base_file_type = std::make_unique<ui::SelectFileDialog::FileTypeInfo>();
if (accept_types.empty()) if (accept_types.empty())
return base_file_type; return base_file_type;
@@ -484,17 +499,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( @@ -485,17 +500,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
std::vector<base::FilePath::StringType>* extensions = std::vector<base::FilePath::StringType>* extensions =
&file_type->extensions.back(); &file_type->extensions.back();
@ -73,7 +73,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
} else { } else {
if (!base::IsStringASCII(accept_type)) if (!base::IsStringASCII(accept_type))
continue; continue;
@@ -505,10 +527,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( @@ -506,10 +528,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
description_id = IDS_AUDIO_FILES; description_id = IDS_AUDIO_FILES;
else if (ascii_type == "video/*") else if (ascii_type == "video/*")
description_id = IDS_VIDEO_FILES; description_id = IDS_VIDEO_FILES;
@ -94,7 +94,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
if (extensions->size() > old_extension_size) if (extensions->size() > old_extension_size)
valid_type_count++; valid_type_count++;
} }
@@ -533,6 +563,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( @@ -534,6 +564,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
l10n_util::GetStringUTF16(description_id)); l10n_util::GetStringUTF16(description_id));
} }
@ -110,7 +110,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
return file_type; return file_type;
} }
@@ -540,7 +579,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( @@ -541,7 +580,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
void FileSelectHelper::RunFileChooser( void FileSelectHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener, scoped_refptr<content::FileSelectListener> listener,
@ -120,7 +120,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
Profile* profile = Profile::FromBrowserContext( Profile* profile = Profile::FromBrowserContext(
render_frame_host->GetProcess()->GetBrowserContext()); render_frame_host->GetProcess()->GetBrowserContext());
@@ -559,6 +599,7 @@ void FileSelectHelper::RunFileChooser( @@ -560,6 +600,7 @@ void FileSelectHelper::RunFileChooser(
// message. // message.
scoped_refptr<FileSelectHelper> file_select_helper( scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile)); new FileSelectHelper(profile));
@ -128,7 +128,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
file_select_helper->RunFileChooser(render_frame_host, std::move(listener), file_select_helper->RunFileChooser(render_frame_host, std::move(listener),
params.Clone()); params.Clone());
} }
@@ -610,7 +651,8 @@ void FileSelectHelper::RunFileChooser( @@ -611,7 +652,8 @@ void FileSelectHelper::RunFileChooser(
} }
void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) { void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) {

View File

@ -12,7 +12,7 @@ index b169371e4d42f..509e4bda85b47 100644
// on the screen, we can't actually attach to it. // on the screen, we can't actually attach to it.
parent_window = nullptr; parent_window = nullptr;
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
index 819da6b0bff94..a8e3ecd8527bd 100644 index 9e07412327ce9..f889c0e6a03d0 100644
--- components/constrained_window/constrained_window_views.cc --- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc
@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget, @@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
@ -41,7 +41,7 @@ index 819da6b0bff94..a8e3ecd8527bd 100644
return; return;
} }
@@ -219,7 +228,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, @@ -224,7 +233,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
views::Widget* widget = views::DialogDelegate::CreateDialogWidget( views::Widget* widget = views::DialogDelegate::CreateDialogWidget(
dialog, nullptr, dialog, nullptr,
@ -51,7 +51,7 @@ index 819da6b0bff94..a8e3ecd8527bd 100644
widget->SetNativeWindowProperty( widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey, views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier)); const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -241,8 +251,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, @@ -246,8 +256,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view = gfx::NativeView parent_view =
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
@ -66,7 +66,7 @@ index 819da6b0bff94..a8e3ecd8527bd 100644
widget->SetNativeWindowProperty( widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey, views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier)); const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -258,8 +273,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, @@ -263,8 +278,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
if (!requires_positioning) if (!requires_positioning)
return widget; return widget;

View File

@ -44,7 +44,7 @@ index ea1467d09700d..5537a99500e7f 100644
base::FeatureList::IsEnabled( base::FeatureList::IsEnabled(
features::kPeriodicSyncPermissionForDefaultSearchEngine) && features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
index dff5883f7536c..27e58f8fbfe24 100644 index c26bff9382b26..8c93b7b8351c7 100644
--- chrome/browser/permissions/chrome_permissions_client.cc --- chrome/browser/permissions/chrome_permissions_client.cc
+++ chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
@ -55,7 +55,7 @@ index dff5883f7536c..27e58f8fbfe24 100644
#include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h" #include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -185,6 +186,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( @@ -186,6 +187,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
double ChromePermissionsClient::GetSiteEngagementScore( double ChromePermissionsClient::GetSiteEngagementScore(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
const GURL& origin) { const GURL& origin) {
@ -65,7 +65,7 @@ index dff5883f7536c..27e58f8fbfe24 100644
return site_engagement::SiteEngagementService::Get( return site_engagement::SiteEngagementService::Get(
Profile::FromBrowserContext(browser_context)) Profile::FromBrowserContext(browser_context))
->GetScore(origin); ->GetScore(origin);
@@ -348,8 +352,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( @@ -350,8 +354,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
std::make_unique<ContextualNotificationPermissionUiSelector>()); std::make_unique<ContextualNotificationPermissionUiSelector>());
selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>( selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
Profile::FromBrowserContext(browser_context))); Profile::FromBrowserContext(browser_context)));
@ -142,10 +142,10 @@ index fbce13c16ad10..0512b2f09937e 100644
std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt( std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
content::WebContents* web_contents, content::WebContents* web_contents,
diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc
index bc44c36d50d80..31fb2f3fe7e7e 100644 index 3a4d21b89411f..75673d62f5738 100644
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
@@ -174,11 +174,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt( @@ -173,11 +173,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
} }
} }

View File

@ -33,7 +33,7 @@ index 10085136f52ce..ec1be9babecc2 100644
} }
diff --git chrome/browser/policy/browser_dm_token_storage_mac.mm chrome/browser/policy/browser_dm_token_storage_mac.mm diff --git chrome/browser/policy/browser_dm_token_storage_mac.mm chrome/browser/policy/browser_dm_token_storage_mac.mm
index 22fdb0efb78c7..39adc3f192ba1 100644 index 5cb3cff75871c..51333ff7d85e2 100644
--- chrome/browser/policy/browser_dm_token_storage_mac.mm --- chrome/browser/policy/browser_dm_token_storage_mac.mm
+++ chrome/browser/policy/browser_dm_token_storage_mac.mm +++ chrome/browser/policy/browser_dm_token_storage_mac.mm
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
@ -44,7 +44,7 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/abseil-cpp/absl/types/optional.h"
@@ -47,11 +48,6 @@ const char kEnrollmentOptionsFilePath[] = FILE_PATH_LITERAL( @@ -47,11 +48,6 @@
"/Library/Google/Chrome/CloudManagementEnrollmentOptions"); "/Library/Google/Chrome/CloudManagementEnrollmentOptions");
const char kEnrollmentMandatoryOption[] = "Mandatory"; const char kEnrollmentMandatoryOption[] = "Mandatory";
@ -56,12 +56,13 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
constexpr char kEnrollmentTokenMetricsName[] = constexpr char kEnrollmentTokenMetricsName[] =
"Enterprise.CloudManagementEnrollmentTokenLocation.Mac"; "Enterprise.CloudManagementEnrollmentTokenLocation.Mac";
@@ -104,16 +100,22 @@ bool DeleteDMTokenFromAppDataDir(const std::string& client_id) { @@ -104,16 +100,23 @@ bool DeleteDMTokenFromAppDataDir(const std::string& client_id) {
// Get the enrollment token from policy file: /Library/com.google.Chrome.plist. // Get the enrollment token from policy file: /Library/com.google.Chrome.plist.
// Return true if policy is set, otherwise false. // Return true if policy is set, otherwise false.
bool GetEnrollmentTokenFromPolicy(std::string* enrollment_token) { bool GetEnrollmentTokenFromPolicy(std::string* enrollment_token) {
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id( + base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(
+ ChromeBrowserPolicyConnector::GetBundleId()); + ChromeBrowserPolicyConnector::GetBundleId());
+ CFStringRef bundle_id = bundle_id_scoper.get();
+ if (!bundle_id) { + if (!bundle_id) {
+ return false; + return false;
+ } + }
@ -80,13 +81,14 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
+ !CFPreferencesAppValueIsForced(kEnrollmentTokenPolicyName, bundle_id)) { + !CFPreferencesAppValueIsForced(kEnrollmentTokenPolicyName, bundle_id)) {
return false; return false;
} }
CFStringRef value_string = base::apple::CFCast<CFStringRef>(value); CFStringRef value_string = base::apple::CFCast<CFStringRef>(value.get());
@@ -138,12 +140,18 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) { @@ -138,12 +141,19 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) {
} }
absl::optional<bool> IsEnrollmentMandatoryByPolicy() { absl::optional<bool> IsEnrollmentMandatoryByPolicy() {
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id( + base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(
+ ChromeBrowserPolicyConnector::GetBundleId()); + ChromeBrowserPolicyConnector::GetBundleId());
+ CFStringRef bundle_id = bundle_id_scoper.get();
+ if (!bundle_id) { + if (!bundle_id) {
+ return absl::nullopt; + return absl::nullopt;
+ } + }
@ -103,7 +105,7 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
} }
diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc
index 1d38696affc60..41a711f077c5c 100644 index c012642290973..3f4d1be7f2092 100644
--- chrome/browser/policy/chrome_browser_policy_connector.cc --- chrome/browser/policy/chrome_browser_policy_connector.cc
+++ chrome/browser/policy/chrome_browser_policy_connector.cc +++ chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -13,11 +13,14 @@ @@ -13,11 +13,14 @@
@ -121,7 +123,7 @@ index 1d38696affc60..41a711f077c5c 100644
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/browser_management/management_service_factory.h" #include "chrome/browser/enterprise/browser_management/management_service_factory.h"
#include "chrome/browser/policy/configuration_policy_handler_list_factory.h" #include "chrome/browser/policy/configuration_policy_handler_list_factory.h"
@@ -78,6 +81,11 @@ @@ -79,6 +82,11 @@
namespace policy { namespace policy {
namespace { namespace {
bool g_command_line_enabled_for_testing = false; bool g_command_line_enabled_for_testing = false;
@ -133,7 +135,7 @@ index 1d38696affc60..41a711f077c5c 100644
} // namespace } // namespace
ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector() ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector()
@@ -241,6 +249,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() { @@ -265,6 +273,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
g_command_line_enabled_for_testing = true; g_command_line_enabled_for_testing = true;
} }
@ -207,7 +209,7 @@ index 1d38696affc60..41a711f077c5c 100644
base::flat_set<std::string> base::flat_set<std::string>
ChromeBrowserPolicyConnector::device_affiliation_ids() const { ChromeBrowserPolicyConnector::device_affiliation_ids() const {
#if BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -314,22 +389,21 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() { @@ -336,23 +411,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
std::unique_ptr<ConfigurationPolicyProvider> std::unique_ptr<ConfigurationPolicyProvider>
ChromeBrowserPolicyConnector::CreatePlatformProvider() { ChromeBrowserPolicyConnector::CreatePlatformProvider() {
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
@ -229,17 +231,18 @@ index 1d38696affc60..41a711f077c5c 100644
- // policies. - // policies.
- CFStringRef bundle_id = CFSTR("com.google.Chrome"); - CFStringRef bundle_id = CFSTR("com.google.Chrome");
-#else -#else
- base::apple::ScopedCFTypeRef<CFStringRef> bundle_id( - base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper =
- base::SysUTF8ToCFStringRef(base::apple::BaseBundleID())); - base::SysUTF8ToCFStringRef(base::apple::BaseBundleID());
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(GetBundleId());
CFStringRef bundle_id = bundle_id_scoper.get();
-#endif -#endif
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id(GetBundleId());
+ if (!bundle_id) { + if (!bundle_id) {
+ return nullptr; + return nullptr;
+ } + }
auto loader = std::make_unique<PolicyLoaderMac>( auto loader = std::make_unique<PolicyLoaderMac>(
base::ThreadPool::CreateSequencedTaskRunner( base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}), {base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
@@ -339,7 +413,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() { @@ -362,7 +436,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
std::move(loader)); std::move(loader));
#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
base::FilePath config_dir_path; base::FilePath config_dir_path;
@ -249,7 +252,7 @@ index 1d38696affc60..41a711f077c5c 100644
// If the folder containing the policy files doesn't exist, there's no need // If the folder containing the policy files doesn't exist, there's no need
// to have a provider for them. Note that in verified boot, the folder // to have a provider for them. Note that in verified boot, the folder
diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h
index f949565fe137d..d6401dfededff 100644 index daa1a4cf0820d..c33db32822fbf 100644
--- chrome/browser/policy/chrome_browser_policy_connector.h --- chrome/browser/policy/chrome_browser_policy_connector.h
+++ chrome/browser/policy/chrome_browser_policy_connector.h +++ chrome/browser/policy/chrome_browser_policy_connector.h
@@ -28,6 +28,10 @@ @@ -28,6 +28,10 @@
@ -290,7 +293,7 @@ index f949565fe137d..d6401dfededff 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_CHROMEOS_LACROS)
diff --git chrome/browser/policy/policy_path_parser_mac.mm chrome/browser/policy/policy_path_parser_mac.mm diff --git chrome/browser/policy/policy_path_parser_mac.mm chrome/browser/policy/policy_path_parser_mac.mm
index 44a46c9c37788..873a6469c7ab5 100644 index 1a2e78c3472ec..5d1bd95a15113 100644
--- chrome/browser/policy/policy_path_parser_mac.mm --- chrome/browser/policy/policy_path_parser_mac.mm
+++ chrome/browser/policy/policy_path_parser_mac.mm +++ chrome/browser/policy/policy_path_parser_mac.mm
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -301,7 +304,7 @@ index 44a46c9c37788..873a6469c7ab5 100644
#include "components/policy/policy_constants.h" #include "components/policy/policy_constants.h"
namespace policy::path_parser { namespace policy::path_parser {
@@ -97,15 +98,11 @@ base::FilePath::StringType ExpandPathVariables( @@ -97,16 +98,12 @@
void CheckUserDataDirPolicy(base::FilePath* user_data_dir) { void CheckUserDataDirPolicy(base::FilePath* user_data_dir) {
// Since the configuration management infrastructure is not initialized when // Since the configuration management infrastructure is not initialized when
// this code runs, read the policy preference directly. // this code runs, read the policy preference directly.
@ -311,16 +314,17 @@ index 44a46c9c37788..873a6469c7ab5 100644
- // policies. - // policies.
- CFStringRef bundle_id = CFSTR("com.google.Chrome"); - CFStringRef bundle_id = CFSTR("com.google.Chrome");
-#else -#else
base::apple::ScopedCFTypeRef<CFStringRef> bundle_id( base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper =
- base::SysUTF8ToCFStringRef(base::apple::BaseBundleID())); - base::SysUTF8ToCFStringRef(base::apple::BaseBundleID());
+ policy::ChromeBrowserPolicyConnector::GetBundleId();
CFStringRef bundle_id = bundle_id_scoper.get();
-#endif -#endif
+ policy::ChromeBrowserPolicyConnector::GetBundleId());
+ if (!bundle_id) { + if (!bundle_id) {
+ return; + return;
+ } + }
base::apple::ScopedCFTypeRef<CFStringRef> key( base::apple::ScopedCFTypeRef<CFStringRef> key =
base::SysUTF8ToCFStringRef(policy::key::kUserDataDir)); base::SysUTF8ToCFStringRef(policy::key::kUserDataDir);
diff --git chrome/browser/policy/policy_path_parser_win.cc chrome/browser/policy/policy_path_parser_win.cc diff --git chrome/browser/policy/policy_path_parser_win.cc chrome/browser/policy/policy_path_parser_win.cc
index 8dbf958c189dd..6eaccc6688eca 100644 index 8dbf958c189dd..6eaccc6688eca 100644
--- chrome/browser/policy/policy_path_parser_win.cc --- chrome/browser/policy/policy_path_parser_win.cc
@ -351,7 +355,7 @@ index 8dbf958c189dd..6eaccc6688eca 100644
*dir = base::FilePath(policy::path_parser::ExpandPathVariables(value)); *dir = base::FilePath(policy::path_parser::ExpandPathVariables(value));
return true; return true;
diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc
index 4733d00519f56..be7ce3c4ec38b 100644 index 89678edacdadf..821c4448a8188 100644
--- chrome/common/chrome_paths.cc --- chrome/common/chrome_paths.cc
+++ chrome/common/chrome_paths.cc +++ chrome/common/chrome_paths.cc
@@ -523,7 +523,8 @@ bool PathProvider(int key, base::FilePath* result) { @@ -523,7 +523,8 @@ bool PathProvider(int key, base::FilePath* result) {
@ -365,7 +369,7 @@ index 4733d00519f56..be7ce3c4ec38b 100644
cur = base::FilePath(policy::kPolicyPath); cur = base::FilePath(policy::kPolicyPath);
break; break;
diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h
index ab0301b8eb26d..3ed179ccf84bf 100644 index 03387b9680834..76191ba98e80b 100644
--- chrome/common/chrome_paths.h --- chrome/common/chrome_paths.h
+++ chrome/common/chrome_paths.h +++ chrome/common/chrome_paths.h
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
@ -373,10 +377,10 @@ index ab0301b8eb26d..3ed179ccf84bf 100644
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h" #include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "extensions/buildflags/buildflags.h"
#include "third_party/widevine/cdm/buildflags.h" #include "third_party/widevine/cdm/buildflags.h"
namespace base { @@ -47,7 +48,7 @@ enum {
@@ -46,7 +47,7 @@ enum {
DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside. DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside.
DIR_COMPONENTS, // Directory where built-in implementations of DIR_COMPONENTS, // Directory where built-in implementations of
// component-updated libraries or data reside. // component-updated libraries or data reside.
@ -386,10 +390,10 @@ index ab0301b8eb26d..3ed179ccf84bf 100644
// policy files that allow sys-admins // policy files that allow sys-admins
// to set policies for chrome. This directory // to set policies for chrome. This directory
diff --git components/policy/tools/generate_policy_source.py components/policy/tools/generate_policy_source.py diff --git components/policy/tools/generate_policy_source.py components/policy/tools/generate_policy_source.py
index e9d31053cb2ea..793ceac3c7772 100755 index a17b30c37e07a..adcdf25e38ed1 100755
--- components/policy/tools/generate_policy_source.py --- components/policy/tools/generate_policy_source.py
+++ components/policy/tools/generate_policy_source.py +++ components/policy/tools/generate_policy_source.py
@@ -500,6 +500,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups, @@ -486,6 +486,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,
#include <cstdint> #include <cstdint>
#include <string> #include <string>
@ -397,7 +401,7 @@ index e9d31053cb2ea..793ceac3c7772 100755
#include "components/policy/core/common/policy_details.h" #include "components/policy/core/common/policy_details.h"
#include "components/policy/core/common/policy_map.h" #include "components/policy/core/common/policy_map.h"
@@ -522,9 +523,11 @@ struct SchemaData; @@ -508,9 +509,11 @@ struct SchemaData;
''') ''')
if target_platform == 'win': if target_platform == 'win':
@ -411,7 +415,7 @@ index e9d31053cb2ea..793ceac3c7772 100755
f.write('''#if BUILDFLAG(IS_CHROMEOS) f.write('''#if BUILDFLAG(IS_CHROMEOS)
// Sets default profile policies values for enterprise users. // Sets default profile policies values for enterprise users.
@@ -1167,12 +1170,14 @@ namespace policy { @@ -1153,12 +1156,14 @@ namespace policy {
f.write('} // namespace\n\n') f.write('} // namespace\n\n')
if target_platform == 'win': if target_platform == 'win':

View File

@ -59,10 +59,10 @@ index f5f266328283d..672609d94d1b7 100644
base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show")); base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show"));
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index 9410144d268a2..49866ff94ffbf 100644 index 9945ca59efde6..1a071f42bb538 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc --- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -54,7 +54,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { @@ -56,7 +56,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
is_incognito &= !browser.profile()->IsGuestSession(); is_incognito &= !browser.profile()->IsGuestSession();
#endif #endif

View File

@ -14,10 +14,10 @@ index 9bba6cea235e0..9dc5b40559207 100644
} }
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index 7c7c87ce27103..f4bc0400d9268 100644 index 94f17d4c532c4..e9605b415a5aa 100644
--- chrome/browser/profiles/profile.cc --- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc
@@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky @@ -88,6 +88,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
namespace { namespace {
@ -25,7 +25,7 @@ index 7c7c87ce27103..f4bc0400d9268 100644
const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext"; const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext";
const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation"; const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation";
const char kTestOTRProfileIDPrefix[] = "Test::OTR"; const char kTestOTRProfileIDPrefix[] = "Test::OTR";
@@ -104,6 +105,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { @@ -108,6 +109,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
// DevTools::BrowserContext, MediaRouter::Presentation, and // DevTools::BrowserContext, MediaRouter::Presentation, and
// CaptivePortal::Signin are exceptions to this ban. // CaptivePortal::Signin are exceptions to this ban.
if (*this == PrimaryID() || if (*this == PrimaryID() ||
@ -34,7 +34,7 @@ index 7c7c87ce27103..f4bc0400d9268 100644
base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix,
base::CompareCase::SENSITIVE) || base::CompareCase::SENSITIVE) ||
base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix,
@@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( @@ -145,6 +148,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
base::Uuid::GenerateRandomV4().AsLowercaseString().c_str())); base::Uuid::GenerateRandomV4().AsLowercaseString().c_str()));
} }
@ -84,10 +84,10 @@ index 52eb459e9deba..11a92e9e5cfdc 100644
// Returns whether the user has signed in this profile to an account. // Returns whether the user has signed in this profile to an account.
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index d397943b6fc9f..4b381fd2e27f4 100644 index 52a5f08810e85..ce21b2ea52f06 100644
--- chrome/browser/profiles/profile_impl.cc --- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc
@@ -1031,7 +1031,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, @@ -1034,7 +1034,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile); otr_profiles_[otr_profile_id] = std::move(otr_profile);
@ -99,10 +99,10 @@ index d397943b6fc9f..4b381fd2e27f4 100644
return raw_otr_profile; return raw_otr_profile;
} }
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index ae86705656ce2..3fa9ad761af3b 100644 index 861f7d92b35c3..996ae52dcdaab 100644
--- chrome/browser/profiles/profile_manager.cc --- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc
@@ -434,7 +434,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) @@ -438,7 +438,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
profile_manager_android_ = std::make_unique<ProfileManagerAndroid>(this); profile_manager_android_ = std::make_unique<ProfileManagerAndroid>(this);
#endif #endif
@ -134,7 +134,7 @@ index f1530f47eebf0..a41dcf65d9f11 100644
// Returns the directory where the first created profile is stored, // Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use. // relative to the user data directory currently in use.
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
index 421a3a60d308a..b89123a708f79 100644 index 7b1fb9863deb6..d2821d03c4238 100644
--- chrome/browser/profiles/renderer_updater.cc --- chrome/browser/profiles/renderer_updater.cc
+++ chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 023d643451c16..f177e491c8953 100644 index e317e16a513ab..570b5ed114b62 100644
--- chrome/browser/safe_browsing/BUILD.gn --- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn
@@ -32,6 +32,7 @@ static_library("safe_browsing") { @@ -32,6 +32,7 @@ static_library("safe_browsing") {

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
index cef85a137d3e2..985d716ec7549 100644 index d830d64348d63..a4a84c1214163 100644
--- chrome/browser/ui/startup/startup_browser_creator.cc --- chrome/browser/ui/startup/startup_browser_creator.cc
+++ chrome/browser/ui/startup/startup_browser_creator.cc +++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -578,6 +578,14 @@ void OpenNewWindowForFirstRun( @@ -580,6 +580,14 @@ void OpenNewWindowForFirstRun(
is_first_run, std::move(launch_mode_recorder)); is_first_run, std::move(launch_mode_recorder));
} }
#endif // BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) #endif // BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT)
@ -17,7 +17,7 @@ index cef85a137d3e2..985d716ec7549 100644
} // namespace } // namespace
StartupProfileMode StartupProfileModeFromReason( StartupProfileMode StartupProfileModeFromReason(
@@ -1441,6 +1449,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( @@ -1450,6 +1458,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
{profile, mode}, last_opened_profiles); {profile, mode}, last_opened_profiles);
} }
@ -30,7 +30,7 @@ index cef85a137d3e2..985d716ec7549 100644
// static // static
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
const base::CommandLine& command_line, const base::CommandLine& command_line,
@@ -1450,6 +1464,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( @@ -1459,6 +1473,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return; return;
} }
@ -43,7 +43,7 @@ index cef85a137d3e2..985d716ec7549 100644
StartupProfileMode mode = StartupProfileMode mode =
StartupProfileModeFromReason(profile_path_info.reason); StartupProfileModeFromReason(profile_path_info.reason);
diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h
index e22ea9b782910..68724228e79f5 100644 index 5e961db0d6f21..f0c065b16d9f0 100644
--- chrome/browser/ui/startup/startup_browser_creator.h --- chrome/browser/ui/startup/startup_browser_creator.h
+++ chrome/browser/ui/startup/startup_browser_creator.h +++ chrome/browser/ui/startup/startup_browser_creator.h
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index 6a9fa1cca416a..e34cd38fe62f1 100644 index c1ff8fe7df4f4..86d9b53f39360 100644
--- chrome/browser/themes/theme_service.cc --- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@

View File

@ -42,10 +42,10 @@ index 438276b719c2f..69635e429be78 100644
const extensions::Extension* extension = const extensions::Extension* extension =
registry->enabled_extensions().GetByID(extension_id); registry->enabled_extensions().GetByID(extension_id);
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index db900e7459540..cc691a3aa71dd 100644 index d99e0959551ce..5d69ddac55ab4 100644
--- chrome/renderer/chrome_content_renderer_client.cc --- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc
@@ -982,6 +982,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -980,6 +980,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized || if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) && status == chrome::mojom::PluginStatus::kBlocked) &&
@ -53,7 +53,7 @@ index db900e7459540..cc691a3aa71dd 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed( content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) { identifier)) {
status = chrome::mojom::PluginStatus::kAllowed; status = chrome::mojom::PluginStatus::kAllowed;
@@ -1144,7 +1145,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1142,7 +1143,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface( render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -63,7 +63,7 @@ index db900e7459540..cc691a3aa71dd 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlocked: { case chrome::mojom::PluginStatus::kBlocked: {
@@ -1153,7 +1155,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1151,7 +1153,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading(); placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -73,7 +73,7 @@ index db900e7459540..cc691a3aa71dd 100644
break; break;
} }
case chrome::mojom::PluginStatus::kBlockedByPolicy: { case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1163,7 +1166,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( @@ -1161,7 +1164,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name)); group_name));
RenderThread::Get()->RecordAction( RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy")); UserMetricsAction("Plugin_BlockedByPolicy"));
@ -84,7 +84,7 @@ index db900e7459540..cc691a3aa71dd 100644
} }
} }
diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h
index ad5f1925735fd..a871f4a7792a7 100644 index 8b26a93f7527e..17890bf20e481 100644
--- content/browser/browser_plugin/browser_plugin_embedder.h --- content/browser/browser_plugin/browser_plugin_embedder.h
+++ content/browser/browser_plugin/browser_plugin_embedder.h +++ content/browser/browser_plugin/browser_plugin_embedder.h
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 18b342e66f11a..765b0634327d1 100644 index 9cc63fbd174db..4ed6c1b0f1af3 100644
--- chrome/renderer/BUILD.gn --- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@ -18,7 +18,7 @@ index 18b342e66f11a..765b0634327d1 100644
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/common", "//chrome/common",
@@ -238,6 +240,10 @@ static_library("renderer") { @@ -239,6 +241,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ] configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index dc84cbd4c97d1..696af79e6cec5 100644 index af3bbf41a347d..f055dce3ae036 100644
--- chrome/app/chrome_main_delegate.cc --- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
@ -10,16 +10,17 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#include "chrome/browser/buildflags.h" #include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -570,6 +571,8 @@ struct MainFunction { @@ -571,6 +572,9 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState(). // Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) { void InitializeUserDataDir(base::CommandLine* command_line) {
+ if (cef::IsChromeRuntimeEnabled()) + if (cef::IsChromeRuntimeEnabled()) {
+ return; + return;
#if BUILDFLAG(IS_CHROMEOS_LACROS) && DCHECK_IS_ON() + }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// In debug builds of Lacros, we keep track of when the user data dir // In debug builds of Lacros, we keep track of when the user data dir
// is initialized, to ensure the cryptohome is not accessed before login // is initialized, to ensure the cryptohome is not accessed before login
@@ -748,6 +751,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { @@ -749,6 +753,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default; ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID) #endif // !BUILDFLAG(IS_ANDROID)
@ -29,8 +30,8 @@ index dc84cbd4c97d1..696af79e6cec5 100644
+ +
absl::optional<int> ChromeMainDelegate::PostEarlyInitialization( absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) { InvokedIn invoked_in) {
DCHECK(base::ThreadPoolInstance::Get()); DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -782,7 +789,7 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -783,7 +791,7 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics. // future session's metrics.
DeferBrowserMetrics(user_data_dir); DeferBrowserMetrics(user_data_dir);
@ -39,7 +40,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
// In the case the process is not the singleton process, the uninstall tasks // In the case the process is not the singleton process, the uninstall tasks
// need to be executed here. A window will be displayed asking to close all // need to be executed here. A window will be displayed asking to close all
// running instances. // running instances.
@@ -946,7 +953,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization( @@ -950,7 +958,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (base::FeatureList::IsEnabled( if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
@ -49,7 +50,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
record = record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions); base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
@@ -1395,6 +1403,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1399,6 +1408,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type = std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType); command_line.GetSwitchValueASCII(switches::kProcessType);
@ -57,7 +58,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
crash_reporter::InitializeCrashKeys(); crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -1425,6 +1434,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1429,6 +1439,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type); InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line); SetUpInstallerPreferences(command_line);
#endif #endif
@ -65,7 +66,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
child_process_logging::Init(); child_process_logging::Init();
@@ -1637,6 +1647,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1641,6 +1652,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
} }
@ -73,7 +74,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote(). // Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) { if (process_type != switches::kZygoteProcess) {
@@ -1680,6 +1691,7 @@ void ChromeMainDelegate::PreSandboxStartup() { @@ -1684,6 +1696,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command // After all the platform Breakpads have been initialized, store the command
// line for crash reporting. // line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line); crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -81,7 +82,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(ENABLE_PDF) #if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData(); MaybePatchGdiGetFontData();
@@ -1805,6 +1817,7 @@ void ChromeMainDelegate::ZygoteForked() { @@ -1809,6 +1822,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler(); SetUpProfilingShutdownHandler();
} }
@ -89,7 +90,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner. // this up for the browser process in a different manner.
const base::CommandLine* command_line = const base::CommandLine* command_line =
@@ -1827,6 +1840,7 @@ void ChromeMainDelegate::ZygoteForked() { @@ -1831,6 +1845,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process. // Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line); crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -97,7 +98,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
} }
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1927,6 +1941,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { @@ -1931,6 +1946,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
channel == version_info::Channel::DEV); channel == version_info::Channel::DEV);
const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process; const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process;
@ -105,7 +106,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
memory_system::Initializer() memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type) .SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(channel, .SetProfilingClientParameters(channel,
@@ -1936,5 +1951,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { @@ -1940,5 +1956,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
memory_system::DispatcherParameters:: memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kDynamic, AllocationTraceRecorderInclusion::kDynamic,
process_type) process_type)
@ -135,7 +136,7 @@ index 176b6248f18e8..1360e8c209eba 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_CHROMEOS_LACROS)
std::unique_ptr<chromeos::LacrosService> lacros_service_; std::unique_ptr<chromeos::LacrosService> lacros_service_;
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index e819129536dc0..e9287f6e03a88 100644 index 5a2adb9fcc983..a3ce0913825d1 100644
--- chrome/browser/chrome_browser_main.cc --- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
@ -146,7 +147,7 @@ index e819129536dc0..e9287f6e03a88 100644
#include "chrome/browser/about_flags.h" #include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h" #include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/after_startup_task_utils.h"
@@ -486,7 +487,7 @@ void ProcessSingletonNotificationCallbackImpl( @@ -506,7 +507,7 @@ void ProcessSingletonNotificationCallbackImpl(
return; return;
} }
@ -155,7 +156,7 @@ index e819129536dc0..e9287f6e03a88 100644
// The uninstall command-line switch is handled by the origin process; see // The uninstall command-line switch is handled by the origin process; see
// ChromeMainDelegate::PostEarlyInitialization(...). The other process won't // ChromeMainDelegate::PostEarlyInitialization(...). The other process won't
// be able to become the singleton process and will display a window asking // be able to become the singleton process and will display a window asking
@@ -774,7 +775,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { @@ -800,7 +801,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT; return content::RESULT_CODE_NORMAL_EXIT;
} }
@ -164,7 +165,7 @@ index e819129536dc0..e9287f6e03a88 100644
// If we are running stale binaries then relaunch and exit immediately. // If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) { if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser( if (!upgrade_util::RelaunchChromeBrowser(
@@ -787,7 +788,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { @@ -813,7 +814,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
// result in browser startup bailing. // result in browser startup bailing.
return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED; return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED;
} }
@ -173,7 +174,7 @@ index e819129536dc0..e9287f6e03a88 100644
return load_local_state_result; return load_local_state_result;
} }
@@ -889,7 +890,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( @@ -915,7 +916,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state()); browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback()); platform_management_service->RefreshCache(base::NullCallback());
@ -182,7 +183,7 @@ index e819129536dc0..e9287f6e03a88 100644
if (first_run::IsChromeFirstRun()) { if (first_run::IsChromeFirstRun()) {
bool stats_default; bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) { if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -902,7 +903,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( @@ -928,7 +929,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
: metrics::EnableMetricsDefault::OPT_IN); : metrics::EnableMetricsDefault::OPT_IN);
} }
} }
@ -191,7 +192,7 @@ index e819129536dc0..e9287f6e03a88 100644
std::string locale = std::string locale =
startup_data_->chrome_feature_list_creator()->actual_locale(); startup_data_->chrome_feature_list_creator()->actual_locale();
@@ -935,6 +936,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { @@ -961,6 +962,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
master_prefs_ = std::make_unique<first_run::MasterPrefs>(); master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@ -199,7 +200,7 @@ index e819129536dc0..e9287f6e03a88 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs = std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs(); startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs) if (!installer_initial_prefs)
@@ -968,6 +970,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { @@ -994,6 +996,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit); master_prefs_->confirm_to_quit);
} }
#endif // BUILDFLAG(IS_MAC) #endif // BUILDFLAG(IS_MAC)
@ -207,7 +208,7 @@ index e819129536dc0..e9287f6e03a88 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
return content::RESULT_CODE_NORMAL_EXIT; return content::RESULT_CODE_NORMAL_EXIT;
} }
@@ -1032,6 +1035,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { @@ -1060,6 +1063,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated(); browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@ -215,7 +216,7 @@ index e819129536dc0..e9287f6e03a88 100644
// Android does first run in Java instead of native. // Android does first run in Java instead of native.
// Chrome OS has its own out-of-box-experience code. // Chrome OS has its own out-of-box-experience code.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -1053,6 +1057,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { @@ -1081,6 +1085,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
} }
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@ -223,7 +224,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS)
// Set the product channel for crash reports. // Set the product channel for crash reports.
@@ -1417,6 +1422,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1457,6 +1462,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun(); browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN)
@ -231,7 +232,7 @@ index e819129536dc0..e9287f6e03a88 100644
// If the command line specifies 'uninstall' then we need to work here // If the command line specifies 'uninstall' then we need to work here
// unless we detect another chrome browser running. // unless we detect another chrome browser running.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) { if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) {
@@ -1428,6 +1434,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1468,6 +1474,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands( return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess()); *base::CommandLine::ForCurrentProcess());
} }
@ -239,7 +240,7 @@ index e819129536dc0..e9287f6e03a88 100644
ui::SelectFileDialog::SetFactory( ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>()); std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1445,6 +1452,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1485,6 +1492,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
@ -247,7 +248,7 @@ index e819129536dc0..e9287f6e03a88 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) { switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference( bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1458,18 +1466,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1498,18 +1506,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT) ? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED); : static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
} }
@ -270,7 +271,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING) #if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
// Begin relaunch processing immediately if User Data migration is required // Begin relaunch processing immediately if User Data migration is required
@@ -1508,7 +1520,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1548,7 +1560,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
} }
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@ -279,7 +280,7 @@ index e819129536dc0..e9287f6e03a88 100644
// Check if there is any machine level Chrome installed on the current // Check if there is any machine level Chrome installed on the current
// machine. If yes and the current Chrome process is user level, we do not // machine. If yes and the current Chrome process is user level, we do not
// allow the user level Chrome to run. So we notify the user and uninstall // allow the user level Chrome to run. So we notify the user and uninstall
@@ -1517,7 +1529,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1557,7 +1569,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// obtained but before potentially creating the first run sentinel). // obtained but before potentially creating the first run sentinel).
if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall())
return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
@ -288,7 +289,7 @@ index e819129536dc0..e9287f6e03a88 100644
// Desktop construction occurs here, (required before profile creation). // Desktop construction occurs here, (required before profile creation).
PreProfileInit(); PreProfileInit();
@@ -1560,12 +1572,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1600,12 +1612,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state()); browser_process_->local_state());
} }
@ -303,7 +304,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient()); page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1592,6 +1606,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1632,6 +1646,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later. // Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile); profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@ -311,7 +312,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
// Execute first run specific code after the PrefService has been initialized // Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends // and preferences have been registered since some of the import code depends
@@ -1631,6 +1646,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1671,6 +1686,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess()); *base::CommandLine::ForCurrentProcess());
} }
#endif // BUILDFLAG(IS_WIN) #endif // BUILDFLAG(IS_WIN)
@ -319,18 +320,19 @@ index e819129536dc0..e9287f6e03a88 100644
// Configure modules that need access to resources. // Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider); net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1711,6 +1727,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { @@ -1750,6 +1766,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
} }
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+ // Bypass StartupBrowserCreator and RunLoop creation with CEF. + // Bypass StartupBrowserCreator and RunLoop creation with CEF.
+ // CEF with the Chrome runtime will create and manage its own RunLoop. + // CEF with the Chrome runtime will create and manage its own RunLoop.
+#if !BUILDFLAG(ENABLE_CEF) +#if !BUILDFLAG(ENABLE_CEF)
+ +
// This step is costly and is already measured in // This step is costly.
// Startup.StartupBrowserCreator_Start.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(), if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
@@ -1744,11 +1764,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { base::FilePath(), profile_info,
@@ -1782,11 +1803,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer // Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess. // ownership of the browser's lifetime to the BrowserProcess.
@ -346,7 +348,7 @@ index e819129536dc0..e9287f6e03a88 100644
#endif // !BUILDFLAG(IS_ANDROID) #endif // !BUILDFLAG(IS_ANDROID)
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index a509d0b37e953..0d48c4a1f1daf 100644 index fce89997a3a60..2c1228e740216 100644
--- chrome/browser/chrome_browser_main_mac.mm --- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
@ -357,7 +359,7 @@ index a509d0b37e953..0d48c4a1f1daf 100644
#import "chrome/browser/app_controller_mac.h" #import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
@@ -113,6 +114,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { @@ -110,6 +111,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
} }
#endif // !BUILDFLAG(CHROME_FOR_TESTING) #endif // !BUILDFLAG(CHROME_FOR_TESTING)
@ -365,7 +367,7 @@ index a509d0b37e953..0d48c4a1f1daf 100644
// Create the app delegate by requesting the shared AppController. // Create the app delegate by requesting the shared AppController.
CHECK_EQ(nil, NSApp.delegate); CHECK_EQ(nil, NSApp.delegate);
AppController* app_controller = AppController.sharedController; AppController* app_controller = AppController.sharedController;
@@ -121,6 +123,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { @@ -118,6 +120,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
chrome::BuildMainMenu(NSApp, app_controller, chrome::BuildMainMenu(NSApp, app_controller,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false); l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
[app_controller mainMenuCreated]; [app_controller mainMenuCreated];
@ -373,7 +375,7 @@ index a509d0b37e953..0d48c4a1f1daf 100644
ui::WarmScreenCapture(); ui::WarmScreenCapture();
@@ -179,5 +182,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, @@ -167,5 +170,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
} }
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
@ -382,18 +384,18 @@ index a509d0b37e953..0d48c4a1f1daf 100644
+#endif +#endif
} }
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index c4d9748b5cc7c..f897335534e00 100644 index a9b87ac2fcd74..c3469d0bded81 100644
--- chrome/browser/chrome_content_browser_client.cc --- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc
@@ -43,6 +43,7 @@ @@ -46,6 +46,7 @@
#include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h" #include "build/chromeos_buildflags.h"
#include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM
+#include "cef/libcef/features/features.h" +#include "cef/libcef/features/features.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/after_startup_task_utils.h"
@@ -1542,6 +1543,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { @@ -1512,6 +1513,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
} }
ChromeContentBrowserClient::ChromeContentBrowserClient() { ChromeContentBrowserClient::ChromeContentBrowserClient() {
@ -402,7 +404,7 @@ index c4d9748b5cc7c..f897335534e00 100644
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back( extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>()); std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1574,6 +1577,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { @@ -1544,6 +1547,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
} }
} }
@ -414,7 +416,7 @@ index c4d9748b5cc7c..f897335534e00 100644
// static // static
void ChromeContentBrowserClient::RegisterLocalStatePrefs( void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) { PrefRegistrySimple* registry) {
@@ -4457,9 +4465,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( @@ -4442,9 +4450,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite); &search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
@ -426,7 +428,7 @@ index c4d9748b5cc7c..f897335534e00 100644
} }
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6530,7 +6540,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( @@ -6546,7 +6556,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif #endif
} }
@ -435,7 +437,7 @@ index c4d9748b5cc7c..f897335534e00 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -6548,6 +6558,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( @@ -6564,6 +6574,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale(); network_context_params->accept_language = GetApplicationLocale();
} }
@ -444,7 +446,7 @@ index c4d9748b5cc7c..f897335534e00 100644
} }
std::vector<base::FilePath> std::vector<base::FilePath>
@@ -7661,10 +7673,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( @@ -7721,10 +7733,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now(); const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context); const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@ -457,7 +459,7 @@ index c4d9748b5cc7c..f897335534e00 100644
FROM_HERE, keepalive_deadline_ - now, FROM_HERE, keepalive_deadline_ - now,
base::BindOnce( base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired, &ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -7683,7 +7695,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { @@ -7743,7 +7755,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_; --num_keepalive_requests_;
if (num_keepalive_requests_ == 0) { if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer"; DVLOG(1) << "Stopping the keepalive timer";
@ -467,7 +469,7 @@ index c4d9748b5cc7c..f897335534e00 100644
// This deletes the keep alive handle attached to the timer function and // This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence. // unblock the shutdown sequence.
} }
@@ -7825,7 +7838,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( @@ -7885,7 +7898,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now(); const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_; const auto then = keepalive_deadline_;
if (now < then) { if (now < then) {
@ -477,10 +479,10 @@ index c4d9748b5cc7c..f897335534e00 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(), weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index db4ede8eb28c8..a5ca9f6c57826 100644 index efc041c50771c..51d187aa9d39a 100644
--- chrome/browser/chrome_content_browser_client.h --- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h
@@ -136,6 +136,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -142,6 +142,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override; ~ChromeContentBrowserClient() override;
@ -489,7 +491,7 @@ index db4ede8eb28c8..a5ca9f6c57826 100644
// TODO(https://crbug.com/787567): This file is about calls from content/ out // TODO(https://crbug.com/787567): This file is about calls from content/ out
// to chrome/ to get values or notify about events, but both of these // to chrome/ to get values or notify about events, but both of these
// functions are from chrome/ to chrome/ and don't involve content/ at all. // functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -654,7 +656,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -672,7 +674,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override; override;
void OnNetworkServiceCreated( void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override; network::mojom::NetworkService* network_service) override;
@ -498,7 +500,7 @@ index db4ede8eb28c8..a5ca9f6c57826 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -1098,7 +1100,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -1149,7 +1151,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0; uint64_t num_keepalive_requests_ = 0;
@ -508,7 +510,7 @@ index db4ede8eb28c8..a5ca9f6c57826 100644
#endif #endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 1e7a865273e07..d5c8889ee79d7 100644 index 2c9e95b07c762..c70fdab5e0bcc 100644
--- chrome/browser/prefs/browser_prefs.cc --- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
@ -519,7 +521,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
#include "chrome/browser/about_flags.h" #include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_ui.h" #include "chrome/browser/accessibility/accessibility_ui.h"
@@ -189,6 +190,10 @@ @@ -195,6 +196,10 @@
#include "chrome/browser/background/background_mode_manager.h" #include "chrome/browser/background/background_mode_manager.h"
#endif #endif
@ -530,7 +532,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1600,7 +1605,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) { @@ -1664,7 +1669,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
RegisterDefaultBrowserPromptPrefs(registry); RegisterDefaultBrowserPromptPrefs(registry);
@ -540,7 +542,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry); DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
#endif #endif
@@ -1618,6 +1625,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { @@ -1692,6 +1699,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last. // This is intentionally last.
RegisterLocalStatePrefsForMigration(registry); RegisterLocalStatePrefsForMigration(registry);
@ -552,7 +554,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
} }
// Register prefs applicable to all profiles. // Register prefs applicable to all profiles.
@@ -2046,6 +2058,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, @@ -2128,6 +2140,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) { const std::string& locale) {
RegisterProfilePrefs(registry, locale); RegisterProfilePrefs(registry, locale);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index 6fa2a2fdfe48f..eadee5fa295e6 100644 index 7d57988659286..576550dd75111 100644
--- chrome/browser/ui/browser_command_controller.cc --- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc
@@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( @@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@ -24,7 +24,7 @@ index 6fa2a2fdfe48f..eadee5fa295e6 100644
// The order of commands in this switch statement must match the function // The order of commands in this switch statement must match the function
// declaration order in browser.h! // declaration order in browser.h!
switch (id) { switch (id) {
@@ -1169,11 +1177,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( @@ -1172,11 +1180,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private: // BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() { bool BrowserCommandController::IsShowingMainUI() {
@ -41,10 +41,10 @@ index 6fa2a2fdfe48f..eadee5fa295e6 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const { bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index dae8cfd98ef49..2c96c0634b6a0 100644 index 6ce427cb564af..8a59dc84c75ec 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc --- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -593,6 +593,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( @@ -596,6 +596,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
} }
} }
@ -102,7 +102,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
} // namespace } // namespace
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@@ -1397,7 +1448,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { @@ -1481,7 +1532,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false; return false;
} }
@ -111,7 +111,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
GlobalError* error = GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile()) GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id); ->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1412,6 +1463,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { @@ -1496,6 +1547,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
} }
} }
@ -142,7 +142,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const { bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS || if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) { command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1593,11 +1668,15 @@ void AppMenuModel::Build() { @@ -1689,11 +1764,15 @@ void AppMenuModel::Build() {
kDefaultIconSize)); kDefaultIconSize));
} }
@ -163,7 +163,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
AddItemWithStringId(IDC_PRINT, IDS_PRINT); AddItemWithStringId(IDC_PRINT, IDS_PRINT);
@@ -1686,9 +1765,13 @@ void AppMenuModel::Build() { @@ -1799,9 +1878,13 @@ void AppMenuModel::Build() {
kMoreToolsMenuItem); kMoreToolsMenuItem);
if (!features::IsChromeRefresh2023()) { if (!features::IsChromeRefresh2023()) {
@ -180,7 +180,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
} }
if (!features::IsChromeRefresh2023()) { if (!features::IsChromeRefresh2023()) {
@@ -1775,6 +1858,11 @@ void AppMenuModel::Build() { @@ -1889,6 +1972,11 @@ void AppMenuModel::Build() {
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon); SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
} }
@ -193,10 +193,10 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
} }
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index c942243e8a63f..278a0bdc89856 100644 index 55425f15d49fa..06cb8ed2acaa1 100644
--- chrome/browser/ui/toolbar/app_menu_model.h --- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h +++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -209,6 +209,7 @@ class AppMenuModel : public ui::SimpleMenuModel, @@ -215,6 +215,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
void ExecuteCommand(int command_id, int event_flags) override; void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override; bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override; bool IsCommandIdEnabled(int command_id) const override;
@ -204,9 +204,9 @@ index c942243e8a63f..278a0bdc89856 100644
bool IsCommandIdAlerted(int command_id) const override; bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override; bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id, bool GetAcceleratorForCommandId(int command_id,
@@ -242,6 +243,8 @@ class AppMenuModel : public ui::SimpleMenuModel, @@ -256,6 +257,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
// took to select the command. absl::optional<safety_hub::SafetyHubModuleType> expected_module =
void LogMenuMetrics(int command_id); absl::nullopt);
+ bool IsCommandIdEnabledInternal(int command_id) const; + bool IsCommandIdEnabledInternal(int command_id) const;
+ +
@ -363,7 +363,7 @@ index 0c231b6ac5b01..6b5af98e18e42 100644
BrowserFrame(const BrowserFrame&) = delete; BrowserFrame(const BrowserFrame&) = delete;
BrowserFrame& operator=(const BrowserFrame&) = delete; BrowserFrame& operator=(const BrowserFrame&) = delete;
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 5ad7ca507f70c..1d195633a21db 100644 index c74a820ce00ad..55267b61c15af 100644
--- chrome/browser/ui/views/frame/browser_view.cc --- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc
@@ -342,11 +342,10 @@ using content::NativeWebKeyboardEvent; @@ -342,11 +342,10 @@ using content::NativeWebKeyboardEvent;
@ -381,7 +381,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
#if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation. // UMA histograms that record animation smoothness for tab loading animation.
@@ -861,11 +860,23 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { @@ -861,11 +860,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// BrowserView, public: // BrowserView, public:
@ -400,21 +400,11 @@ index 5ad7ca507f70c..1d195633a21db 100644
+void BrowserView::InitBrowser(std::unique_ptr<Browser> browser) { +void BrowserView::InitBrowser(std::unique_ptr<Browser> browser) {
+ DCHECK(!browser_); + DCHECK(!browser_);
+ browser_ = std::move(browser); + browser_ = std::move(browser);
+
+ immersive_mode_controller_ = chrome::CreateImmersiveModeController(this);
+ +
// Store the actions so that the access is available for other classes. // Store the actions so that the access is available for other classes.
if (base::FeatureList::IsEnabled(features::kSidePanelPinning)) { if (base::FeatureList::IsEnabled(features::kSidePanelPinning)) {
browser_->SetUserData(BrowserActions::UserDataKey(), browser_->SetUserData(BrowserActions::UserDataKey(),
@@ -925,7 +936,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) @@ -962,8 +971,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
- immersive_mode_controller_ = chrome::CreateImmersiveModeController(this);
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -985,8 +995,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>( contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_)); devtools_web_view_, contents_web_view_));
@ -432,7 +422,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
contents_separator_ = contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>()); top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1060,7 +1077,9 @@ BrowserView::~BrowserView() { @@ -1037,7 +1053,9 @@ BrowserView::~BrowserView() {
// All the tabs should have been destroyed already. If we were closed by the // All the tabs should have been destroyed already. If we were closed by the
// OS with some tabs than the NativeBrowserFrame should have destroyed them. // OS with some tabs than the NativeBrowserFrame should have destroyed them.
@ -442,7 +432,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
// Stop the animation timer explicitly here to avoid running it in a nested // Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor. // message loop, which may run by Browser destructor.
@@ -1074,12 +1093,14 @@ BrowserView::~BrowserView() { @@ -1051,12 +1069,14 @@ BrowserView::~BrowserView() {
// child views and it is an observer for avatar toolbar button if any. // child views and it is an observer for avatar toolbar button if any.
autofill_bubble_handler_.reset(); autofill_bubble_handler_.reset();
@ -457,7 +447,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
// The TabStrip attaches a listener to the model. Make sure we shut down the // The TabStrip attaches a listener to the model. Make sure we shut down the
// TabStrip first so that it can cleanly remove the listener. // TabStrip first so that it can cleanly remove the listener.
@@ -1097,7 +1118,9 @@ BrowserView::~BrowserView() { @@ -1074,7 +1094,9 @@ BrowserView::~BrowserView() {
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the // `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
// SidePanelCoordinator. // SidePanelCoordinator.
@ -467,7 +457,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
} }
// static // static
@@ -1972,9 +1995,14 @@ void BrowserView::OnExclusiveAccessUserInput() { @@ -1949,9 +1971,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const { bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel. // Immersive mode needs UI for the slide-down top panel.
@ -483,7 +473,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
} }
@@ -3063,7 +3091,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { @@ -3060,7 +3087,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
} }
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@ -493,7 +483,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller(); return download_button->bubble_controller();
return nullptr; return nullptr;
@@ -3611,7 +3640,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { @@ -3611,7 +3639,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this) if (top_container()->parent() == this)
return; return;
@ -503,7 +493,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
top_container()->DestroyLayer(); top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0); AddChildViewAt(top_container(), 0);
EnsureFocusOrder(); EnsureFocusOrder();
@@ -4073,11 +4103,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) { @@ -4073,11 +4102,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling( bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child, gfx::NativeView child,
const gfx::Point& location) { const gfx::Point& location) {
@ -544,7 +534,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
// Draggable regions are defined relative to the web contents. // Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location); gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(), views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4086,7 +4143,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( @@ -4086,7 +4142,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
// Draggable regions should be ignored for clicks into any browser view's // Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar. // owned widgets, for example alerts, permission prompts or find bar.
@ -553,7 +543,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
point_in_contents_web_view_coords.x(), point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) || point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords); WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4194,8 +4251,10 @@ void BrowserView::Layout() { @@ -4194,8 +4250,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code? // TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@ -566,7 +556,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
#if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
// In chromeOS ash we round the bottom two corners of the browser frame by // In chromeOS ash we round the bottom two corners of the browser frame by
@@ -4273,6 +4332,11 @@ void BrowserView::AddedToWidget() { @@ -4273,6 +4331,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif #endif
@ -578,7 +568,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
toolbar_->Init(); toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when // TODO(pbos): Investigate whether the side panels should be creatable when
@@ -4321,13 +4385,9 @@ void BrowserView::AddedToWidget() { @@ -4321,13 +4384,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder(); EnsureFocusOrder();
@ -594,7 +584,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
using_native_frame_ = frame_->ShouldUseNativeFrame(); using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip(); MaybeInitializeWebUITabStrip();
@@ -4747,7 +4807,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, @@ -4744,7 +4803,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout. // Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false; in_process_fullscreen_ = false;
ToolbarSizeChanged(false); ToolbarSizeChanged(false);
@ -604,7 +594,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
} }
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -5136,6 +5197,8 @@ Profile* BrowserView::GetProfile() { @@ -5133,6 +5193,8 @@ Profile* BrowserView::GetProfile() {
} }
void BrowserView::UpdateUIForTabFullscreen() { void BrowserView::UpdateUIForTabFullscreen() {
@ -613,7 +603,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
frame()->GetFrameView()->UpdateFullscreenTopUI(); frame()->GetFrameView()->UpdateFullscreenTopUI();
} }
@@ -5158,6 +5221,8 @@ void BrowserView::HideDownloadShelf() { @@ -5155,6 +5217,8 @@ void BrowserView::HideDownloadShelf() {
} }
bool BrowserView::CanUserExitFullscreen() const { bool BrowserView::CanUserExitFullscreen() const {
@ -623,10 +613,10 @@ index 5ad7ca507f70c..1d195633a21db 100644
} }
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index d6d8db2ed2341..c200381042cc9 100644 index 2e4054890db75..1a518ba936fd1 100644
--- chrome/browser/ui/views/frame/browser_view.h --- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h
@@ -137,11 +137,16 @@ class BrowserView : public BrowserWindow, @@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow,
kUnknown kUnknown
}; };
@ -643,7 +633,7 @@ index d6d8db2ed2341..c200381042cc9 100644
void set_frame(BrowserFrame* frame) { void set_frame(BrowserFrame* frame) {
frame_ = frame; frame_ = frame;
paint_as_active_subscription_ = paint_as_active_subscription_ =
@@ -826,6 +831,9 @@ class BrowserView : public BrowserWindow, @@ -832,6 +837,9 @@ class BrowserView : public BrowserWindow,
// TopContainerBackground::PaintThemeCustomImage for details. // TopContainerBackground::PaintThemeCustomImage for details.
gfx::Point GetThemeOffsetFromBrowserView() const; gfx::Point GetThemeOffsetFromBrowserView() const;
@ -654,7 +644,7 @@ index d6d8db2ed2341..c200381042cc9 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable. // interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index b358a30764051..5c67244a43251 100644 index 5e39a622e391e..e0b67a6902182 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc --- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -48,6 +48,10 @@ @@ -48,6 +48,10 @@
@ -668,7 +658,7 @@ index b358a30764051..5c67244a43251 100644
using views::View; using views::View;
using web_modal::ModalDialogHostObserver; using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost; using web_modal::WebContentsModalDialogHost;
@@ -579,6 +583,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { @@ -583,6 +587,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) { int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@ -699,10 +689,10 @@ index 8267a265a8e10..ee08f18e96a34 100644
ContentsWebView::~ContentsWebView() { ContentsWebView::~ContentsWebView() {
diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
index 4730d2459c324..714809151a0bd 100644 index 84e2a84c15907..3f010beb931b6 100644
--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc --- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
+++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
@@ -575,6 +575,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( @@ -585,6 +585,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
frame->GetNativeWindow()->SetEventTargeter( frame->GetNativeWindow()->SetEventTargeter(
std::make_unique<chromeos::InteriorResizeHandleTargeter>()); std::make_unique<chromeos::InteriorResizeHandleTargeter>());
#endif #endif
@ -714,7 +704,7 @@ index 4730d2459c324..714809151a0bd 100644
} }
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() { PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -671,18 +676,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( @@ -681,18 +686,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest( int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) { const gfx::Point& point) {
@ -765,7 +755,7 @@ index 4730d2459c324..714809151a0bd 100644
// Allow dragging and resizing the window. // Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame( int window_component = GetHTComponentForFrame(
@@ -749,7 +778,8 @@ void PictureInPictureBrowserFrameView::Layout() { @@ -759,7 +788,8 @@ void PictureInPictureBrowserFrameView::Layout() {
gfx::Rect content_area = GetLocalBounds(); gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets()); content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area; gfx::Rect top_bar = content_area;
@ -775,7 +765,7 @@ index 4730d2459c324..714809151a0bd 100644
top_bar_container_view_->SetBoundsRect(top_bar); top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) { if (auto_pip_setting_overlay_) {
@@ -1213,7 +1243,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { @@ -1234,7 +1264,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
} }
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const { int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@ -785,11 +775,25 @@ index 4730d2459c324..714809151a0bd 100644
} }
gfx::Size PictureInPictureBrowserFrameView::GetNonClientViewAreaSize() const { gfx::Size PictureInPictureBrowserFrameView::GetNonClientViewAreaSize() const {
diff --git chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
index b862ceac7225d..9575440a77d67 100644
--- chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
+++ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
@@ -27,7 +27,8 @@ OmniboxPopupCloser::OmniboxPopupCloser(BrowserView* browser_view)
OmniboxPopupCloser::~OmniboxPopupCloser() = default;
void OmniboxPopupCloser::OnMouseEvent(ui::MouseEvent* event) {
- if (!browser_view_->browser()->is_delete_scheduled() &&
+ if (browser_view_->browser() &&
+ !browser_view_->browser()->is_delete_scheduled() &&
event->type() == ui::ET_MOUSE_PRESSED) {
LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view);
diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc
index ca602db58de3a..1db448a2526a4 100644 index 0e24efef68ace..f1cda2809f398 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc --- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params, @@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
}; };
for (PageActionIconType type : params.types_enabled) { for (PageActionIconType type : params.types_enabled) {
@ -803,7 +807,7 @@ index ca602db58de3a..1db448a2526a4 100644
case PageActionIconType::kPaymentsOfferNotification: case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon( add_page_action_icon(
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 50c887cc242fd..99428cb8eeda2 100644 index 9536b049aeb9d..30f3091939675 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -558,29 +558,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( @@ -558,29 +558,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@ -849,10 +853,10 @@ index 50c887cc242fd..99428cb8eeda2 100644
} }
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 503fe3b9c17ec..9c3be45b4699b 100644 index f7f763cac17f4..788185cc57cae 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc --- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background { @@ -190,7 +190,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override { void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view, bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_); browser_view_);
@ -861,7 +865,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
SkColor frame_color = SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor( browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent); BrowserFrameActiveState::kUseCurrent);
@@ -221,12 +221,13 @@ END_METADATA @@ -219,12 +219,13 @@ END_METADATA
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public: // ToolbarView, public:
@ -877,7 +881,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
SetID(VIEW_ID_TOOLBAR); SetID(VIEW_ID_TOOLBAR);
container_view_ = AddChildView(std::make_unique<ContainerView>()); container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -251,6 +252,19 @@ ToolbarView::~ToolbarView() { @@ -249,6 +250,19 @@ ToolbarView::~ToolbarView() {
} }
void ToolbarView::Init() { void ToolbarView::Init() {
@ -897,7 +901,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
#if defined(USE_AURA) #if defined(USE_AURA)
// Avoid generating too many occlusion tracking calculation events before this // Avoid generating too many occlusion tracking calculation events before this
// function returns. The occlusion status will be computed only once once this // function returns. The occlusion status will be computed only once once this
@@ -275,12 +289,13 @@ void ToolbarView::Init() { @@ -273,12 +287,12 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>( auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this, browser_, browser_->profile(), browser_->command_controller(), this,
@ -907,13 +911,12 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
size_animation_.Reset(1); size_animation_.Reset(1);
std::unique_ptr<DownloadToolbarButtonView> download_button; std::unique_ptr<DownloadToolbarButtonView> download_button;
- if (download::IsDownloadBubbleEnabled(browser_->profile())) { - if (download::IsDownloadBubbleEnabled()) {
+ if (download::IsDownloadBubbleEnabled(browser_->profile()) && + if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload)) {
+ BUTTON_VISIBLE(kDownload)) {
download_button = download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_); std::make_unique<DownloadToolbarButtonView>(browser_view_);
} }
@@ -362,8 +377,10 @@ void ToolbarView::Init() { @@ -360,8 +374,10 @@ void ToolbarView::Init() {
} }
} }
std::unique_ptr<media_router::CastToolbarButton> cast; std::unique_ptr<media_router::CastToolbarButton> cast;
@ -925,7 +928,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
std::unique_ptr<MediaToolbarButtonView> media_button; std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) { if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -373,7 +390,8 @@ void ToolbarView::Init() { @@ -371,7 +387,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView> std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button; send_tab_to_self_button;
@ -935,7 +938,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
send_tab_to_self_button = send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>( std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_); browser_view_);
@@ -444,7 +462,8 @@ void ToolbarView::Init() { @@ -443,7 +460,8 @@ void ToolbarView::Init() {
send_tab_to_self_button_ = send_tab_to_self_button_ =
container_view_->AddChildView(std::move(send_tab_to_self_button)); container_view_->AddChildView(std::move(send_tab_to_self_button));
@ -946,7 +949,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
side_panel_container_ = container_view_->AddChildView( side_panel_container_ = container_view_->AddChildView(
std::make_unique<SidePanelToolbarContainer>(browser_view_)); std::make_unique<SidePanelToolbarContainer>(browser_view_));
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index 8411945c45330..0d50479ec2cdc 100644 index 3bfe52cff3511..11373de4c2a3a 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h --- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView, @@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView,

View File

@ -1,5 +1,5 @@
diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc
index 6413d01cb4b41..b38eb084d8508 100644 index 9b666cd9c1989..dd0814403474c 100644
--- chrome/utility/chrome_content_utility_client.cc --- chrome/utility/chrome_content_utility_client.cc
+++ chrome/utility/chrome_content_utility_client.cc +++ chrome/utility/chrome_content_utility_client.cc
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index 7fa53303b844c..06016ae9beb4e 100644 index 4300a5d94e04a..7ff40d52d3ec5 100644
--- content/browser/devtools/devtools_instrumentation.h --- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h
@@ -110,7 +110,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -108,7 +108,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node, FrameTreeNode* frame_tree_node,
absl::optional<blink::UserAgentMetadata>* override_out); absl::optional<blink::UserAgentMetadata>* override_out);
@ -33,17 +33,17 @@ index d69f9d4641613..e88aaf8617c52 100644
MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view); MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view);
diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h
index 95ce91508908e..94042da4b46bf 100644 index 1a1a07dad71dd..42048c360e797 100644
--- content/browser/renderer_host/input/synthetic_gesture_target_base.h --- content/browser/renderer_host/input/synthetic_gesture_target_base.h
+++ content/browser/renderer_host/input/synthetic_gesture_target_base.h +++ content/browser/renderer_host/input/synthetic_gesture_target_base.h
@@ -9,6 +9,7 @@ @@ -8,6 +8,7 @@
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h" #include "base/memory/raw_ptr.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "content/browser/renderer_host/input/synthetic_gesture_target.h"
+#include "content/common/content_export.h" +#include "content/common/content_export.h"
#include "content/common/input/synthetic_gesture_target.h"
#include "ui/gfx/geometry/point_f.h" #include "ui/gfx/geometry/point_f.h"
namespace ui {
@@ -26,7 +27,8 @@ namespace content { @@ -26,7 +27,8 @@ namespace content {
class RenderWidgetHostImpl; class RenderWidgetHostImpl;
@ -68,7 +68,7 @@ index 97c7dc7c25000..63c42610bfd9c 100644
blink::mojom::V8CacheOptions GetV8CacheOptions(); blink::mojom::V8CacheOptions GetV8CacheOptions();
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 1b0bfc81ebda9..fb5b9f1c1fc1a 100644 index af07b543f8a96..ff537ffb32224 100644
--- third_party/blink/renderer/controller/BUILD.gn --- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn
@@ -35,6 +35,7 @@ component("controller") { @@ -35,6 +35,7 @@ component("controller") {

View File

@ -12,10 +12,10 @@ index 34cacda8ef225..e0465b8ac1185 100644
version.Set("V8-Version", V8_VERSION_STRING); version.Set("V8-Version", V8_VERSION_STRING);
std::string host = info.GetHeaderValue("host"); std::string host = info.GetHeaderValue("host");
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 75cc859b67292..6b565adaef9c7 100644 index 16b5afde04752..01561da6aee2d 100644
--- content/browser/loader/navigation_url_loader_impl.cc --- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc
@@ -752,6 +752,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { @@ -751,6 +751,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
: nullptr, : nullptr,
&loader_factory); &loader_factory);
@ -39,10 +39,10 @@ index 75cc859b67292..6b565adaef9c7 100644
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>( factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory)); std::move(loader_factory));
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index dcdc54f90f114..cc4d517b22809 100644 index ed845bfab9e73..fc694c9d62f4d 100644
--- content/public/browser/content_browser_client.cc --- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc
@@ -1067,7 +1067,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( @@ -1084,7 +1084,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated( void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {} network::mojom::NetworkService* network_service) {}
@ -51,7 +51,7 @@ index dcdc54f90f114..cc4d517b22809 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -1076,6 +1076,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( @@ -1093,6 +1093,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) { cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en"; network_context_params->accept_language = "en-us,en";
@ -60,10 +60,10 @@ index dcdc54f90f114..cc4d517b22809 100644
std::vector<base::FilePath> std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 06e22b37dfbce..95f433c7c2a5e 100644 index 966f79ab782fa..9b820f69835b8 100644
--- content/public/browser/content_browser_client.h --- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h
@@ -40,6 +40,7 @@ @@ -42,6 +42,7 @@
#include "content/public/browser/mojo_binder_policy_map.h" #include "content/public/browser/mojo_binder_policy_map.h"
#include "content/public/browser/privacy_sandbox_invoking_api.h" #include "content/public/browser/privacy_sandbox_invoking_api.h"
#include "content/public/browser/storage_partition_config.h" #include "content/public/browser/storage_partition_config.h"
@ -71,7 +71,7 @@ index 06e22b37dfbce..95f433c7c2a5e 100644
#include "content/public/common/alternative_error_page_override_info.mojom-forward.h" #include "content/public/common/alternative_error_page_override_info.mojom-forward.h"
#include "content/public/common/page_visibility_state.h" #include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h" #include "content/public/common/window_container_type.mojom-forward.h"
@@ -1961,7 +1962,7 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2008,7 +2009,7 @@ class CONTENT_EXPORT ContentBrowserClient {
// //
// If |relative_partition_path| is the empty string, it means this needs to // If |relative_partition_path| is the empty string, it means this needs to
// create the default NetworkContext for the BrowserContext. // create the default NetworkContext for the BrowserContext.
@ -80,7 +80,7 @@ index 06e22b37dfbce..95f433c7c2a5e 100644
BrowserContext* context, BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -2175,6 +2176,19 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2229,6 +2230,19 @@ class CONTENT_EXPORT ContentBrowserClient {
RenderFrameHost* initiator_document, RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory); mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -100,7 +100,7 @@ index 06e22b37dfbce..95f433c7c2a5e 100644
// Creates an OverlayWindow to be used for video or Picture-in-Picture. // Creates an OverlayWindow to be used for video or Picture-in-Picture.
// This window will house the content shown when in Picture-in-Picture mode. // This window will house the content shown when in Picture-in-Picture mode.
// This will return a new OverlayWindow. // This will return a new OverlayWindow.
@@ -2232,6 +2246,10 @@ class CONTENT_EXPORT ContentBrowserClient { @@ -2286,6 +2300,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string. // Used as part of the user agent string.
virtual std::string GetProduct(); virtual std::string GetProduct();
@ -137,7 +137,7 @@ index 72f72e2c6627d..f5ca688e5d9f4 100644
// started. // started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 83daef460d5dd..ec9dd64fde6d8 100644 index e72f99daf2fea..d3b5bd5565da0 100644
--- content/renderer/render_thread_impl.cc --- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc
@@ -584,6 +584,8 @@ void RenderThreadImpl::Init() { @@ -584,6 +584,8 @@ void RenderThreadImpl::Init() {
@ -150,10 +150,10 @@ index 83daef460d5dd..ec9dd64fde6d8 100644
base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver, base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver,
base::Unretained(this))); base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index ee367c7306b07..440493e485874 100644 index 5790d6ed3e4d9..d7519f9032c78 100644
--- content/renderer/renderer_blink_platform_impl.cc --- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc
@@ -948,6 +948,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { @@ -984,6 +984,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -170,10 +170,10 @@ index ee367c7306b07..440493e485874 100644
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
return std::make_unique<V8ValueConverterImpl>(); return std::make_unique<V8ValueConverterImpl>();
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 23c389ed9c731..931165a4e9a8f 100644 index 328a108d2bd1c..f44846ddc2c9e 100644
--- content/renderer/renderer_blink_platform_impl.h --- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h
@@ -224,6 +224,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -234,6 +234,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override; InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_ANDROID)
@ -184,7 +184,7 @@ index 23c389ed9c731..931165a4e9a8f 100644
// plus eTLD+1, such as https://google.com), or to a more specific origin. // plus eTLD+1, such as https://google.com), or to a more specific origin.
void SetIsLockedToSite(); void SetIsLockedToSite();
diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc
index 35b1675d9f57f..6e715215ed905 100644 index 84da983df907b..7a9390e069df5 100644
--- content/shell/browser/shell_content_browser_client.cc --- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc +++ content/shell/browser/shell_content_browser_client.cc
@@ -701,7 +701,7 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( @@ -701,7 +701,7 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
@ -218,10 +218,10 @@ index 950e82cd59ab4..1f8b23da6fec5 100644
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc
index 8d5fc50c9d528..7692150fb9ce0 100644 index 6a118e43698a1..82df4466206d2 100644
--- headless/lib/browser/headless_content_browser_client.cc --- headless/lib/browser/headless_content_browser_client.cc
+++ headless/lib/browser/headless_content_browser_client.cc +++ headless/lib/browser/headless_content_browser_client.cc
@@ -294,7 +294,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed( @@ -297,7 +297,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
return true; return true;
} }
@ -230,7 +230,7 @@ index 8d5fc50c9d528..7692150fb9ce0 100644
content::BrowserContext* context, content::BrowserContext* context,
bool in_memory, bool in_memory,
const base::FilePath& relative_partition_path, const base::FilePath& relative_partition_path,
@@ -304,6 +304,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( @@ -307,6 +307,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams( HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams(
in_memory, relative_partition_path, network_context_params, in_memory, relative_partition_path, network_context_params,
cert_verifier_creation_params); cert_verifier_creation_params);
@ -239,7 +239,7 @@ index 8d5fc50c9d528..7692150fb9ce0 100644
std::string HeadlessContentBrowserClient::GetProduct() { std::string HeadlessContentBrowserClient::GetProduct() {
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
index dfdef1bdae542..af36779ca0ed6 100644 index 18f90a11713b5..688549524fb17 100644
--- headless/lib/browser/headless_content_browser_client.h --- headless/lib/browser/headless_content_browser_client.h
+++ headless/lib/browser/headless_content_browser_client.h +++ headless/lib/browser/headless_content_browser_client.h
@@ -80,7 +80,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { @@ -80,7 +80,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {

View File

@ -90,7 +90,7 @@ index 4320694e7f691..bb9b6629bc384 100644
} }
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 965b07bc43847..89da1178ca765 100644 index f3988a35b1df7..8dd8c652b105e 100644
--- content/app/content_main_runner_impl.cc --- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
@ -101,7 +101,7 @@ index 965b07bc43847..89da1178ca765 100644
#include "base/time/time.h" #include "base/time/time.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "build/build_config.h" #include "build/build_config.h"
@@ -1338,6 +1339,11 @@ void ContentMainRunnerImpl::Shutdown() { @@ -1334,6 +1335,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true; is_shutdown_ = true;
} }

View File

@ -81,7 +81,7 @@ index 27a803784eb9e..a8b033f475cb4 100644
g_crash_helper_enabled = true; g_crash_helper_enabled = true;
return true; return true;
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
index 680c8ec662ecf..2c898fc6e1c70 100644 index 2f69ae87fd93d..69a1bb6e008b4 100644
--- chrome/common/crash_keys.cc --- chrome/common/crash_keys.cc
+++ chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc
@@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
@ -105,7 +105,7 @@ index 680c8ec662ecf..2c898fc6e1c70 100644
static const char* const kIgnoreSwitches[] = { static const char* const kIgnoreSwitches[] = {
switches::kEnableLogging, switches::kEnableLogging,
switches::kFlagSwitchesBegin, switches::kFlagSwitchesBegin,
@@ -159,11 +163,9 @@ bool IsBoringSwitch(const std::string& flag) { @@ -160,11 +164,9 @@ bool IsBoringSwitch(const std::string& flag) {
return false; return false;
} }

View File

@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index c957a691efcac..127872ce6c249 100644 index 44cf15e1b4703..b3f744454f6c3 100644
--- components/embedder_support/user_agent_utils.cc --- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
@ -21,7 +21,7 @@ index c957a691efcac..127872ce6c249 100644
namespace embedder_support { namespace embedder_support {
namespace { namespace {
@@ -240,6 +245,14 @@ blink::UserAgentBrandList GetUserAgentBrandFullVersionList( @@ -253,6 +258,14 @@ std::vector<std::string> GetFormFactorClientHints(
std::string GetProductAndVersion( std::string GetProductAndVersion(
UserAgentReductionEnterprisePolicyState user_agent_reduction) { UserAgentReductionEnterprisePolicyState user_agent_reduction) {

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc
index cead7cfa14bae..24142c2e4896f 100644 index 8cea5bf4591cd..c5fca9dd1a9e8 100644
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc --- chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@ -10,9 +10,9 @@ index cead7cfa14bae..24142c2e4896f 100644
#include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/preloading/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h" #include "chrome/browser/preloading/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_contents.h" #include "components/no_state_prefetch/browser/no_state_prefetch_contents.h"
@@ -18,6 +19,10 @@ @@ -26,6 +27,10 @@
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h" #include "pdf/pdf_features.h"
#include "extensions/common/manifest_handlers/mime_types_handler.h" #endif // BUILDFLAG(ENABLE_PDF)
+#if BUILDFLAG(ENABLE_CEF) +#if BUILDFLAG(ENABLE_CEF)
+#include "cef/libcef/browser/extensions/alloy_extensions_util.h" +#include "cef/libcef/browser/extensions/alloy_extensions_util.h"
@ -21,7 +21,7 @@ index cead7cfa14bae..24142c2e4896f 100644
namespace extensions { namespace extensions {
void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
@@ -34,6 +39,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( @@ -43,6 +48,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
if (!web_contents) if (!web_contents)
return; return;
@ -29,7 +29,7 @@ index cead7cfa14bae..24142c2e4896f 100644
// If the request was for NoStatePrefetch, abort the prefetcher and do not // If the request was for NoStatePrefetch, abort the prefetcher and do not
// continue. This is because plugins cancel NoStatePrefetch, see // continue. This is because plugins cancel NoStatePrefetch, see
// http://crbug.com/343590. // http://crbug.com/343590.
@@ -44,6 +50,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( @@ -53,6 +59,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
no_state_prefetch_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD); no_state_prefetch_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
return; return;
} }
@ -37,7 +37,7 @@ index cead7cfa14bae..24142c2e4896f 100644
auto* browser_context = web_contents->GetBrowserContext(); auto* browser_context = web_contents->GetBrowserContext();
@@ -70,9 +77,18 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( @@ -79,9 +86,18 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
// forms of zooming won't work). // forms of zooming won't work).
// TODO(1042323): Present a coherent representation of a tab id for portal // TODO(1042323): Present a coherent representation of a tab id for portal
// contents. // contents.
@ -60,7 +60,7 @@ index cead7cfa14bae..24142c2e4896f 100644
std::unique_ptr<StreamContainer> stream_container( std::unique_ptr<StreamContainer> stream_container(
new StreamContainer(tab_id, embedded, handler_url, extension_id, new StreamContainer(tab_id, embedded, handler_url, extension_id,
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index bf2c4d83e99b0..55c8c05898e2d 100644 index 55f83aa0e801a..e111e3273796e 100644
--- extensions/browser/extension_host.cc --- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc
@@ -62,12 +62,13 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -62,12 +62,13 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@ -132,7 +132,7 @@ index bf2c4d83e99b0..55c8c05898e2d 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index 316d778267f30..49de50e79fa37 100644 index c0398bdd68648..93fc2409ab3d7 100644
--- extensions/browser/extension_host.h --- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h +++ extensions/browser/extension_host.h
@@ -62,6 +62,12 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -62,6 +62,12 @@ class ExtensionHost : public DeferredStartRenderHost,
@ -157,7 +157,7 @@ index 316d778267f30..49de50e79fa37 100644
content::RenderFrameHost* main_frame_host() const { return main_frame_host_; } content::RenderFrameHost* main_frame_host() const { return main_frame_host_; }
content::RenderProcessHost* render_process_host() const; content::RenderProcessHost* render_process_host() const;
bool has_loaded_once() const { return has_loaded_once_; } bool has_loaded_once() const { return has_loaded_once_; }
@@ -230,7 +236,8 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -238,7 +244,8 @@ class ExtensionHost : public DeferredStartRenderHost,
raw_ptr<content::BrowserContext> browser_context_; raw_ptr<content::BrowserContext> browser_context_;
// The host for our HTML content. // The host for our HTML content.
@ -199,10 +199,10 @@ index c3197eb4790fa..1e7ae767b0582 100644
} }
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index 058367b7ab78d..99a9e901566ce 100644 index bded50cb03354..4df474bd3c7bb 100644
--- extensions/browser/extensions_browser_client.h --- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h
@@ -32,6 +32,7 @@ @@ -31,6 +31,7 @@
#include "url/gurl.h" #include "url/gurl.h"
class ExtensionFunctionRegistry; class ExtensionFunctionRegistry;
@ -210,7 +210,7 @@ index 058367b7ab78d..99a9e901566ce 100644
class PrefService; class PrefService;
namespace base { namespace base {
@@ -80,6 +81,7 @@ class ComponentExtensionResourceManager; @@ -79,6 +80,7 @@ class ComponentExtensionResourceManager;
class Extension; class Extension;
class ExtensionCache; class ExtensionCache;
class ExtensionError; class ExtensionError;
@ -218,7 +218,7 @@ index 058367b7ab78d..99a9e901566ce 100644
class ExtensionHostDelegate; class ExtensionHostDelegate;
class ExtensionSet; class ExtensionSet;
class ExtensionSystem; class ExtensionSystem;
@@ -265,6 +267,14 @@ class ExtensionsBrowserClient { @@ -264,6 +266,14 @@ class ExtensionsBrowserClient {
virtual std::unique_ptr<ExtensionHostDelegate> virtual std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() = 0; CreateExtensionHostDelegate() = 0;
@ -257,7 +257,7 @@ index fcfb4635bfc23..619f210c7240e 100644
base::BindOnce(&ProcessManager::HandleCloseExtensionHost, base::BindOnce(&ProcessManager::HandleCloseExtensionHost,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
diff --git extensions/common/extensions_client.cc extensions/common/extensions_client.cc diff --git extensions/common/extensions_client.cc extensions/common/extensions_client.cc
index a8108350ddde2..7ae49e78b4327 100644 index 713e66b05abcf..de97074586d0f 100644
--- extensions/common/extensions_client.cc --- extensions/common/extensions_client.cc
+++ extensions/common/extensions_client.cc +++ extensions/common/extensions_client.cc
@@ -23,7 +23,7 @@ ExtensionsClient* g_client = nullptr; @@ -23,7 +23,7 @@ ExtensionsClient* g_client = nullptr;

View File

@ -12,7 +12,7 @@ index 321877844bd21..f7f00a99d6244 100644
# https://crbug.com/474506. # https://crbug.com/474506.
"//clank/java/BUILD.gn", "//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn diff --git BUILD.gn BUILD.gn
index ad4b830fa0932..f6bd36461ae40 100644 index 678989ac85db1..b05b5aac2fc64 100644
--- BUILD.gn --- BUILD.gn
+++ BUILD.gn +++ BUILD.gn
@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@ -31,7 +31,7 @@ index ad4b830fa0932..f6bd36461ae40 100644
+ deps += [ "//cef" ] + deps += [ "//cef" ]
+ } + }
+ +
if (enable_printing || enable_printing_unittests) { if (enable_printing || enable_printing_tests) {
deps += [ "//printing:printing_unittests" ] deps += [ "//printing:printing_unittests" ]
} }
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
@ -76,7 +76,7 @@ index 1da479dd5eebc..ff9c7e467997c 100644
- visual_studio_runtime_dirs = [] - visual_studio_runtime_dirs = []
} }
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 54efa2d231a3b..bee18f42509b6 100644 index 5a4ddf12a9db3..6c255f9db2433 100644
--- chrome/chrome_paks.gni --- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni +++ chrome/chrome_paks.gni
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
@ -99,7 +99,7 @@ index 54efa2d231a3b..bee18f42509b6 100644
sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
deps += [ "//extensions:extensions_browser_resources" ] deps += [ "//extensions:extensions_browser_resources" ]
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
index fdb87c7e75342..7ba91bd740c81 100644 index c43aa5873d96a..68978caa5b96b 100644
--- chrome/chrome_repack_locales.gni --- chrome/chrome_repack_locales.gni
+++ chrome/chrome_repack_locales.gni +++ chrome/chrome_repack_locales.gni
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
@ -110,9 +110,9 @@ index fdb87c7e75342..7ba91bd740c81 100644
import("//extensions/buildflags/buildflags.gni") import("//extensions/buildflags/buildflags.gni")
import("//tools/grit/repack.gni") import("//tools/grit/repack.gni")
@@ -93,6 +94,10 @@ template("chrome_repack_locales") { @@ -97,6 +98,10 @@ template("chrome_repack_locales") {
[ "${root_gen_dir}/chromeos/strings/chromeos_strings_" ] source_patterns += [ "${root_gen_dir}/components/strings/search_engine_descriptions_strings_" ]
deps += [ "//chromeos/strings" ] deps += [ "//components/strings:search_engine_descriptions_strings" ]
} }
+ if (enable_cef) { + if (enable_cef) {
+ source_patterns += [ "${root_gen_dir}/cef/cef_strings_" ] + source_patterns += [ "${root_gen_dir}/cef/cef_strings_" ]
@ -149,7 +149,7 @@ index 6a32fb624ea4c..923a92b478368 100644
outputs = [ outputs = [
"$root_out_dir/chrome.7z", "$root_out_dir/chrome.7z",
diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni
index 77f1be6116d0c..6bc41416af551 100644 index 79d613489bac2..86b82e96b7ec0 100644
--- tools/grit/grit_args.gni --- tools/grit/grit_args.gni
+++ tools/grit/grit_args.gni +++ tools/grit/grit_args.gni
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@

View File

@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 95e5ac768b904..58ec586338027 100644 index cdce083b1bea8..f59c624b3c7c0 100644
--- tools/gritsettings/resource_ids.spec --- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec
@@ -1263,6 +1263,15 @@ @@ -1266,6 +1266,15 @@
# END "everything else" section. # END "everything else" section.
# Everything but chrome/, components/, content/, and ios/ # Everything but chrome/, components/, content/, and ios/

View File

@ -1,16 +1,16 @@
diff --git base/win/dark_mode_support.cc base/win/dark_mode_support.cc diff --git base/win/dark_mode_support.cc base/win/dark_mode_support.cc
index 325bc70b6ba97..d4117dbb1d4d8 100644 index 6b9d2c180c904..3570ef071ba07 100644
--- base/win/dark_mode_support.cc --- base/win/dark_mode_support.cc
+++ base/win/dark_mode_support.cc +++ base/win/dark_mode_support.cc
@@ -6,6 +6,7 @@ @@ -7,6 +7,7 @@
#include <windows.h> #include <windows.h>
#include "base/check.h"
+#include "base/command_line.h" +#include "base/command_line.h"
#include "base/native_library.h" #include "base/native_library.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
@@ -85,11 +86,20 @@ const DarkModeSupport& GetDarkModeSupport() { @@ -86,11 +87,20 @@ const DarkModeSupport& GetDarkModeSupport() {
return dark_mode_support; return dark_mode_support;
} }
@ -32,7 +32,7 @@ index 325bc70b6ba97..d4117dbb1d4d8 100644
return (dark_mode_support.allow_dark_mode_for_app || return (dark_mode_support.allow_dark_mode_for_app ||
dark_mode_support.set_preferred_app_mode) && dark_mode_support.set_preferred_app_mode) &&
diff --git ui/native_theme/native_theme_mac.mm ui/native_theme/native_theme_mac.mm diff --git ui/native_theme/native_theme_mac.mm ui/native_theme/native_theme_mac.mm
index e6078b2a45d88..bf051fb8a02f4 100644 index b9feac1c87c51..bb63c6d350bfe 100644
--- ui/native_theme/native_theme_mac.mm --- ui/native_theme/native_theme_mac.mm
+++ ui/native_theme/native_theme_mac.mm +++ ui/native_theme/native_theme_mac.mm
@@ -50,6 +50,13 @@ bool InvertedColors() { @@ -50,6 +50,13 @@ bool InvertedColors() {

View File

@ -12,7 +12,7 @@ index 239c3870a149a..9f5a34fc846bd 100644
if (use_atk) { if (use_atk) {
assert(use_glib, "use_atk=true requires that use_glib=true") assert(use_glib, "use_atk=true requires that use_glib=true")
diff --git build/config/linux/atspi2/BUILD.gn build/config/linux/atspi2/BUILD.gn diff --git build/config/linux/atspi2/BUILD.gn build/config/linux/atspi2/BUILD.gn
index d1629205c82a3..21de94bee534b 100644 index 30bc77f9c23fb..778d4bc350036 100644
--- build/config/linux/atspi2/BUILD.gn --- build/config/linux/atspi2/BUILD.gn
+++ build/config/linux/atspi2/BUILD.gn +++ build/config/linux/atspi2/BUILD.gn
@@ -6,7 +6,7 @@ import("//build/config/linux/pkg_config.gni") @@ -6,7 +6,7 @@ import("//build/config/linux/pkg_config.gni")

View File

@ -0,0 +1,68 @@
diff --git ui/gfx/x/connection.cc ui/gfx/x/connection.cc
index e9034ec7dea3e..b11df74c1d9dd 100644
--- ui/gfx/x/connection.cc
+++ ui/gfx/x/connection.cc
@@ -183,6 +183,7 @@ Connection::Connection(const std::string& address)
Connection::~Connection() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ window_event_manager_.Reset();
platform_event_source.reset();
}
diff --git ui/gfx/x/window_event_manager.cc ui/gfx/x/window_event_manager.cc
index 7aee20ec3d2b7..9b5b320402ff8 100644
--- ui/gfx/x/window_event_manager.cc
+++ ui/gfx/x/window_event_manager.cc
@@ -113,10 +113,18 @@ WindowEventManager::WindowEventManager(Connection* connection)
: connection_(connection) {}
WindowEventManager::~WindowEventManager() {
+ Reset();
+}
+
+void WindowEventManager::Reset() {
+ if (!connection_) {
+ return;
+ }
// Clear events still requested by not-yet-deleted ScopedEventSelectors.
for (const auto& mask_pair : mask_map_) {
SetEventMask(connection_, mask_pair.first, EventMask::NoEvent);
}
+ connection_ = nullptr;
}
void WindowEventManager::SelectEvents(Window window, EventMask event_mask) {
@@ -143,7 +151,9 @@ void WindowEventManager::AfterMaskChanged(Window window, EventMask old_mask) {
return;
}
- SetEventMask(connection_, window, new_mask);
+ if (connection_) {
+ SetEventMask(connection_, window, new_mask);
+ }
if (new_mask == EventMask::NoEvent) {
mask_map_.erase(window);
diff --git ui/gfx/x/window_event_manager.h ui/gfx/x/window_event_manager.h
index 4b85f49d3b2cc..c0158edd6901b 100644
--- ui/gfx/x/window_event_manager.h
+++ ui/gfx/x/window_event_manager.h
@@ -53,6 +53,8 @@ class WindowEventManager {
~WindowEventManager();
+ void Reset();
+
private:
friend class ScopedEventSelector;
@@ -70,7 +72,7 @@ class WindowEventManager {
// necessary.
void AfterMaskChanged(Window window, EventMask old_mask);
- const raw_ptr<Connection> connection_;
+ raw_ptr<Connection> connection_;
std::map<Window, std::unique_ptr<MultiMask>> mask_map_;
};

View File

@ -1,8 +1,8 @@
diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc
index 2bb8fbf922692..288ec4fd4ef7f 100644 index 49f0ddab8318e..a3a9cd189fc2f 100644
--- printing/printing_context_linux.cc --- printing/printing_context_linux.cc
+++ printing/printing_context_linux.cc +++ printing/printing_context_linux.cc
@@ -73,11 +73,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { @@ -69,11 +69,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
ResetSettings(); ResetSettings();
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -16,7 +16,7 @@ index 2bb8fbf922692..288ec4fd4ef7f 100644
if (print_dialog_) { if (print_dialog_) {
print_dialog_->UseDefaultSettings(); print_dialog_->UseDefaultSettings();
@@ -89,8 +89,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { @@ -85,8 +85,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
@ -27,7 +27,7 @@ index 2bb8fbf922692..288ec4fd4ef7f 100644
#endif #endif
return gfx::Size(); return gfx::Size();
@@ -102,11 +102,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings( @@ -98,11 +98,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
DCHECK(!in_print_job_); DCHECK(!in_print_job_);
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 2937e79e51567..36f1d2ab826f4 100644 index 7de5f5de28091..b2bccf7d9e3d9 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc --- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -1032,8 +1032,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { @@ -1038,8 +1038,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
->GetDisplayNearestPoint(anchor_rect.CenterPoint()) ->GetDisplayNearestPoint(anchor_rect.CenterPoint())
.work_area(); .work_area();
int available_space = screen_space.bottom() - anchor_rect.bottom(); int available_space = screen_space.bottom() - anchor_rect.bottom();

View File

@ -1,5 +1,5 @@
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index 645217ffce6ad..9e335e8234cd9 100644 index c30066f515f63..450c67882ea91 100644
--- base/message_loop/message_pump_win.cc --- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
@ -30,7 +30,7 @@ index 645217ffce6ad..9e335e8234cd9 100644
} }
if (has_msg) if (has_msg)
diff --git base/task/current_thread.cc base/task/current_thread.cc diff --git base/task/current_thread.cc base/task/current_thread.cc
index b062ee6f827b7..675a604f4b859 100644 index 96b2fd7cad015..2fa7f4016fe5a 100644
--- base/task/current_thread.cc --- base/task/current_thread.cc
+++ base/task/current_thread.cc +++ base/task/current_thread.cc
@@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver( @@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver(
@ -43,7 +43,7 @@ index b062ee6f827b7..675a604f4b859 100644
current_->RemoveDestructionObserver(destruction_observer); current_->RemoveDestructionObserver(destruction_observer);
} }
diff --git base/task/current_thread.h base/task/current_thread.h diff --git base/task/current_thread.h base/task/current_thread.h
index 7d80fd4bde3e0..e2c59fc4ec88c 100644 index 33e320fd647cb..5f67ef65d4392 100644
--- base/task/current_thread.h --- base/task/current_thread.h
+++ base/task/current_thread.h +++ base/task/current_thread.h
@@ -133,6 +133,12 @@ class BASE_EXPORT CurrentThread { @@ -133,6 +133,12 @@ class BASE_EXPORT CurrentThread {

View File

@ -1,8 +1,8 @@
diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
index 83c0308a977a0..9859e33d3ce7e 100644 index cf7b47f868066..bc7c1adfea855 100644
--- components/metrics/persistent_system_profile.cc --- components/metrics/persistent_system_profile.cc
+++ components/metrics/persistent_system_profile.cc +++ components/metrics/persistent_system_profile.cc
@@ -392,6 +392,10 @@ bool PersistentSystemProfile::GetSystemProfile( @@ -393,6 +393,10 @@ bool PersistentSystemProfile::GetSystemProfile(
return true; return true;
} }

View File

@ -10,10 +10,10 @@ index 17b1395583e24..9b41b21f42b1f 100644
+// This load will not send any cookies. For CEF usage. +// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20) +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 689818d34e56e..c4d897053b7e4 100644 index dd14dce03cc93..eb25e13036d1a 100644
--- net/url_request/url_request_http_job.cc --- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc
@@ -1808,7 +1808,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { @@ -1812,7 +1812,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode // Read cookies whenever allow_credentials() is true, even if the PrivacyMode
// is being overridden by NetworkDelegate and will eventually block them, as // is being overridden by NetworkDelegate and will eventually block them, as
// blocked cookies still need to be logged in that case. // blocked cookies still need to be logged in that case.
@ -22,9 +22,9 @@ index 689818d34e56e..c4d897053b7e4 100644
+ !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES); + !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES);
} }
bool URLRequestHttpJob::IsPartitionedCookiesEnabled() const { bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index 2a309fe2b1dd6..4e8dcaf0e2608 100644 index 39c94526163d0..9e7bdd53e91be 100644
--- services/network/public/cpp/resource_request.cc --- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc
@@ -312,7 +312,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { @@ -312,7 +312,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {

View File

@ -1,8 +1,8 @@
diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc
index 3db20acc9d4ea..ad7cd90aa7f0b 100644 index 357b362117d20..b5c7cfe5dd511 100644
--- net/test/embedded_test_server/embedded_test_server.cc --- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc +++ net/test/embedded_test_server/embedded_test_server.cc
@@ -980,7 +980,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { @@ -997,7 +997,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get()) if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>(); temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
@ -11,7 +11,7 @@ index 3db20acc9d4ea..ad7cd90aa7f0b 100644
if (!io_thread_->task_runner()->PostTaskAndReply( if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) { FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false; return false;
@@ -1007,7 +1007,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( @@ -1024,7 +1024,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get()) if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>(); temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();

View File

@ -1,5 +1,5 @@
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
index 28790bb292272..34791ae1b2965 100644 index dc6605dc280d3..86c4633cf7240 100644
--- net/url_request/url_request_job.cc --- net/url_request/url_request_job.cc
+++ net/url_request/url_request_job.cc +++ net/url_request/url_request_job.cc
@@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@

View File

@ -12,13 +12,41 @@ index 431df5d50debe..0fcc9ea8fbb1a 100644
if (!host_->GetView()) { if (!host_->GetView()) {
return nullptr; return nullptr;
} }
diff --git content/browser/renderer_host/input/fling_scheduler_base.h content/browser/renderer_host/input/fling_scheduler_base.h diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index afefe3cd83dee..6668463247644 100644 index a6c27fe9b7f71..11060758d670f 100644
--- content/browser/renderer_host/input/fling_scheduler_base.h --- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/input/fling_scheduler_base.h +++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3272,6 +3272,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
+void RenderWidgetHostImpl::SetCompositorForFlingScheduler(ui::Compositor* compositor)
+{
+ fling_scheduler_->SetCompositor(compositor);
+}
+
void RenderWidgetHostImpl::AddPendingUserActivation(
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 28f81135df654..85125c19aaa2f 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -807,6 +807,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();
+ void SetCompositorForFlingScheduler(ui::Compositor* compositor);
// The RenderWidgetHostImpl will keep showing the old page (for a while) after
// navigation until the first frame of the new page arrives. This reduces
diff --git content/common/input/fling_scheduler_base.h content/common/input/fling_scheduler_base.h
index e8ee63f3abc2e..2d1717082759d 100644
--- content/common/input/fling_scheduler_base.h
+++ content/common/input/fling_scheduler_base.h
@@ -7,12 +7,23 @@ @@ -7,12 +7,23 @@
#include "content/browser/renderer_host/input/fling_controller.h" #include "content/common/input/fling_controller.h"
+namespace ui { +namespace ui {
+class Compositor; +class Compositor;
@ -40,31 +68,3 @@ index afefe3cd83dee..6668463247644 100644
}; };
} // namespace content } // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index a1ce7be62ca99..600b61ffafb34 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3282,6 +3282,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
+void RenderWidgetHostImpl::SetCompositorForFlingScheduler(ui::Compositor* compositor)
+{
+ fling_scheduler_->SetCompositor(compositor);
+}
+
void RenderWidgetHostImpl::AddPendingUserActivation(
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 28001459e1357..42b6450adeef7 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -807,6 +807,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();
+ void SetCompositorForFlingScheduler(ui::Compositor* compositor);
// The RenderWidgetHostImpl will keep showing the old page (for a while) after
// navigation until the first frame of the new page arrives. This reduces

Some files were not shown because too many files have changed in this diff Show More