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 // TODO(crbug.com/647290): Rename "Session" to "Connection" | 5 // TODO(crbug.com/647290): Rename "Session" to "Connection" |
6 | 6 |
7 module blink.mojom; | 7 module blink.mojom; |
8 | 8 |
9 import "url/mojo/url.mojom"; | 9 import "url/mojo/url.mojom"; |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 interface PresentationConnection { | 55 interface PresentationConnection { |
56 // TODO(zhaobin): migrate SendSessionMessage from PresentationService => | 56 // TODO(zhaobin): migrate SendSessionMessage from PresentationService => |
57 // PresentationConnection.Send(). http://crbug.com/658474 | 57 // PresentationConnection.Send(). http://crbug.com/658474 |
58 | 58 |
59 // Called to set the PresentationConnection that is the destination for | 59 // Called to set the PresentationConnection that is the destination for |
60 // messages sent and the source of messages received by this connection. | 60 // messages sent and the source of messages received by this connection. |
61 SetTargetConnection(PresentationConnection connection); | 61 SetTargetConnection(PresentationConnection connection); |
62 | 62 |
63 // Called when a message is sent by the target connection. | 63 // Called when a message is sent by the target connection. |
64 OnMessage(SessionMessage message); | 64 OnMessage(SessionMessage message) => (bool success); |
| 65 |
| 66 // Called when target connection notifies connection state change. |
| 67 DidChangeState(PresentationConnectionState state); |
65 }; | 68 }; |
66 | 69 |
67 interface PresentationService { | 70 interface PresentationService { |
68 // Sets the PresentationServiceClient. | 71 // Sets the PresentationServiceClient. |
69 SetClient(PresentationServiceClient client); | 72 SetClient(PresentationServiceClient client); |
70 | 73 |
71 ///////////// Functions here are for the controller part of the API. ///////// | 74 ///////////// Functions here are for the controller part of the API. ///////// |
72 | 75 |
73 // Called when the frame sets or changes the default presentation URLs. | 76 // Called when the frame sets or changes the default presentation URLs. |
74 // When the default presentation is started on this frame, | 77 // When the default presentation is started on this frame, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // See PresentationService::ListenForSessionMessages. | 163 // See PresentationService::ListenForSessionMessages. |
161 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, | 164 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, |
162 array<SessionMessage> messages); | 165 array<SessionMessage> messages); |
163 | 166 |
164 // See PresentationService::SetDefaultPresentationURL. | 167 // See PresentationService::SetDefaultPresentationURL. |
165 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); | 168 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); |
166 | 169 |
167 // See PresentationService::OnReceiverConnectionAvailable. | 170 // See PresentationService::OnReceiverConnectionAvailable. |
168 OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo); | 171 OnReceiverConnectionAvailable(PresentationSessionInfo sessionInfo); |
169 }; | 172 }; |
OLD | NEW |