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

Unified Diff: content/common/presentation_session.mojom

Issue 839773002: Plumbing from WebPresentationClient to the Presentation Mojo service for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: content/common/presentation_session.mojom
diff --git a/content/common/presentation_session.mojom b/content/common/presentation_session.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..9c037499e99c3a833c3bb4ab22a812d6efb3e6ff
--- /dev/null
+++ b/content/common/presentation_session.mojom
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module presentation;
+
+// PresentationSession represents an interface between the page and one of its
+// presentations on the second screen. See the Presentation API for more details
+// about the API.
+[Client=PresentationSessionClient]
+interface PresentationSession {
Peter Beverloo 2015/01/07 15:13:01 If you prune the unused methods in the other .mojo
whywhat 2015/01/07 18:02:59 Done.
+ /* PresentationSession idl */
+
+ // when onstatechange listener is added;
+ // might cause the event fired with the initial state change
+ StateChangeListenerAdded();
+
+ // when onstatechange listener is removed;
+ // might close the session?
+ StateChangeListenerRemoved();
+
+ // when onmessage listener is added;
+ // might open the communication channel
+ MessageListenerAdded();
+
+ // when onmessage listener is removed;
+ // might close the communication channel?
+ MessageListenerRemoved();
+
+ // when postMessage() is called
+ PostMessage(string message);
+
+ // when close() is called
+ CloseSession();
+};
+
+interface PresentationSessionClient {
+ // When to fire onstatechange event
+ SessionStateChanged(string new_state);
+
+ // When to fire onmessage event
+ SessionMessageReceived(string message);
+};

Powered by Google App Engine
This is Rietveld 408576698