Chromium Code Reviews| 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); |
| +}; |