From 652dc88bf1b667ae508f3b2c4c3f8cbdb24bca0c Mon Sep 17 00:00:00 2001 From: Jeremy Roman Date: Tue, 12 Mar 2019 10:18:18 -0700 Subject: [PATCH] Attach activate data to the portalactivate event. This allows authors to pass a serializable value along with the activation event, so that the contexts can coordinate and transfer state across the activation. Transfer is supported, so message ports and similar objects can also be passed (subject to bug 940021). The existing TransferableMessage mojo struct (used for postMessage elsewhere) is reused, and is plumbed along the existing portal activation path. Web platform test included. Bug: 938549 Change-Id: Ib9a35a58c6317523b74fdd47cdd8e68c1d6ddfbd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504046 Commit-Queue: Jeremy Roman Reviewed-by: Nasko Oskov Reviewed-by: Kentaro Hara Reviewed-by: Lucas Gadani Cr-Commit-Position: refs/heads/master@{#639981} --- portals/portal-activate-data.html | 65 +++++++++++++++++++ .../portal-activate-data-portal.html | 13 ++++ 2 files changed, 78 insertions(+) create mode 100644 portals/portal-activate-data.html create mode 100644 portals/resources/portal-activate-data-portal.html diff --git a/portals/portal-activate-data.html b/portals/portal-activate-data.html new file mode 100644 index 00000000000000..e2417cb7332010 --- /dev/null +++ b/portals/portal-activate-data.html @@ -0,0 +1,65 @@ + +Tests passing of data along with portal activation + + + diff --git a/portals/resources/portal-activate-data-portal.html b/portals/resources/portal-activate-data-portal.html new file mode 100644 index 00000000000000..cba38a005f57a5 --- /dev/null +++ b/portals/resources/portal-activate-data-portal.html @@ -0,0 +1,13 @@ + +