Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: third_party/WebKit/public/platform/modules/presentation/presentation.mojom

Issue 2379703002: [Presentation API] (alternative) 1-UA: send message between controller and receiver page (Closed)
Patch Set: rebase with master and resolve merge conflicts Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/modules/presentation/presentation.mojom
diff --git a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
index 0427db2c60e7d0709b13a1b4b2bbbeea73563084..260f31fa67ccbfae1d14af3fdaf9f9005464148a 100644
--- a/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
+++ b/third_party/WebKit/public/platform/modules/presentation/presentation.mojom
@@ -11,6 +11,7 @@ import "url/mojo/url.mojom";
struct PresentationSessionInfo {
url.mojom.Url url;
string id;
+ bool is_offscreen_presentation;
mark a. foltz 2016/10/21 00:53:03 Or just is_offscreen? Since it's part of Presenta
zhaobin 2016/10/22 02:44:14 Done.
};
enum PresentationConnectionState {
@@ -52,6 +53,15 @@ struct SessionMessage {
array<uint8>? data;
};
+interface PresentationConnection {
mark a. foltz 2016/10/21 00:53:03 Can you add a TODO to migrate SendSessionMessage f
zhaobin 2016/10/22 02:44:14 Done.
+ // Called to set the PresentationConnection that is the destination for
+ // messages sent and the source of messages received by this connection.
+ SetTargetConnection(PresentationConnection connection);
+
+ // Called when a message is sent by the target connection.
+ OnConnectionMessageReceived(SessionMessage message);
mark a. foltz 2016/10/21 00:53:03 Or just OnMessage() (similar to the Presentation A
zhaobin 2016/10/22 02:44:14 Done.
+};
+
interface PresentationService {
// Sets the PresentationServiceClient.
SetClient(PresentationServiceClient client);
@@ -109,6 +119,9 @@ interface PresentationService {
// PresentationServiceClient::OnSessionMessagesReceived.
// This is called after a presentation session is created.
ListenForSessionMessages(PresentationSessionInfo sessionInfo);
+
+ SetPresentationConnection(PresentationSessionInfo sessionInfo,
mark a. foltz 2016/10/21 00:53:03 Document this function. Is it called on the contr
zhaobin 2016/10/22 02:44:14 Done.
+ PresentationConnection connection);
};
interface PresentationServiceClient {
@@ -142,6 +155,8 @@ interface PresentationServiceClient {
// See PresentationService::SetDefaultPresentationURL.
OnDefaultSessionStarted(PresentationSessionInfo sessionInfo);
mark a. foltz 2016/10/21 00:53:03 Can this be moved above with the other controller-
zhaobin 2016/10/22 02:44:14 Done.
- // See PresentationService::ListeningForReceiverPageRendered.
- OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo);
+ // Called on a presentation receiver when the first presentation connection is
+ // available from the controlling page.
+ OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo,
mark a. foltz 2016/10/21 00:53:03 Maybe this should be OnFirstConnectionAvailable?
zhaobin 2016/10/22 02:44:14 It is called for all connections to the receiver p
+ PresentationConnection connection);
};

Powered by Google App Engine
This is Rietveld 408576698