Skip to content

Commit

Permalink
Update to Chromium version 122.0.6261.0 (#1250580)
Browse files Browse the repository at this point in the history
Frame identifiers have changed from int64_t to string type. This is due
to https://crbug.com/1502660 which removes access to frame routing IDs
in the renderer process. New cross-process frame identifiers are 160-bit
values (32-bit child process ID + 128-bit local frame token) and most
easily represented as strings. All other frame-related expectations and
behaviors remain the same.
  • Loading branch information
magreenblatt committed Jan 30, 2024
1 parent 2a86a02 commit 2f1e782
Show file tree
Hide file tree
Showing 156 changed files with 1,452 additions and 1,436 deletions.
2 changes: 1 addition & 1 deletion CHROMIUM_BUILD_COMPATIBILITY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding

{
'chromium_checkout': 'refs/tags/121.0.6167.0'
'chromium_checkout': 'refs/tags/122.0.6261.0'
}
2 changes: 1 addition & 1 deletion CHROMIUM_UPDATE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'chrome/common/extensions/api/*_features.json',
'chrome/renderer/chrome_content_renderer_client.*',
'chrome/renderer/extensions/chrome_extensions_renderer_client.*',
'components/content_settings/core/common/content_settings_types.h',
'components/content_settings/core/common/content_settings_types.mojom',
'content/browser/renderer_host/render_widget_host_view_base.*',
'content/public/browser/content_browser_client.*',
'content/public/browser/render_widget_host_view.h',
Expand Down
14 changes: 7 additions & 7 deletions include/capi/cef_browser_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=d23df6f606a96b432905c5c80f29ab72915b8e01$
// $hash=e7f9480661f77931890085d6c5bf23d9842212e2$
//

#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
Expand Down Expand Up @@ -165,15 +165,16 @@ typedef struct _cef_browser_t {
///
/// Returns the frame with the specified identifier, or NULL if not found.
///
struct _cef_frame_t*(CEF_CALLBACK* get_frame_byident)(
struct _cef_frame_t*(CEF_CALLBACK* get_frame_by_identifier)(
struct _cef_browser_t* self,
int64_t identifier);
const cef_string_t* identifier);

///
/// Returns the frame with the specified name, or NULL if not found.
///
struct _cef_frame_t*(CEF_CALLBACK* get_frame)(struct _cef_browser_t* self,
const cef_string_t* name);
struct _cef_frame_t*(CEF_CALLBACK* get_frame_by_name)(
struct _cef_browser_t* self,
const cef_string_t* name);

///
/// Returns the number of frames that currently exist.
Expand All @@ -184,8 +185,7 @@ typedef struct _cef_browser_t {
/// Returns the identifiers of all existing frames.
///
void(CEF_CALLBACK* get_frame_identifiers)(struct _cef_browser_t* self,
size_t* identifiersCount,
int64_t* identifiers);
cef_string_list_t identifiers);

///
/// Returns the names of all existing frames.
Expand Down
6 changes: 3 additions & 3 deletions include/capi/cef_cookie_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=50e59e2d7038a1be0d3a2451c9b7073aee5156ef$
// $hash=76ba2e59636aa71c8c6286093198a1e64d012c62$
//

#ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
Expand Down Expand Up @@ -126,8 +126,8 @@ typedef struct _cef_cookie_manager_t {
/// cef_settings_t.cache_path if specified or in memory otherwise. If |callback|
/// is non-NULL it will be executed asnychronously on the UI thread after the
/// manager's storage has been initialized. Using this function is equivalent to
/// calling cef_request_context_t::cef_request_context_get_global_context()->Get
/// DefaultCookieManager().
/// calling cef_request_context_t::cef_request_context_get_global_context()-
/// >GetDefaultCookieManager().
///
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager(
struct _cef_completion_callback_t* callback);
Expand Down
8 changes: 5 additions & 3 deletions include/capi/cef_frame_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=7294486141b2377198e994048a768db4a7cb9cd0$
// $hash=8f347a95168778ec0e686cdef93be3bc517e2f68$
//

#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_
Expand Down Expand Up @@ -178,10 +178,12 @@ typedef struct _cef_frame_t {
cef_string_userfree_t(CEF_CALLBACK* get_name)(struct _cef_frame_t* self);

///
/// Returns the globally unique identifier for this frame or < 0 if the
/// Returns the globally unique identifier for this frame or NULL if the
/// underlying frame does not yet exist.
///
int64_t(CEF_CALLBACK* get_identifier)(struct _cef_frame_t* self);
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_identifier)(
struct _cef_frame_t* self);

///
/// Returns the parent of this frame or NULL if this is the main (top-level)
Expand Down
6 changes: 3 additions & 3 deletions include/capi/cef_media_router_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=62e7e781f3fef0d332b6a921d48a192fd0115295$
// $hash=8eec1100e8470cbe3ebc54d5962416d2fa4d57fb$
//

#ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_
Expand Down Expand Up @@ -114,8 +114,8 @@ typedef struct _cef_media_router_t {
/// Returns the MediaRouter object associated with the global request context.
/// If |callback| is non-NULL it will be executed asnychronously on the UI
/// thread after the manager's storage has been initialized. Equivalent to
/// calling cef_request_context_t::cef_request_context_get_global_context()->get
/// _media_router().
/// calling cef_request_context_t::cef_request_context_get_global_context()-
/// >get_media_router().
///
CEF_EXPORT cef_media_router_t* cef_media_router_get_global(
struct _cef_completion_callback_t* callback);
Expand Down
10 changes: 5 additions & 5 deletions include/capi/cef_scheme_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=ba8011bd357e466a94acfd86597f44af00f096a3$
// $hash=dd3f6003f9a8f59c2eb4320c382651a441086aee$
//

#ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_
Expand Down Expand Up @@ -116,8 +116,8 @@ typedef struct _cef_scheme_handler_factory_t {
/// matches the specified |scheme_name| and optional |domain_name|. Returns
/// false (0) if an error occurs. This function may be called on any thread in
/// the browser process. Using this function is equivalent to calling cef_reques
/// t_context_t::cef_request_context_get_global_context()->register_scheme_handl
/// er_factory().
/// t_context_t::cef_request_context_get_global_context()-
/// >register_scheme_handler_factory().
///
CEF_EXPORT int cef_register_scheme_handler_factory(
const cef_string_t* scheme_name,
Expand All @@ -128,8 +128,8 @@ CEF_EXPORT int cef_register_scheme_handler_factory(
/// Clear all scheme handler factories registered with the global request
/// context. Returns false (0) on error. This function may be called on any
/// thread in the browser process. Using this function is equivalent to calling
/// cef_request_context_t::cef_request_context_get_global_context()->clear_schem
/// e_handler_factories().
/// cef_request_context_t::cef_request_context_get_global_context()-
/// >clear_scheme_handler_factories().
///
CEF_EXPORT int cef_clear_scheme_handler_factories(void);

Expand Down
8 changes: 4 additions & 4 deletions include/cef_api_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
// 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 "d14f0a1044fad3677f4e3541ad4becc55e3e1a21"
#define CEF_API_HASH_UNIVERSAL "26455bea1da0a2592502ac7a3889bbb7c7c41652"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "74ea462bd443de49ae328d73dcbd1e4fde5d6cc5"
#define CEF_API_HASH_PLATFORM "e29ebe81ef26bdbf93ee46ca2f6437ffbb91bb36"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "8716cddadbd9316af1313f3cb8f8a42acdad369c"
#define CEF_API_HASH_PLATFORM "36f2affe168d233f9864b0c2d23144f01a737bac"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "12843112055d55c94bb2ea66f62b4935962d5c7e"
#define CEF_API_HASH_PLATFORM "cb887a91b5128574e18ff99b03798a8aed936561"
#endif

#ifdef __cplusplus
Expand Down
9 changes: 5 additions & 4 deletions include/cef_browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,15 @@ class CefBrowser : public virtual CefBaseRefCounted {
///
/// Returns the frame with the specified identifier, or NULL if not found.
///
/*--cef(capi_name=get_frame_byident)--*/
virtual CefRefPtr<CefFrame> GetFrame(int64_t identifier) = 0;
/*--cef()--*/
virtual CefRefPtr<CefFrame> GetFrameByIdentifier(
const CefString& identifier) = 0;

///
/// Returns the frame with the specified name, or NULL if not found.
///
/*--cef(optional_param=name)--*/
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) = 0;
virtual CefRefPtr<CefFrame> GetFrameByName(const CefString& name) = 0;

///
/// Returns the number of frames that currently exist.
Expand All @@ -188,7 +189,7 @@ class CefBrowser : public virtual CefBaseRefCounted {
/// Returns the identifiers of all existing frames.
///
/*--cef(count_func=identifiers:GetFrameCount)--*/
virtual void GetFrameIdentifiers(std::vector<int64_t>& identifiers) = 0;
virtual void GetFrameIdentifiers(std::vector<CefString>& identifiers) = 0;

///
/// Returns the names of all existing frames.
Expand Down
4 changes: 2 additions & 2 deletions include/cef_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ class CefFrame : public virtual CefBaseRefCounted {
virtual CefString GetName() = 0;

///
/// Returns the globally unique identifier for this frame or < 0 if the
/// Returns the globally unique identifier for this frame or empty if the
/// underlying frame does not yet exist.
///
/*--cef()--*/
virtual int64_t GetIdentifier() = 0;
virtual CefString GetIdentifier() = 0;

///
/// Returns the parent of this frame or NULL if this is the main (top-level)
Expand Down
35 changes: 18 additions & 17 deletions include/internal/cef_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3545,23 +3545,24 @@ typedef enum {
CEF_PERMISSION_TYPE_AR_SESSION = 1 << 1,
CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2,
CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3,
CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4,
CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5,
CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6,
CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7,
CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8,
CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9,
CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10,
CEF_PERMISSION_TYPE_MIDI = 1 << 11,
CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 12,
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 13,
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 14,
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 15,
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 16,
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17,
CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18,
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19,
CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 20,
CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL = 1 << 4,
CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 5,
CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 6,
CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 7,
CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 8,
CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 9,
CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 10,
CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 11,
CEF_PERMISSION_TYPE_MIDI = 1 << 12,
CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 13,
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 14,
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 15,
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 16,
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 17,
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 18,
CEF_PERMISSION_TYPE_VR_SESSION = 1 << 19,
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 20,
CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 21,
} cef_permission_request_types_t;

///
Expand Down
39 changes: 29 additions & 10 deletions include/internal/cef_types_content_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,32 +362,51 @@ typedef enum {
/// Stores per origin metadata for cookie controls.
CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA,

/// Content Setting for 3PC accesses granted via 3PC deprecation trial.
CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT,

/// Content setting used to indicate whether entering picture-in-picture
/// automatically should be enabled.
CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE,
/// Content Setting for temporary 3PC accesses granted by user behavior
/// heuristics.
CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS,

/// Content Setting for 3PC accesses granted by metadata delivered via the
/// component updater service. This type will only be used when
/// `net::features::kTpcdMetadataGrants` is enabled.
CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS,

/// Content Setting for 3PC accesses granted via 3PC deprecation trial.
CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL,

/// Content Setting for 3PC accesses granted via top-level 3PC deprecation
/// trial. Similar to TPCD_TRIAL, but applicable at the page-level for the
/// lifetime of the page that served the token, rather than being specific to
/// a requesting-origin/top-level-site combination and persistent.
CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL,

/// Content setting used to indicate whether entering picture-in-picture
/// automatically should be enabled.
CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE,

/// Whether user has opted into keeping file/directory permissions persistent
/// between visits for a given origin. When enabled, permission metadata
/// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming
/// permission request.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION,

/// Content Setting for temporary 3PC accesses granted by user behavior
/// heuristics.
CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS,

/// Whether the FSA Persistent Permissions restore prompt is eligible to be
/// shown to the user, for a given origin.
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION,

/// Whether an application capturing another tab, may scroll and zoom
/// the captured tab.
CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL,

/// Content setting for access to smart card readers.
/// The "guard" content setting stores whether to allow sites to access the
/// Smart Card API.
CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD,
CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA,

/// Content settings for access to printers for the Web Printing API.
CEF_CONTENT_SETTING_TYPE_WEB_PRINTING,

CEF_CONTENT_SETTING_TYPE_NUM_TYPES,
} cef_content_setting_types_t;

Expand Down
14 changes: 1 addition & 13 deletions libcef/browser/alloy/alloy_browser_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,7 @@ AlloyBrowserContext::AlloyBrowserContext(
const CefRequestContextSettings& settings)
: CefBrowserContext(settings) {}

AlloyBrowserContext::~AlloyBrowserContext() {
if (resource_context_) {
content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE,
resource_context_.release());
}
}
AlloyBrowserContext::~AlloyBrowserContext() = default;

bool AlloyBrowserContext::IsInitialized() const {
CEF_REQUIRE_UIT();
Expand Down Expand Up @@ -311,13 +306,6 @@ bool AlloyBrowserContext::IsPrintPreviewSupported() const {
return !GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled);
}

content::ResourceContext* AlloyBrowserContext::GetResourceContext() {
if (!resource_context_) {
resource_context_ = std::make_unique<content::ResourceContext>();
}
return resource_context_.get();
}

content::ClientHintsControllerDelegate*
AlloyBrowserContext::GetClientHintsControllerDelegate() {
return nullptr;
Expand Down
3 changes: 0 additions & 3 deletions libcef/browser/alloy/alloy_browser_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
bool IsPrintPreviewSupported() const override;

// content::BrowserContext overrides.
content::ResourceContext* GetResourceContext() override;
content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate()
override;
base::FilePath GetPath() override;
Expand Down Expand Up @@ -142,8 +141,6 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
std::unique_ptr<ProfileKey> key_;

std::unique_ptr<DownloadPrefs> download_prefs_;

std::unique_ptr<content::ResourceContext> resource_context_;
};

#endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_CONTEXT_H_
6 changes: 3 additions & 3 deletions libcef/browser/alloy/alloy_browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
#include "ui/native_theme/native_theme.h"

#if BUILDFLAG(IS_LINUX)
#include "ui/ozone/buildflags.h"
#if defined(USE_AURA) && BUILDFLAG(OZONE_PLATFORM_X11)
#include "ui/base/ozone_buildflags.h"
#if defined(USE_AURA) && BUILDFLAG(IS_OZONE_X11)
#include "ui/events/devices/x11/touch_factory_x11.h"
#endif
#endif
Expand Down Expand Up @@ -252,7 +252,7 @@ void AlloyBrowserMainParts::ToolkitInitialized() {

void AlloyBrowserMainParts::PreCreateMainMessageLoop() {
#if BUILDFLAG(IS_LINUX)
#if defined(USE_AURA) && BUILDFLAG(OZONE_PLATFORM_X11)
#if defined(USE_AURA) && BUILDFLAG(IS_OZONE_X11)
ui::TouchFactory::SetTouchDeviceListFromCommandLine();
#endif
#endif
Expand Down
Loading

0 comments on commit 2f1e782

Please sign in to comment.