Update to Chromium version 122.0.6261.0 (#1250580)

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.
This commit is contained in:
Marshall Greenblatt
2024-01-25 21:12:43 -05:00
parent 2a86a02bdd
commit 2f1e782f62
156 changed files with 1452 additions and 1436 deletions

View File

@@ -109,15 +109,19 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
bool* is_guest_view = nullptr,
bool prefer_speculative = false) const;
// Returns the frame object matching the specified ID or nullptr if no match
// is found. Nullptr will also be returned if a guest view match is found
// because we don't create frame objects for guest views. If |is_guest_view|
// is non-nullptr it will be set to true in this case. Safe to call from any
// thread.
// Returns the frame object matching the specified ID/token or nullptr if no
// match is found. Nullptr will also be returned if a guest view match is
// found because we don't create frame objects for guest views. If
// |is_guest_view| is non-nullptr it will be set to true in this case. Safe to
// call from any thread.
CefRefPtr<CefFrameHostImpl> GetFrameForGlobalId(
const content::GlobalRenderFrameHostId& global_id,
bool* is_guest_view = nullptr,
bool prefer_speculative = false) const;
CefRefPtr<CefFrameHostImpl> GetFrameForGlobalToken(
const content::GlobalRenderFrameHostToken& global_token,
bool* is_guest_view = nullptr,
bool prefer_speculative = false) const;
// Returns all non-speculative frame objects that currently exist. Guest views
// will be excluded because they don't have a frame object. Safe to call from
@@ -248,6 +252,11 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
content::GlobalRenderFrameHostIdHasher>;
FrameIDMap frame_id_map_;
// Map of global token to global ID.
using FrameTokenToIdMap = std::map<content::GlobalRenderFrameHostToken,
content::GlobalRenderFrameHostId>;
FrameTokenToIdMap frame_token_to_id_map_;
// The current main frame.
CefRefPtr<CefFrameHostImpl> main_frame_;