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

@ -114,7 +114,9 @@ content::WebContents* CefBrowserContentsDelegate::OpenURLFromTab(
if (auto c = client()) {
if (auto handler = c->GetRequestHandler()) {
// May return nullptr for omnibox navigations.
auto frame = browser()->GetFrame(params.frame_tree_node_id);
auto frame = browser_info_->browser()->GetFrameForHost(
content::RenderFrameHost::FromID(params.source_render_process_id,
params.source_render_frame_id));
if (!frame) {
frame = browser()->GetMainFrame();
}
@ -324,11 +326,9 @@ void CefBrowserContentsDelegate::RenderFrameHostStateChanged(
void CefBrowserContentsDelegate::RenderFrameDeleted(
content::RenderFrameHost* render_frame_host) {
const auto frame_id =
frame_util::MakeFrameId(render_frame_host->GetGlobalId());
browser_info_->RemoveFrame(render_frame_host);
if (focused_frame_ && focused_frame_->GetIdentifier() == frame_id) {
if (focused_frame_ && focused_frame_->IsSameFrame(render_frame_host)) {
focused_frame_ = nullptr;
OnStateChanged(State::kFocusedFrame);
}