Commit 324086b5 authored by Adithya Srinivasan's avatar Adithya Srinivasan Committed by Commit Bot

Portals: Move ForwardMessageToPortalHost to an associated interface

This is a follow up to https://crrev.com/c/1423462.

Moving ForwardMessageToPortalHost to FrameNavigationControl associates
it with the Frame navigation messages and the legacy Frame IPC channel,
ensuring a defined ordering between postMessage and navigation messages.

Bug: 914120
Change-Id: I1fdb9a5be5b2d034764d28464aaeba955efc9320
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1536536Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644386}
parent 213ba79c
......@@ -1069,7 +1069,8 @@ void RenderFrameHostImpl::ForwardMessageToPortalHost(
if (target_origin != GetLastCommittedOrigin())
return;
}
frame_->ForwardMessageToPortalHost(message, source_origin, target_origin);
GetNavigationControl()->ForwardMessageToPortalHost(message, source_origin,
target_origin);
}
SiteInstanceImpl* RenderFrameHostImpl::GetSiteInstance() {
......
......@@ -59,11 +59,6 @@ interface Frame {
// Cancels blocked requests. BlockRequests must have been called before.
CancelBlockedRequests();
// Forwards message to the portal's main frame.
ForwardMessageToPortalHost(string message,
url.mojom.Origin source_origin,
url.mojom.Origin? target_origin);
// Set the lifecycle state.
SetLifecycleState(blink.mojom.FrameLifecycleState state);
......@@ -221,6 +216,11 @@ interface FrameNavigationControl {
mojo_base.mojom.String16 target_origin,
blink.mojom.TransferableMessage message);
// Forwards message to the portal's main frame.
ForwardMessageToPortalHost(string message,
url.mojom.Origin source_origin,
url.mojom.Origin? target_origin);
// Called on the main frame of a page embedded in a Portal when it is
// activated. The frame has the option to adopt the previous page as a portal
// identified by |portal_token| with the interface |portal|. The activation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment