Portals: Expose portalHost in predecessor

Exposing it in the activate callback ensures that the portalHost is
exposed when the promise callback is executed.

Bug: 948118, 921776
Change-Id: Ie654fdefd3e75187a06e8c06eba3de52f8276ff1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1548316
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Jeremy Roman <[email protected]>
Reviewed-by: Lucas Gadani <[email protected]>
Commit-Queue: Adithya Srinivasan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#652383}
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index b2082e2..7deab3e 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -225,10 +225,12 @@
   // activated. The frame has the option to adopt the previous page as a portal
   // identified by |portal_token| with the interface |portal|. The activation
   // can optionally include a message |data| dispatched with the
-  // PortalActivateEvent.
+  // PortalActivateEvent. The return value |was_adopted| indicates if the portal
+  // for the predecessor (identified by |portal_token|) was adopted by the
+  // current frame.
   OnPortalActivated(mojo_base.mojom.UnguessableToken portal_token,
                     associated blink.mojom.Portal portal,
-                    blink.mojom.TransferableMessage data);
+                    blink.mojom.TransferableMessage data) => (bool was_adopted);
 };
 
 // Implemented by the frame (e.g. renderer processes).