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 }; |
(...skipping 11 matching lines...) Expand all Loading... | |
22 }; | 22 }; |
23 | 23 |
24 struct PresentationError { | 24 struct PresentationError { |
25 PresentationErrorType error_type; | 25 PresentationErrorType error_type; |
26 string message; | 26 string message; |
27 }; | 27 }; |
28 | 28 |
29 enum PresentationMessageType { | 29 enum PresentationMessageType { |
30 TEXT, | 30 TEXT, |
31 ARRAY_BUFFER, | 31 ARRAY_BUFFER, |
32 BLOB, | |
32 }; | 33 }; |
33 | 34 |
34 struct SessionMessage { | 35 struct SessionMessage { |
35 string presentation_url; | 36 string presentation_url; |
36 string presentation_id; | 37 string presentation_id; |
37 PresentationMessageType type; | 38 PresentationMessageType type; |
38 string? message; | 39 string? message; |
40 // Used for both ArrayBuffer and Blob data. | |
mark a. foltz
2015/06/02 23:51:02
nit: ARRAY_BUFFER and BLOB
USE s.singapati at gmail.com
2015/06/03 15:03:50
Done.
| |
39 array<uint8>? data; | 41 array<uint8>? data; |
40 }; | 42 }; |
41 | 43 |
42 interface PresentationService { | 44 interface PresentationService { |
43 // Called when the frame sets or changes the default presentation URL or | 45 // Called when the frame sets or changes the default presentation URL or |
44 // presentation ID. | 46 // presentation ID. |
45 SetDefaultPresentationURL( | 47 SetDefaultPresentationURL( |
46 string default_presentation_url, | 48 string default_presentation_url, |
47 string? default_presentation_id); | 49 string? default_presentation_id); |
48 | 50 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 // Called when the frame is ready to process the next batch of messages. | 108 // Called when the frame is ready to process the next batch of messages. |
107 // When the callback carries null messages, there is an error | 109 // When the callback carries null messages, there is an error |
108 // at the presentation service side. | 110 // at the presentation service side. |
109 ListenForSessionMessages() | 111 ListenForSessionMessages() |
110 => (array<SessionMessage>? messages); | 112 => (array<SessionMessage>? messages); |
111 }; | 113 }; |
112 | 114 |
113 interface PresentationServiceClient { | 115 interface PresentationServiceClient { |
114 OnScreenAvailabilityUpdated(bool available); | 116 OnScreenAvailabilityUpdated(bool available); |
115 }; | 117 }; |
OLD | NEW |