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 blink.mojom; | 5 module blink.mojom; |
6 | 6 |
7 struct PresentationSessionInfo { | 7 struct PresentationSessionInfo { |
8 string url; | 8 string url; |
9 string id; | 9 string id; |
10 }; | 10 }; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 CloseConnection(string presentation_url, string presentation_id); | 98 CloseConnection(string presentation_url, string presentation_id); |
99 | 99 |
100 // Called when terminate() is called by the frame. | 100 // Called when terminate() is called by the frame. |
101 Terminate(string presentation_url, string presentation_id); | 101 Terminate(string presentation_url, string presentation_id); |
102 | 102 |
103 // Starts listening for messages for session with |sessionInfo|. | 103 // Starts listening for messages for session with |sessionInfo|. |
104 // Messages will be received in | 104 // Messages will be received in |
105 // PresentationServiceClient::OnSessionMessagesReceived. | 105 // PresentationServiceClient::OnSessionMessagesReceived. |
106 // This is called after a presentation session is created. | 106 // This is called after a presentation session is created. |
107 ListenForSessionMessages(PresentationSessionInfo sessionInfo); | 107 ListenForSessionMessages(PresentationSessionInfo sessionInfo); |
| 108 |
| 109 // Returns a list of available receiver connections. In addition, when new |
| 110 // receiver connections become available, |OnReceiverConnectionAvailable| |
| 111 // will be invoked. |
| 112 GetReceiverConnections() => (array<PresentationSessionInfo> connections); |
108 }; | 113 }; |
109 | 114 |
110 interface PresentationServiceClient { | 115 interface PresentationServiceClient { |
111 // Called when the client tries to listen for screen availability changes for | 116 // Called when the client tries to listen for screen availability changes for |
112 // presentation of |url| but it is not supported by the device or underlying | 117 // presentation of |url| but it is not supported by the device or underlying |
113 // platform. This can also be called if the device is currently in a mode | 118 // platform. This can also be called if the device is currently in a mode |
114 // where it can't do screen discoveries (eg. low battery). | 119 // where it can't do screen discoveries (eg. low battery). |
115 OnScreenAvailabilityNotSupported(string url); | 120 OnScreenAvailabilityNotSupported(string url); |
116 | 121 |
117 // Called when the client is listening for screen availability for | 122 // Called when the client is listening for screen availability for |
(...skipping 12 matching lines...) Expand all Loading... |
130 OnConnectionClosed(PresentationSessionInfo connection, | 135 OnConnectionClosed(PresentationSessionInfo connection, |
131 PresentationConnectionCloseReason reason, | 136 PresentationConnectionCloseReason reason, |
132 string message); | 137 string message); |
133 | 138 |
134 // See PresentationService::ListenForSessionMessages. | 139 // See PresentationService::ListenForSessionMessages. |
135 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, | 140 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, |
136 array<SessionMessage> messages); | 141 array<SessionMessage> messages); |
137 | 142 |
138 // See PresentationService::SetDefaultPresentationURL. | 143 // See PresentationService::SetDefaultPresentationURL. |
139 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); | 144 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); |
| 145 |
| 146 // See PresentationService::GetReceiverConnections. |
| 147 OnReceiverConnectionAvailable(PresentationSessionInfo connection); |
140 }; | 148 }; |
OLD | NEW |