OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module presentation; | 5 module presentation; |
6 | 6 |
7 struct PresentationSessionInfo { | 7 struct PresentationSessionInfo { |
8 string url; | 8 string url; |
9 string id; | 9 string id; |
10 }; | 10 }; |
11 | 11 |
12 enum PresentationErrorType { | 12 enum PresentationErrorType { |
13 NO_AVAILABLE_SCREENS, | 13 NO_AVAILABLE_SCREENS, |
14 SESSION_REQUEST_CANCELLED, | 14 SESSION_REQUEST_CANCELLED, |
15 NO_PRESENTATION_FOUND, | 15 NO_PRESENTATION_FOUND, |
16 UNKNOWN, | 16 UNKNOWN, |
17 }; | 17 }; |
18 | 18 |
19 struct PresentationError { | 19 struct PresentationError { |
20 PresentationErrorType error_type; | 20 PresentationErrorType error_type; |
21 string message; | 21 string message; |
22 }; | 22 }; |
23 | 23 |
24 enum MessageType { | |
imcheng
2015/04/02 23:57:24
Doesn't look like these are used. Remove them for
USE s.singapati at gmail.com
2015/04/07 17:45:16
Done.
| |
25 TEXT, | |
26 BINARY, | |
27 }; | |
28 | |
29 enum BinaryType { | |
30 NONE, | |
31 BLOB, | |
32 ARRAYBUFFER, | |
33 }; | |
34 | |
24 interface PresentationService { | 35 interface PresentationService { |
25 // Called when the frame sets or changes the default presentation URL or | 36 // Called when the frame sets or changes the default presentation URL or |
26 // presentation ID. | 37 // presentation ID. |
27 SetDefaultPresentationURL( | 38 SetDefaultPresentationURL( |
28 string default_presentation_url, | 39 string default_presentation_url, |
29 string? default_presentation_id); | 40 string? default_presentation_id); |
30 | 41 |
31 // Returns the last screen availability state if it’s changed since the last | 42 // Returns the last screen availability state if it’s changed since the last |
32 // time the method was called. The client has to call this method again when | 43 // time the method was called. The client has to call this method again when |
33 // handling the result (provided via Mojo callback) to get the next update | 44 // handling the result (provided via Mojo callback) to get the next update |
(...skipping 29 matching lines...) Expand all Loading... | |
63 StartSession(string presentation_url, string? presentation_id) | 74 StartSession(string presentation_url, string? presentation_id) |
64 => (PresentationSessionInfo? sessionInfo, PresentationError? error); | 75 => (PresentationSessionInfo? sessionInfo, PresentationError? error); |
65 | 76 |
66 // Called when joinSession() is called by the frame. The result callback | 77 // Called when joinSession() is called by the frame. The result callback |
67 // works the same as for the method above. JoinSession will join a known | 78 // works the same as for the method above. JoinSession will join a known |
68 // session (i.e. when the page navigates or the user opens another tab) | 79 // session (i.e. when the page navigates or the user opens another tab) |
69 // silently and without user action. | 80 // silently and without user action. |
70 JoinSession(string presentation_url, string? presentation_id) | 81 JoinSession(string presentation_url, string? presentation_id) |
71 => (PresentationSessionInfo? sessionInfo, PresentationError? error); | 82 => (PresentationSessionInfo? sessionInfo, PresentationError? error); |
72 | 83 |
84 // Called when postMessage is called by the frame. | |
85 PostMessages( | |
86 string presentation_url, | |
87 string presentation_id, | |
88 array<string> string_messages); | |
imcheng
2015/04/02 23:57:24
=> ();
This means PresentationDispatcher will sup
USE s.singapati at gmail.com
2015/04/07 17:45:16
Done.
| |
89 | |
73 // Called when closeSession() is called by the frame. | 90 // Called when closeSession() is called by the frame. |
74 CloseSession(string presentation_url, string presentation_id); | 91 CloseSession(string presentation_url, string presentation_id); |
75 }; | 92 }; |
OLD | NEW |