refactor: use content::GlobalRenderFrameHostId (#38843)

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-06-20 15:32:31 +02:00 committed by GitHub
parent 93024be3b2
commit 2b3902e526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 16 deletions

View file

@ -14,8 +14,7 @@ namespace electron {
ElectronWebContentsUtilityHandlerImpl::ElectronWebContentsUtilityHandlerImpl(
content::RenderFrameHost* frame_host,
mojo::PendingAssociatedReceiver<mojom::ElectronWebContentsUtility> receiver)
: render_process_id_(frame_host->GetProcess()->GetID()),
render_frame_id_(frame_host->GetRoutingID()) {
: render_frame_host_id_(frame_host->GetGlobalId()) {
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(frame_host);
DCHECK(web_contents);
@ -70,7 +69,7 @@ void ElectronWebContentsUtilityHandlerImpl::DoGetZoomLevel(
content::RenderFrameHost*
ElectronWebContentsUtilityHandlerImpl::GetRenderFrameHost() {
return content::RenderFrameHost::FromID(render_process_id_, render_frame_id_);
return content::RenderFrameHost::FromID(render_frame_host_id_);
}
// static