mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3b5a9dfb50 | ||
|
7c94248e45 | ||
|
344f01c1a8 | ||
|
5dc6f2f29c | ||
|
fe66d80346 | ||
|
37e6a4002e | ||
|
96006d1193 | ||
|
36934ebbc5 | ||
|
84beb5a7e1 | ||
|
d1c786e7fe | ||
|
615db2f583 | ||
|
4de18f0d4b | ||
|
2830d3a706 | ||
|
8e5da68011 | ||
|
9eac4fa487 | ||
|
059f2446c0 | ||
|
f3023f8ca0 | ||
|
8311b6cfba | ||
|
a5cda9c3dc | ||
|
b36991c674 | ||
|
74f62fd38c | ||
|
071f544b5a | ||
|
2cb5ebb3db | ||
|
3463fdd061 | ||
|
b3fe8ad6d7 | ||
|
0bebcc9e97 | ||
|
9eb3683b09 | ||
|
0c9655dfb7 | ||
|
7b50b32953 | ||
|
64bb2aadd5 | ||
|
4261816c34 | ||
|
c7c6a109c9 | ||
|
c8be96d15c | ||
|
e902b1f226 |
4
BUILD.gn
4
BUILD.gn
@@ -677,6 +677,8 @@ source_set("libcef_static") {
|
||||
"libcef/browser/scheme_impl.cc",
|
||||
"libcef/browser/server_impl.cc",
|
||||
"libcef/browser/server_impl.h",
|
||||
"libcef/browser/setting_helper.cc",
|
||||
"libcef/browser/setting_helper.h",
|
||||
"libcef/browser/simple_menu_model_impl.cc",
|
||||
"libcef/browser/simple_menu_model_impl.h",
|
||||
"libcef/browser/ssl_info_impl.cc",
|
||||
@@ -1284,7 +1286,6 @@ make_pack_header("resources") {
|
||||
"$root_gen_dir/chrome/grit/browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/common_resources.h",
|
||||
"$root_gen_dir/chrome/grit/component_extension_resources.h",
|
||||
"$root_gen_dir/chrome/grit/dev_ui_browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/pdf_resources.h",
|
||||
"$root_gen_dir/chrome/grit/renderer_resources.h",
|
||||
"$root_gen_dir/components/grit/components_resources.h",
|
||||
@@ -1312,7 +1313,6 @@ make_pack_header("resources") {
|
||||
deps = [
|
||||
":cef_resources",
|
||||
"//base/tracing/protos:chrome_track_event_resources",
|
||||
"//chrome/browser:dev_ui_browser_resources",
|
||||
"//chrome/browser:resources",
|
||||
"//chrome/browser/resources:component_extension_resources",
|
||||
"//chrome/browser/resources/pdf:resources",
|
||||
|
@@ -7,5 +7,6 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/133.0.6943.0'
|
||||
'chromium_checkout': 'refs/tags/134.0.6998.178',
|
||||
'depot_tools_checkout': 'f35efa5b85'
|
||||
}
|
||||
|
@@ -1,41 +1,48 @@
|
||||
{
|
||||
"hashes": {
|
||||
"13300": {
|
||||
"comment": "Added January 13, 2025.",
|
||||
"linux": "b622b5e8d42567bd96b6c530c3bf39b42d94c97a",
|
||||
"mac": "10daecda70220382f54f8b1fc3b2d1df7da3088c",
|
||||
"universal": "a5c9449c676e3d151ac2d141bd3907dcd1fec3d4",
|
||||
"windows": "854c5a8fc37bb040ad0ad8e4680f62b07ec217c0"
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "2508f3f0b0e5dfa191036fa6c04f8dcfa18c94b9",
|
||||
"mac": "80c0b59ba9dd783aa71fae0aa5f7dad64620e8c9",
|
||||
"windows": "45d39c3669ba75467e3e609f626c31506c0eae22"
|
||||
},
|
||||
"13301": {
|
||||
"comment": "Added January 13, 2025.",
|
||||
"linux": "0ec77d8bc98964aaf2c4ac037dbbe47f59863902",
|
||||
"mac": "65b51b1dfde1ab0af99d98e1e8b6aadf5bc28707",
|
||||
"universal": "e343550e4371b76f59813dac2742a9d3206cb98f",
|
||||
"windows": "34b14819172ed39721a3fe298cf73dec7b6e7df2"
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "aa073dd1c586812503ca293c718358460d8c2dd6",
|
||||
"mac": "fda40a5df44628cac50a589ff979c0746011591e",
|
||||
"windows": "7109702038d51512d35dd2ed77231f9100e38214"
|
||||
},
|
||||
"13302": {
|
||||
"comment": "Added January 13, 2025.",
|
||||
"linux": "e98affe8187daaa1ee02b01677208ff0a54af74c",
|
||||
"mac": "45a0649980f85c53a6156627f0af6368ccfc5554",
|
||||
"universal": "b8423655541f6f2a1a9b6f5252f03e59842dc31a",
|
||||
"windows": "b04c40f0d79e2ea6f6a4d508843b9eaafb102c1e"
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "d5597ebfa30081953425e897209a8387b9584205",
|
||||
"mac": "4aa24470ba3a4bd9c06bc0e4a201b896394a86b5",
|
||||
"windows": "18799961f4461a9cbae2aed89ac04b73ab7c37f3"
|
||||
},
|
||||
"13303": {
|
||||
"comment": "Added January 13, 2025.",
|
||||
"linux": "1b2584e9f06dc0cb59ccceee89857fc164d4db52",
|
||||
"mac": "82d74e5024ed80b43d49d7e83b0e8a3a42a0b319",
|
||||
"universal": "a0905ba86f2c4964857f6c9c0706ab3e1050a8cd",
|
||||
"windows": "bc115a66808672931cf676ce31d58ded946f680e"
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "f3a696ee30ce1e00490a58df017393c126c89709",
|
||||
"mac": "f2cdce2b9a4b635c28b5b92c42c35625a937380c",
|
||||
"windows": "20016fd6a9b87ef4c539cd1f42bf1ca09b6903ca"
|
||||
},
|
||||
"13304": {
|
||||
"comment": "Added January 13, 2025.",
|
||||
"linux": "199fe896c737a07dcf1506e0c86688363df7e8b6",
|
||||
"mac": "405810f1f8b146678867b6a91cbe8c4670febbbf",
|
||||
"universal": "be55f7cf1813ae098d4f68b2a2c9ca85784fc3ee",
|
||||
"windows": "73bb28a92f4be742e3fc80057a80797e3bf23063"
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "f1ababb4ff51ecbf77c481cee3721ef0eca9c8ca",
|
||||
"mac": "98964c37b8917d83da4b173e22905503d38ad08f",
|
||||
"windows": "19c014af0082aa901398e006381b6980e4f806e9"
|
||||
},
|
||||
"13400": {
|
||||
"comment": "Added February 21, 2025.",
|
||||
"linux": "ea2106b5bc012c25d735521e0c7fb719d433ea4a",
|
||||
"mac": "ba5ab71db4f9447f19eb7b1943024981c88064dd",
|
||||
"windows": "6ab74b90e88b7397aab9911baac5484f12466eef"
|
||||
},
|
||||
"13401": {
|
||||
"comment": "Added March 10, 2025.",
|
||||
"linux": "b14bee2c0fd250da67faea421f620b58e5dea9a2",
|
||||
"mac": "b54732b528bc2669481ec0cf17c7b97b033720b9",
|
||||
"windows": "751255204f006b8b883a8baf552a2da792f8aa44"
|
||||
}
|
||||
},
|
||||
"last": "13304",
|
||||
"last": "13401",
|
||||
"min": "13300"
|
||||
}
|
@@ -247,6 +247,8 @@
|
||||
'tests/cefclient/browser/client_prefs.cc',
|
||||
'tests/cefclient/browser/client_prefs.h',
|
||||
'tests/cefclient/browser/client_types.h',
|
||||
'tests/cefclient/browser/config_test.cc',
|
||||
'tests/cefclient/browser/config_test.h',
|
||||
'tests/cefclient/browser/default_client_handler.cc',
|
||||
'tests/cefclient/browser/default_client_handler.h',
|
||||
'tests/cefclient/browser/dialog_test.cc',
|
||||
@@ -324,6 +326,7 @@
|
||||
'cefclient_sources_resources': [
|
||||
'tests/cefclient/resources/binary_transfer.html',
|
||||
'tests/cefclient/resources/binding.html',
|
||||
'tests/cefclient/resources/config.html',
|
||||
'tests/cefclient/resources/dialogs.html',
|
||||
'tests/cefclient/resources/draggable.html',
|
||||
'tests/cefclient/resources/hang.html',
|
||||
|
@@ -271,6 +271,17 @@ macro(ADD_WINDOWS_MANIFEST manifest_path target extension)
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Set LPAC ACLs required for Windows sandbox support.
|
||||
# See https://github.com/chromiumembedded/cef/issues/3791#issuecomment-2664128961
|
||||
macro(SET_LPAC_ACLS target)
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "icacls" "${CEF_TARGET_OUT_DIR}" "/grant" "*S-1-15-2-2:(OI)(CI)(RX)"
|
||||
COMMENT "Setting LPAC ACLs..."
|
||||
)
|
||||
endmacro()
|
||||
|
||||
endif(OS_WINDOWS)
|
||||
|
||||
|
||||
|
@@ -313,6 +313,30 @@
|
||||
#define STACK_UNINITIALIZED
|
||||
#endif
|
||||
|
||||
// Attribute "no_stack_protector" disables -fstack-protector for the specified
|
||||
// function.
|
||||
//
|
||||
// "stack_protector" is enabled on most POSIX builds. The flag adds a canary
|
||||
// to each stack frame, which on function return is checked against a reference
|
||||
// canary. If the canaries do not match, it's likely that a stack buffer
|
||||
// overflow has occurred, so immediately crashing will prevent exploitation in
|
||||
// many cases.
|
||||
//
|
||||
// In some cases it's desirable to remove this, e.g. on hot functions, or if
|
||||
// we have purposely changed the reference canary.
|
||||
//
|
||||
// On Linux systems the reference canary will be purposely changed when forking
|
||||
// sub-processes (see https://crbug.com/40181003). To avoid sub-process shutdown
|
||||
// crashes the NO_STACK_PROTECTOR annotation must be added to all functions in
|
||||
// the call stack leading to CefExecuteProcess(). Applications that cannot add
|
||||
// this annotation must instead pass the `--change-stack-guard-on-fork=disable`
|
||||
// command-line flag.
|
||||
#if defined(COMPILER_GCC) || defined(__clang__)
|
||||
#define NO_STACK_PROTECTOR __attribute__((no_stack_protector))
|
||||
#else
|
||||
#define NO_STACK_PROTECTOR
|
||||
#endif
|
||||
|
||||
// The ANALYZER_ASSUME_TRUE(bool arg) macro adds compiler-specific hints
|
||||
// to Clang which control what code paths are statically analyzed,
|
||||
// and is meant to be used in conjunction with assert & assert-like functions.
|
||||
|
@@ -77,19 +77,15 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _CEF_AH_PASTE(a, b, c) a##_##b##_##c
|
||||
#define _CEF_AH_EVAL(a, b, c) _CEF_AH_PASTE(a, b, c)
|
||||
#define _CEF_AH_DECLARE(version, suffix) \
|
||||
_CEF_AH_EVAL(CEF_API_HASH, version, suffix)
|
||||
#define _CEF_AH_PASTE(a, b) a##_##b
|
||||
#define _CEF_AH_EVAL(a, b) _CEF_AH_PASTE(a, b)
|
||||
#define _CEF_AH_DECLARE(version) _CEF_AH_EVAL(CEF_API_HASH, version)
|
||||
|
||||
// API hashes for the selected CEF_API_VERSION. API hashes are created for
|
||||
// each version by analyzing CEF header files for C API type definitions. The
|
||||
// hash value will change when header files are modified in a way that may
|
||||
// cause binary incompatibility with other builds. The universal hash value
|
||||
// will change if any platform is affected whereas the platform hash values
|
||||
// will change only if that particular platform is affected.
|
||||
#define CEF_API_HASH_UNIVERSAL _CEF_AH_DECLARE(CEF_API_VERSION, UNIVERSAL)
|
||||
#define CEF_API_HASH_PLATFORM _CEF_AH_DECLARE(CEF_API_VERSION, PLATFORM)
|
||||
// cause binary incompatibility with other builds.
|
||||
#define CEF_API_HASH_PLATFORM _CEF_AH_DECLARE(CEF_API_VERSION)
|
||||
|
||||
#if defined(BUILDING_CEF_SHARED)
|
||||
|
||||
@@ -132,7 +128,7 @@ extern "C" {
|
||||
/// parameter describes which hash value will be returned:
|
||||
///
|
||||
/// 0 - CEF_API_HASH_PLATFORM
|
||||
/// 1 - CEF_API_HASH_UNIVERSAL
|
||||
/// 1 - CEF_API_HASH_UNIVERSAL (deprecated, same as CEF_API_HASH_PLATFORM)
|
||||
/// 2 - CEF_COMMIT_HASH (from cef_version.h)
|
||||
///
|
||||
CEF_EXPORT const char* cef_api_hash(int version, int entry);
|
||||
|
@@ -59,7 +59,7 @@ class CefApp;
|
||||
/// |windows_sandbox_info| parameter is only used on Windows and may be NULL
|
||||
/// (see cef_sandbox_win.h for details).
|
||||
///
|
||||
/*--cef(api_hash_check,optional_param=application,
|
||||
/*--cef(api_hash_check,no_stack_protector,optional_param=application,
|
||||
optional_param=windows_sandbox_info)--*/
|
||||
int CefExecuteProcess(const CefMainArgs& args,
|
||||
CefRefPtr<CefApp> application,
|
||||
|
@@ -31,8 +31,11 @@
|
||||
#define CEF_INCLUDE_CEF_BASE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/base/cef_atomic_ref_count.h"
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#include "include/base/cef_atomic_ref_count.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
|
||||
// Bring in common C++ type definitions used by CEF consumers.
|
||||
|
@@ -249,7 +249,7 @@ class CefPdfPrintCallback : public virtual CefBaseRefCounted {
|
||||
/// is the output path. |ok| will be true if the printing completed
|
||||
/// successfully or false otherwise.
|
||||
///
|
||||
/*--cef()--*/
|
||||
/*--cef(optional_param=path)--*/
|
||||
virtual void OnPdfPrintFinished(const CefString& path, bool ok) = 0;
|
||||
};
|
||||
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_registration.h"
|
||||
#include "include/cef_values.h"
|
||||
|
||||
///
|
||||
@@ -65,6 +66,24 @@ class CefPreferenceRegistrar : public CefBaseScoped {
|
||||
CefRefPtr<CefValue> default_value) = 0;
|
||||
};
|
||||
|
||||
#if CEF_API_ADDED(13401)
|
||||
///
|
||||
/// Implemented by the client to observe preference changes and registered via
|
||||
/// CefPreferenceManager::AddPreferenceObserver. The methods of this class will
|
||||
/// be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client,added=13401)--*/
|
||||
class CefPreferenceObserver : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
/// Called when a preference has changed. The new value can be retrieved using
|
||||
/// CefPreferenceManager::GetPreference.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPreferenceChanged(const CefString& name) = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Manage access to preferences. Many built-in preferences are registered by
|
||||
/// Chromium. Custom preferences can be registered in
|
||||
@@ -73,6 +92,36 @@ class CefPreferenceRegistrar : public CefBaseScoped {
|
||||
/*--cef(source=library,no_debugct_check)--*/
|
||||
class CefPreferenceManager : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
#if CEF_API_ADDED(13401)
|
||||
///
|
||||
/// Returns the current Chrome Variations configuration (combination of field
|
||||
/// trials and chrome://flags) as equivalent command-line switches
|
||||
/// (`--[enable|disable]-features=XXXX`, etc). These switches can be used to
|
||||
/// apply the same configuration when launching a CEF-based application. See
|
||||
/// https://developer.chrome.com/docs/web-platform/chrome-variations for
|
||||
/// background and details. Note that field trial tests are disabled by
|
||||
/// default in Official CEF builds (via the
|
||||
/// `disable_fieldtrial_testing_config=true` GN flag). This method must be
|
||||
/// called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(added=13401)--*/
|
||||
static void GetChromeVariationsAsSwitches(std::vector<CefString>& switches);
|
||||
|
||||
///
|
||||
/// Returns the current Chrome Variations configuration (combination of field
|
||||
/// trials and chrome://flags) as human-readable strings. This is the
|
||||
/// human-readable equivalent of the "Active Variations" section of
|
||||
/// chrome://version. See
|
||||
/// https://developer.chrome.com/docs/web-platform/chrome-variations for
|
||||
/// background and details. Note that field trial tests are disabled by
|
||||
/// default in Official CEF builds (via the
|
||||
/// `disable_fieldtrial_testing_config=true` GN flag). This method must be
|
||||
/// called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(added=13401)--*/
|
||||
static void GetChromeVariationsAsStrings(std::vector<CefString>& strings);
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Returns the global preference manager object.
|
||||
///
|
||||
@@ -129,6 +178,21 @@ class CefPreferenceManager : public virtual CefBaseRefCounted {
|
||||
virtual bool SetPreference(const CefString& name,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error) = 0;
|
||||
|
||||
#if CEF_API_ADDED(13401)
|
||||
///
|
||||
/// Add an observer for preference changes. |name| is the name of the
|
||||
/// preference to observe. If |name| is empty then all preferences will
|
||||
/// be observed. Observing all preferences has performance consequences and
|
||||
/// is not recommended outside of testing scenarios. The observer will remain
|
||||
/// registered until the returned Registration object is destroyed. This
|
||||
/// method must be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(optional_param=name,added=13401)--*/
|
||||
virtual CefRefPtr<CefRegistration> AddPreferenceObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer) = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_PREFERENCE_H_
|
||||
|
@@ -44,6 +44,7 @@
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/cef_media_router.h"
|
||||
#include "include/cef_preference.h"
|
||||
#include "include/cef_registration.h"
|
||||
#include "include/cef_values.h"
|
||||
|
||||
class CefRequestContextHandler;
|
||||
@@ -66,6 +67,27 @@ class CefResolveCallback : public virtual CefBaseRefCounted {
|
||||
const std::vector<CefString>& resolved_ips) = 0;
|
||||
};
|
||||
|
||||
#if CEF_API_ADDED(13401)
|
||||
///
|
||||
/// Implemented by the client to observe content and website setting changes and
|
||||
/// registered via CefRequestContext::AddSettingObserver. The methods of this
|
||||
/// class will be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client,added=13401)--*/
|
||||
class CefSettingObserver : public virtual CefBaseRefCounted {
|
||||
public:
|
||||
///
|
||||
/// Called when a content or website setting has changed. The new value can be
|
||||
/// retrieved using CefRequestContext::GetContentSetting or
|
||||
/// CefRequestContext::GetWebsiteSetting.
|
||||
///
|
||||
/*--cef(optional_param=requesting_url,optional_param=top_level_url)--*/
|
||||
virtual void OnSettingChanged(const CefString& requesting_url,
|
||||
const CefString& top_level_url,
|
||||
cef_content_setting_types_t content_type) = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
///
|
||||
/// A request context provides request handling for a set of related browser
|
||||
/// or URL request objects. A request context can be specified when creating a
|
||||
@@ -292,6 +314,17 @@ class CefRequestContext : public CefPreferenceManager {
|
||||
cef_content_setting_types_t content_type,
|
||||
cef_content_setting_values_t value) = 0;
|
||||
|
||||
#if CEF_API_ADDED(13401)
|
||||
///
|
||||
/// Add an observer for content and website setting changes. The observer will
|
||||
/// remain registered until the returned Registration object is destroyed.
|
||||
/// This method must be called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(added=13401)--*/
|
||||
virtual CefRefPtr<CefRegistration> AddSettingObserver(
|
||||
CefRefPtr<CefSettingObserver> observer) = 0;
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Sets the Chrome color scheme for all browsers that share this request
|
||||
/// context. |variant| values of SYSTEM, LIGHT and DARK change the underlying
|
||||
|
@@ -31,7 +31,10 @@
|
||||
#define CEF_INCLUDE_CEF_SANDBOX_MAC_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
|
||||
#if defined(OS_MAC)
|
||||
|
@@ -31,7 +31,9 @@
|
||||
#define CEF_INCLUDE_CEF_SANDBOX_WIN_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
||||
|
@@ -31,7 +31,9 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_APP_WIN_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
||||
|
@@ -32,7 +32,9 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#if defined(COMPILER_MSVC)
|
||||
|
||||
|
@@ -31,12 +31,14 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_THREAD_INTERNAL_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#if defined(OS_WIN)
|
||||
#include <windows.h>
|
||||
#elif defined(OS_POSIX)
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
|
||||
|
@@ -35,8 +35,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
|
||||
|
@@ -993,9 +993,11 @@ typedef enum {
|
||||
// No error.
|
||||
ERR_NONE = 0,
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#define NET_ERROR(label, value) ERR_##label = value,
|
||||
#include "include/base/internal/cef_net_error_list.h"
|
||||
#undef NET_ERROR
|
||||
#endif
|
||||
|
||||
} cef_errorcode_t;
|
||||
|
||||
@@ -3619,6 +3621,9 @@ typedef enum {
|
||||
CEF_CPAIT_OPTIMIZATION_GUIDE,
|
||||
#if CEF_API_ADDED(13304)
|
||||
CEF_CPAIT_COLLABORATION_MESSAGING,
|
||||
#endif
|
||||
#if CEF_API_ADDED(13400)
|
||||
CEF_CPAIT_CHANGE_PASSWORD,
|
||||
#endif
|
||||
CEF_CPAIT_NUM_VALUES,
|
||||
} cef_chrome_page_action_icon_type_t;
|
||||
|
@@ -31,6 +31,8 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_api_hash.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -484,6 +486,15 @@ typedef enum {
|
||||
/// or legacy behavior.
|
||||
CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_SCOPE,
|
||||
|
||||
#if CEF_API_ADDED(13400)
|
||||
/// Website setting to indicate whether the user has allowlisted suspicious
|
||||
/// notifications for the origin.
|
||||
CEF_CONTENT_SETTING_TYPE_ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER,
|
||||
|
||||
/// Content settings for access to the Controlled Frame API.
|
||||
CEF_CONTENT_SETTING_TYPE_CONTROLLED_FRAME,
|
||||
#endif
|
||||
|
||||
CEF_CONTENT_SETTING_TYPE_NUM_VALUES,
|
||||
} cef_content_setting_types_t;
|
||||
|
||||
|
@@ -31,15 +31,12 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_LINUX_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
|
||||
#if defined(CEF_X11)
|
||||
typedef union _XEvent XEvent;
|
||||
typedef struct _XDisplay XDisplay;
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
#include "include/internal/cef_string.h"
|
||||
#include "include/internal/cef_types_color.h"
|
||||
@@ -47,17 +44,6 @@ typedef struct _XDisplay XDisplay;
|
||||
#include "include/internal/cef_types_osr.h"
|
||||
#include "include/internal/cef_types_runtime.h"
|
||||
|
||||
// Handle types.
|
||||
#if defined(CEF_X11)
|
||||
#define cef_cursor_handle_t unsigned long
|
||||
#define cef_event_handle_t XEvent*
|
||||
#else
|
||||
#define cef_cursor_handle_t void*
|
||||
#define cef_event_handle_t void*
|
||||
#endif
|
||||
|
||||
#define cef_window_handle_t unsigned long
|
||||
|
||||
#define kNullCursorHandle 0
|
||||
#define kNullEventHandle NULL
|
||||
#define kNullWindowHandle 0
|
||||
@@ -66,6 +52,20 @@ typedef struct _XDisplay XDisplay;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CEF_X11)
|
||||
typedef union _XEvent XEvent;
|
||||
typedef struct _XDisplay XDisplay;
|
||||
|
||||
// Handle types.
|
||||
typedef unsigned long cef_cursor_handle_t;
|
||||
typedef XEvent* cef_event_handle_t;
|
||||
#else
|
||||
typedef void* cef_cursor_handle_t;
|
||||
typedef void* cef_event_handle_t;
|
||||
#endif
|
||||
|
||||
typedef unsigned long cef_window_handle_t;
|
||||
|
||||
///
|
||||
/// Return the singleton X11 display shared with Chromium. The display is not
|
||||
/// thread-safe and must only be accessed on the browser process UI thread.
|
||||
|
@@ -31,7 +31,9 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_MAC_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_MAC)
|
||||
#include "include/internal/cef_string.h"
|
||||
@@ -40,16 +42,6 @@
|
||||
#include "include/internal/cef_types_osr.h"
|
||||
#include "include/internal/cef_types_runtime.h"
|
||||
|
||||
// Handle types.
|
||||
// Actually NSCursor*
|
||||
#define cef_cursor_handle_t void*
|
||||
// Acutally NSEvent*
|
||||
#define cef_event_handle_t void*
|
||||
// Actually NSView*
|
||||
#define cef_window_handle_t void*
|
||||
// Actually IOSurface*
|
||||
#define cef_shared_texture_handle_t void*
|
||||
|
||||
#define kNullCursorHandle NULL
|
||||
#define kNullEventHandle NULL
|
||||
#define kNullWindowHandle NULL
|
||||
@@ -78,6 +70,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Handle types.
|
||||
// Actually NSCursor*
|
||||
typedef void* cef_cursor_handle_t;
|
||||
// Actually NSEvent*
|
||||
typedef void* cef_event_handle_t;
|
||||
// Actually NSView*
|
||||
typedef void* cef_window_handle_t;
|
||||
// Actually IOSurface*
|
||||
typedef void* cef_shared_texture_handle_t;
|
||||
|
||||
///
|
||||
/// Structure representing CefExecuteProcess arguments.
|
||||
///
|
||||
|
@@ -31,8 +31,15 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_OSR_H_
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "include/internal/cef_types_geometry.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Structure containing shared texture common metadata.
|
||||
/// For documentation on each field, please refer to
|
||||
@@ -107,4 +114,8 @@ typedef struct _cef_accelerated_paint_info_common_t {
|
||||
|
||||
} cef_accelerated_paint_info_common_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_OSR_H_
|
||||
|
@@ -31,10 +31,15 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WIN_H_
|
||||
#pragma once
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include "include/base/cef_build.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
||||
#if !defined(GENERATING_CEF_API_HASH)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "include/internal/cef_string.h"
|
||||
#include "include/internal/cef_types_color.h"
|
||||
@@ -42,12 +47,6 @@
|
||||
#include "include/internal/cef_types_osr.h"
|
||||
#include "include/internal/cef_types_runtime.h"
|
||||
|
||||
// Handle types.
|
||||
#define cef_cursor_handle_t HCURSOR
|
||||
#define cef_event_handle_t MSG*
|
||||
#define cef_window_handle_t HWND
|
||||
#define cef_shared_texture_handle_t HANDLE
|
||||
|
||||
#define kNullCursorHandle NULL
|
||||
#define kNullEventHandle NULL
|
||||
#define kNullWindowHandle NULL
|
||||
@@ -56,6 +55,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Handle types.
|
||||
typedef HCURSOR cef_cursor_handle_t;
|
||||
typedef MSG* cef_event_handle_t;
|
||||
typedef HWND cef_window_handle_t;
|
||||
typedef HANDLE cef_shared_texture_handle_t;
|
||||
|
||||
///
|
||||
/// Structure representing CefExecuteProcess arguments.
|
||||
///
|
||||
|
@@ -375,12 +375,14 @@ void ChromeContentBrowserClientCef::CreateWindowResult(
|
||||
CefBrowserInfoManager::GetInstance()->CreateWindowResult(opener, success);
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClientCef::OverrideWebkitPrefs(
|
||||
void ChromeContentBrowserClientCef::OverrideWebPreferences(
|
||||
content::WebContents* web_contents,
|
||||
content::SiteInstance& main_frame_site,
|
||||
blink::web_pref::WebPreferences* prefs) {
|
||||
renderer_prefs::SetDefaultPrefs(*prefs);
|
||||
|
||||
ChromeContentBrowserClient::OverrideWebkitPrefs(web_contents, prefs);
|
||||
ChromeContentBrowserClient::OverrideWebPreferences(web_contents,
|
||||
main_frame_site, prefs);
|
||||
|
||||
SkColor base_background_color;
|
||||
auto browser = CefBrowserHostBase::GetBrowserForContents(web_contents);
|
||||
|
@@ -65,8 +65,9 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient {
|
||||
bool* no_javascript_access) override;
|
||||
void CreateWindowResult(content::RenderFrameHost* opener,
|
||||
bool success) override;
|
||||
void OverrideWebkitPrefs(content::WebContents* web_contents,
|
||||
blink::web_pref::WebPreferences* prefs) override;
|
||||
void OverrideWebPreferences(content::WebContents* web_contents,
|
||||
content::SiteInstance& main_frame_site,
|
||||
blink::web_pref::WebPreferences* prefs) override;
|
||||
void WillCreateURLLoaderFactory(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
|
@@ -12,10 +12,12 @@
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "cef/libcef/browser/browser_info_manager.h"
|
||||
#include "cef/libcef/browser/prefs/pref_helper.h"
|
||||
#include "cef/libcef/browser/request_context_impl.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "cef/libcef/browser/trace_subscriber.h"
|
||||
#include "cef/libcef/common/cef_switches.h"
|
||||
#include "chrome/browser/browser_process_impl.h"
|
||||
#include "components/network_session_configurator/common/network_switches.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
@@ -289,6 +291,7 @@ int RunMainWithPreferredStackSize(FiberState& fiber_state) {
|
||||
|
||||
} // namespace
|
||||
|
||||
NO_STACK_PROTECTOR
|
||||
int CefExecuteProcess(const CefMainArgs& args,
|
||||
CefRefPtr<CefApp> application,
|
||||
void* windows_sandbox_info) {
|
||||
@@ -570,12 +573,24 @@ CefTraceSubscriber* CefContext::GetTraceSubscriber() {
|
||||
if (shutting_down_) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!trace_subscriber_.get()) {
|
||||
if (!trace_subscriber_) {
|
||||
trace_subscriber_ = std::make_unique<CefTraceSubscriber>();
|
||||
}
|
||||
return trace_subscriber_.get();
|
||||
}
|
||||
|
||||
pref_helper::Registrar* CefContext::GetPrefRegistrar() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (shutting_down_) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!pref_registrar_) {
|
||||
pref_registrar_ = std::make_unique<pref_helper::Registrar>();
|
||||
pref_registrar_->Init(g_browser_process->local_state());
|
||||
}
|
||||
return pref_registrar_.get();
|
||||
}
|
||||
|
||||
void CefContext::PopulateGlobalRequestContextSettings(
|
||||
CefRequestContextSettings* settings) {
|
||||
CefRefPtr<CefCommandLine> command_line =
|
||||
@@ -645,12 +660,15 @@ void CefContext::ShutdownOnUIThread() {
|
||||
observer.OnContextDestroyed();
|
||||
}
|
||||
|
||||
if (trace_subscriber_.get()) {
|
||||
trace_subscriber_.reset(nullptr);
|
||||
if (trace_subscriber_) {
|
||||
trace_subscriber_.reset();
|
||||
}
|
||||
if (pref_registrar_) {
|
||||
pref_registrar_.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void CefContext::FinalizeShutdown() {
|
||||
browser_info_manager_.reset(nullptr);
|
||||
browser_info_manager_.reset();
|
||||
application_ = nullptr;
|
||||
}
|
||||
|
@@ -16,6 +16,10 @@
|
||||
#include "cef/libcef/browser/main_runner.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
|
||||
namespace pref_helper {
|
||||
class Registrar;
|
||||
}
|
||||
|
||||
class CefBrowserInfoManager;
|
||||
class CefTraceSubscriber;
|
||||
|
||||
@@ -73,6 +77,7 @@ class CefContext {
|
||||
cef_state_t windowless_state) const;
|
||||
|
||||
CefTraceSubscriber* GetTraceSubscriber();
|
||||
pref_helper::Registrar* GetPrefRegistrar();
|
||||
|
||||
// Populate request context settings for the global system context based on
|
||||
// CefSettings and command-line flags.
|
||||
@@ -112,6 +117,7 @@ class CefContext {
|
||||
|
||||
std::unique_ptr<CefMainRunner> main_runner_;
|
||||
std::unique_ptr<CefTraceSubscriber> trace_subscriber_;
|
||||
std::unique_ptr<pref_helper::Registrar> pref_registrar_;
|
||||
std::unique_ptr<CefBrowserInfoManager> browser_info_manager_;
|
||||
|
||||
// Observers that want to be notified of changes to this object.
|
||||
|
@@ -4,10 +4,28 @@
|
||||
|
||||
#include "cef/libcef/browser/global_preference_manager_impl.h"
|
||||
|
||||
#include "base/metrics/field_trial_list_including_low_anonymity.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "cef/libcef/browser/context.h"
|
||||
#include "cef/libcef/browser/prefs/pref_helper.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "cef/libcef/common/api_version_util.h"
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "components/flags_ui/pref_service_flags_storage.h"
|
||||
#include "components/variations/synthetic_trials_active_group_id_provider.h"
|
||||
|
||||
namespace {
|
||||
|
||||
std::string GetActiveGroupNameAsString(
|
||||
const base::FieldTrial::ActiveGroup& group) {
|
||||
constexpr std::string_view kNonBreakingHyphenUTF8 = "\xE2\x80\x91";
|
||||
std::string result = group.trial_name + ":" + group.group_name;
|
||||
base::ReplaceChars(result, "-", kNonBreakingHyphenUTF8, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool CefGlobalPreferenceManagerImpl::HasPreference(const CefString& name) {
|
||||
CEF_REQUIRE_UIT_RETURN(false);
|
||||
@@ -40,6 +58,77 @@ bool CefGlobalPreferenceManagerImpl::SetPreference(const CefString& name,
|
||||
value, error);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRegistration>
|
||||
CefGlobalPreferenceManagerImpl::AddPreferenceObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer) {
|
||||
CEF_API_REQUIRE_ADDED(13401);
|
||||
CEF_REQUIRE_UIT_RETURN(nullptr);
|
||||
return CefContext::Get()->GetPrefRegistrar()->AddObserver(name, observer);
|
||||
}
|
||||
|
||||
// static
|
||||
void CefPreferenceManager::GetChromeVariationsAsSwitches(
|
||||
std::vector<CefString>& switches) {
|
||||
CEF_API_REQUIRE_ADDED(13401);
|
||||
|
||||
// Verify that the context is in a valid state.
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
DCHECK(false) << "context not valid";
|
||||
return;
|
||||
}
|
||||
|
||||
switches.clear();
|
||||
|
||||
// Based on ChromeFeatureListCreator::ConvertFlagsToSwitches().
|
||||
|
||||
flags_ui::PrefServiceFlagsStorage flags_storage(
|
||||
g_browser_process->local_state());
|
||||
base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
|
||||
about_flags::ConvertFlagsToSwitches(&flags_storage, &command_line,
|
||||
flags_ui::kNoSentinels);
|
||||
|
||||
for (const auto& arg : command_line.argv()) {
|
||||
if (!arg.empty()) {
|
||||
switches.push_back(arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void CefPreferenceManager::GetChromeVariationsAsStrings(
|
||||
std::vector<CefString>& strings) {
|
||||
CEF_API_REQUIRE_ADDED(13401);
|
||||
|
||||
// Verify that the context is in a valid state.
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
DCHECK(false) << "context not valid";
|
||||
return;
|
||||
}
|
||||
|
||||
strings.clear();
|
||||
|
||||
// Based on components/webui/version/version_handler_helper.cc
|
||||
// GetVariationsList().
|
||||
|
||||
base::FieldTrial::ActiveGroups active_groups;
|
||||
// Include low anonymity trial groups in the version string, as it is only
|
||||
// displayed locally (and is useful for diagnostics purposes).
|
||||
base::FieldTrialListIncludingLowAnonymity::
|
||||
GetActiveFieldTrialGroupsForTesting(&active_groups);
|
||||
|
||||
for (const auto& group : active_groups) {
|
||||
strings.push_back(GetActiveGroupNameAsString(group));
|
||||
}
|
||||
|
||||
// Synthetic field trials.
|
||||
for (const auto& group :
|
||||
variations::SyntheticTrialsActiveGroupIdProvider::GetInstance()
|
||||
->GetGroups()) {
|
||||
strings.push_back(GetActiveGroupNameAsString(group.active_group()));
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
CefRefPtr<CefPreferenceManager>
|
||||
CefPreferenceManager::GetGlobalPreferenceManager() {
|
||||
|
@@ -27,6 +27,9 @@ class CefGlobalPreferenceManagerImpl : public CefPreferenceManager {
|
||||
bool SetPreference(const CefString& name,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error) override;
|
||||
CefRefPtr<CefRegistration> AddPreferenceObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer) override;
|
||||
|
||||
private:
|
||||
IMPLEMENT_REFCOUNTING(CefGlobalPreferenceManagerImpl);
|
||||
|
@@ -207,6 +207,7 @@ void CefMainRunner::QuitMessageLoop() {
|
||||
}
|
||||
|
||||
// static
|
||||
NO_STACK_PROTECTOR
|
||||
int CefMainRunner::RunAsHelperProcess(const CefMainArgs& args,
|
||||
CefRefPtr<CefApp> application,
|
||||
void* windows_sandbox_info) {
|
||||
|
@@ -215,8 +215,10 @@ class CefMediaAccessQuery {
|
||||
content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
|
||||
-1 /* webrtc::kFullDesktopScreenId */);
|
||||
}
|
||||
video_devices.emplace_back(request_.video_type, media_id.ToString(),
|
||||
"Screen");
|
||||
if (media_id.type != content::DesktopMediaID::TYPE_NONE) {
|
||||
video_devices.emplace_back(request_.video_type, media_id.ToString(),
|
||||
"Screen");
|
||||
}
|
||||
}
|
||||
|
||||
blink::mojom::StreamDevicesSetPtr stream_devices_set =
|
||||
|
@@ -20,6 +20,12 @@
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "third_party/blink/public/mojom/context_menu/context_menu.mojom.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "chrome/browser/spellchecker/spellcheck_factory.h"
|
||||
#include "chrome/browser/spellchecker/spellcheck_service.h"
|
||||
#include "components/spellcheck/browser/spellcheck_platform.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
CefString GetLabel(int message_id) {
|
||||
@@ -120,8 +126,8 @@ bool CefMenuManager::IsShowingContextMenu() {
|
||||
return web_contents()->IsShowingContextMenu();
|
||||
}
|
||||
|
||||
bool CefMenuManager::CreateContextMenu(
|
||||
const content::ContextMenuParams& params) {
|
||||
bool CefMenuManager::CreateContextMenu(const content::ContextMenuParams& params,
|
||||
bool query_spellcheck) {
|
||||
// The renderer may send the "show context menu" message multiple times, one
|
||||
// for each right click mouse event it receives. Normally, this doesn't happen
|
||||
// because mouse events are not forwarded once the context menu is showing.
|
||||
@@ -134,6 +140,24 @@ bool CefMenuManager::CreateContextMenu(
|
||||
}
|
||||
|
||||
params_ = params;
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// System spellcheck suggestions need to be queried asynchronously.
|
||||
if (query_spellcheck && !params_.misspelled_word.empty() &&
|
||||
params_.dictionary_suggestions.empty()) {
|
||||
SpellcheckService* spellcheck_service =
|
||||
SpellcheckServiceFactory::GetForContext(
|
||||
browser_->web_contents()->GetBrowserContext());
|
||||
if (spellcheck_service) {
|
||||
spellcheck_platform::GetPerLanguageSuggestions(
|
||||
spellcheck_service->platform_spell_checker(), params_.misspelled_word,
|
||||
base::BindOnce(&CefMenuManager::OnGetPlatformSuggestionsComplete,
|
||||
weak_ptr_factory_.GetWeakPtr()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
model_->Clear();
|
||||
|
||||
// Create the default menu model.
|
||||
@@ -511,3 +535,18 @@ bool CefMenuManager::IsCustomContextMenuCommand(int command_id) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
void CefMenuManager::OnGetPlatformSuggestionsComplete(
|
||||
const spellcheck::PerLanguageSuggestions&
|
||||
platform_per_language_suggestions) {
|
||||
std::vector<std::u16string> combined_suggestions;
|
||||
spellcheck::FillSuggestions(platform_per_language_suggestions,
|
||||
&combined_suggestions);
|
||||
|
||||
params_.dictionary_suggestions = combined_suggestions;
|
||||
|
||||
// Now that we have spelling suggestions, call CreateContextMenu again.
|
||||
CreateContextMenu(params_, /*query_spellcheck=*/false);
|
||||
}
|
||||
#endif
|
||||
|
@@ -13,6 +13,10 @@
|
||||
#include "content/public/browser/context_menu_params.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "components/spellcheck/common/spellcheck_common.h"
|
||||
#endif
|
||||
|
||||
namespace content {
|
||||
class RenderFrameHost;
|
||||
class WebContents;
|
||||
@@ -39,7 +43,8 @@ class CefMenuManager : public CefMenuModelImpl::Delegate,
|
||||
bool IsShowingContextMenu();
|
||||
|
||||
// Create the context menu.
|
||||
bool CreateContextMenu(const content::ContextMenuParams& params);
|
||||
bool CreateContextMenu(const content::ContextMenuParams& params,
|
||||
bool query_spellcheck = true);
|
||||
void CancelContextMenu();
|
||||
|
||||
private:
|
||||
@@ -62,6 +67,12 @@ class CefMenuManager : public CefMenuModelImpl::Delegate,
|
||||
// Returns true if the specified id is a custom context menu command.
|
||||
bool IsCustomContextMenuCommand(int command_id);
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
void OnGetPlatformSuggestionsComplete(
|
||||
const spellcheck::PerLanguageSuggestions&
|
||||
platform_per_language_suggestions);
|
||||
#endif
|
||||
|
||||
// AlloyBrowserHostImpl pointer is guaranteed to outlive this object.
|
||||
raw_ptr<AlloyBrowserHostImpl> browser_;
|
||||
|
||||
|
@@ -18,8 +18,13 @@ namespace throttle {
|
||||
|
||||
namespace {
|
||||
|
||||
bool NavigationOnUIThread(content::NavigationHandle* navigation_handle) {
|
||||
void NavigationOnUIThread(
|
||||
content::NavigationHandle* navigation_handle,
|
||||
bool should_run_async,
|
||||
navigation_interception::InterceptNavigationThrottle::ResultCallback
|
||||
result_callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
CHECK(!should_run_async);
|
||||
|
||||
const bool is_main_frame = navigation_handle->IsInMainFrame();
|
||||
const auto global_id = frame_util::GetGlobalId(navigation_handle);
|
||||
@@ -45,7 +50,8 @@ bool NavigationOnUIThread(content::NavigationHandle* navigation_handle) {
|
||||
navigation_handle->GetWebContents()->GetPrimaryMainFrame(),
|
||||
open_params, browser)) {
|
||||
// Cancel the navigation.
|
||||
return true;
|
||||
std::move(result_callback).Run(true);
|
||||
return;
|
||||
}
|
||||
|
||||
bool ignore_navigation = false;
|
||||
@@ -81,7 +87,7 @@ bool NavigationOnUIThread(content::NavigationHandle* navigation_handle) {
|
||||
}
|
||||
}
|
||||
|
||||
return ignore_navigation;
|
||||
std::move(result_callback).Run(ignore_navigation);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -95,7 +101,7 @@ void CreateThrottlesForNavigation(content::NavigationHandle* navigation_handle,
|
||||
std::unique_ptr<content::NavigationThrottle> throttle =
|
||||
std::make_unique<navigation_interception::InterceptNavigationThrottle>(
|
||||
navigation_handle, base::BindRepeating(&NavigationOnUIThread),
|
||||
navigation_interception::SynchronyMode::kSync);
|
||||
navigation_interception::SynchronyMode::kSync, std::nullopt);
|
||||
|
||||
// Always execute our throttle first.
|
||||
throttles.emplace(throttles.begin(), std::move(throttle));
|
||||
|
@@ -202,7 +202,8 @@ void SaveCookiesOnUIThread(
|
||||
}
|
||||
|
||||
net::CookieInclusionStatus status;
|
||||
status.AddExclusionReason(net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR);
|
||||
status.AddExclusionReason(
|
||||
net::CookieInclusionStatus::ExclusionReason::EXCLUDE_UNKNOWN_ERROR);
|
||||
SetCanonicalCookieCallback(progress, net::CanonicalCookie(),
|
||||
net::CookieAccessResult(std::move(status)));
|
||||
}
|
||||
|
@@ -307,7 +307,7 @@ bool CefCookieManagerImpl::SetCookieInternal(
|
||||
if (!canonical_cookie) {
|
||||
net::CookieInclusionStatus status;
|
||||
status.AddExclusionReason(
|
||||
net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR);
|
||||
net::CookieInclusionStatus::ExclusionReason::EXCLUDE_UNKNOWN_ERROR);
|
||||
SetCookieCallbackImpl(callback, net::CookieAccessResult(std::move(status)));
|
||||
return true;
|
||||
}
|
||||
|
@@ -263,8 +263,6 @@ class InterceptedRequest : public network::mojom::URLLoader,
|
||||
const std::optional<GURL>& new_url) override;
|
||||
void SetPriority(net::RequestPriority priority,
|
||||
int32_t intra_priority_value) override;
|
||||
void PauseReadingBodyFromNet() override;
|
||||
void ResumeReadingBodyFromNet() override;
|
||||
|
||||
int32_t id() const { return id_; }
|
||||
|
||||
@@ -764,18 +762,6 @@ void InterceptedRequest::SetPriority(net::RequestPriority priority,
|
||||
}
|
||||
}
|
||||
|
||||
void InterceptedRequest::PauseReadingBodyFromNet() {
|
||||
if (target_loader_) {
|
||||
target_loader_->PauseReadingBodyFromNet();
|
||||
}
|
||||
}
|
||||
|
||||
void InterceptedRequest::ResumeReadingBodyFromNet() {
|
||||
if (target_loader_) {
|
||||
target_loader_->ResumeReadingBodyFromNet();
|
||||
}
|
||||
}
|
||||
|
||||
// Helper methods.
|
||||
|
||||
void InterceptedRequest::BeforeRequestReceived(const GURL& original_url,
|
||||
|
@@ -584,10 +584,6 @@ void StreamReaderURLLoader::FollowRedirect(
|
||||
void StreamReaderURLLoader::SetPriority(net::RequestPriority priority,
|
||||
int intra_priority_value) {}
|
||||
|
||||
void StreamReaderURLLoader::PauseReadingBodyFromNet() {}
|
||||
|
||||
void StreamReaderURLLoader::ResumeReadingBodyFromNet() {}
|
||||
|
||||
void StreamReaderURLLoader::OnInputStreamOpened(
|
||||
std::unique_ptr<StreamReaderURLLoader::Delegate> returned_delegate,
|
||||
std::unique_ptr<InputStream> input_stream) {
|
||||
|
@@ -137,8 +137,6 @@ class StreamReaderURLLoader : public network::mojom::URLLoader {
|
||||
const std::optional<GURL>& new_url) override;
|
||||
void SetPriority(net::RequestPriority priority,
|
||||
int intra_priority_value) override;
|
||||
void PauseReadingBodyFromNet() override;
|
||||
void ResumeReadingBodyFromNet() override;
|
||||
|
||||
private:
|
||||
void ContinueWithRequestHeaders(
|
||||
|
@@ -238,8 +238,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
|
||||
root_layer_ = std::make_unique<ui::Layer>(ui::LAYER_SOLID_COLOR);
|
||||
|
||||
bool opaque = SkColorGetA(background_color_) == SK_AlphaOPAQUE;
|
||||
GetRootLayer()->SetFillsBoundsOpaquely(opaque);
|
||||
// Opacity of SOLID_COLOR layer is determined by the color's alpha channel.
|
||||
GetRootLayer()->SetColor(background_color_);
|
||||
|
||||
external_begin_frame_enabled_ = use_external_begin_frame;
|
||||
|
@@ -92,7 +92,7 @@ void SoftwareOutputDeviceProxy::Resize(const gfx::Size& viewport_pixel_size,
|
||||
|
||||
canvas_ = skia::CreatePlatformCanvasWithPixels(
|
||||
viewport_pixel_size_.width(), viewport_pixel_size_.height(), false,
|
||||
static_cast<uint8_t*>(shm_.memory()), skia::CRASH_ON_FAILURE);
|
||||
static_cast<uint8_t*>(shm_.memory()), 0U, skia::CRASH_ON_FAILURE);
|
||||
#else
|
||||
canvas_ = skia::CreatePlatformCanvasWithSharedSection(
|
||||
viewport_pixel_size_.width(), viewport_pixel_size_.height(), false,
|
||||
|
@@ -175,7 +175,7 @@ void CefVideoConsumerOSR::OnFrameCaptured(
|
||||
auto& gmb_handle = data->get_gpu_memory_buffer_handle();
|
||||
cef_accelerated_paint_info_t paint_info;
|
||||
paint_info.extra = extra;
|
||||
paint_info.shared_texture_handle = gmb_handle.dxgi_handle.Get();
|
||||
paint_info.shared_texture_handle = gmb_handle.dxgi_handle().buffer_handle();
|
||||
paint_info.format = pixel_format;
|
||||
view_->OnAcceleratedPaint(damage_rect, info->coded_size, paint_info);
|
||||
#elif BUILDFLAG(IS_APPLE)
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "cef/include/cef_preference.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "cef/libcef/common/values_impl.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -118,4 +119,145 @@ bool SetPreference(PrefService* pref_service,
|
||||
return true;
|
||||
}
|
||||
|
||||
class RegistrationImpl final : public Registration, public CefRegistration {
|
||||
public:
|
||||
RegistrationImpl(Registrar* registrar,
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer)
|
||||
: registrar_(registrar), name_(name), observer_(observer) {
|
||||
DCHECK(registrar_);
|
||||
DCHECK(observer_);
|
||||
}
|
||||
|
||||
RegistrationImpl(const RegistrationImpl&) = delete;
|
||||
RegistrationImpl& operator=(const RegistrationImpl&) = delete;
|
||||
|
||||
~RegistrationImpl() override {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (registrar_) {
|
||||
registrar_->RemoveObserver(name_.ToString(), this);
|
||||
}
|
||||
}
|
||||
|
||||
void Detach() override {
|
||||
registrar_ = nullptr;
|
||||
observer_ = nullptr;
|
||||
}
|
||||
|
||||
void RunCallback() const override { RunCallback(name_); }
|
||||
|
||||
void RunCallback(const CefString& name) const override {
|
||||
observer_->OnPreferenceChanged(name);
|
||||
}
|
||||
|
||||
private:
|
||||
raw_ptr<Registrar> registrar_;
|
||||
CefString name_;
|
||||
CefRefPtr<CefPreferenceObserver> observer_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(RegistrationImpl);
|
||||
};
|
||||
|
||||
Registrar::~Registrar() {
|
||||
RemoveAll();
|
||||
}
|
||||
|
||||
void Registrar::Init(PrefService* service) {
|
||||
DCHECK(service);
|
||||
DCHECK(IsEmpty() || service_ == service);
|
||||
service_ = service;
|
||||
}
|
||||
|
||||
void Registrar::Reset() {
|
||||
RemoveAll();
|
||||
service_ = nullptr;
|
||||
}
|
||||
|
||||
void Registrar::RemoveAll() {
|
||||
if (!name_observers_.empty()) {
|
||||
for (auto& [name, registrations] : name_observers_) {
|
||||
service_->RemovePrefObserver(name, this);
|
||||
for (auto& registration : registrations) {
|
||||
registration.Detach();
|
||||
}
|
||||
}
|
||||
name_observers_.clear();
|
||||
}
|
||||
|
||||
if (!all_observers_.empty()) {
|
||||
service_->RemovePrefObserverAllPrefs(this);
|
||||
for (auto& registration : all_observers_) {
|
||||
registration.Detach();
|
||||
}
|
||||
all_observers_.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
bool Registrar::IsEmpty() const {
|
||||
return name_observers_.empty() && all_observers_.empty();
|
||||
}
|
||||
|
||||
CefRefPtr<CefRegistration> Registrar::AddObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer) {
|
||||
CHECK(service_);
|
||||
|
||||
RegistrationImpl* impl = new RegistrationImpl(this, name, observer);
|
||||
|
||||
if (name.empty()) {
|
||||
if (all_observers_.empty()) {
|
||||
service_->AddPrefObserverAllPrefs(this);
|
||||
}
|
||||
all_observers_.AddObserver(impl);
|
||||
} else {
|
||||
const std::string& name_str = name.ToString();
|
||||
if (!name_observers_.contains(name_str)) {
|
||||
service_->AddPrefObserver(name_str, this);
|
||||
}
|
||||
name_observers_[name_str].AddObserver(impl);
|
||||
}
|
||||
|
||||
return impl;
|
||||
}
|
||||
|
||||
void Registrar::RemoveObserver(std::string_view name,
|
||||
Registration* registration) {
|
||||
CHECK(service_);
|
||||
|
||||
if (name.empty()) {
|
||||
all_observers_.RemoveObserver(registration);
|
||||
if (all_observers_.empty()) {
|
||||
service_->RemovePrefObserverAllPrefs(this);
|
||||
}
|
||||
} else {
|
||||
auto it = name_observers_.find(std::string(name));
|
||||
DCHECK(it != name_observers_.end());
|
||||
it->second.RemoveObserver(registration);
|
||||
if (it->second.empty()) {
|
||||
name_observers_.erase(it);
|
||||
service_->RemovePrefObserver(name, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Registrar::OnPreferenceChanged(PrefService* service,
|
||||
std::string_view pref_name) {
|
||||
std::string pref_name_str(pref_name);
|
||||
if (!name_observers_.empty()) {
|
||||
auto it = name_observers_.find(pref_name_str);
|
||||
if (it != name_observers_.end()) {
|
||||
for (Registration& registration : it->second) {
|
||||
registration.RunCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!all_observers_.empty()) {
|
||||
CefString name_str(pref_name_str);
|
||||
for (Registration& registration : all_observers_) {
|
||||
registration.RunCallback(name_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace pref_helper
|
||||
|
@@ -5,8 +5,16 @@
|
||||
#ifndef CEF_LIBCEF_BROWSER_PREFS_PREF_HELPER_H_
|
||||
#define CEF_LIBCEF_BROWSER_PREFS_PREF_HELPER_H_
|
||||
|
||||
#include "cef/include/cef_values.h"
|
||||
#include <unordered_map>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "cef/include/cef_registration.h"
|
||||
#include "cef/include/cef_values.h"
|
||||
#include "components/prefs/pref_observer.h"
|
||||
|
||||
class CefPreferenceObserver;
|
||||
class CefRegistration;
|
||||
class PrefService;
|
||||
|
||||
namespace pref_helper {
|
||||
@@ -28,6 +36,69 @@ bool SetPreference(PrefService* pref_service,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error);
|
||||
|
||||
class Registration : public base::CheckedObserver {
|
||||
public:
|
||||
virtual void Detach() = 0;
|
||||
virtual void RunCallback() const = 0;
|
||||
virtual void RunCallback(const CefString& name) const = 0;
|
||||
};
|
||||
|
||||
class RegistrationImpl;
|
||||
|
||||
// Automatically manages the registration of one or more CefPreferenceObserver
|
||||
// objects with a PrefService. When the Registrar is destroyed, all registered
|
||||
// observers are automatically unregistered with the PrefService. Loosely based
|
||||
// on PrefChangeRegistrar.
|
||||
class Registrar final : public PrefObserver {
|
||||
public:
|
||||
Registrar() = default;
|
||||
|
||||
Registrar(const Registrar&) = delete;
|
||||
Registrar& operator=(const Registrar&) = delete;
|
||||
|
||||
~Registrar();
|
||||
|
||||
// Must be called before adding or removing observers. Can be called more
|
||||
// than once as long as the value of |service| doesn't change.
|
||||
void Init(PrefService* service);
|
||||
|
||||
// Removes all observers and clears the reference to the PrefService.
|
||||
// `Init` must be called before adding or removing any observers.
|
||||
void Reset();
|
||||
|
||||
// Removes all observers that have been previously added with a call to Add.
|
||||
void RemoveAll();
|
||||
|
||||
// Returns true if no observers are registered.
|
||||
bool IsEmpty() const;
|
||||
|
||||
// Adds a pref |observer| for the specified pref |name|. All registered
|
||||
// observers will be automatically unregistered and detached when the
|
||||
// Registrar's destructor is called.
|
||||
CefRefPtr<CefRegistration> AddObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer);
|
||||
|
||||
private:
|
||||
friend class RegistrationImpl;
|
||||
|
||||
void RemoveObserver(std::string_view name, Registration* registration);
|
||||
|
||||
// PrefObserver:
|
||||
void OnPreferenceChanged(PrefService* service,
|
||||
std::string_view pref_name) override;
|
||||
|
||||
raw_ptr<PrefService, AcrossTasksDanglingUntriaged> service_ = nullptr;
|
||||
|
||||
// Observers registered for a preference by name.
|
||||
using ObserverMap =
|
||||
std::unordered_map<std::string, base::ObserverList<Registration>>;
|
||||
ObserverMap name_observers_;
|
||||
|
||||
// Observers registered for all preferences.
|
||||
base::ObserverList<Registration> all_observers_;
|
||||
};
|
||||
|
||||
} // namespace pref_helper
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_PREFS_PREF_HELPER_H_
|
||||
|
@@ -10,7 +10,9 @@
|
||||
#include "cef/libcef/browser/browser_context.h"
|
||||
#include "cef/libcef/browser/context.h"
|
||||
#include "cef/libcef/browser/prefs/pref_helper.h"
|
||||
#include "cef/libcef/browser/setting_helper.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "cef/libcef/common/api_version_util.h"
|
||||
#include "cef/libcef/common/app_manager.h"
|
||||
#include "cef/libcef/common/task_runner_impl.h"
|
||||
#include "cef/libcef/common/values_impl.h"
|
||||
@@ -459,6 +461,22 @@ bool CefRequestContextImpl::SetPreference(const CefString& name,
|
||||
return pref_helper::SetPreference(pref_service, name, value, error);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRegistration> CefRequestContextImpl::AddPreferenceObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer) {
|
||||
CEF_API_REQUIRE_ADDED(13401);
|
||||
if (!VerifyBrowserContext()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!pref_registrar_) {
|
||||
pref_registrar_ = std::make_unique<pref_helper::Registrar>();
|
||||
pref_registrar_->Init(browser_context()->AsProfile()->GetPrefs());
|
||||
}
|
||||
|
||||
return pref_registrar_->AddObserver(name, observer);
|
||||
}
|
||||
|
||||
void CefRequestContextImpl::ClearCertificateExceptions(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
GetBrowserContext(
|
||||
@@ -588,6 +606,26 @@ void CefRequestContextImpl::SetContentSetting(
|
||||
requesting_url, top_level_url, content_type, value));
|
||||
}
|
||||
|
||||
CefRefPtr<CefRegistration> CefRequestContextImpl::AddSettingObserver(
|
||||
CefRefPtr<CefSettingObserver> observer) {
|
||||
CEF_API_REQUIRE_ADDED(13401);
|
||||
if (!VerifyBrowserContext()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!setting_registrar_) {
|
||||
auto* settings_map = HostContentSettingsMapFactory::GetForProfile(
|
||||
browser_context()->AsProfile());
|
||||
if (!settings_map) {
|
||||
return nullptr;
|
||||
}
|
||||
setting_registrar_ = std::make_unique<setting_helper::Registrar>();
|
||||
setting_registrar_->Init(settings_map);
|
||||
}
|
||||
|
||||
return setting_registrar_->AddObserver(observer);
|
||||
}
|
||||
|
||||
void CefRequestContextImpl::SetChromeColorScheme(cef_color_variant_t variant,
|
||||
cef_color_t user_color) {
|
||||
GetBrowserContext(
|
||||
|
@@ -17,6 +17,14 @@ namespace content {
|
||||
struct GlobalRenderFrameHostId;
|
||||
}
|
||||
|
||||
namespace pref_helper {
|
||||
class Registrar;
|
||||
}
|
||||
|
||||
namespace setting_helper {
|
||||
class Registrar;
|
||||
}
|
||||
|
||||
class CefBrowserContext;
|
||||
|
||||
// Implementation of the CefRequestContext interface. All methods are thread-
|
||||
@@ -80,6 +88,20 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
||||
BrowserContextCallback callback);
|
||||
|
||||
// CefPreferenceManager methods.
|
||||
bool HasPreference(const CefString& name) override;
|
||||
CefRefPtr<CefValue> GetPreference(const CefString& name) override;
|
||||
CefRefPtr<CefDictionaryValue> GetAllPreferences(
|
||||
bool include_defaults) override;
|
||||
bool CanSetPreference(const CefString& name) override;
|
||||
bool SetPreference(const CefString& name,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error) override;
|
||||
CefRefPtr<CefRegistration> AddPreferenceObserver(
|
||||
const CefString& name,
|
||||
CefRefPtr<CefPreferenceObserver> observer) override;
|
||||
|
||||
// CefRequestContext methods.
|
||||
bool IsSame(CefRefPtr<CefRequestContext> other) override;
|
||||
bool IsSharingWith(CefRefPtr<CefRequestContext> other) override;
|
||||
bool IsGlobal() override;
|
||||
@@ -92,14 +114,6 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
const CefString& domain_name,
|
||||
CefRefPtr<CefSchemeHandlerFactory> factory) override;
|
||||
bool ClearSchemeHandlerFactories() override;
|
||||
bool HasPreference(const CefString& name) override;
|
||||
CefRefPtr<CefValue> GetPreference(const CefString& name) override;
|
||||
CefRefPtr<CefDictionaryValue> GetAllPreferences(
|
||||
bool include_defaults) override;
|
||||
bool CanSetPreference(const CefString& name) override;
|
||||
bool SetPreference(const CefString& name,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error) override;
|
||||
void ClearCertificateExceptions(
|
||||
CefRefPtr<CefCompletionCallback> callback) override;
|
||||
void ClearHttpAuthCredentials(
|
||||
@@ -125,6 +139,8 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
const CefString& top_level_url,
|
||||
cef_content_setting_types_t content_type,
|
||||
cef_content_setting_values_t value) override;
|
||||
CefRefPtr<CefRegistration> AddSettingObserver(
|
||||
CefRefPtr<CefSettingObserver> observer) override;
|
||||
void SetChromeColorScheme(cef_color_variant_t variant,
|
||||
cef_color_t user_color) override;
|
||||
cef_color_variant_t GetChromeColorSchemeMode() override;
|
||||
@@ -218,6 +234,9 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
|
||||
Config config_;
|
||||
|
||||
std::unique_ptr<pref_helper::Registrar> pref_registrar_;
|
||||
std::unique_ptr<setting_helper::Registrar> setting_registrar_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefRequestContextImpl);
|
||||
};
|
||||
|
||||
|
118
libcef/browser/setting_helper.cc
Normal file
118
libcef/browser/setting_helper.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
// Copyright (c) 2025 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#include "cef/libcef/browser/setting_helper.h"
|
||||
|
||||
#include "cef/include/cef_request_context.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace setting_helper {
|
||||
|
||||
class RegistrationImpl final : public Registration, public CefRegistration {
|
||||
public:
|
||||
RegistrationImpl(Registrar* registrar, CefRefPtr<CefSettingObserver> observer)
|
||||
: registrar_(registrar), observer_(observer) {
|
||||
DCHECK(registrar_);
|
||||
DCHECK(observer_);
|
||||
}
|
||||
|
||||
RegistrationImpl(const RegistrationImpl&) = delete;
|
||||
RegistrationImpl& operator=(const RegistrationImpl&) = delete;
|
||||
|
||||
~RegistrationImpl() override {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (registrar_) {
|
||||
registrar_->RemoveObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Detach() override {
|
||||
registrar_ = nullptr;
|
||||
observer_ = nullptr;
|
||||
}
|
||||
|
||||
void RunCallback(const CefString& requesting_url,
|
||||
const CefString& top_level_url,
|
||||
cef_content_setting_types_t content_type) const override {
|
||||
observer_->OnSettingChanged(requesting_url, top_level_url, content_type);
|
||||
}
|
||||
|
||||
private:
|
||||
raw_ptr<Registrar> registrar_;
|
||||
CefRefPtr<CefSettingObserver> observer_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(RegistrationImpl);
|
||||
};
|
||||
|
||||
Registrar::~Registrar() {
|
||||
RemoveAll();
|
||||
}
|
||||
|
||||
void Registrar::Init(HostContentSettingsMap* settings) {
|
||||
DCHECK(settings);
|
||||
DCHECK(IsEmpty() || settings_ == settings);
|
||||
settings_ = settings;
|
||||
}
|
||||
|
||||
void Registrar::Reset() {
|
||||
RemoveAll();
|
||||
settings_ = nullptr;
|
||||
}
|
||||
|
||||
void Registrar::RemoveAll() {
|
||||
if (!observers_.empty()) {
|
||||
settings_->RemoveObserver(this);
|
||||
for (auto& registration : observers_) {
|
||||
registration.Detach();
|
||||
}
|
||||
observers_.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
bool Registrar::IsEmpty() const {
|
||||
return observers_.empty();
|
||||
}
|
||||
|
||||
CefRefPtr<CefRegistration> Registrar::AddObserver(
|
||||
CefRefPtr<CefSettingObserver> observer) {
|
||||
CHECK(settings_);
|
||||
|
||||
RegistrationImpl* impl = new RegistrationImpl(this, observer);
|
||||
|
||||
if (observers_.empty()) {
|
||||
settings_->AddObserver(this);
|
||||
}
|
||||
observers_.AddObserver(impl);
|
||||
|
||||
return impl;
|
||||
}
|
||||
|
||||
void Registrar::RemoveObserver(Registration* registration) {
|
||||
CHECK(settings_);
|
||||
|
||||
observers_.RemoveObserver(registration);
|
||||
if (observers_.empty()) {
|
||||
settings_->RemoveObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Registrar::OnContentSettingChanged(
|
||||
const ContentSettingsPattern& primary_pattern,
|
||||
const ContentSettingsPattern& secondary_pattern,
|
||||
ContentSettingsTypeSet content_type_set) {
|
||||
DCHECK(!IsEmpty());
|
||||
|
||||
const CefString requesting_url(primary_pattern.ToRepresentativeUrl().spec());
|
||||
const CefString top_level_url(secondary_pattern.ToRepresentativeUrl().spec());
|
||||
const auto content_type =
|
||||
static_cast<cef_content_setting_types_t>(content_type_set.GetType());
|
||||
|
||||
for (Registration& registration : observers_) {
|
||||
registration.RunCallback(requesting_url, top_level_url, content_type);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace setting_helper
|
81
libcef/browser/setting_helper.h
Normal file
81
libcef/browser/setting_helper.h
Normal file
@@ -0,0 +1,81 @@
|
||||
// Copyright (c) 2025 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_BROWSER_SETTING_HELPER_H_
|
||||
#define CEF_LIBCEF_BROWSER_SETTING_HELPER_H_
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "cef/include/cef_registration.h"
|
||||
#include "components/content_settings/core/browser/content_settings_observer.h"
|
||||
|
||||
class CefSettingObserver;
|
||||
class CefRegistration;
|
||||
class HostContentSettingsMap;
|
||||
|
||||
namespace setting_helper {
|
||||
|
||||
class Registration : public base::CheckedObserver {
|
||||
public:
|
||||
virtual void Detach() = 0;
|
||||
virtual void RunCallback(const CefString& requesting_url,
|
||||
const CefString& top_level_url,
|
||||
cef_content_setting_types_t content_type) const = 0;
|
||||
};
|
||||
|
||||
class RegistrationImpl;
|
||||
|
||||
// Automatically manages the registration of one or more CefSettingObserver
|
||||
// objects with a HostContentSettingsMap. When the Registrar is destroyed, all
|
||||
// registered observers are automatically unregistered with the
|
||||
// HostContentSettingsMap. Loosely based on PrefChangeRegistrar.
|
||||
class Registrar final : public content_settings::Observer {
|
||||
public:
|
||||
Registrar() = default;
|
||||
|
||||
Registrar(const Registrar&) = delete;
|
||||
Registrar& operator=(const Registrar&) = delete;
|
||||
|
||||
~Registrar();
|
||||
|
||||
// Must be called before adding or removing observers. Can be called more
|
||||
// than once as long as the value of |settings| doesn't change.
|
||||
void Init(HostContentSettingsMap* settings);
|
||||
|
||||
// Removes all observers and clears the reference to the
|
||||
// HostContentSettingsMap. `Init` must be called before adding or removing any
|
||||
// observers.
|
||||
void Reset();
|
||||
|
||||
// Removes all observers that have been previously added with a call to Add.
|
||||
void RemoveAll();
|
||||
|
||||
// Returns true if no observers are registered.
|
||||
bool IsEmpty() const;
|
||||
|
||||
// Adds a setting observer. All registered observers will be automatically
|
||||
// unregistered and detached when the Registrar's destructor is called.
|
||||
CefRefPtr<CefRegistration> AddObserver(
|
||||
CefRefPtr<CefSettingObserver> observer);
|
||||
|
||||
private:
|
||||
friend class RegistrationImpl;
|
||||
|
||||
void RemoveObserver(Registration* registration);
|
||||
|
||||
// content_settings::Observer:
|
||||
void OnContentSettingChanged(
|
||||
const ContentSettingsPattern& primary_pattern,
|
||||
const ContentSettingsPattern& secondary_pattern,
|
||||
ContentSettingsTypeSet content_type_set) override;
|
||||
|
||||
raw_ptr<HostContentSettingsMap, AcrossTasksDanglingUntriaged> settings_ =
|
||||
nullptr;
|
||||
|
||||
base::ObserverList<Registration> observers_;
|
||||
};
|
||||
|
||||
} // namespace setting_helper
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_SETTING_HELPER_H_
|
@@ -4,8 +4,9 @@
|
||||
|
||||
#include "cef/libcef/browser/task_manager_impl.h"
|
||||
|
||||
#include <ranges>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/system/sys_info.h"
|
||||
#include "cef/libcef/browser/browser_host_base.h"
|
||||
#include "cef/libcef/browser/context.h"
|
||||
@@ -27,7 +28,6 @@ CefTaskManager::TaskType toCefTaskType(task_manager::Task::Type type) {
|
||||
case task_manager::Task::CROSTINI:
|
||||
case task_manager::Task::PLUGIN_VM:
|
||||
case task_manager::Task::NACL:
|
||||
case task_manager::Task::LACROS:
|
||||
return CEF_TASK_TYPE_UNKNOWN;
|
||||
case task_manager::Task::BROWSER:
|
||||
return CEF_TASK_TYPE_BROWSER;
|
||||
@@ -85,7 +85,7 @@ void CefTaskManagerImpl::OnTaskAdded(int64_t id) {
|
||||
}
|
||||
|
||||
void CefTaskManagerImpl::OnTaskToBeRemoved(int64_t id) {
|
||||
auto index = base::ranges::find(tasks_, id);
|
||||
auto index = std::ranges::find(tasks_, id);
|
||||
if (index != tasks_.end()) {
|
||||
tasks_.erase(index);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ int64_t CefTaskManagerImpl::GetTaskIdForBrowserId(int browser_id) {
|
||||
}
|
||||
|
||||
bool CefTaskManagerImpl::IsValidTaskId(int64_t task_id) const {
|
||||
return base::ranges::find(tasks_, task_id) != tasks_.end();
|
||||
return std::ranges::find(tasks_, task_id) != tasks_.end();
|
||||
}
|
||||
|
||||
CefRefPtr<CefTaskManager> CefTaskManager::GetTaskManager() {
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include "cef/libcef/browser/views/window_view.h"
|
||||
|
||||
#include <memory>
|
||||
#include <ranges>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
|
||||
@@ -16,7 +17,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "cef/libcef/browser/geometry_util.h"
|
||||
#include "cef/libcef/browser/image_impl.h"
|
||||
#include "cef/libcef/browser/views/widget.h"
|
||||
@@ -887,7 +887,7 @@ void CefWindowView::RemoveOverlayView(CefOverlayViewHost* host,
|
||||
DCHECK_EQ(host_view->parent(), this);
|
||||
RemoveChildView(host_view);
|
||||
|
||||
const auto it = base::ranges::find_if(
|
||||
const auto it = std::ranges::find_if(
|
||||
overlay_hosts_,
|
||||
[host](CefOverlayViewHost* current) { return current == host; });
|
||||
DCHECK(it != overlay_hosts_.end());
|
||||
|
@@ -37,8 +37,13 @@ bool GetCookieDomain(const GURL& url,
|
||||
domain_string = pc.Domain();
|
||||
}
|
||||
net::CookieInclusionStatus status;
|
||||
return net::cookie_util::GetCookieDomainWithString(url, domain_string, status,
|
||||
result);
|
||||
const auto& retval =
|
||||
net::cookie_util::GetCookieDomainWithString(url, domain_string, status);
|
||||
if (retval.has_value()) {
|
||||
*result = *retval;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
cef_cookie_same_site_t MakeCefCookieSameSite(net::CookieSameSite value) {
|
||||
|
@@ -373,8 +373,7 @@ void CefFrameImpl::OnDraggableRegionsChanged() {
|
||||
return;
|
||||
}
|
||||
|
||||
blink::WebVector<blink::WebDraggableRegion> webregions =
|
||||
frame_->GetDocument().DraggableRegions();
|
||||
auto webregions = frame_->GetDocument().DraggableRegions();
|
||||
std::vector<cef::mojom::DraggableRegionEntryPtr> regions;
|
||||
if (!webregions.empty()) {
|
||||
auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_);
|
||||
|
@@ -462,12 +462,12 @@ void GetCefString(v8::Isolate* isolate,
|
||||
|
||||
#if defined(CEF_STRING_TYPE_WIDE)
|
||||
// Allocate enough space for a worst-case conversion.
|
||||
int len = str->Utf8Length();
|
||||
size_t len = str->Utf8LengthV2();
|
||||
if (len == 0) {
|
||||
return;
|
||||
}
|
||||
char* buf = new char[len + 1];
|
||||
str->WriteUtf8(isolate, buf, len + 1);
|
||||
str->WriteUtf8V2(isolate, buf, len, v8::String::WriteFlags::kNullTerminate);
|
||||
|
||||
// Perform conversion to the wide type.
|
||||
cef_string_t* retws = out.GetWritableStruct();
|
||||
@@ -481,15 +481,16 @@ void GetCefString(v8::Isolate* isolate,
|
||||
return;
|
||||
}
|
||||
char16_t* buf = new char16_t[len + 1];
|
||||
str->Write(isolate, reinterpret_cast<uint16_t*>(buf), 0, len + 1);
|
||||
str->WriteV2(isolate, 0, len, reinterpret_cast<uint16_t*>(buf),
|
||||
v8::String::WriteFlags::kNullTerminate);
|
||||
#else
|
||||
// Allocate enough space for a worst-case conversion.
|
||||
int len = str->Utf8Length();
|
||||
size_t len = str->Utf8LengthV2();
|
||||
if (len == 0) {
|
||||
return;
|
||||
}
|
||||
char* buf = new char[len + 1];
|
||||
str->WriteUtf8(isolate, buf, len + 1);
|
||||
str->WriteUtf8V2(isolate, buf, len, v8::String::WriteFlags::kNullTerminate);
|
||||
#endif
|
||||
|
||||
// Don't perform an extra string copy.
|
||||
|
@@ -48,23 +48,23 @@ CEF_EXPORT int cef_version_info(int entry) {
|
||||
#include "cef/libcef_dll/cef_api_versions.inc"
|
||||
|
||||
CEF_EXPORT const char* cef_api_hash(int version, int entry) {
|
||||
static const ApiVersionHash* hash = nullptr;
|
||||
static const ApiVersionHash* current_version_hash = nullptr;
|
||||
|
||||
// Initialize on the first successful lookup.
|
||||
if (!hash) {
|
||||
for (size_t i = 0; i < kApiVersionHashesSize; ++i) {
|
||||
if (version == kApiVersionHashes[i].version) {
|
||||
hash = &kApiVersionHashes[i];
|
||||
if (!current_version_hash) {
|
||||
for (const auto& version_hash : kApiVersionHashes) {
|
||||
if (version == version_hash.version) {
|
||||
current_version_hash = &version_hash;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hash) {
|
||||
if (current_version_hash) {
|
||||
g_version = version;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hash) {
|
||||
if (!current_version_hash) {
|
||||
LOG(ERROR) << "Request for unsupported CEF API version " << version;
|
||||
return nullptr;
|
||||
}
|
||||
@@ -76,9 +76,8 @@ CEF_EXPORT const char* cef_api_hash(int version, int entry) {
|
||||
|
||||
switch (entry) {
|
||||
case 0:
|
||||
return hash->platform;
|
||||
case 1:
|
||||
return hash->universal;
|
||||
return current_version_hash->hash;
|
||||
case 2:
|
||||
return CEF_COMMIT_HASH;
|
||||
default:
|
||||
@@ -97,9 +96,8 @@ CEF_EXPORT int cef_id_for_pack_resource_name(const char* name) {
|
||||
|
||||
// Initialize on the first call.
|
||||
if (string_to_id_map->empty()) {
|
||||
for (size_t i = 0; i < kIdNamesPackResourcesSize; ++i) {
|
||||
(*string_to_id_map)[kIdNamesPackResources[i].name] =
|
||||
kIdNamesPackResources[i].id;
|
||||
for (const auto& pack_resource : kIdNamesPackResources) {
|
||||
(*string_to_id_map)[pack_resource.name] = pack_resource.id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,9 +117,8 @@ CEF_EXPORT int cef_id_for_pack_string_name(const char* name) {
|
||||
|
||||
// Initialize on the first call.
|
||||
if (string_to_id_map->empty()) {
|
||||
for (size_t i = 0; i < kIdNamesPackStringsSize; ++i) {
|
||||
(*string_to_id_map)[kIdNamesPackStrings[i].name] =
|
||||
kIdNamesPackStrings[i].id;
|
||||
for (const auto& pack_string : kIdNamesPackStrings) {
|
||||
(*string_to_id_map)[pack_string.name] = pack_string.id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,9 +138,8 @@ CEF_EXPORT int cef_id_for_command_id_name(const char* name) {
|
||||
|
||||
// Initialize on the first call.
|
||||
if (string_to_id_map->empty()) {
|
||||
for (size_t i = 0; i < kIdNamesCommandIdsSize; ++i) {
|
||||
(*string_to_id_map)[kIdNamesCommandIds[i].name] =
|
||||
kIdNamesCommandIds[i].id;
|
||||
for (const auto& command : kIdNamesCommandIds) {
|
||||
(*string_to_id_map)[command.name] = command.id;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -519,6 +519,9 @@ patches = [
|
||||
#
|
||||
# Avoid inclusion of undefined PartitionAlloc dependencies in Dawn after
|
||||
# https://crrev.com/4dacf2b61c359950d2c2f1b5f9b9d079a01290a4
|
||||
#
|
||||
# win: Fix extra qualification on member 'basic_common_reference'
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/6265643
|
||||
'name': 'base_sandbox_2743',
|
||||
},
|
||||
{
|
||||
@@ -763,10 +766,12 @@ patches = [
|
||||
'name': 'mojo_connect_result_3664'
|
||||
},
|
||||
{
|
||||
# Fix error: static assertion failed due to requirement 'sizeof(cc::Layer)
|
||||
# == sizeof(cc::SameSizeAsLayer)' when building with
|
||||
# enable_backup_ref_ptr_instance_tracer=true.
|
||||
# https://issues.chromium.org/issues/387277990
|
||||
'name': 'cc_layer_387277990'
|
||||
# Support for configuration accessors/observers.
|
||||
# - Allow pref_service::Registrar access to
|
||||
# PrefService::[Add|Remove]PrefObserver.
|
||||
# - Enable SyntheticTrialsActiveGroupIdProvider::GetGroups in Release
|
||||
# builds.
|
||||
# https://github.com/chromiumembedded/cef/issues/3892
|
||||
'name': 'config_3892'
|
||||
}
|
||||
]
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git base/command_line.cc base/command_line.cc
|
||||
index 1f3627a128300..430b05e63b5c7 100644
|
||||
index a35ddac7efebb..dbcfea242b463 100644
|
||||
--- base/command_line.cc
|
||||
+++ base/command_line.cc
|
||||
@@ -396,11 +396,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string,
|
||||
@@ -404,11 +404,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string,
|
||||
#if BUILDFLAG(ENABLE_COMMANDLINE_SEQUENCE_CHECKS)
|
||||
sequence_checker_.Check();
|
||||
#endif
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index 5d8029ab4b82c..3fd3b54866cf7 100644
|
||||
index 854457658bbdc..823f50e53821d 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -42,6 +42,7 @@ import("//build/rust/rust_static_library.gni")
|
||||
@@ -10,7 +10,7 @@ index 5d8029ab4b82c..3fd3b54866cf7 100644
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -1491,7 +1492,13 @@ component("base") {
|
||||
@@ -1492,7 +1493,13 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
@@ -25,7 +25,7 @@ index 5d8029ab4b82c..3fd3b54866cf7 100644
|
||||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1941,6 +1948,12 @@ component("base") {
|
||||
@@ -1942,6 +1949,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
@@ -59,6 +59,28 @@ index f680f63cffc5b..9cb615bbc8a5a 100644
|
||||
DCHECK([&] {
|
||||
auto const was_set = is_initialized_check_flag_.test_and_set();
|
||||
is_initialized_check_flag_.clear();
|
||||
diff --git base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h
|
||||
index c3ac11523410f..2a3d3bc4d1f34 100644
|
||||
--- base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h
|
||||
+++ base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h
|
||||
@@ -1271,7 +1271,7 @@ template <typename T,
|
||||
typename TQ,
|
||||
template <typename>
|
||||
typename UQ>
|
||||
-struct std::basic_common_reference<raw_ptr<T, Traits>, T*, TQ, UQ> {
|
||||
+struct basic_common_reference<raw_ptr<T, Traits>, T*, TQ, UQ> {
|
||||
using type = T*;
|
||||
};
|
||||
|
||||
@@ -1281,7 +1281,7 @@ template <typename T,
|
||||
typename TQ,
|
||||
template <typename>
|
||||
typename UQ>
|
||||
-struct std::basic_common_reference<T*, raw_ptr<T, Traits>, TQ, UQ> {
|
||||
+struct basic_common_reference<T*, raw_ptr<T, Traits>, TQ, UQ> {
|
||||
using type = T*;
|
||||
};
|
||||
|
||||
diff --git base/hash/md5.h base/hash/md5.h
|
||||
index 215d636fec275..922e88f31b999 100644
|
||||
--- base/hash/md5.h
|
||||
@@ -179,10 +201,10 @@ index af1d4f46d02c9..953585804c177 100644
|
||||
#else
|
||||
return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser);
|
||||
diff --git base/logging.cc base/logging.cc
|
||||
index b67b6fbf7e4e5..fc23ed1b4477d 100644
|
||||
index 4511af700c1be..dbd50c28455be 100644
|
||||
--- base/logging.cc
|
||||
+++ base/logging.cc
|
||||
@@ -60,6 +60,7 @@
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "base/vlog.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
@@ -190,7 +212,7 @@ index b67b6fbf7e4e5..fc23ed1b4477d 100644
|
||||
#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
|
||||
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
|
||||
|
||||
@@ -538,7 +539,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
|
||||
@@ -534,7 +535,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -247,12 +269,12 @@ index 5d11d4a1560b1..242a93bcca8ed 100644
|
||||
} // namespace win
|
||||
#endif
|
||||
diff --git base/rand_util.h base/rand_util.h
|
||||
index b198a7198aab9..01bc8e9b6ad1f 100644
|
||||
index 716222897d140..2d1053085630c 100644
|
||||
--- base/rand_util.h
|
||||
+++ base/rand_util.h
|
||||
@@ -17,8 +17,9 @@
|
||||
#include "base/containers/span.h"
|
||||
#include "base/gtest_prod_util.h"
|
||||
@@ -23,8 +23,9 @@
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
|
||||
@@ -261,7 +283,7 @@ index b198a7198aab9..01bc8e9b6ad1f 100644
|
||||
#include "third_party/boringssl/src/include/openssl/rand.h"
|
||||
#endif
|
||||
|
||||
@@ -117,7 +118,7 @@ class RandomBitGenerator {
|
||||
@@ -185,7 +186,7 @@ class RandomBitGenerator {
|
||||
~RandomBitGenerator() = default;
|
||||
};
|
||||
|
||||
@@ -344,7 +366,7 @@ index ea33ca66f384c..33f4cc76f76bd 100644
|
||||
return lhs.token_ == rhs.token_;
|
||||
#else
|
||||
diff --git base/win/sid.cc base/win/sid.cc
|
||||
index 6b5d9b1e494b7..538c98d6676ad 100644
|
||||
index 6a91e984f5161..4433591d96c99 100644
|
||||
--- base/win/sid.cc
|
||||
+++ base/win/sid.cc
|
||||
@@ -29,12 +29,56 @@
|
||||
|
@@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
|
||||
+
|
||||
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
|
||||
diff --git content/shell/BUILD.gn content/shell/BUILD.gn
|
||||
index ce28d886a26d2..3d044d223fac5 100644
|
||||
index 34ae648c14c93..0a481969e9417 100644
|
||||
--- content/shell/BUILD.gn
|
||||
+++ content/shell/BUILD.gn
|
||||
@@ -909,7 +909,6 @@ if (is_mac) {
|
||||
@@ -910,7 +910,6 @@ if (is_mac) {
|
||||
# Specify a sensible install_name for static builds. The library is
|
||||
# dlopen()ed so this is not used to resolve the module.
|
||||
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]
|
||||
|
@@ -1,10 +1,10 @@
|
||||
diff --git base/task/thread_pool/thread_pool_impl.cc base/task/thread_pool/thread_pool_impl.cc
|
||||
index 44872d0f8c7c4..a374b12919609 100644
|
||||
index 33deee9fff103..1b2a4c1482ac0 100644
|
||||
--- base/task/thread_pool/thread_pool_impl.cc
|
||||
+++ base/task/thread_pool/thread_pool_impl.cc
|
||||
@@ -103,6 +103,10 @@ ThreadPoolImpl::ThreadPoolImpl(std::string_view histogram_label,
|
||||
: kForegroundPoolEnvironmentParams.thread_type_hint,
|
||||
task_tracker_->GetTrackedRef(), tracked_ref_factory_.GetTrackedRef());
|
||||
@@ -108,6 +108,10 @@ ThreadPoolImpl::ThreadPoolImpl(std::string_view histogram_label,
|
||||
ThreadGroupType::BACKGROUND, task_tracker_->GetTrackedRef(),
|
||||
tracked_ref_factory_.GetTrackedRef());
|
||||
}
|
||||
+
|
||||
+ // After https://crrev.com/e2e090c363 the ThreadPool is being created earlier
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
|
||||
index 023ce7091b061..f175b3683f48f 100644
|
||||
index 1547a5ee8178c..e3bc0e82b1c66 100644
|
||||
--- third_party/blink/public/web/web_element.h
|
||||
+++ third_party/blink/public/web/web_element.h
|
||||
@@ -82,6 +82,9 @@ class BLINK_EXPORT WebElement : public WebNode {
|
||||
@@ -81,6 +81,9 @@ class BLINK_EXPORT WebElement : public WebNode {
|
||||
WebString TextContent() const;
|
||||
WebString TextContentAbridged(unsigned int max_length) const;
|
||||
WebString InnerHTML() const;
|
||||
@@ -13,7 +13,7 @@ index 023ce7091b061..f175b3683f48f 100644
|
||||
// Returns true if the element's computed writing suggestions value is true.
|
||||
// https://html.spec.whatwg.org/#writing-suggestions:computed-writing-suggestions-value
|
||||
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
|
||||
index def4b446fcbbb..d48998241f604 100644
|
||||
index 8baa5193bfbe0..98c3b930a0498 100644
|
||||
--- third_party/blink/renderer/core/exported/web_element.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_element.cc
|
||||
@@ -119,6 +119,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
|
||||
|
@@ -1,13 +1,16 @@
|
||||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index aecccefd0dfa1..72c287317da0c 100644
|
||||
index d2a1fe5b3d301..4e49261495260 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -207,7 +207,7 @@ BrowserTaskExecutor::OnUserInputStart() {
|
||||
@@ -183,10 +183,9 @@ void BrowserTaskExecutor::ResetForTesting() {
|
||||
|
||||
// static
|
||||
void BrowserTaskExecutor::Shutdown() {
|
||||
- if (!g_browser_task_executor)
|
||||
+ if (!g_browser_task_executor || !g_browser_task_executor->ui_thread_executor_)
|
||||
+ if (!g_browser_task_executor || !Get()->browser_ui_thread_scheduler_)
|
||||
return;
|
||||
|
||||
DCHECK(Get()->ui_thread_executor_);
|
||||
- DCHECK(Get()->browser_ui_thread_scheduler_);
|
||||
// We don't delete |g_browser_task_executor| because other threads may
|
||||
// PostTask or call BrowserTaskExecutor::GetTaskRunner while we're tearing
|
||||
// things down. We don't want to add locks so we just leak instead of dealing
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
|
||||
index 01dab0910e066..4c6d6faae8ce9 100644
|
||||
index 53a73d6c75b7a..05290de4c03a0 100644
|
||||
--- content/browser/child_process_security_policy_impl.cc
|
||||
+++ content/browser/child_process_security_policy_impl.cc
|
||||
@@ -2134,6 +2134,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
|
||||
@@ -2146,6 +2146,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme)) {
|
||||
return true;
|
||||
}
|
||||
@@ -20,10 +20,10 @@ index 01dab0910e066..4c6d6faae8ce9 100644
|
||||
|
||||
// Make an exception to allow most visited tiles to commit in third-party
|
||||
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
|
||||
index 5a95c24b9acc5..b8e93ae3b5881 100644
|
||||
index e51bcccd6f63f..a4250481a396e 100644
|
||||
--- content/browser/renderer_host/navigation_request.cc
|
||||
+++ content/browser/renderer_host/navigation_request.cc
|
||||
@@ -8243,10 +8243,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
@@ -8358,10 +8358,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
bool use_opaque_origin =
|
||||
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
|
||||
network::mojom::WebSandboxFlags::kOrigin;
|
||||
@@ -47,7 +47,7 @@ index 5a95c24b9acc5..b8e93ae3b5881 100644
|
||||
}
|
||||
|
||||
return origin_and_debug_info;
|
||||
@@ -8354,11 +8366,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -8469,11 +8481,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
DetermineInitiatorRelationship(initiator_rfh,
|
||||
frame_tree_node_->current_frame_host()));
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index 88109264ea962..6f7255b07f159 100644
|
||||
index ffbd381f00929..d03d101656711 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -132,6 +132,9 @@ declare_args() {
|
||||
@@ -12,7 +12,7 @@ index 88109264ea962..6f7255b07f159 100644
|
||||
# Initialize all local variables with a pattern. This flag will fill
|
||||
# uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
|
||||
# rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
|
||||
@@ -2315,6 +2318,7 @@ config("export_dynamic") {
|
||||
@@ -2287,6 +2290,7 @@ config("export_dynamic") {
|
||||
# 2. Remove the thin_archive config, so that the .a file actually contains all
|
||||
# .o files, instead of just references to .o files in the build directoy
|
||||
config("thin_archive") {
|
||||
@@ -20,7 +20,7 @@ index 88109264ea962..6f7255b07f159 100644
|
||||
if ((is_apple && use_lld) || (is_linux && !is_clang)) {
|
||||
# The macOS and iOS linker ld64.ldd doesn't support thin archive without
|
||||
# symbol table, gcc on linux also throws the error `archive has no index`.
|
||||
@@ -2332,6 +2336,7 @@ config("thin_archive") {
|
||||
@@ -2304,6 +2308,7 @@ config("thin_archive") {
|
||||
} else if (is_win && use_lld) {
|
||||
arflags = [ "/llvmlibthin" ]
|
||||
}
|
||||
|
@@ -1,26 +0,0 @@
|
||||
diff --git cc/layers/layer.cc cc/layers/layer.cc
|
||||
index f51e5495d95f5..cd6c1bb02f50c 100644
|
||||
--- cc/layers/layer.cc
|
||||
+++ cc/layers/layer.cc
|
||||
@@ -50,16 +50,18 @@ struct SameSizeAsLayer : public base::RefCounted<SameSizeAsLayer>,
|
||||
SameSizeAsLayer();
|
||||
~SameSizeAsLayer() override;
|
||||
|
||||
- void* pointers[4];
|
||||
+ raw_ptr<void> raw_pointers[2];
|
||||
+ std::unique_ptr<void> unique_pointers[2];
|
||||
|
||||
struct {
|
||||
LayerList children;
|
||||
gfx::Size bounds;
|
||||
- unsigned bitfields;
|
||||
+ HitTestOpaqueness hit_test_opaqueness;
|
||||
+ bool bitfields;
|
||||
SkColor4f background_color;
|
||||
TouchActionRegion touch_action_region;
|
||||
ElementId element_id;
|
||||
- raw_ptr<void> rare_inputs;
|
||||
+ std::unique_ptr<void> rare_inputs;
|
||||
} inputs;
|
||||
gfx::Rect update_rect;
|
||||
int int_fields[7];
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 968f2f959882a..e96fca4f0e130 100644
|
||||
index ab4deb1a228f5..c98b27c19a611 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -12,6 +12,7 @@ import("//build/config/compiler/pgo/pgo.gni")
|
||||
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/python.gni")
|
||||
import("//build/config/ui.gni")
|
||||
@@ -10,7 +10,7 @@ index 968f2f959882a..e96fca4f0e130 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/browser/request_header_integrity/buildflags.gni")
|
||||
@@ -1811,6 +1812,7 @@ static_library("browser") {
|
||||
@@ -1844,6 +1845,7 @@ static_library("browser") {
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//build/config/linux/dbus:buildflags",
|
||||
"//cc",
|
||||
@@ -18,7 +18,7 @@ index 968f2f959882a..e96fca4f0e130 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2496,6 +2498,10 @@ static_library("browser") {
|
||||
@@ -2530,6 +2532,10 @@ static_library("browser") {
|
||||
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ index 7603c2662b8dc..9a38d816bdc40 100644
|
||||
return false;
|
||||
}
|
||||
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
|
||||
index 964c47b090cb1..1917dc314c3ae 100644
|
||||
index 4f2fdafea29b3..dc69a82b32245 100644
|
||||
--- chrome/browser/devtools/devtools_window.cc
|
||||
+++ chrome/browser/devtools/devtools_window.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -24,7 +24,7 @@ index 964c47b090cb1..1917dc314c3ae 100644
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
#include "chrome/browser/ui/browser_tabstrip.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
@@ -1220,6 +1221,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
@@ -1217,6 +1218,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
!browser->is_type_normal()) {
|
||||
can_dock = false;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ index 964c47b090cb1..1917dc314c3ae 100644
|
||||
}
|
||||
|
||||
// Create WebContents with devtools.
|
||||
@@ -1679,9 +1687,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
@@ -1676,9 +1684,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
if (!inspected_web_contents ||
|
||||
!inspected_web_contents->OpenURL(params,
|
||||
/*navigation_handle_callback=*/{})) {
|
||||
@@ -52,7 +52,7 @@ index 964c47b090cb1..1917dc314c3ae 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1844,12 +1856,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
@@ -1841,12 +1853,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
Browser::CreationStatus::kOk) {
|
||||
return;
|
||||
}
|
||||
@@ -88,10 +88,10 @@ index 964c47b090cb1..1917dc314c3ae 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index c8b65faa2d65b..2ec88972acec2 100644
|
||||
index a66522f120f6f..4c8ffb85841f8 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
|
||||
@@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/ozone.gni")
|
||||
import("//build/config/ui.gni")
|
||||
@@ -99,7 +99,7 @@ index c8b65faa2d65b..2ec88972acec2 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/ash/components/assistant/assistant.gni")
|
||||
@@ -301,6 +302,10 @@ static_library("ui") {
|
||||
@@ -299,6 +300,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@@ -110,7 +110,7 @@ index c8b65faa2d65b..2ec88972acec2 100644
|
||||
public_deps = [
|
||||
# WARNING WARNING WARNING
|
||||
# New dependencies outside of //chrome/browser should be added to
|
||||
@@ -329,6 +334,7 @@ static_library("ui") {
|
||||
@@ -326,6 +331,7 @@ static_library("ui") {
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//build/config/linux/dbus:buildflags",
|
||||
"//cc/paint",
|
||||
@@ -118,7 +118,7 @@ index c8b65faa2d65b..2ec88972acec2 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
@@ -696,6 +702,13 @@ static_library("ui") {
|
||||
@@ -695,6 +701,13 @@ static_library("ui") {
|
||||
deps += [ "//components/plus_addresses/resources:vector_icons" ]
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ index c8b65faa2d65b..2ec88972acec2 100644
|
||||
# TODO(crbug.com/41437292): Remove this circular dependency.
|
||||
# Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies".
|
||||
# These are all-platform circular includes.
|
||||
@@ -5441,6 +5454,7 @@ static_library("ui") {
|
||||
@@ -5471,6 +5484,7 @@ static_library("ui") {
|
||||
if (enable_printing) {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
@@ -141,10 +141,10 @@ index c8b65faa2d65b..2ec88972acec2 100644
|
||||
]
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
index 3d0ffcbb38c23..04830b0062651 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -270,6 +270,25 @@
|
||||
@@ -268,6 +268,25 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
@@ -170,7 +170,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -565,6 +584,10 @@ Browser::Browser(const CreateParams& params)
|
||||
@@ -563,6 +582,10 @@ Browser::Browser(const CreateParams& params)
|
||||
type_(params.type),
|
||||
profile_(params.profile),
|
||||
window_(nullptr),
|
||||
@@ -181,7 +181,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
tab_strip_model_delegate_(
|
||||
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
|
||||
tab_strip_model_(std::make_unique<TabStripModel>(
|
||||
@@ -802,6 +825,12 @@ Browser::~Browser() {
|
||||
@@ -800,6 +823,12 @@ Browser::~Browser() {
|
||||
if (select_file_dialog_.get()) {
|
||||
select_file_dialog_->ListenerDestroyed();
|
||||
}
|
||||
@@ -194,7 +194,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1409,6 +1438,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
@@ -1399,6 +1428,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
->WindowFullscreenStateChanged();
|
||||
command_controller_->FullscreenStateChanged();
|
||||
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
|
||||
@@ -203,7 +203,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
void Browser::FullscreenTopUIStateChanged() {
|
||||
@@ -1742,6 +1773,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1740,6 +1771,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1749,8 +1788,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1747,8 +1786,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
@@ -239,7 +239,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() const {
|
||||
@@ -1845,9 +1894,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
|
||||
@@ -1843,9 +1892,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
|
||||
content::PreloadingEligibility Browser::IsPrerender2Supported(
|
||||
content::WebContents& web_contents,
|
||||
content::PreloadingTriggerType trigger_type) {
|
||||
@@ -254,7 +254,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) {
|
||||
@@ -1910,6 +1964,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
@@ -1908,6 +1962,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
std::move(navigation_handle_callback));
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -2083,6 +2145,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -2081,6 +2143,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
||||
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
|
||||
@@ -278,7 +278,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -2112,6 +2176,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -2110,6 +2174,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -287,7 +287,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
if (!GetStatusBubble()) {
|
||||
return;
|
||||
}
|
||||
@@ -2121,6 +2187,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -2119,6 +2185,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
|
||||
const ui::EventType type = event.type();
|
||||
const bool exited = type == ui::EventType::kMouseExited;
|
||||
@@ -2149,6 +2226,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
@@ -2147,6 +2224,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
void Browser::BeforeUnloadFired(WebContents* web_contents,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) {
|
||||
@@ -2261,12 +2351,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -2259,12 +2349,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
// to track `new_contents` after it is added to its TabModel this override can
|
||||
// be removed.
|
||||
CreateSessionServiceTabHelper(new_contents);
|
||||
@@ -350,7 +350,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
// Don't show the page hung dialog when a HTML popup hangs because
|
||||
// the dialog will take the focus and immediately close the popup.
|
||||
RenderWidgetHostView* view = render_widget_host->GetView();
|
||||
@@ -2279,6 +2381,13 @@ void Browser::RendererUnresponsive(
|
||||
@@ -2277,6 +2379,13 @@ void Browser::RendererUnresponsive(
|
||||
void Browser::RendererResponsive(
|
||||
WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
@@ -364,7 +364,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
RenderWidgetHostView* view = render_widget_host->GetView();
|
||||
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
|
||||
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
|
||||
@@ -2288,6 +2397,15 @@ void Browser::RendererResponsive(
|
||||
@@ -2286,6 +2395,15 @@ void Browser::RendererResponsive(
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
WebContents* source) {
|
||||
@@ -380,7 +380,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
|
||||
}
|
||||
|
||||
@@ -2323,6 +2441,11 @@ void Browser::DraggableRegionsChanged(
|
||||
@@ -2321,6 +2439,11 @@ void Browser::DraggableRegionsChanged(
|
||||
if (app_controller_) {
|
||||
app_controller_->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
@@ -392,7 +392,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
void Browser::DidFinishNavigation(
|
||||
@@ -2405,11 +2528,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -2403,11 +2526,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
@@ -408,7 +408,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2619,6 +2746,15 @@ void Browser::RequestMediaAccessPermission(
|
||||
@@ -2617,6 +2744,15 @@ void Browser::RequestMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
content::MediaResponseCallback callback) {
|
||||
@@ -424,7 +424,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
const extensions::Extension* extension =
|
||||
GetExtensionForOrigin(profile_, request.security_origin);
|
||||
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
|
||||
@@ -3187,9 +3323,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
@@ -3192,9 +3328,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
// Browser, Getters for UI (private):
|
||||
|
||||
StatusBubble* Browser::GetStatusBubble() {
|
||||
@@ -436,7 +436,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
// We hide the status bar for web apps windows as this matches native
|
||||
@@ -3197,6 +3334,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
@@ -3202,6 +3339,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
// mode, as the minimal browser UI includes the status bar.
|
||||
if (web_app::AppBrowserController::IsWebApp(this) &&
|
||||
!app_controller()->HasMinimalUiButtons()) {
|
||||
@@ -449,7 +449,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -3346,6 +3489,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -3351,6 +3494,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
web_contents_collection_.StopObserving(web_contents);
|
||||
}
|
||||
@@ -458,7 +458,7 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
}
|
||||
|
||||
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
||||
@@ -3506,6 +3651,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
@@ -3511,6 +3656,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
|
||||
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
|
||||
bool check_can_support) const {
|
||||
@@ -474,18 +474,18 @@ index e0582db3e8e88..3d7ccab3a9804 100644
|
||||
case TYPE_NORMAL:
|
||||
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
index fa28d4500e08d..c759623e8df87 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "base/timer/elapsed_timer.h"
|
||||
#include "base/types/expected.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/tab_contents/web_contents_collection.h"
|
||||
#include "chrome/browser/themes/theme_service_observer.h"
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
|
||||
@@ -55,6 +56,10 @@
|
||||
@@ -54,6 +55,10 @@
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/shell_dialogs/select_file_dialog.h"
|
||||
|
||||
@@ -496,7 +496,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#error This file should only be included on desktop.
|
||||
#endif
|
||||
@@ -339,6 +344,15 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -338,6 +343,15 @@ class Browser : public TabStripModelObserver,
|
||||
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
|
||||
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
|
||||
|
||||
@@ -512,7 +512,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
private:
|
||||
friend class Browser;
|
||||
friend class WindowSizerChromeOSTest;
|
||||
@@ -422,6 +436,13 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -421,6 +435,13 @@ class Browser : public TabStripModelObserver,
|
||||
update_ui_immediately_for_testing_ = true;
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
// Accessors ////////////////////////////////////////////////////////////////
|
||||
|
||||
const CreateParams& create_params() const { return create_params_; }
|
||||
@@ -523,6 +544,12 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -522,6 +543,12 @@ class Browser : public TabStripModelObserver,
|
||||
base::WeakPtr<Browser> AsWeakPtr();
|
||||
base::WeakPtr<const Browser> AsWeakPtr() const;
|
||||
|
||||
@@ -539,7 +539,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -962,10 +989,18 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -961,10 +988,18 @@ class Browser : public TabStripModelObserver,
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
@@ -558,7 +558,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
@@ -1303,6 +1338,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1302,6 +1337,10 @@ class Browser : public TabStripModelObserver,
|
||||
// This Browser's window.
|
||||
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
|
||||
|
||||
@@ -569,7 +569,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
||||
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
||||
|
||||
@@ -1369,6 +1408,8 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1368,6 +1407,8 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string initial_workspace_;
|
||||
bool initial_visible_on_all_workspaces_state_;
|
||||
|
||||
@@ -579,7 +579,7 @@ index 0ee8fee2166f0..cdbf89ce7088b 100644
|
||||
|
||||
UnloadController unload_controller_;
|
||||
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
||||
index 819c44848e6ab..8e233a8b2d420 100644
|
||||
index cefd4bc59943a..69425ab604ddb 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -260,6 +260,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
@@ -648,3 +648,59 @@ index f12ba73369a65..23c43dcb1dd24 100644
|
||||
NavigateParams params(browser, std::move(new_contents));
|
||||
params.source_contents = source_contents;
|
||||
params.url = target_url;
|
||||
diff --git chrome/browser/ui/browser_window/browser_window_features.cc chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
index e584d77d67bda..a38a8504abd85 100644
|
||||
--- chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
+++ chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
@@ -67,6 +67,14 @@ BrowserWindowFeatures::BrowserWindowFeaturesFactory& GetFactory() {
|
||||
return *factory;
|
||||
}
|
||||
|
||||
+bool IsNormalBrowser(Browser* browser) {
|
||||
+ // CEF normal browsers have TYPE_POPUP.
|
||||
+ if (browser->is_type_popup() && browser->cef_delegate()) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ return browser->is_type_normal();
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
@@ -153,10 +161,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
|
||||
}
|
||||
|
||||
void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
+ const bool supports_toolbar = IsNormalBrowser(browser);
|
||||
+
|
||||
// Features that are only enabled for normal browser windows (e.g. a window
|
||||
// with an omnibox and a tab strip). By default most features should be
|
||||
// instantiated in this block.
|
||||
- if (browser->is_type_normal()) {
|
||||
+ if (supports_toolbar) {
|
||||
if (IsChromeLabsEnabled()) {
|
||||
chrome_labs_coordinator_ =
|
||||
std::make_unique<ChromeLabsCoordinator>(browser);
|
||||
@@ -198,7 +208,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
}
|
||||
}
|
||||
|
||||
- if ((browser->is_type_normal() || browser->is_type_app()) &&
|
||||
+ if ((supports_toolbar || browser->is_type_app()) &&
|
||||
base::FeatureList::IsEnabled(toast_features::kToastFramework)) {
|
||||
toast_service_ = std::make_unique<ToastService>(browser);
|
||||
}
|
||||
@@ -231,10 +241,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
|
||||
browser_view->browser(),
|
||||
side_panel_coordinator_->GetWindowRegistry());
|
||||
|
||||
+ const bool supports_toolbar = IsNormalBrowser(browser_view->browser());
|
||||
+
|
||||
// Memory Saver mode is default off but is available to turn on.
|
||||
// The controller relies on performance manager which isn't initialized in
|
||||
// some unit tests without browser view.
|
||||
- if (browser_view->GetIsNormalType()) {
|
||||
+ if (supports_toolbar) {
|
||||
memory_saver_opt_in_iph_controller_ =
|
||||
std::make_unique<MemorySaverOptInIPHController>(
|
||||
browser_view->browser());
|
||||
|
@@ -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
|
||||
index 3e36390382b9b..bf0aacb0eb08e 100644
|
||||
index b14b639735870..0cba06a45f327 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -359,6 +359,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
@@ -352,6 +352,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
return callback.get();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ index 3e36390382b9b..bf0aacb0eb08e 100644
|
||||
enum class UmaEnumIdLookupType {
|
||||
GeneralEnumId,
|
||||
ContextSpecificEnumId,
|
||||
@@ -629,6 +641,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
@@ -624,6 +636,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ index 3e36390382b9b..bf0aacb0eb08e 100644
|
||||
id = CollapseCommandsForUMA(id);
|
||||
const auto& map = GetIdcToUmaMap(type);
|
||||
auto it = map.find(id);
|
||||
@@ -919,6 +935,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
@@ -882,6 +898,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
: nullptr;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+ auto* cb = GetMenuCreatedCallback();
|
||||
+ if (!cb->is_null()) {
|
||||
@@ -47,7 +47,7 @@ index 3e36390382b9b..bf0aacb0eb08e 100644
|
||||
observers_.AddObserver(&autofill_context_menu_manager_);
|
||||
}
|
||||
|
||||
@@ -1376,6 +1400,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
@@ -1339,6 +1363,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
autofill_client->HideAutofillSuggestions(
|
||||
autofill::SuggestionHidingReason::kContextMenuOpened);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ index 3e36390382b9b..bf0aacb0eb08e 100644
|
||||
}
|
||||
|
||||
Profile* RenderViewContextMenu::GetProfile() const {
|
||||
@@ -3603,6 +3633,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
@@ -3577,6 +3607,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
execute_plugin_action_callback_ = std::move(cb);
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ index 3e36390382b9b..bf0aacb0eb08e 100644
|
||||
RenderViewContextMenu::GetHandlersForLinkUrl() {
|
||||
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
|
||||
index a57ce5f206298..2b6fc94cca039 100644
|
||||
index e58e041b3ff58..e06b6ef140f36 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
@@ -154,7 +154,21 @@ class RenderViewContextMenu
|
||||
@@ -155,7 +155,21 @@ class RenderViewContextMenu
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -113,7 +113,7 @@ index a57ce5f206298..2b6fc94cca039 100644
|
||||
Profile* GetProfile() const;
|
||||
|
||||
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
|
||||
@@ -475,6 +489,9 @@ class RenderViewContextMenu
|
||||
@@ -479,6 +493,9 @@ class RenderViewContextMenu
|
||||
// built.
|
||||
bool is_protocol_submenu_valid_ = false;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
index f49641db657c6..89419c039510e 100644
|
||||
index c27eaca24d4b4..f2a7d6376f6aa 100644
|
||||
--- chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
+++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
|
@@ -256,10 +256,10 @@ index c7acd9b05fbb8..3e95e4125fa24 100644
|
||||
|
||||
} // namespace ui
|
||||
diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm
|
||||
index 416c1bb5503ef..a6705c94c0dc2 100644
|
||||
index 5da67cfb7362d..6e618083bc851 100644
|
||||
--- ui/shell_dialogs/select_file_dialog_mac.mm
|
||||
+++ ui/shell_dialogs/select_file_dialog_mac.mm
|
||||
@@ -104,6 +104,10 @@ void SelectFileDialogImpl::SelectFileImpl(
|
||||
@@ -105,6 +105,10 @@ void SelectFileDialogImpl::SelectFileImpl(
|
||||
mojo_window->CreateSelectFileDialog(std::move(receiver));
|
||||
} else {
|
||||
NSWindow* ns_window = gfx_window.GetNativeNSWindow();
|
||||
|
@@ -12,10 +12,10 @@ index cc58a303a78b6..7755e58c8651c 100644
|
||||
// on the screen, we can't actually attach to it.
|
||||
parent_window = nullptr;
|
||||
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
|
||||
index 6cea2c60b144f..7bae772782b71 100644
|
||||
index 0876f22294f71..8331fba0f4ee2 100644
|
||||
--- components/constrained_window/constrained_window_views.cc
|
||||
+++ components/constrained_window/constrained_window_views.cc
|
||||
@@ -101,10 +101,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
|
||||
@@ -102,10 +102,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
|
||||
gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
web_modal::ModalDialogHost* dialog_host,
|
||||
const gfx::Size& size) {
|
||||
@@ -36,7 +36,7 @@ index 6cea2c60b144f..7bae772782b71 100644
|
||||
}
|
||||
|
||||
gfx::Point position = dialog_host->GetDialogPosition(size);
|
||||
@@ -113,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
@@ -114,43 +121,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
position.set_y(position.y() -
|
||||
widget->non_client_view()->frame_view()->GetInsets().top());
|
||||
|
||||
@@ -94,7 +94,7 @@ index 6cea2c60b144f..7bae772782b71 100644
|
||||
}
|
||||
|
||||
void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@@ -160,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@@ -161,15 +147,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ index 6cea2c60b144f..7bae772782b71 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -298,8 +293,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -302,8 +297,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
|
||||
gfx::NativeView parent_view =
|
||||
parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) : nullptr;
|
||||
@@ -136,7 +136,7 @@ index 6cea2c60b144f..7bae772782b71 100644
|
||||
widget->SetNativeWindowProperty(
|
||||
views::kWidgetIdentifierKey,
|
||||
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
|
||||
@@ -316,8 +316,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -320,8 +320,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
return widget;
|
||||
|
||||
ModalDialogHost* host =
|
||||
@@ -146,7 +146,7 @@ index 6cea2c60b144f..7bae772782b71 100644
|
||||
if (host) {
|
||||
DCHECK_EQ(parent_view, host->GetHostView());
|
||||
std::unique_ptr<ModalDialogHostObserver> observer =
|
||||
@@ -334,11 +333,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -338,11 +337,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
|
||||
views::Widget* ShowBrowserModal(std::unique_ptr<ui::DialogModel> dialog_model,
|
||||
gfx::NativeWindow parent) {
|
||||
@@ -210,7 +210,7 @@ index 51ed6bcf6b540..c6e1161140655 100644
|
||||
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
|
||||
// Returns whether a dialog currently about to be shown should be activated.
|
||||
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
|
||||
index 8829ec9e33506..01277e6e7e5b8 100644
|
||||
index 7d1c482562bef..30de35e14e826 100644
|
||||
--- ui/views/window/dialog_delegate.cc
|
||||
+++ ui/views/window/dialog_delegate.cc
|
||||
@@ -87,10 +87,12 @@ DialogDelegate::DialogDelegate() {
|
||||
@@ -228,7 +228,7 @@ index 8829ec9e33506..01277e6e7e5b8 100644
|
||||
widget->Init(std::move(params));
|
||||
return widget;
|
||||
}
|
||||
@@ -99,16 +101,18 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
@@ -99,15 +101,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
Widget* DialogDelegate::CreateDialogWidget(
|
||||
std::unique_ptr<WidgetDelegate> delegate,
|
||||
gfx::NativeWindow context,
|
||||
@@ -243,15 +243,14 @@ index 8829ec9e33506..01277e6e7e5b8 100644
|
||||
-bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent) {
|
||||
+bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent,
|
||||
+ gfx::AcceleratedWidget parent_widget) {
|
||||
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
|
||||
BUILDFLAG(ENABLE_DESKTOP_AURA)
|
||||
#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_DESKTOP_AURA)
|
||||
// The new style doesn't support unparented dialogs on Linux desktop.
|
||||
- return parent != nullptr;
|
||||
+ return parent != nullptr || parent_widget != gfx::kNullAcceleratedWidget;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
@@ -119,7 +123,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -118,7 +122,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
gfx::NativeView parent,
|
||||
@@ -261,7 +260,7 @@ index 8829ec9e33506..01277e6e7e5b8 100644
|
||||
DialogDelegate* dialog = delegate->AsDialogDelegate();
|
||||
|
||||
views::Widget::InitParams params(
|
||||
@@ -129,7 +134,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -128,7 +133,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
params.bounds = bounds;
|
||||
|
||||
if (dialog) {
|
||||
@@ -270,7 +269,7 @@ index 8829ec9e33506..01277e6e7e5b8 100644
|
||||
}
|
||||
|
||||
if (!dialog || dialog->use_custom_frame()) {
|
||||
@@ -143,6 +148,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -142,6 +147,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
}
|
||||
params.context = context;
|
||||
params.parent = parent;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
index ca80263783e89..b0e3f15b824f5 100644
|
||||
index 5149acb874523..02ff8061b79c2 100644
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
+++ chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -56,7 +56,7 @@ index ca80263783e89..b0e3f15b824f5 100644
|
||||
DownloadTargetDeterminer::CompletionCallback target_determined_callback =
|
||||
base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined,
|
||||
weak_ptr_factory_.GetWeakPtr(), download->GetId(),
|
||||
@@ -1118,8 +1137,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
|
||||
@@ -1134,8 +1153,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
|
||||
Browser* browser =
|
||||
web_contents ? chrome::FindBrowserWithTab(web_contents) : nullptr;
|
||||
std::unique_ptr<chrome::ScopedTabbedBrowserDisplayer> browser_displayer;
|
||||
@@ -71,7 +71,7 @@ index ca80263783e89..b0e3f15b824f5 100644
|
||||
std::make_unique<chrome::ScopedTabbedBrowserDisplayer>(profile_);
|
||||
browser = browser_displayer->browser();
|
||||
diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h
|
||||
index 7ae09b406f344..801d6c846e744 100644
|
||||
index 04eb2a8d15f4d..740b869961528 100644
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.h
|
||||
+++ chrome/browser/download/chrome_download_manager_delegate.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -95,7 +95,7 @@ index 7ae09b406f344..801d6c846e744 100644
|
||||
// This is the Chrome side helper for the download system.
|
||||
class ChromeDownloadManagerDelegate
|
||||
: public content::DownloadManagerDelegate,
|
||||
@@ -401,6 +408,10 @@ class ChromeDownloadManagerDelegate
|
||||
@@ -404,6 +411,10 @@ class ChromeDownloadManagerDelegate
|
||||
// Whether a file picker dialog is showing.
|
||||
bool is_file_picker_showing_;
|
||||
|
||||
|
@@ -34,10 +34,10 @@ index f61ec524109fe..92ca490728855 100644
|
||||
|
||||
WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate(
|
||||
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
index d19671bad0e0d..639a1737a0ef5 100644
|
||||
index b3921038447a8..dd5225f5e7227 100644
|
||||
--- chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
@@ -1674,7 +1674,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1680,7 +1680,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ index d19671bad0e0d..639a1737a0ef5 100644
|
||||
tab_strip->ActivateTabAt(tab_index);
|
||||
DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
|
||||
}
|
||||
@@ -1688,7 +1688,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1694,7 +1694,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
}
|
||||
|
||||
bool highlighted = *params->update_properties.highlighted;
|
||||
@@ -55,7 +55,7 @@ index d19671bad0e0d..639a1737a0ef5 100644
|
||||
tab_strip->ToggleSelectionAt(tab_index);
|
||||
}
|
||||
}
|
||||
@@ -1700,7 +1700,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1706,7 +1706,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
kCannotUpdateMuteCaptured, base::NumberToString(tab_id))));
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index d19671bad0e0d..639a1737a0ef5 100644
|
||||
int opener_id = *params->update_properties.opener_tab_id;
|
||||
WebContents* opener_contents = nullptr;
|
||||
if (opener_id == tab_id) {
|
||||
@@ -1735,7 +1735,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1741,7 +1741,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
->SetAutoDiscardable(state);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ index d19671bad0e0d..639a1737a0ef5 100644
|
||||
// Bug fix for crbug.com/1197888. Don't let the extension update the tab if
|
||||
// the user is dragging tabs.
|
||||
if (!ExtensionTabUtil::IsTabStripEditable()) {
|
||||
@@ -1756,7 +1756,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1762,7 +1762,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
// Navigate the tab to a new location if the url is different.
|
||||
if (params->update_properties.url) {
|
||||
std::string updated_url = *params->update_properties.url;
|
||||
@@ -83,7 +83,7 @@ index d19671bad0e0d..639a1737a0ef5 100644
|
||||
!IsURLAllowedInIncognito(GURL(updated_url))) {
|
||||
return RespondNow(Error(ErrorUtils::FormatErrorMessage(
|
||||
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
|
||||
@@ -1771,7 +1772,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1777,7 +1778,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(std::move(error)));
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ index d19671bad0e0d..639a1737a0ef5 100644
|
||||
current_url, updated_url, js_callstack());
|
||||
}
|
||||
diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc
|
||||
index 704ad20866c37..081ef3bbf73cc 100644
|
||||
index 8a2e378aac255..456c542044eb3 100644
|
||||
--- chrome/browser/extensions/extension_tab_util.cc
|
||||
+++ chrome/browser/extensions/extension_tab_util.cc
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/types/expected_macros.h"
|
||||
@@ -104,7 +104,7 @@ index 704ad20866c37..081ef3bbf73cc 100644
|
||||
#include "chrome/browser/browser_process.h" // nogncheck
|
||||
#include "chrome/browser/extensions/browser_extension_window_controller.h"
|
||||
#include "chrome/browser/extensions/chrome_extension_function_details.h"
|
||||
@@ -81,6 +82,10 @@
|
||||
@@ -84,6 +85,10 @@
|
||||
#include "url/url_constants.h"
|
||||
#endif
|
||||
|
||||
@@ -115,7 +115,7 @@ index 704ad20866c37..081ef3bbf73cc 100644
|
||||
using content::NavigationEntry;
|
||||
using content::WebContents;
|
||||
using extensions::mojom::APIPermissionID;
|
||||
@@ -732,6 +737,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
|
||||
@@ -735,6 +740,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,10 +165,10 @@ index 63848c93738ce..0358e098c7339 100644
|
||||
// ones that need to call AttachTabHelpers; if you think you do, re-read the
|
||||
// design document linked above, especially the section "Reusing tab helpers".
|
||||
diff --git chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
|
||||
index 2df9dfff43c9b..897738dfc8ddf 100644
|
||||
index 767a3b368e93d..d206384a0e20c 100644
|
||||
--- chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
|
||||
+++ chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
|
||||
@@ -812,6 +812,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() {
|
||||
@@ -820,6 +820,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() {
|
||||
if (!gfx::Animation::ShouldRenderRichAnimation()) {
|
||||
return;
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ index 2245c931fbe4f..761ea6b3a6afb 100644
|
||||
~BrowserFrameMac() override;
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
index b540a7a995fbc..e411aa8c235d9 100644
|
||||
index 29ba0f48f559a..07887ae9ec11c 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
+++ chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
@@ -185,7 +185,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() {
|
||||
|
@@ -17,10 +17,10 @@ index fbce13c16ad10..0512b2f09937e 100644
|
||||
std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
|
||||
content::WebContents* web_contents,
|
||||
diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
index a5c99f86b52d2..f7e0241b6dc87 100644
|
||||
index ab9701eb9ce8c..7c1dbe9adb0e8 100644
|
||||
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
@@ -225,11 +225,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
|
||||
@@ -210,11 +210,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -85,10 +85,10 @@ index 2fe342e49d3c1..559b2a676dab5 100644
|
||||
|
||||
// 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
|
||||
index 22aa92b18ffe4..317185360e925 100644
|
||||
index b91df021f6402..fb37277fa9261 100644
|
||||
--- chrome/browser/profiles/profile_impl.cc
|
||||
+++ chrome/browser/profiles/profile_impl.cc
|
||||
@@ -1024,7 +1024,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
@@ -1022,7 +1022,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
|
||||
otr_profiles_[otr_profile_id] = std::move(otr_profile);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 89c2f12346bba..84c537aafb255 100644
|
||||
index 31a8d9d259f7b..267ef1c830a69 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -39,6 +39,7 @@ static_library("safe_browsing") {
|
||||
@@ -40,6 +40,7 @@ static_library("safe_browsing") {
|
||||
"//components/enterprise/buildflags",
|
||||
"//components/enterprise/common:strings",
|
||||
"//components/enterprise/obfuscation/core:enterprise_obfuscation",
|
||||
|
@@ -1,10 +1,10 @@
|
||||
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
|
||||
index 4a28298d21ee8..b0044efb59bf5 100644
|
||||
index 0939e62b45530..ca2ac8ce23749 100644
|
||||
--- chrome/browser/ui/webui/about/about_ui.cc
|
||||
+++ chrome/browser/ui/webui/about/about_ui.cc
|
||||
@@ -90,6 +90,10 @@
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -86,6 +86,10 @@
|
||||
#include "third_party/zlib/google/compression_utils.h"
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/grit/cef_resources.h"
|
||||
@@ -13,7 +13,7 @@ index 4a28298d21ee8..b0044efb59bf5 100644
|
||||
using content::BrowserThread;
|
||||
|
||||
namespace {
|
||||
@@ -537,6 +541,11 @@ ChromeURLsUIConfig::CreateWebUIController(content::WebUI* web_ui,
|
||||
@@ -533,6 +537,11 @@ ChromeURLsUIConfig::CreateWebUIController(content::WebUI* web_ui,
|
||||
CreditsUIConfig::CreditsUIConfig()
|
||||
: AboutUIConfigBase(chrome::kChromeUICreditsHost) {}
|
||||
|
||||
@@ -25,7 +25,7 @@ index 4a28298d21ee8..b0044efb59bf5 100644
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
TermsUIConfig::TermsUIConfig()
|
||||
: AboutUIConfigBase(chrome::kChromeUITermsHost) {}
|
||||
@@ -638,6 +647,16 @@ void AboutUIHTMLSource::StartDataRequest(
|
||||
@@ -634,6 +643,16 @@ void AboutUIHTMLSource::StartDataRequest(
|
||||
IDS_TERMS_HTML);
|
||||
#endif
|
||||
}
|
||||
@@ -43,7 +43,7 @@ index 4a28298d21ee8..b0044efb59bf5 100644
|
||||
FinishDataRequest(response, std::move(callback));
|
||||
}
|
||||
diff --git chrome/browser/ui/webui/about/about_ui.h chrome/browser/ui/webui/about/about_ui.h
|
||||
index 3f08e01880ef0..122cf9bacc2e3 100644
|
||||
index 46103729d33a7..fbc400e60239b 100644
|
||||
--- chrome/browser/ui/webui/about/about_ui.h
|
||||
+++ chrome/browser/ui/webui/about/about_ui.h
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -69,18 +69,18 @@ index 3f08e01880ef0..122cf9bacc2e3 100644
|
||||
// chrome://terms
|
||||
class TermsUIConfig : public AboutUIConfigBase {
|
||||
diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
index c86664f532a5d..1465b151f8704 100644
|
||||
index acc4db4ef254f..18a764bf77ee0 100644
|
||||
--- chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
+++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "chrome/browser/ui/webui/chrome_web_ui_configs.h"
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/about/about_ui.h"
|
||||
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
|
||||
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
@@ -205,6 +206,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
|
||||
@@ -105,7 +105,7 @@ index 506d4ea46d297..b11a7b0325dc5 100644
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
kChromeUIManagementHost,
|
||||
diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h
|
||||
index a5e4b8cb32f40..5efd6d78c7dc9 100644
|
||||
index ff691df3c5a0e..f4ab7030e9908 100644
|
||||
--- chrome/common/webui_url_constants.h
|
||||
+++ chrome/common/webui_url_constants.h
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -116,7 +116,7 @@ index a5e4b8cb32f40..5efd6d78c7dc9 100644
|
||||
#include "chrome/common/buildflags.h"
|
||||
#include "components/signin/public/base/signin_buildflags.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
@@ -144,6 +145,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
|
||||
@@ -145,6 +146,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
|
||||
inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/";
|
||||
inline constexpr char kChromeUIKillHost[] = "kill";
|
||||
inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/webui/version/version_handler.cc chrome/browser/ui/webui/version/version_handler.cc
|
||||
index 2d8d97e4938cf..78bbdbaa8ad69 100644
|
||||
index e503ac10c0eaa..dacd96a06e870 100644
|
||||
--- chrome/browser/ui/webui/version/version_handler.cc
|
||||
+++ chrome/browser/ui/webui/version/version_handler.cc
|
||||
@@ -29,12 +29,23 @@
|
||||
@@ -124,18 +124,18 @@ index 2f8162d7491d1..b00f0d5bf26ae 100644
|
||||
// Factory for the creating refs in callbacks.
|
||||
base::WeakPtrFactory<VersionHandler> weak_ptr_factory_{this};
|
||||
diff --git chrome/browser/ui/webui/version/version_ui.cc chrome/browser/ui/webui/version/version_ui.cc
|
||||
index e464e50866897..6c86e5096db3b 100644
|
||||
index 7919a35b990e8..67cbd0aa3360e 100644
|
||||
--- chrome/browser/ui/webui/version/version_ui.cc
|
||||
+++ chrome/browser/ui/webui/version/version_ui.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/browser_process_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/webui/version/version_handler.h"
|
||||
@@ -64,6 +65,10 @@
|
||||
@@ -63,6 +64,10 @@
|
||||
#include "chrome/browser/ui/webui/version/version_util_win.h"
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ index e464e50866897..6c86e5096db3b 100644
|
||||
using content::WebUIDataSource;
|
||||
|
||||
namespace {
|
||||
@@ -84,6 +89,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
@@ -83,6 +88,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
{version_ui::kCommandLineName, IDS_VERSION_UI_COMMAND_LINE},
|
||||
{version_ui::kExecutablePathName, IDS_VERSION_UI_EXECUTABLE_PATH},
|
||||
{version_ui::kProfilePathName, IDS_VERSION_UI_PROFILE_PATH},
|
||||
@@ -157,7 +157,7 @@ index e464e50866897..6c86e5096db3b 100644
|
||||
{version_ui::kVariationsName, IDS_VERSION_UI_VARIATIONS},
|
||||
{version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD},
|
||||
{version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL},
|
||||
@@ -115,6 +124,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
@@ -114,6 +123,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
IDR_PRODUCT_LOGO_WHITE);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
html_source->SetDefaultResource(IDR_VERSION_UI_ABOUT_VERSION_HTML);
|
||||
@@ -168,7 +168,7 @@ index e464e50866897..6c86e5096db3b 100644
|
||||
}
|
||||
|
||||
std::string GetProductModifier() {
|
||||
@@ -232,6 +245,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
|
||||
@@ -231,6 +244,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
|
||||
// blank.
|
||||
html_source->AddString(version_ui::kExecutablePath, std::string());
|
||||
html_source->AddString(version_ui::kProfilePath, std::string());
|
||||
@@ -179,20 +179,39 @@ index e464e50866897..6c86e5096db3b 100644
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
html_source->AddString(version_ui::kOSType, base::mac::GetOSDisplayName());
|
||||
diff --git components/version_ui/BUILD.gn components/version_ui/BUILD.gn
|
||||
index 49f73fb885870..4f1c5fa814d5b 100644
|
||||
--- components/version_ui/BUILD.gn
|
||||
+++ components/version_ui/BUILD.gn
|
||||
diff --git components/version_ui_strings.grdp components/version_ui_strings.grdp
|
||||
index 7c3d198ccdb52..4a15d9d7f1e13 100644
|
||||
--- components/version_ui_strings.grdp
|
||||
+++ components/version_ui_strings.grdp
|
||||
@@ -76,6 +76,14 @@
|
||||
<message name="IDS_VERSION_UI_PROFILE_PATH" desc="label for the profile path on the about:version page">
|
||||
Profile Path
|
||||
</message>
|
||||
+ <if expr="enable_cef">
|
||||
+ <message name="IDS_VERSION_UI_MODULE_PATH" desc="label for the module path on the about:version page">
|
||||
+ Module Path
|
||||
+ </message>
|
||||
+ <message name="IDS_VERSION_UI_USER_DATA_PATH" desc="label for the user data path on the about:version page">
|
||||
+ User Data Path
|
||||
+ </message>
|
||||
+ </if>
|
||||
<message name="IDS_VERSION_UI_PATH_NOTFOUND" desc="label for the non-existent path on the about:version page">
|
||||
No such file or directory
|
||||
</message>
|
||||
diff --git components/webui/version/BUILD.gn components/webui/version/BUILD.gn
|
||||
index 2193019afd18e..42ec99b0a4673 100644
|
||||
--- components/webui/version/BUILD.gn
|
||||
+++ components/webui/version/BUILD.gn
|
||||
@@ -2,6 +2,8 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
+
|
||||
static_library("version_ui") {
|
||||
static_library("version") {
|
||||
sources = [
|
||||
"version_handler_helper.cc",
|
||||
@@ -16,4 +18,8 @@ static_library("version_ui") {
|
||||
@@ -16,4 +18,8 @@ static_library("version") {
|
||||
"//components/variations/net",
|
||||
"//components/variations/service",
|
||||
]
|
||||
@@ -201,10 +220,10 @@ index 49f73fb885870..4f1c5fa814d5b 100644
|
||||
+ configs += [ "//cef/libcef/features:config" ]
|
||||
+ }
|
||||
}
|
||||
diff --git components/version_ui/resources/about_version.css components/version_ui/resources/about_version.css
|
||||
diff --git components/webui/version/resources/about_version.css components/webui/version/resources/about_version.css
|
||||
index bd41fd2492e79..04378e39332e1 100644
|
||||
--- components/version_ui/resources/about_version.css
|
||||
+++ components/version_ui/resources/about_version.css
|
||||
--- components/webui/version/resources/about_version.css
|
||||
+++ components/webui/version/resources/about_version.css
|
||||
@@ -135,3 +135,7 @@ body {
|
||||
position: fixed;
|
||||
width: 1px;
|
||||
@@ -213,10 +232,10 @@ index bd41fd2492e79..04378e39332e1 100644
|
||||
+#footnote {
|
||||
+ font-size: 0.8em;
|
||||
+}
|
||||
diff --git components/version_ui/resources/about_version.html components/version_ui/resources/about_version.html
|
||||
diff --git components/webui/version/resources/about_version.html components/webui/version/resources/about_version.html
|
||||
index 1243b0cb31f59..723f9eedd2885 100644
|
||||
--- components/version_ui/resources/about_version.html
|
||||
+++ components/version_ui/resources/about_version.html
|
||||
--- components/webui/version/resources/about_version.html
|
||||
+++ components/webui/version/resources/about_version.html
|
||||
@@ -48,9 +48,21 @@ about:version template page
|
||||
</picture>
|
||||
</if>
|
||||
@@ -275,10 +294,10 @@ index 1243b0cb31f59..723f9eedd2885 100644
|
||||
</div>
|
||||
|
||||
<div id="messages" role="alert" aria-live="polite" aria-relevant="additions">
|
||||
diff --git components/version_ui/resources/about_version.ts components/version_ui/resources/about_version.ts
|
||||
diff --git components/webui/version/resources/about_version.ts components/webui/version/resources/about_version.ts
|
||||
index ea5f11471acf2..f604065bbe8fe 100644
|
||||
--- components/version_ui/resources/about_version.ts
|
||||
+++ components/version_ui/resources/about_version.ts
|
||||
--- components/webui/version/resources/about_version.ts
|
||||
+++ components/webui/version/resources/about_version.ts
|
||||
@@ -72,9 +72,21 @@ function handleVariationInfo(
|
||||
* @param profilePath The profile path to display.
|
||||
*/
|
||||
@@ -302,12 +321,12 @@ index ea5f11471acf2..f604065bbe8fe 100644
|
||||
}
|
||||
|
||||
// <if expr="is_win">
|
||||
diff --git components/version_ui/version_ui_constants.cc components/version_ui/version_ui_constants.cc
|
||||
index a4677847706a6..5ad9dc52045ce 100644
|
||||
--- components/version_ui/version_ui_constants.cc
|
||||
+++ components/version_ui/version_ui_constants.cc
|
||||
diff --git components/webui/version/version_ui_constants.cc components/webui/version/version_ui_constants.cc
|
||||
index 146817785885f..313ebec9d923f 100644
|
||||
--- components/webui/version/version_ui_constants.cc
|
||||
+++ components/webui/version/version_ui_constants.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "components/version_ui/version_ui_constants.h"
|
||||
#include "components/webui/version/version_ui_constants.h"
|
||||
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
@@ -330,12 +349,12 @@ index a4677847706a6..5ad9dc52045ce 100644
|
||||
+#endif
|
||||
+
|
||||
} // namespace version_ui
|
||||
diff --git components/version_ui/version_ui_constants.h components/version_ui/version_ui_constants.h
|
||||
index 5d43d7626b3c3..c61eadf18e136 100644
|
||||
--- components/version_ui/version_ui_constants.h
|
||||
+++ components/version_ui/version_ui_constants.h
|
||||
diff --git components/webui/version/version_ui_constants.h components/webui/version/version_ui_constants.h
|
||||
index 86d7317ddcee5..45523e445c4b0 100644
|
||||
--- components/webui/version/version_ui_constants.h
|
||||
+++ components/webui/version/version_ui_constants.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define COMPONENTS_VERSION_UI_VERSION_UI_CONSTANTS_H_
|
||||
#define COMPONENTS_WEBUI_VERSION_VERSION_UI_CONSTANTS_H_
|
||||
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
@@ -359,23 +378,4 @@ index 5d43d7626b3c3..c61eadf18e136 100644
|
||||
+
|
||||
} // namespace version_ui
|
||||
|
||||
#endif // COMPONENTS_VERSION_UI_VERSION_UI_CONSTANTS_H_
|
||||
diff --git components/version_ui_strings.grdp components/version_ui_strings.grdp
|
||||
index 7c3d198ccdb52..4a15d9d7f1e13 100644
|
||||
--- components/version_ui_strings.grdp
|
||||
+++ components/version_ui_strings.grdp
|
||||
@@ -76,6 +76,14 @@
|
||||
<message name="IDS_VERSION_UI_PROFILE_PATH" desc="label for the profile path on the about:version page">
|
||||
Profile Path
|
||||
</message>
|
||||
+ <if expr="enable_cef">
|
||||
+ <message name="IDS_VERSION_UI_MODULE_PATH" desc="label for the module path on the about:version page">
|
||||
+ Module Path
|
||||
+ </message>
|
||||
+ <message name="IDS_VERSION_UI_USER_DATA_PATH" desc="label for the user data path on the about:version page">
|
||||
+ User Data Path
|
||||
+ </message>
|
||||
+ </if>
|
||||
<message name="IDS_VERSION_UI_PATH_NOTFOUND" desc="label for the non-existent path on the about:version page">
|
||||
No such file or directory
|
||||
</message>
|
||||
#endif // COMPONENTS_WEBUI_VERSION_VERSION_UI_CONSTANTS_H_
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/common/features.gni chrome/common/features.gni
|
||||
index 418e78ecb356b..8fe49cf32a374 100644
|
||||
index 3d82d96a32ad9..1abf381036167 100644
|
||||
--- chrome/common/features.gni
|
||||
+++ chrome/common/features.gni
|
||||
@@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni")
|
||||
@@ -19,7 +19,7 @@ index 418e78ecb356b..8fe49cf32a374 100644
|
||||
|
||||
# Platforms for which Chrome supports a certificate management UI that
|
||||
# shows the Chrome Root Store. This is specific to the v2 UI that is
|
||||
@@ -64,11 +65,13 @@ declare_args() {
|
||||
@@ -67,11 +68,13 @@ declare_args() {
|
||||
# optimize_webui was moved to ui/base/ui_features.gni
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index 05117bbe71fb1..ff809156ee815 100644
|
||||
index 15957beb86998..fa0a5a1b76b9d 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -18,7 +18,7 @@ index 05117bbe71fb1..ff809156ee815 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -251,6 +253,10 @@ static_library("renderer") {
|
||||
@@ -249,6 +251,10 @@ static_library("renderer") {
|
||||
]
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc
|
||||
index 54cf4bbb6c1dc..312a603e6c639 100644
|
||||
index fa1a9aec7cca6..ec0d65954fe0a 100644
|
||||
--- chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc
|
||||
+++ chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc
|
||||
@@ -25,12 +25,31 @@
|
||||
@@ -26,12 +26,31 @@
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/post_message_support.h"
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
|
||||
@@ -33,10 +33,10 @@ index 54cf4bbb6c1dc..312a603e6c639 100644
|
||||
+ g_next_print_preview_enabled = enabled;
|
||||
+}
|
||||
+
|
||||
// Return the PDF object element if `frame` is the out of process PDF extension
|
||||
// or its child frame.
|
||||
// Returns the PDF object element if the parent of `frame` is the PDF extension
|
||||
// frame.
|
||||
blink::WebElement ChromePrintRenderFrameHelperDelegate::GetPdfElement(
|
||||
@@ -47,6 +66,10 @@ blink::WebElement ChromePrintRenderFrameHelperDelegate::GetPdfElement(
|
||||
@@ -54,6 +73,10 @@ blink::WebElement ChromePrintRenderFrameHelperDelegate::GetPdfElement(
|
||||
}
|
||||
|
||||
bool ChromePrintRenderFrameHelperDelegate::IsPrintPreviewEnabled() {
|
||||
|
@@ -1,24 +1,24 @@
|
||||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index f8530b82f9fe4..ea235f7747807 100644
|
||||
index 078a4b1a1e350..65ac56b910d9d 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/chrome_resource_bundle_helper.h"
|
||||
@@ -571,6 +572,7 @@ struct MainFunction {
|
||||
@@ -544,6 +545,7 @@ struct MainFunction {
|
||||
int (*function)(content::MainFunctionParams);
|
||||
};
|
||||
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
// Initializes the user data dir. Must be called before InitializeLocalState().
|
||||
void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -654,6 +656,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -621,6 +623,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
}
|
||||
@@ -26,7 +26,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
void InitLogging(const std::string& process_type) {
|
||||
@@ -789,6 +792,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
@@ -740,6 +743,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
ChromeMainDelegate::~ChromeMainDelegate() = default;
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -37,7 +37,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
InvokedIn invoked_in) {
|
||||
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
|
||||
@@ -814,7 +821,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -765,7 +772,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
// future session's metrics.
|
||||
DeferBrowserMetrics(user_data_dir);
|
||||
|
||||
@@ -46,7 +46,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
// 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
|
||||
// running instances.
|
||||
@@ -966,7 +973,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -850,7 +857,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
|
||||
// Initializes the resource bundle and determines the locale.
|
||||
std::string actual_locale = LoadLocalState(
|
||||
@@ -56,7 +56,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
|
||||
chrome_feature_list_creator->OverrideCachedUIStrings();
|
||||
|
||||
@@ -983,6 +991,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -865,6 +873,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
new net::NetworkChangeNotifierFactoryAndroid());
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
|
||||
bool record = true;
|
||||
@@ -993,6 +1003,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -875,6 +885,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
if (record)
|
||||
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
|
||||
}
|
||||
@@ -73,7 +73,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
UmaSessionStats::OnStartup();
|
||||
@@ -1036,8 +1047,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
|
||||
@@ -921,8 +932,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
|
||||
std::make_unique<ChromeThreadProfilerClient>());
|
||||
|
||||
// `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little
|
||||
@@ -84,7 +84,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
// Start the sampling profiler as early as possible - namely, once the thread
|
||||
// pool has been created.
|
||||
sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
|
||||
@@ -1435,6 +1446,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1312,6 +1323,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
@@ -92,7 +92,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
#if BUILDFLAG(IS_POSIX)
|
||||
@@ -1450,6 +1462,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1327,6 +1339,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
if (chrome::ProcessNeedsProfileDir(process_type)) {
|
||||
InitializeUserDataDir(base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
@@ -100,7 +100,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
|
||||
// Register component_updater PathProvider after DIR_USER_DATA overridden by
|
||||
// command line flags. Maybe move the chrome PathProvider down here also?
|
||||
@@ -1553,7 +1566,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1423,7 +1436,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
#else
|
||||
const std::string loaded_locale =
|
||||
ui::ResourceBundle::InitSharedInstanceWithLocale(
|
||||
@@ -110,7 +110,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
|
||||
base::FilePath resources_pack_path;
|
||||
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
|
||||
@@ -1563,6 +1577,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1433,6 +1447,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != switches::kZygoteProcess &&
|
||||
@@ -1599,6 +1614,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1469,6 +1484,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
// After all the platform Breakpads have been initialized, store the command
|
||||
// line for crash reporting.
|
||||
crash_keys::SetCrashKeysFromCommandLine(command_line);
|
||||
@@ -126,7 +126,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
MaybePatchGdiGetFontData();
|
||||
@@ -1717,6 +1733,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1587,6 +1603,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
SetUpProfilingShutdownHandler();
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
|
||||
// this up for the browser process in a different manner.
|
||||
const base::CommandLine* command_line =
|
||||
@@ -1729,6 +1746,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1599,6 +1616,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
|
||||
// Reset the command line for the newly spawned process.
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
@@ -142,7 +142,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -1839,6 +1857,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
@@ -1709,6 +1727,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
: memory_system::DispatcherParameters::
|
||||
AllocationTraceRecorderInclusion::kIgnore;
|
||||
|
||||
@@ -150,7 +150,7 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
memory_system::Initializer()
|
||||
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
|
||||
.SetProfilingClientParameters(chrome::GetChannel(),
|
||||
@@ -1846,5 +1865,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
@@ -1716,5 +1735,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
.SetDispatcherParameters(memory_system::DispatcherParameters::
|
||||
PoissonAllocationSamplerInclusion::kEnforce,
|
||||
allocation_recorder_inclusion, process_type)
|
||||
@@ -158,10 +158,10 @@ index f8530b82f9fe4..ea235f7747807 100644
|
||||
+ .Initialize(*memory_system_);
|
||||
}
|
||||
diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h
|
||||
index 521d5710b6387..8a5f3e6a312d2 100644
|
||||
index 4c70555277148..63300fe191e5e 100644
|
||||
--- chrome/app/chrome_main_delegate.h
|
||||
+++ chrome/app/chrome_main_delegate.h
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "chrome/common/chrome_content_client.h"
|
||||
#include "components/memory_system/memory_system.h"
|
||||
#include "content/public/app/content_main_delegate.h"
|
||||
@@ -169,7 +169,7 @@ index 521d5710b6387..8a5f3e6a312d2 100644
|
||||
|
||||
namespace base {
|
||||
class CommandLine;
|
||||
@@ -55,6 +56,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
@@ -50,6 +51,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
|
||||
~ChromeMainDelegate() override;
|
||||
|
||||
@@ -178,7 +178,7 @@ index 521d5710b6387..8a5f3e6a312d2 100644
|
||||
protected:
|
||||
// content::ContentMainDelegate:
|
||||
std::optional<int> BasicStartupComplete() override;
|
||||
@@ -99,13 +102,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
@@ -94,13 +97,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
|
||||
void InitializeMemorySystem();
|
||||
|
||||
@@ -195,8 +195,8 @@ index 521d5710b6387..8a5f3e6a312d2 100644
|
||||
- memory_system::MemorySystem memory_system_;
|
||||
+ std::unique_ptr<memory_system::MemorySystem> memory_system_;
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
std::unique_ptr<chromeos::LacrosService> lacros_service_;
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// The sampling profiler exists until the `ChromeContentBrowserClient` is
|
||||
diff --git chrome/app_shim/BUILD.gn chrome/app_shim/BUILD.gn
|
||||
index db17714f74137..7119e5dba649a 100644
|
||||
--- chrome/app_shim/BUILD.gn
|
||||
@@ -232,7 +232,7 @@ index 8f5c477acba39..ff2f90a8bf27b 100644
|
||||
|
||||
base::PathService::OverrideAndCreateIfNeeded(
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index a6ecd483d6428..251faf73f46dd 100644
|
||||
index af2f0398d633e..598d57e22fdd4 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -52,6 +52,7 @@
|
||||
@@ -465,7 +465,7 @@ index e26e3625c99c8..c0d4a95607e37 100644
|
||||
+#endif
|
||||
}
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
index 678e42c96fe4a..3e61f6e714e5c 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -47,6 +47,7 @@
|
||||
@@ -476,7 +476,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/ai/ai_manager.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
@@ -1493,6 +1494,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
@@ -1483,6 +1484,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
}
|
||||
|
||||
ChromeContentBrowserClient::ChromeContentBrowserClient() {
|
||||
@@ -485,7 +485,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
extra_parts_.push_back(
|
||||
std::make_unique<ChromeContentBrowserClientPluginsPart>());
|
||||
@@ -1530,6 +1533,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
@@ -1520,6 +1523,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,55 +497,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
// static
|
||||
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
PrefRegistrySimple* registry) {
|
||||
@@ -3940,30 +3948,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
|
||||
web_prefs->preferred_color_scheme;
|
||||
}
|
||||
#else
|
||||
- // Update based on native theme scheme.
|
||||
- web_prefs->preferred_color_scheme =
|
||||
- ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme());
|
||||
-
|
||||
- bool using_different_colored_frame = false;
|
||||
- if (Profile* profile =
|
||||
- Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
|
||||
- if (ThemeService* theme_service =
|
||||
- ThemeServiceFactory::GetForProfile(profile)) {
|
||||
- using_different_colored_frame =
|
||||
- !theme_service->UsingDefaultTheme() ||
|
||||
- theme_service->GetUserColor().has_value() ||
|
||||
- theme_service->UsingDeviceTheme();
|
||||
- }
|
||||
+ auto preferred_color_scheme = native_theme->GetPreferredColorScheme();
|
||||
+
|
||||
+ auto* profile = Profile::FromBrowserContext(
|
||||
+ web_contents->GetBrowserContext());
|
||||
+ const auto* theme_service = ThemeServiceFactory::GetForProfile(profile);
|
||||
+
|
||||
+ const auto browser_color_scheme = theme_service->GetBrowserColorScheme();
|
||||
+ if (browser_color_scheme != ThemeService::BrowserColorScheme::kSystem) {
|
||||
+ // Override the native theme.
|
||||
+ preferred_color_scheme =
|
||||
+ browser_color_scheme == ThemeService::BrowserColorScheme::kLight
|
||||
+ ? ui::NativeTheme::PreferredColorScheme::kLight
|
||||
+ : ui::NativeTheme::PreferredColorScheme::kDark;
|
||||
}
|
||||
|
||||
- // Update based on the ColorProvider associated with `web_contents`. Depends
|
||||
- // on the browser color mode settings and whether the user profile has set a
|
||||
- // custom coloring for the browser ui.
|
||||
- web_prefs->preferred_root_scrollbar_color_scheme =
|
||||
- web_contents->GetColorMode() == ui::ColorProviderKey::ColorMode::kLight ||
|
||||
- using_different_colored_frame
|
||||
- ? blink::mojom::PreferredColorScheme::kLight
|
||||
- : blink::mojom::PreferredColorScheme::kDark;
|
||||
+ // Update based on native theme scheme.
|
||||
+ web_prefs->preferred_color_scheme =
|
||||
+ web_prefs->preferred_root_scrollbar_color_scheme =
|
||||
+ ToBlinkPreferredColorScheme(preferred_color_scheme);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Reauth WebUI doesn't support dark mode yet because it shares the dialog
|
||||
@@ -4717,9 +4720,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
@@ -4722,9 +4730,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
&search::HandleNewTabURLReverseRewrite);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -557,7 +509,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
@@ -6783,7 +6788,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -6799,7 +6809,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +518,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -6801,6 +6806,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -6817,6 +6827,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
@@ -575,7 +527,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
}
|
||||
|
||||
std::vector<base::FilePath>
|
||||
@@ -7911,11 +7918,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
@@ -7925,11 +7937,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto timeout = GetKeepaliveTimerTimeout(context);
|
||||
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
|
||||
@@ -589,7 +541,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
FROM_HERE, keepalive_deadline_ - now,
|
||||
base::BindOnce(
|
||||
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
|
||||
@@ -7937,7 +7944,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
@@ -7951,7 +7963,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
--num_keepalive_requests_;
|
||||
if (num_keepalive_requests_ == 0) {
|
||||
DVLOG(1) << "Stopping the keepalive timer";
|
||||
@@ -599,7 +551,7 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
// This deletes the keep alive handle attached to the timer function and
|
||||
// unblock the shutdown sequence.
|
||||
}
|
||||
@@ -8112,7 +8120,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
@@ -8129,7 +8142,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto then = keepalive_deadline_;
|
||||
if (now < then) {
|
||||
@@ -609,10 +561,10 @@ index a1a8e77a2ef3f..cdbae8a69a450 100644
|
||||
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
|
||||
weak_factory_.GetWeakPtr(),
|
||||
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
|
||||
index 7e866a09fc060..0b7403c116151 100644
|
||||
index 388954e9b504a..7fd8d7b36fa04 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -155,6 +155,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -157,6 +157,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
~ChromeContentBrowserClient() override;
|
||||
|
||||
@@ -621,7 +573,7 @@ index 7e866a09fc060..0b7403c116151 100644
|
||||
// TODO(crbug.com/41356866): This file is about calls from content/ out
|
||||
// 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.
|
||||
@@ -721,7 +723,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -726,7 +728,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
@@ -630,7 +582,7 @@ index 7e866a09fc060..0b7403c116151 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1319,7 +1321,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -1339,7 +1341,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
uint64_t num_keepalive_requests_ = 0;
|
||||
@@ -640,7 +592,7 @@ index 7e866a09fc060..0b7403c116151 100644
|
||||
#endif
|
||||
|
||||
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
|
||||
index 48d8f868628b1..c0e765902a76e 100644
|
||||
index 3cc0bb183d1d1..57ea33377a7e4 100644
|
||||
--- chrome/browser/prefs/browser_prefs.cc
|
||||
+++ chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -651,7 +603,7 @@ index 48d8f868628b1..c0e765902a76e 100644
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
|
||||
@@ -209,6 +210,10 @@
|
||||
@@ -213,6 +214,10 @@
|
||||
#include "extensions/browser/pref_names.h"
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
@@ -662,17 +614,7 @@ index 48d8f868628b1..c0e765902a76e 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
|
||||
@@ -1949,7 +1954,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
+#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && \
|
||||
+ BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
|
||||
downgrade::RegisterPrefs(registry);
|
||||
#endif
|
||||
|
||||
@@ -2010,6 +2016,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1937,6 +1942,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
// This is intentionally last.
|
||||
RegisterLocalStatePrefsForMigration(registry);
|
||||
@@ -684,7 +626,7 @@ index 48d8f868628b1..c0e765902a76e 100644
|
||||
}
|
||||
|
||||
// Register prefs applicable to all profiles.
|
||||
@@ -2458,6 +2469,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -2387,6 +2397,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
const std::string& locale) {
|
||||
RegisterProfilePrefs(registry, locale);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
|
||||
index 6ebb06992652c..f3f058dddbc88 100644
|
||||
index 47e19e2f12139..be792c0b0a12a 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -421,6 +421,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -24,7 +24,7 @@ index 6ebb06992652c..f3f058dddbc88 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1224,11 +1232,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1211,11 +1219,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@@ -41,10 +41,10 @@ index 6ebb06992652c..f3f058dddbc88 100644
|
||||
|
||||
void BrowserCommandController::InitCommandState() {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index b10f798217379..21ae3aae53e7f 100644
|
||||
index 6130205985f73..5505b44742fde 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -734,10 +734,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
@@ -733,10 +733,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
ui::SimpleMenuModel::Delegate* delegate)
|
||||
: SimpleMenuModel(delegate) {
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
|
||||
@@ -57,7 +57,7 @@ index b10f798217379..21ae3aae53e7f 100644
|
||||
}
|
||||
|
||||
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
|
||||
@@ -802,6 +804,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -801,6 +803,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ index b10f798217379..21ae3aae53e7f 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1731,7 +1784,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1730,7 +1783,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ index b10f798217379..21ae3aae53e7f 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1747,6 +1800,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1746,6 +1799,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ index b10f798217379..21ae3aae53e7f 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1902,8 +1979,10 @@ void AppMenuModel::Build() {
|
||||
@@ -1901,8 +1978,10 @@ void AppMenuModel::Build() {
|
||||
IDS_CLEAR_BROWSING_DATA,
|
||||
kTrashCanRefreshIcon);
|
||||
|
||||
@@ -166,9 +166,9 @@ index b10f798217379..21ae3aae53e7f 100644
|
||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
|
||||
@@ -1999,6 +2078,11 @@ void AppMenuModel::Build() {
|
||||
@@ -1997,6 +2076,11 @@ void AppMenuModel::Build() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ FilterMenuModel(this, base::BindRepeating(&AppMenuModel::IsCommandIdVisible,
|
||||
@@ -179,10 +179,10 @@ index b10f798217379..21ae3aae53e7f 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index 84787f30b7b01..df979d0f711a0 100644
|
||||
index f5f5d8c1a8918..bebb784115c87 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.h
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.h
|
||||
@@ -231,6 +231,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -232,6 +232,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
void ExecuteCommand(int command_id, int event_flags) override;
|
||||
bool IsCommandIdChecked(int command_id) const override;
|
||||
bool IsCommandIdEnabled(int command_id) const override;
|
||||
@@ -190,7 +190,7 @@ index 84787f30b7b01..df979d0f711a0 100644
|
||||
bool IsCommandIdAlerted(int command_id) const override;
|
||||
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
@@ -271,6 +272,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
|
||||
int event_flags);
|
||||
|
||||
@@ -397,10 +397,10 @@ index 3d8a15049d4d2..66c4789581fe1 100644
|
||||
// regenerated.
|
||||
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
|
||||
index d7096d08fca43..4b878694700ed 100644
|
||||
index 76c889780c153..80e31b0c2986b 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -351,10 +351,6 @@ using web_modal::WebContentsModalDialogHost;
|
||||
@@ -364,10 +364,6 @@ using web_modal::WebContentsModalDialogHost;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -411,7 +411,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
constexpr char kTabLoadingSmoothnessHistogramName[] =
|
||||
@@ -764,6 +760,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
@@ -777,6 +773,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
return browser_view_->frame()->GetTopInset() - browser_view_->y();
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
bool IsToolbarVisible() const override {
|
||||
return browser_view_->IsToolbarVisible();
|
||||
}
|
||||
@@ -915,11 +919,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -928,11 +932,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@@ -449,9 +449,9 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
SetShowIcon(::ShouldShowWindowIcon(
|
||||
browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed()));
|
||||
|
||||
@@ -1021,8 +1035,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
|
||||
devtools_web_view_, contents_web_view_, watermark_view_));
|
||||
@@ -1072,8 +1086,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
watermark_view_));
|
||||
#endif
|
||||
|
||||
- toolbar_ = top_container_->AddChildView(
|
||||
- std::make_unique<ToolbarView>(browser_.get(), this));
|
||||
@@ -467,7 +467,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1112,7 +1133,9 @@ void BrowserView::ToggleCompactModeUI() {
|
||||
@@ -1145,7 +1166,9 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
}
|
||||
|
||||
BrowserView::~BrowserView() {
|
||||
@@ -475,9 +475,9 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
browser_->GetFeatures().TearDownPreBrowserViewDestruction();
|
||||
+ }
|
||||
|
||||
// Destroy the top controls slide controller first as it depends on the
|
||||
// tabstrip model and the browser frame.
|
||||
@@ -1120,7 +1143,9 @@ BrowserView::~BrowserView() {
|
||||
// Remove the layout manager to avoid dangling. This needs to be earlier than
|
||||
// other cleanups that destroy views referenced in the layout manager.
|
||||
@@ -1157,7 +1180,9 @@ BrowserView::~BrowserView() {
|
||||
|
||||
// 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.
|
||||
@@ -487,7 +487,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1129,17 +1154,18 @@ BrowserView::~BrowserView() {
|
||||
@@ -1166,17 +1191,18 @@ BrowserView::~BrowserView() {
|
||||
// Immersive mode may need to reparent views before they are removed/deleted.
|
||||
immersive_mode_controller_.reset();
|
||||
|
||||
@@ -510,7 +510,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
|
||||
// These are raw pointers to child views, so they need to be set to null
|
||||
// before `RemoveAllChildViews()` is called to avoid dangling.
|
||||
@@ -1713,6 +1739,16 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
@@ -1801,6 +1827,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
|
||||
}
|
||||
|
||||
@@ -520,14 +520,26 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
+ // child views and it is an observer for avatar toolbar button if any.
|
||||
+ autofill_bubble_handler_.reset();
|
||||
+
|
||||
+ toolbar_ = nullptr;
|
||||
+ toolbar_button_provider_ = nullptr;
|
||||
+ if (GetBrowserViewLayout()) {
|
||||
+ GetBrowserViewLayout()->reset_toolbar();
|
||||
+ }
|
||||
+
|
||||
+ if (toolbar_ && toolbar_->parent()) {
|
||||
+ // Remove now instead of waiting for RemoveAllChildViews(), as there is
|
||||
+ // otherwise no guarantee that the Toolbar will be removed before the
|
||||
+ // BrowserView is removed (and destroyed).
|
||||
+ toolbar_->parent()->RemoveChildView(toolbar_);
|
||||
+ toolbar_.ClearAndDelete();
|
||||
+ } else {
|
||||
+ toolbar_ = nullptr;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// static:
|
||||
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
@@ -2113,7 +2149,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -2221,7 +2269,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
@@ -542,10 +554,10 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3305,7 +3347,9 @@ views::View* BrowserView::GetTopContainer() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@@ -3460,7 +3514,9 @@ DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
- DCHECK(toolbar_button_provider_);
|
||||
+ if (!toolbar_button_provider_) {
|
||||
+ return nullptr;
|
||||
@@ -553,7 +565,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) {
|
||||
return download_button->bubble_controller();
|
||||
}
|
||||
@@ -3913,7 +3957,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -4094,7 +4150,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -563,7 +575,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4431,11 +4476,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4612,11 +4669,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
@@ -604,7 +616,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4444,7 +4516,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4625,7 +4709,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
|
||||
// Draggable regions should be ignored for clicks into any browser view's
|
||||
// owned widgets, for example alerts, permission prompts or find bar.
|
||||
@@ -613,7 +625,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4558,8 +4630,10 @@ void BrowserView::Layout(PassKey) {
|
||||
@@ -4739,8 +4823,10 @@ void BrowserView::Layout(PassKey) {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@@ -626,7 +638,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -4626,6 +4700,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4807,6 +4893,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@@ -636,9 +648,9 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
+ SetToolbarButtonProvider(toolbar_);
|
||||
+
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4668,14 +4747,10 @@ void BrowserView::AddedToWidget() {
|
||||
if (download::IsDownloadBubbleEnabled() &&
|
||||
features::IsToolbarPinningEnabled() &&
|
||||
@@ -4854,14 +4945,10 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@@ -656,7 +668,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -5066,7 +5141,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
|
||||
@@ -5257,7 +5344,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
|
||||
// Undo our anti-jankiness hacks and force a re-layout.
|
||||
in_process_fullscreen_ = false;
|
||||
ToolbarSizeChanged(false);
|
||||
@@ -666,7 +678,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
}
|
||||
|
||||
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
|
||||
@@ -5562,6 +5638,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -5753,6 +5841,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@@ -675,7 +687,7 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -5591,6 +5669,8 @@ bool BrowserView::CanUserEnterFullscreen() const {
|
||||
@@ -5782,6 +5872,8 @@ bool BrowserView::CanUserEnterFullscreen() const {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@@ -685,10 +697,10 @@ index d7096d08fca43..4b878694700ed 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index 121c651acf814..9d9b86da4705a 100644
|
||||
index b9986c6e9097d..fc8f781e6ac66 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -151,11 +151,16 @@ class BrowserView : public BrowserWindow,
|
||||
METADATA_HEADER(BrowserView, views::ClientView)
|
||||
|
||||
public:
|
||||
@@ -705,7 +717,7 @@ index 121c651acf814..9d9b86da4705a 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -859,6 +864,10 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -900,6 +905,10 @@ class BrowserView : public BrowserWindow,
|
||||
void Copy();
|
||||
void Paste();
|
||||
|
||||
@@ -716,7 +728,7 @@ index 121c651acf814..9d9b86da4705a 100644
|
||||
protected:
|
||||
// Enumerates where the devtools are docked relative to the browser's main
|
||||
// web contents.
|
||||
@@ -882,6 +891,8 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -923,6 +932,8 @@ class BrowserView : public BrowserWindow,
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
const gfx::Rect& local_webview_container_bounds);
|
||||
|
||||
@@ -726,10 +738,10 @@ index 121c651acf814..9d9b86da4705a 100644
|
||||
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
|
||||
// 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
|
||||
index 0c01106d900a3..42ce123ef2b01 100644
|
||||
index 46f6be18ac556..be2ce4a9dc6da 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -53,6 +53,10 @@
|
||||
@@ -52,6 +52,10 @@
|
||||
#include "ui/views/window/client_view.h"
|
||||
#include "ui/views/window/hit_test_utils.h"
|
||||
|
||||
@@ -740,7 +752,7 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
using views::View;
|
||||
using web_modal::ModalDialogHostObserver;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
@@ -103,6 +107,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -102,6 +106,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
observer_list_.Notify(&ModalDialogHostObserver::OnHostDestroying);
|
||||
}
|
||||
|
||||
@@ -751,7 +763,7 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
void NotifyPositionRequiresUpdate() {
|
||||
observer_list_.Notify(&ModalDialogHostObserver::OnPositionRequiresUpdate);
|
||||
}
|
||||
@@ -112,7 +120,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -111,7 +119,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
views::View* view = browser_view_layout_->contents_container_;
|
||||
gfx::Rect rect = view->ConvertRectToWidget(view->GetLocalBounds());
|
||||
const int middle_x = rect.x() + rect.width() / 2;
|
||||
@@ -760,7 +772,7 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
return gfx::Point(middle_x - size.width() / 2, top);
|
||||
}
|
||||
|
||||
@@ -135,7 +143,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -134,7 +142,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
// universally.
|
||||
views::View* view = browser_view_layout_->contents_container_;
|
||||
gfx::Rect content_area = view->ConvertRectToWidget(view->GetLocalBounds());
|
||||
@@ -769,7 +781,7 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
return gfx::Size(content_area.width(), content_area.bottom() - top);
|
||||
}
|
||||
|
||||
@@ -164,6 +172,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -163,6 +171,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
return host_widget ? host_widget->GetNativeView() : nullptr;
|
||||
}
|
||||
|
||||
@@ -783,7 +795,7 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
// Add/remove observer.
|
||||
void AddObserver(ModalDialogHostObserver* observer) override {
|
||||
observer_list_.AddObserver(observer);
|
||||
@@ -480,6 +495,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
@@ -486,6 +501,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
exclusive_access_bubble->RepositionIfVisible();
|
||||
}
|
||||
|
||||
@@ -792,7 +804,7 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
// Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
|
||||
const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
|
||||
dialog_host_->GetMaximumDialogSize());
|
||||
@@ -493,6 +510,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
@@ -499,6 +516,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
|
||||
dialog_host_->NotifyPositionRequiresUpdate();
|
||||
}
|
||||
@@ -814,6 +826,28 @@ index 0c01106d900a3..42ce123ef2b01 100644
|
||||
int browser_view_width = vertical_layout_rect_.width();
|
||||
bool toolbar_visible = delegate_->IsToolbarVisible();
|
||||
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
|
||||
diff --git chrome/browser/ui/views/frame/browser_view_layout.h chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
index f5203245ab9ec..de060d33fcf16 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
@@ -90,6 +90,8 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
contents_border_widget_ = contents_border_widget;
|
||||
}
|
||||
|
||||
+ void reset_toolbar() { toolbar_ = nullptr; }
|
||||
+
|
||||
views::Widget* contents_border_widget() { return contents_border_widget_; }
|
||||
|
||||
// Sets the bounds for the contents border.
|
||||
@@ -186,7 +188,7 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
const raw_ptr<WebAppFrameToolbarView> web_app_frame_toolbar_;
|
||||
const raw_ptr<views::Label> web_app_window_title_;
|
||||
const raw_ptr<TabStripRegionView> tab_strip_region_view_;
|
||||
- const raw_ptr<views::View> toolbar_;
|
||||
+ raw_ptr<views::View> toolbar_;
|
||||
const raw_ptr<InfoBarContainerView> infobar_container_;
|
||||
const raw_ptr<views::View> contents_container_;
|
||||
const raw_ptr<views::View> left_aligned_side_panel_separator_;
|
||||
diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h
|
||||
index 451c5ad63337b..66f946c95b9b4 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout_delegate.h
|
||||
@@ -827,13 +861,13 @@ index 451c5ad63337b..66f946c95b9b4 100644
|
||||
virtual bool IsBookmarkBarVisible() const = 0;
|
||||
virtual bool IsContentsSeparatorEnabled() const = 0;
|
||||
diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
index 8249bfe911f1d..192365dbb651a 100644
|
||||
index 6bdd187588951..8ac385bcd0cb5 100644
|
||||
--- chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
+++ chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
@@ -50,6 +50,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
|
||||
glic_border_->SetCanProcessEventsWithinSubtree(false);
|
||||
}
|
||||
#endif
|
||||
@@ -29,6 +29,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
|
||||
// Draws the ContentsWebView background.
|
||||
SetPaintToLayer(ui::LAYER_SOLID_COLOR);
|
||||
SetProperty(views::kElementIdentifierKey, kContentsWebViewElementId);
|
||||
+
|
||||
+ // Mouse events on draggable regions will not be handled by the WebView.
|
||||
+ // Avoid the resulting DCHECK in NativeViewHost::OnMousePressed by
|
||||
@@ -842,12 +876,12 @@ index 8249bfe911f1d..192365dbb651a 100644
|
||||
+ holder()->SetCanProcessEventsWithinSubtree(false);
|
||||
}
|
||||
|
||||
ContentsWebView::~ContentsWebView() {
|
||||
ContentsWebView::~ContentsWebView() = default;
|
||||
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 dc6b96a941f2e..2a2dda8a12ad2 100644
|
||||
index d69e8e49bf650..61386736a8d57 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
|
||||
@@ -603,6 +603,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
@@ -668,6 +668,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
frame_background_ = std::make_unique<views::FrameBackground>();
|
||||
}
|
||||
#endif
|
||||
@@ -859,7 +893,7 @@ index dc6b96a941f2e..2a2dda8a12ad2 100644
|
||||
}
|
||||
|
||||
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
|
||||
@@ -730,18 +735,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
@@ -801,18 +806,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
|
||||
int PictureInPictureBrowserFrameView::NonClientHitTest(
|
||||
const gfx::Point& point) {
|
||||
@@ -910,7 +944,7 @@ index dc6b96a941f2e..2a2dda8a12ad2 100644
|
||||
|
||||
// Allow dragging and resizing the window.
|
||||
int window_component = GetHTComponentForFrame(
|
||||
@@ -813,7 +842,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
@@ -886,7 +915,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
gfx::Rect content_area = GetLocalBounds();
|
||||
content_area.Inset(FrameBorderInsets());
|
||||
gfx::Rect top_bar = content_area;
|
||||
@@ -920,7 +954,7 @@ index dc6b96a941f2e..2a2dda8a12ad2 100644
|
||||
top_bar_container_view_->SetBoundsRect(top_bar);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (auto_pip_setting_overlay_) {
|
||||
@@ -1354,7 +1384,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
@@ -1436,7 +1466,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
}
|
||||
|
||||
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
|
||||
@@ -945,27 +979,29 @@ index 33c6444869375..d74818698d81a 100644
|
||||
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
|
||||
index 54b8559f2bc13..ff0e8b78a1626 100644
|
||||
index b41c7ca3a6a01..24d3c68c34a26 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -103,6 +103,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
};
|
||||
|
||||
for (PageActionIconType type : params.types_enabled) {
|
||||
@@ -117,6 +117,14 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (params.browser && params.browser->cef_delegate() &&
|
||||
+ !params.browser->cef_delegate()->IsPageActionIconVisible(type)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
switch (type) {
|
||||
case PageActionIconType::kPaymentsOfferNotification:
|
||||
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
|
||||
index b4b61fdac8801..9f2735a83f380 100644
|
||||
index 99da126067283..1519dd277c73b 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -639,29 +639,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@@ -669,29 +669,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
}
|
||||
|
||||
bool BrowserTabStripController::IsFrameCondensed() const {
|
||||
@@ -1008,10 +1044,10 @@ index b4b61fdac8801..9f2735a83f380 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
index 27efd0c4238f4..50037f13b926a 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -189,7 +189,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
@@ -188,7 +188,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
void Paint(gfx::Canvas* canvas, views::View* view) const override {
|
||||
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
|
||||
browser_view_);
|
||||
@@ -1020,7 +1056,7 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
SkColor frame_color =
|
||||
browser_view_->frame()->GetFrameView()->GetFrameColor(
|
||||
BrowserFrameActiveState::kUseCurrent);
|
||||
@@ -223,12 +223,13 @@ END_METADATA
|
||||
@@ -222,12 +222,13 @@ END_METADATA
|
||||
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarElementId);
|
||||
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarContainerElementId);
|
||||
|
||||
@@ -1036,7 +1072,7 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
SetID(VIEW_ID_TOOLBAR);
|
||||
SetProperty(views::kElementIdentifierKey, kToolbarElementId);
|
||||
|
||||
@@ -260,9 +261,24 @@ ToolbarView::~ToolbarView() {
|
||||
@@ -259,9 +260,24 @@ ToolbarView::~ToolbarView() {
|
||||
for (const auto& view_and_command : GetViewCommandMap()) {
|
||||
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
|
||||
}
|
||||
@@ -1061,7 +1097,7 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
#if defined(USE_AURA)
|
||||
// Avoid generating too many occlusion tracking calculation events before this
|
||||
// function returns. The occlusion status will be computed only once once this
|
||||
@@ -285,12 +301,12 @@ void ToolbarView::Init() {
|
||||
@@ -284,12 +300,12 @@ void ToolbarView::Init() {
|
||||
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
@@ -1071,12 +1107,12 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
size_animation_.Reset(1);
|
||||
|
||||
std::unique_ptr<DownloadToolbarButtonView> download_button;
|
||||
- if (download::IsDownloadBubbleEnabled()) {
|
||||
+ if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload)) {
|
||||
- if (download::IsDownloadBubbleEnabled() &&
|
||||
+ if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload) &&
|
||||
(!features::IsToolbarPinningEnabled() ||
|
||||
!base::FeatureList::IsEnabled(features::kPinnableDownloadsButton))) {
|
||||
download_button =
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
}
|
||||
@@ -372,7 +388,8 @@ void ToolbarView::Init() {
|
||||
@@ -373,7 +389,8 @@ void ToolbarView::Init() {
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
if (!(features::IsToolbarPinningEnabled() &&
|
||||
base::FeatureList::IsEnabled(features::kPinnedCastButton))) {
|
||||
@@ -1086,7 +1122,7 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
cast = media_router::CastToolbarButton::Create(browser_);
|
||||
}
|
||||
}
|
||||
@@ -386,7 +403,8 @@ void ToolbarView::Init() {
|
||||
@@ -387,7 +404,8 @@ void ToolbarView::Init() {
|
||||
|
||||
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
|
||||
send_tab_to_self_button;
|
||||
@@ -1096,7 +1132,7 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
send_tab_to_self_button =
|
||||
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
|
||||
browser_view_);
|
||||
@@ -857,7 +875,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
@@ -860,7 +878,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
LayoutCommon();
|
||||
@@ -1107,10 +1143,10 @@ index 693fcd880ac44..e67cd48e40a2d 100644
|
||||
|
||||
if (toolbar_controller_) {
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index 8bac5ea80b3e5..cd55d2e3343f4 100644
|
||||
index 8562522807529..a88825e8242e3 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -96,7 +96,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
@@ -100,7 +100,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(kToolbarElementId);
|
||||
DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(kToolbarContainerElementId);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
|
||||
index 7ce2012ec4756..9c88518fad933 100644
|
||||
index 6fdd6606c9eb5..88874797758c4 100644
|
||||
--- chrome/browser/ui/views/sad_tab_view.cc
|
||||
+++ chrome/browser/ui/views/sad_tab_view.cc
|
||||
@@ -703,6 +703,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
|
||||
index 1e4c380032c3a..41e992e99a123 100644
|
||||
index 51da615ed2e56..fb7d3b21c759a 100644
|
||||
--- content/browser/devtools/devtools_instrumentation.h
|
||||
+++ content/browser/devtools/devtools_instrumentation.h
|
||||
@@ -116,7 +116,7 @@ bool ApplyUserAgentMetadataOverrides(
|
||||
@@ -55,7 +55,7 @@ index 09d80f2ba678d..5dbff44c280a1 100644
|
||||
explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
|
||||
|
||||
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 555c721f4db1d..bf0dc7a83adb4 100644
|
||||
index e202f66106af0..64a316dc80348 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -3,6 +3,7 @@
|
||||
|
85
patch/patches/config_3892.patch
Normal file
85
patch/patches/config_3892.patch
Normal file
@@ -0,0 +1,85 @@
|
||||
diff --git components/prefs/pref_service.h components/prefs/pref_service.h
|
||||
index f1856d6ee4419..413b77e80d84d 100644
|
||||
--- components/prefs/pref_service.h
|
||||
+++ components/prefs/pref_service.h
|
||||
@@ -52,6 +52,10 @@ namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
+namespace pref_helper {
|
||||
+class Registrar;
|
||||
+}
|
||||
+
|
||||
namespace prefs {
|
||||
class ScopedDictionaryPrefUpdate;
|
||||
}
|
||||
@@ -441,6 +445,8 @@ class COMPONENTS_PREFS_EXPORT PrefService {
|
||||
// declared as a friend, too.
|
||||
friend class PrefChangeRegistrar;
|
||||
friend class subtle::PrefMemberBase;
|
||||
+ // CEF registration manager.
|
||||
+ friend class pref_helper::Registrar;
|
||||
|
||||
// These are protected so they can only be accessed by the friend
|
||||
// classes listed above.
|
||||
diff --git components/variations/synthetic_trials_active_group_id_provider.cc components/variations/synthetic_trials_active_group_id_provider.cc
|
||||
index bd51697297471..3e669cd080457 100644
|
||||
--- components/variations/synthetic_trials_active_group_id_provider.cc
|
||||
+++ components/variations/synthetic_trials_active_group_id_provider.cc
|
||||
@@ -27,7 +27,7 @@ SyntheticTrialsActiveGroupIdProvider::GetActiveGroupIds() {
|
||||
return group_ids_;
|
||||
}
|
||||
|
||||
-#if !defined(NDEBUG)
|
||||
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
|
||||
std::vector<SyntheticTrialGroup>
|
||||
SyntheticTrialsActiveGroupIdProvider::GetGroups() {
|
||||
base::AutoLock scoped_lock(lock_);
|
||||
@@ -38,7 +38,7 @@ SyntheticTrialsActiveGroupIdProvider::GetGroups() {
|
||||
void SyntheticTrialsActiveGroupIdProvider::ResetForTesting() {
|
||||
base::AutoLock scoped_lock(lock_);
|
||||
group_ids_.clear();
|
||||
-#if !defined(NDEBUG)
|
||||
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
|
||||
groups_.clear();
|
||||
#endif // !defined(NDEBUG)
|
||||
}
|
||||
@@ -53,7 +53,7 @@ void SyntheticTrialsActiveGroupIdProvider::OnSyntheticTrialsChanged(
|
||||
for (const auto& group : groups) {
|
||||
group_ids_.push_back(group.id());
|
||||
}
|
||||
-#if !defined(NDEBUG)
|
||||
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
|
||||
groups_ = groups;
|
||||
#endif // !defined(NDEBUG)
|
||||
}
|
||||
diff --git components/variations/synthetic_trials_active_group_id_provider.h components/variations/synthetic_trials_active_group_id_provider.h
|
||||
index b4a999731d996..0bbac173fddf1 100644
|
||||
--- components/variations/synthetic_trials_active_group_id_provider.h
|
||||
+++ components/variations/synthetic_trials_active_group_id_provider.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "base/component_export.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/thread_annotations.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "components/variations/active_field_trials.h"
|
||||
#include "components/variations/synthetic_trials.h"
|
||||
|
||||
@@ -36,7 +37,7 @@ class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider
|
||||
// Returns currently active synthetic trial group IDs.
|
||||
std::vector<ActiveGroupId> GetActiveGroupIds();
|
||||
|
||||
-#if !defined(NDEBUG)
|
||||
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
|
||||
// In debug mode, not only the group IDs are tracked but also the full group
|
||||
// info, to display the names unhashed in chrome://version.
|
||||
std::vector<SyntheticTrialGroup> GetGroups();
|
||||
@@ -60,7 +61,7 @@ class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider
|
||||
|
||||
base::Lock lock_;
|
||||
std::vector<ActiveGroupId> group_ids_; // GUARDED_BY(lock_);
|
||||
-#if !defined(NDEBUG)
|
||||
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
|
||||
// In debug builds, keep the full group information to be able to display it
|
||||
// in chrome://version.
|
||||
std::vector<SyntheticTrialGroup> groups_; // GUARDED_BY(lock_);
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index 8a8a0bdade6fe..59b9b4a7fe9da 100644
|
||||
index 1d0f19760a671..c21a9a23ff281 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -591,7 +591,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
@@ -12,10 +12,10 @@ index 8a8a0bdade6fe..59b9b4a7fe9da 100644
|
||||
version.Set("V8-Version", V8_VERSION_STRING);
|
||||
std::string host = info.GetHeaderValue("host");
|
||||
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
|
||||
index e93fa14d97024..4d8289e154528 100644
|
||||
index 7e8951316373a..189f591893c1a 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -921,7 +921,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -939,7 +939,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
terminal_external_protocol;
|
||||
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
|
||||
@@ -24,7 +24,7 @@ index e93fa14d97024..4d8289e154528 100644
|
||||
frame_tree_node->frame_tree_node_id(), navigation_ui_data,
|
||||
request_info.is_primary_main_frame,
|
||||
frame_tree_node->IsInFencedFrameTree(), request_info.sandbox_flags,
|
||||
@@ -933,6 +933,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -951,6 +951,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
*request_info.initiator_document_token)
|
||||
: nullptr,
|
||||
request_info.isolation_info, &terminal_external_protocol);
|
||||
@@ -47,10 +47,10 @@ index e93fa14d97024..4d8289e154528 100644
|
||||
return std::make_pair(
|
||||
/*is_cacheable=*/false,
|
||||
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
|
||||
index f252c048f288c..72c6569d6294a 100644
|
||||
index f07621fc68623..4f155b2f47f3b 100644
|
||||
--- content/public/browser/content_browser_client.cc
|
||||
+++ content/public/browser/content_browser_client.cc
|
||||
@@ -1155,7 +1155,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
@@ -1170,7 +1170,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
void ContentBrowserClient::OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) {}
|
||||
|
||||
@@ -59,7 +59,7 @@ index f252c048f288c..72c6569d6294a 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1164,6 +1164,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -1179,6 +1179,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
cert_verifier_creation_params) {
|
||||
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
|
||||
network_context_params->accept_language = "en-us,en";
|
||||
@@ -68,10 +68,10 @@ index f252c048f288c..72c6569d6294a 100644
|
||||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 25a2aec8dc537..ecbbfe7d0a774 100644
|
||||
index 373e9128eeefb..b1bf9be324211 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -1351,6 +1351,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1365,6 +1365,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
|
||||
@@ -84,7 +84,7 @@ index 25a2aec8dc537..ecbbfe7d0a774 100644
|
||||
// Allows the embedder to return a delegate for the SpeechRecognitionManager.
|
||||
// The delegate will be owned by the manager. It's valid to return nullptr.
|
||||
virtual SpeechRecognitionManagerDelegate*
|
||||
@@ -2201,7 +2207,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2220,7 +2226,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
//
|
||||
// If |relative_partition_path| is the empty string, it means this needs to
|
||||
// create the default NetworkContext for the BrowserContext.
|
||||
@@ -93,7 +93,7 @@ index 25a2aec8dc537..ecbbfe7d0a774 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -2428,6 +2434,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2448,6 +2454,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const net::IsolationInfo& isolation_info,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
@@ -116,7 +116,7 @@ index 25a2aec8dc537..ecbbfe7d0a774 100644
|
||||
// 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 will return a new OverlayWindow.
|
||||
@@ -2488,6 +2510,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2508,6 +2530,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
@@ -124,11 +124,11 @@ index 25a2aec8dc537..ecbbfe7d0a774 100644
|
||||
+ // purposes with external tools like Selenium.
|
||||
+ virtual std::string GetChromeProduct() { return GetProduct(); }
|
||||
+
|
||||
// Returns the user agent. This can also return the reduced user agent, based
|
||||
// on blink::features::kUserAgentReduction. Content may cache this value.
|
||||
// Returns the user agent. Content may cache this value.
|
||||
virtual std::string GetUserAgent();
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index 42c94f71f09cf..853c508260f08 100644
|
||||
index 7a2d251ba2d13..68297ee6f118f 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -109,6 +109,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -153,10 +153,10 @@ index 42c94f71f09cf..853c508260f08 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index e388b778c476f..a9f4346d31d03 100644
|
||||
index beb2d175d23f0..52b29dba3995b 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -592,6 +592,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -588,6 +588,8 @@ void RenderThreadImpl::Init() {
|
||||
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
|
||||
blink::URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
@@ -166,10 +166,10 @@ index e388b778c476f..a9f4346d31d03 100644
|
||||
base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver,
|
||||
base::Unretained(this)));
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index 24ed2d721fa6b..0616c3b77b027 100644
|
||||
index 0e94e8aded089..7ae244e8d9861 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1043,6 +1043,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
@@ -1046,6 +1046,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -186,10 +186,10 @@ index 24ed2d721fa6b..0616c3b77b027 100644
|
||||
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
|
||||
return std::make_unique<V8ValueConverterImpl>();
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index ced5bb344ec46..307d0a7a466f8 100644
|
||||
index f726c03e34578..96bded19157a3 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -246,6 +246,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -249,6 +249,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -200,10 +200,10 @@ index ced5bb344ec46..307d0a7a466f8 100644
|
||||
// plus eTLD+1, such as https://google.com), or to a more specific origin.
|
||||
void SetIsLockedToSite();
|
||||
diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc
|
||||
index 24e086b3379cb..743f87696ef1f 100644
|
||||
index 2dcf4df15f13d..0cca73ab49c9b 100644
|
||||
--- content/shell/browser/shell_content_browser_client.cc
|
||||
+++ content/shell/browser/shell_content_browser_client.cc
|
||||
@@ -772,7 +772,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -813,7 +813,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ index 24e086b3379cb..743f87696ef1f 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -781,6 +781,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -822,6 +822,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
|
||||
cert_verifier_creation_params) {
|
||||
ConfigureNetworkContextParamsForShell(context, network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
@@ -221,10 +221,10 @@ index 24e086b3379cb..743f87696ef1f 100644
|
||||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
|
||||
index 71dc7b791092b..8fb32c32f63f4 100644
|
||||
index 0d744f6f0d286..24a7fd8d099b4 100644
|
||||
--- content/shell/browser/shell_content_browser_client.h
|
||||
+++ content/shell/browser/shell_content_browser_client.h
|
||||
@@ -158,7 +158,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
|
||||
@@ -159,7 +159,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
|
||||
GetGeolocationSystemPermissionManager() override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
@@ -234,10 +234,10 @@ index 71dc7b791092b..8fb32c32f63f4 100644
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc
|
||||
index d52f189cebcf6..2392f71e5f343 100644
|
||||
index db5915d32bf54..77480eb3e4b10 100644
|
||||
--- headless/lib/browser/headless_content_browser_client.cc
|
||||
+++ headless/lib/browser/headless_content_browser_client.cc
|
||||
@@ -391,7 +391,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
|
||||
@@ -392,7 +392,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ index d52f189cebcf6..2392f71e5f343 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -401,6 +401,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -402,6 +402,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
|
||||
HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams(
|
||||
in_memory, relative_partition_path, network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
@@ -255,10 +255,10 @@ index d52f189cebcf6..2392f71e5f343 100644
|
||||
|
||||
std::string HeadlessContentBrowserClient::GetProduct() {
|
||||
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
|
||||
index b3d871de1d6f4..e47394d1e9809 100644
|
||||
index 4383dda44ddc1..e6cd5b6211d50 100644
|
||||
--- headless/lib/browser/headless_content_browser_client.h
|
||||
+++ headless/lib/browser/headless_content_browser_client.h
|
||||
@@ -111,7 +111,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -112,7 +112,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
|
||||
content::BrowserContext* browser_context,
|
||||
const url::Origin& top_frame_origin,
|
||||
const url::Origin& context_origin) override;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc
|
||||
index 5695fd36ce0e0..b109cefdeef6f 100644
|
||||
index c2d7f5c2f7abc..512125a22dfc8 100644
|
||||
--- content/browser/renderer_host/navigation_policy_container_builder.cc
|
||||
+++ content/browser/renderer_host/navigation_policy_container_builder.cc
|
||||
@@ -43,7 +43,6 @@ std::unique_ptr<PolicyContainerPolicies> GetInitiatorPolicies(
|
||||
@@ -45,7 +45,6 @@ std::unique_ptr<PolicyContainerPolicies> GetInitiatorPolicies(
|
||||
RenderFrameHostImpl::GetPolicyContainerHost(
|
||||
frame_token, initiator_process_id, storage_partition);
|
||||
|
||||
|
@@ -12,10 +12,10 @@ index edd8c78fb1537..49622b9c05dc0 100644
|
||||
if (main_argv) {
|
||||
setproctitle_init(main_argv);
|
||||
diff --git content/app/content_main.cc content/app/content_main.cc
|
||||
index 6cb1ea690dce9..cfadae04565be 100644
|
||||
index 54dfbaa6df693..b3a4093c076a3 100644
|
||||
--- content/app/content_main.cc
|
||||
+++ content/app/content_main.cc
|
||||
@@ -193,16 +193,10 @@ ContentMainParams::~ContentMainParams() = default;
|
||||
@@ -198,16 +198,10 @@ ContentMainParams::~ContentMainParams() = default;
|
||||
ContentMainParams::ContentMainParams(ContentMainParams&&) = default;
|
||||
ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default;
|
||||
|
||||
@@ -34,7 +34,7 @@ index 6cb1ea690dce9..cfadae04565be 100644
|
||||
|
||||
// A flag to indicate whether Main() has been called before. On Android, we
|
||||
// may re-run Main() without restarting the browser process. This flag
|
||||
@@ -281,7 +275,9 @@ NO_STACK_PROTECTOR int RunContentProcess(
|
||||
@@ -286,7 +280,9 @@ NO_STACK_PROTECTOR int RunContentProcess(
|
||||
// default, "C", locale.
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
|
||||
@@ -45,7 +45,7 @@ index 6cb1ea690dce9..cfadae04565be 100644
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -289,14 +285,6 @@ NO_STACK_PROTECTOR int RunContentProcess(
|
||||
@@ -294,14 +290,6 @@ NO_STACK_PROTECTOR int RunContentProcess(
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
@@ -60,7 +60,7 @@ index 6cb1ea690dce9..cfadae04565be 100644
|
||||
InitializeMac();
|
||||
#endif
|
||||
|
||||
@@ -345,12 +333,44 @@ NO_STACK_PROTECTOR int RunContentProcess(
|
||||
@@ -350,12 +338,44 @@ NO_STACK_PROTECTOR int RunContentProcess(
|
||||
|
||||
if (IsSubprocess())
|
||||
CommonSubprocessInit();
|
||||
@@ -107,10 +107,10 @@ index 6cb1ea690dce9..cfadae04565be 100644
|
||||
}
|
||||
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index 8c20f50669a20..8a2c458c1e2ef 100644
|
||||
index 93cbe4e3b64d4..a4356c3ccf4eb 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -52,6 +52,7 @@
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/threading/hang_watcher.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
@@ -118,7 +118,7 @@ index 8c20f50669a20..8a2c458c1e2ef 100644
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -1332,6 +1333,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
@@ -1329,6 +1330,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
|
@@ -81,10 +81,10 @@ index 30a2c1adc4509..b60a7afaf1e5e 100644
|
||||
g_crash_helper_enabled = true;
|
||||
return true;
|
||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||
index d9c721376c855..e72b67e2a1a50 100644
|
||||
index 36f846b0dfe29..98979130c36cc 100644
|
||||
--- chrome/common/crash_keys.cc
|
||||
+++ chrome/common/crash_keys.cc
|
||||
@@ -12,6 +12,8 @@
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <deque>
|
||||
#include <string_view>
|
||||
|
||||
@@ -93,7 +93,7 @@ index d9c721376c855..e72b67e2a1a50 100644
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/format_macros.h"
|
||||
@@ -110,8 +112,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) {
|
||||
@@ -106,8 +108,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) {
|
||||
"commandline-disabled-feature");
|
||||
}
|
||||
|
||||
@@ -102,10 +102,10 @@ index d9c721376c855..e72b67e2a1a50 100644
|
||||
// Return true if we DON'T want to upload this flag to the crash server.
|
||||
-bool IsBoringSwitch(const std::string& flag) {
|
||||
+bool IsBoringChromeSwitch(const std::string& flag) {
|
||||
static const std::string_view kIgnoreSwitches[] = {
|
||||
kStringAnnotationsSwitch,
|
||||
switches::kEnableLogging,
|
||||
@@ -171,6 +175,8 @@ bool IsBoringSwitch(const std::string& flag) {
|
||||
static const auto kIgnoreSwitches = std::to_array<std::string_view>({
|
||||
kStringAnnotationsSwitch,
|
||||
switches::kEnableLogging,
|
||||
@@ -167,6 +171,8 @@ bool IsBoringSwitch(const std::string& flag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ index d9c721376c855..e72b67e2a1a50 100644
|
||||
std::deque<CrashKeyWithName>& GetCommandLineStringAnnotations() {
|
||||
static base::NoDestructor<std::deque<CrashKeyWithName>>
|
||||
command_line_string_annotations;
|
||||
@@ -216,7 +222,7 @@ void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) {
|
||||
@@ -215,7 +221,7 @@ void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) {
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
|
||||
SetStringAnnotations(command_line);
|
||||
HandleEnableDisableFeatures(command_line);
|
||||
@@ -210,10 +210,10 @@ index 7c890b331be4a..75d22156605d3 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc
|
||||
index 14563198df62b..63b2c14420927 100644
|
||||
index b63e5c28a63a6..3bf12a61a34d2 100644
|
||||
--- components/crash/core/app/crashpad.cc
|
||||
+++ components/crash/core/app/crashpad.cc
|
||||
@@ -127,7 +127,8 @@ bool InitializeCrashpadImpl(bool initial_client,
|
||||
@@ -132,7 +132,8 @@ bool InitializeCrashpadImpl(bool initial_client,
|
||||
// fallback. Forwarding is turned off for debug-mode builds even for the
|
||||
// browser process, because the system's crash reporter can take a very long
|
||||
// time to chew on symbols.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
||||
index 384a829d6a4f5..e1290c8446954 100644
|
||||
index 1856966f2b913..6d7ecb4549502 100644
|
||||
--- components/embedder_support/user_agent_utils.cc
|
||||
+++ components/embedder_support/user_agent_utils.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -21,7 +21,7 @@ index 384a829d6a4f5..e1290c8446954 100644
|
||||
namespace embedder_support {
|
||||
|
||||
namespace {
|
||||
@@ -321,6 +326,14 @@ blink::UserAgentBrandList ShuffleBrandList(
|
||||
@@ -315,6 +320,14 @@ blink::UserAgentBrandList ShuffleBrandList(
|
||||
|
||||
std::string GetProductAndVersion(
|
||||
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index 44a11ec90ec9b..4c35b35a97f28 100644
|
||||
index 3f65718281973..66580417cc79e 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -158,6 +158,8 @@ exec_script_whitelist =
|
||||
@@ -158,6 +158,8 @@ exec_script_allowlist =
|
||||
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
|
||||
"//chrome/version.gni",
|
||||
|
||||
@@ -12,7 +12,7 @@ index 44a11ec90ec9b..4c35b35a97f28 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 09eeeee99b2e6..747d7f9e75d0e 100644
|
||||
index 704ddc0e043d8..b762c1887cd3b 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni")
|
||||
@@ -78,7 +78,7 @@ index bd41166938952..fba7843d79796 100644
|
||||
|
||||
visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ]
|
||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 75a2ccaebf8b5..676f21d56caa2 100644
|
||||
index 4a4b18b2715c3..efacf2ddeafcc 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
|
||||
@@ -89,7 +89,7 @@ index 75a2ccaebf8b5..676f21d56caa2 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/compose/features.gni")
|
||||
@@ -480,6 +481,10 @@ template("chrome_extra_paks") {
|
||||
@@ -487,6 +488,10 @@ template("chrome_extra_paks") {
|
||||
]
|
||||
deps += [ "//extensions:extensions_resources" ]
|
||||
}
|
||||
@@ -101,7 +101,7 @@ index 75a2ccaebf8b5..676f21d56caa2 100644
|
||||
sources += [ "$root_gen_dir/chrome/extensions_resources.pak" ]
|
||||
deps += [ "//chrome/browser/resources/extensions:resources" ]
|
||||
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
|
||||
index 0ec0aa2c8efb3..be510257b243c 100644
|
||||
index c3b77e3653933..21f42ddf85a3b 100644
|
||||
--- chrome/chrome_repack_locales.gni
|
||||
+++ chrome/chrome_repack_locales.gni
|
||||
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
|
||||
@@ -112,7 +112,7 @@ index 0ec0aa2c8efb3..be510257b243c 100644
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//tools/grit/repack.gni")
|
||||
|
||||
@@ -109,6 +110,10 @@ template("chrome_repack_locales") {
|
||||
@@ -106,6 +107,10 @@ template("chrome_repack_locales") {
|
||||
source_patterns += [ "${root_gen_dir}/components/strings/search_engine_descriptions_strings_" ]
|
||||
deps += [ "//components/strings:search_engine_descriptions_strings" ]
|
||||
}
|
||||
@@ -151,23 +151,23 @@ index c490d199bf51e..4c0de0d7a0822 100644
|
||||
outputs = [
|
||||
"$root_out_dir/chrome.7z",
|
||||
diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni
|
||||
index 20b2ffa87c31a..0c919d103eab5 100644
|
||||
index 5cf2768230fa5..f354073500d2c 100644
|
||||
--- tools/grit/grit_args.gni
|
||||
+++ tools/grit/grit_args.gni
|
||||
@@ -6,7 +6,9 @@ import("//build/config/chrome_build.gni")
|
||||
@@ -5,7 +5,9 @@
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/devtools.gni")
|
||||
import("//build/config/features.gni")
|
||||
+import("//build/config/locales.gni")
|
||||
import("//build/config/ui.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
|
||||
shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir)
|
||||
devtools_grd_path = "$shared_intermediate_dir/$devtools_grd_location"
|
||||
@@ -41,6 +43,9 @@ _grit_defines = [
|
||||
"is_desktop_android=${is_desktop_android}",
|
||||
@@ -38,6 +40,9 @@ _grit_defines = [
|
||||
"use_titlecase=${is_mac}",
|
||||
|
||||
"enable_glic=${enable_glic}",
|
||||
"is_desktop_android=${is_desktop_android}",
|
||||
+
|
||||
+ "enable_cef=${enable_cef}",
|
||||
+ "enable_pseudolocales=${enable_pseudolocales}",
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index 87dc2b6740a44..5319dd909a836 100644
|
||||
index 80494b5bb318a..61ed661f2a80a 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -1415,11 +1415,20 @@
|
||||
@@ -1463,11 +1463,18 @@
|
||||
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
|
||||
"META": {"sizes": {"messages": [2000],}},
|
||||
"messages": [10080],
|
||||
@@ -13,12 +13,10 @@ index 87dc2b6740a44..5319dd909a836 100644
|
||||
# Everything but chrome/, components/, content/, and ios/
|
||||
|
||||
+ "cef/libcef/resources/cef_resources.grd": {
|
||||
+ "META": {"align": 31500},
|
||||
+ "includes": [31500],
|
||||
+ "includes": [12500],
|
||||
+ },
|
||||
+ "cef/libcef/resources/cef_strings.grd": {
|
||||
+ "META": {"align": 32000},
|
||||
+ "messages": [32000],
|
||||
+ "messages": [12510],
|
||||
+ }
|
||||
+
|
||||
# Thinking about appending to the end?
|
||||
|
@@ -48,10 +48,10 @@ index 963360a3247e1..18e6a1db9a73e 100644
|
||||
}
|
||||
|
||||
diff --git ui/gtk/native_theme_gtk.cc ui/gtk/native_theme_gtk.cc
|
||||
index 184939bdb8b3d..bb13d7c74e20b 100644
|
||||
index a28c128deecd3..e8c8a9825b0fe 100644
|
||||
--- ui/gtk/native_theme_gtk.cc
|
||||
+++ ui/gtk/native_theme_gtk.cc
|
||||
@@ -156,9 +156,11 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings,
|
||||
@@ -157,9 +157,11 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings,
|
||||
// have a light variant and aren't affected by the setting. Because of this,
|
||||
// experimentally check if the theme is dark by checking if the window
|
||||
// background color is dark.
|
||||
@@ -67,7 +67,7 @@ index 184939bdb8b3d..bb13d7c74e20b 100644
|
||||
|
||||
// GTK doesn't have a native high contrast setting. Rather, it's implied by
|
||||
diff --git ui/native_theme/native_theme.cc ui/native_theme/native_theme.cc
|
||||
index aa2d789b3aec5..f84090947a345 100644
|
||||
index 95876b4040844..2f4480cacade6 100644
|
||||
--- ui/native_theme/native_theme.cc
|
||||
+++ ui/native_theme/native_theme.cc
|
||||
@@ -146,6 +146,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() {
|
||||
@@ -78,7 +78,7 @@ index aa2d789b3aec5..f84090947a345 100644
|
||||
|
||||
RecordNumColorProvidersInitializedDuringOnNativeThemeUpdated(
|
||||
color_provider_manager.num_providers_initialized() -
|
||||
@@ -289,6 +290,13 @@ bool NativeTheme::IsForcedDarkMode() {
|
||||
@@ -294,6 +295,13 @@ bool NativeTheme::IsForcedDarkMode() {
|
||||
return kIsForcedDarkMode;
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ index aa2d789b3aec5..f84090947a345 100644
|
||||
static bool kIsForcedHighContrast =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
diff --git ui/native_theme/native_theme.h ui/native_theme/native_theme.h
|
||||
index 4c8e8c2b171fc..4c0ac7cfee394 100644
|
||||
index 4e825d649919c..ff1af10d30758 100644
|
||||
--- ui/native_theme/native_theme.h
|
||||
+++ ui/native_theme/native_theme.h
|
||||
@@ -624,6 +624,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -636,6 +636,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
// Calculates and returns the use overlay scrollbar setting.
|
||||
static bool CalculateUseOverlayScrollbar();
|
||||
|
||||
@@ -129,7 +129,7 @@ index 36d8e38eb0b07..0b96dd332363a 100644
|
||||
theme->NotifyOnNativeThemeUpdated();
|
||||
}];
|
||||
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
|
||||
index d34f90e8a6b93..5d77885591ea2 100644
|
||||
index 2b2a12cd9d1ac..00c034b7f81f7 100644
|
||||
--- ui/native_theme/native_theme_win.cc
|
||||
+++ ui/native_theme/native_theme_win.cc
|
||||
@@ -685,7 +685,10 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -153,13 +153,15 @@ index d34f90e8a6b93..5d77885591ea2 100644
|
||||
return NativeTheme::CalculatePreferredColorScheme();
|
||||
}
|
||||
|
||||
@@ -1678,8 +1681,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
@@ -1679,9 +1682,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
}
|
||||
|
||||
void NativeThemeWin::UpdateDarkModeStatus() {
|
||||
- bool dark_mode_enabled = false;
|
||||
- bool system_dark_mode_enabled = false;
|
||||
- if (hkcu_themes_regkey_.Valid()) {
|
||||
+ bool dark_mode_enabled = ShouldUseDarkColors();
|
||||
+ bool system_dark_mode_enabled = ShouldUseDarkColors();
|
||||
+ if (supports_windows_dark_mode_ && !IsForcedDarkMode() &&
|
||||
+ hkcu_themes_regkey_.Valid()) {
|
||||
DWORD apps_use_light_theme = 1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/common/media/component_widevine_cdm_hint_file_linux.cc chrome/common/media/component_widevine_cdm_hint_file_linux.cc
|
||||
index b3e05e8183158..90be2d4a3368b 100644
|
||||
index c416845d817fe..f940dd80e2ed4 100644
|
||||
--- chrome/common/media/component_widevine_cdm_hint_file_linux.cc
|
||||
+++ chrome/common/media/component_widevine_cdm_hint_file_linux.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -8,9 +8,9 @@ index b3e05e8183158..90be2d4a3368b 100644
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
+#include "third_party/widevine/cdm/widevine_cdm_common.h"
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
#include "base/command_line.h"
|
||||
@@ -32,6 +33,26 @@ namespace {
|
||||
namespace {
|
||||
|
||||
@@ -25,6 +26,26 @@ namespace {
|
||||
const char kPath[] = "Path";
|
||||
const char kLastBundledVersion[] = "LastBundledVersion";
|
||||
|
||||
@@ -37,19 +37,9 @@ index b3e05e8183158..90be2d4a3368b 100644
|
||||
// Returns the hint file contents as a Value::Dict. Returned result may be an
|
||||
// empty dictionary if the hint file does not exist or is formatted incorrectly.
|
||||
base::Value::Dict GetHintFileContents() {
|
||||
@@ -58,8 +79,7 @@ base::Value::Dict GetHintFileContents() {
|
||||
hint_file_path = command_line->GetSwitchValuePath(
|
||||
switches::kCrosWidevineComponentUpdatedHintFile);
|
||||
#else
|
||||
- CHECK(base::PathService::Get(chrome::FILE_COMPONENT_WIDEVINE_CDM_HINT,
|
||||
- &hint_file_path));
|
||||
+ CHECK(GetHintFilePath(&hint_file_path));
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -65,8 +86,7 @@ bool UpdateWidevineCdmHintFile(const base::FilePath& cdm_base_path,
|
||||
DCHECK(!cdm_base_path.empty());
|
||||
|
||||
DVLOG(1) << __func__ << " checking " << hint_file_path;
|
||||
@@ -98,8 +118,7 @@ bool UpdateWidevineCdmHintFile(const base::FilePath& cdm_base_path,
|
||||
NOTREACHED() << "Lacros should not be updating the hint file.";
|
||||
#else
|
||||
base::FilePath hint_file_path;
|
||||
- CHECK(base::PathService::Get(chrome::FILE_COMPONENT_WIDEVINE_CDM_HINT,
|
||||
- &hint_file_path));
|
||||
|
@@ -98,7 +98,7 @@ index aa43742055b04..e84f21ab963cc 100644
|
||||
// it will get the locale that should be used potentially from other sources,
|
||||
// depending on the platform (e.g. the OS locale on Mac).
|
||||
diff --git ui/base/l10n/l10n_util.cc ui/base/l10n/l10n_util.cc
|
||||
index 3ba9c2e2971ad..f01e59a731f5e 100644
|
||||
index 67c6ca1c23ef2..b11c4ac515a1f 100644
|
||||
--- ui/base/l10n/l10n_util.cc
|
||||
+++ ui/base/l10n/l10n_util.cc
|
||||
@@ -506,25 +506,7 @@ bool CheckAndResolveLocale(const std::string& locale,
|
||||
|
@@ -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
|
||||
index 5383396da441c..a53441bcd1c74 100644
|
||||
index 7c8fc82a86d0e..4bc6327ec45bb 100644
|
||||
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
@@ -1198,8 +1198,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
|
||||
@@ -1224,8 +1224,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
|
||||
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
|
||||
.work_area();
|
||||
int available_space = screen_space.bottom() - anchor_rect.bottom();
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index fc345ea0ae7a6..aedd501ab118e 100644
|
||||
index ccfac3b103824..4497a134b2b7c 100644
|
||||
--- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
+++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
@@ -171,6 +171,13 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -16,7 +16,7 @@ index fc345ea0ae7a6..aedd501ab118e 100644
|
||||
// Private methods:
|
||||
@interface RenderWidgetHostViewCocoa ()
|
||||
|
||||
@@ -786,6 +793,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -789,6 +796,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
|
||||
index 3cef1f28ccdb0..c91c9927436de 100644
|
||||
index 5ffc5ec97f90a..d322d2a26264a 100644
|
||||
--- components/metrics/persistent_system_profile.cc
|
||||
+++ components/metrics/persistent_system_profile.cc
|
||||
@@ -401,6 +401,10 @@ bool PersistentSystemProfile::GetSystemProfile(
|
||||
@@ -415,6 +415,10 @@ bool PersistentSystemProfile::GetSystemProfile(
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user