| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Called in StartSession's callback function for offscreen presentation only. | 108 // Called in StartSession's callback function for offscreen presentation only. |
| 109 // It passes in controlling frame's PresentationConnection and | 109 // It passes in controlling frame's PresentationConnection and |
| 110 // PresentationConnectionRequest to PresentationService. | 110 // PresentationConnectionRequest to PresentationService. |
| 111 SetPresentationConnection( | 111 SetPresentationConnection( |
| 112 PresentationSessionInfo sessionInfo, | 112 PresentationSessionInfo sessionInfo, |
| 113 PresentationConnection controller_connection_ptr, | 113 PresentationConnection controller_connection_ptr, |
| 114 PresentationConnection& receiver_connection_request); | 114 PresentationConnection& receiver_connection_request); |
| 115 | 115 |
| 116 ////////////////////////////////////////////////////////////////////////////// | 116 ////////////////////////////////////////////////////////////////////////////// |
| 117 | 117 |
| 118 // Called when send() is called by the frame. The true in the | |
| 119 // result callback notifies that the service is ready for next message. | |
| 120 // The false in the result callback notifies the renderer to stop sending | |
| 121 // the send requests and invalidate all pending requests. This occurs | |
| 122 // for eg., when frame is deleted or navigated away. | |
| 123 SendConnectionMessage(PresentationSessionInfo sessionInfo, | |
| 124 ConnectionMessage message_request) => (bool success); | |
| 125 | |
| 126 // Called when close() is called by the frame. | 118 // Called when close() is called by the frame. |
| 127 CloseConnection(url.mojom.Url presentation_url, string presentation_id); | 119 CloseConnection(url.mojom.Url presentation_url, string presentation_id); |
| 128 | 120 |
| 129 // Called when terminate() is called by the frame. | 121 // Called when terminate() is called by the frame. |
| 130 Terminate(url.mojom.Url presentation_url, string presentation_id); | 122 Terminate(url.mojom.Url presentation_url, string presentation_id); |
| 131 | 123 |
| 132 // Starts listening for messages for session with |sessionInfo|. | 124 // Starts listening for messages for session with |sessionInfo|. |
| 133 // Messages will be received in | 125 // Messages will be received in |
| 134 // PresentationServiceClient::OnConnectionMessagesReceived. | 126 // PresentationServiceClient::OnConnectionMessagesReceived. |
| 135 // This is called after a presentation session is created. | 127 // This is called after a presentation session is created. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 OnConnectionMessagesReceived(PresentationSessionInfo sessionInfo, | 164 OnConnectionMessagesReceived(PresentationSessionInfo sessionInfo, |
| 173 array<ConnectionMessage> messages); | 165 array<ConnectionMessage> messages); |
| 174 | 166 |
| 175 // Called on a presentation receiver when presentation connection is available | 167 // Called on a presentation receiver when presentation connection is available |
| 176 // from the controlling page. | 168 // from the controlling page. |
| 177 OnReceiverConnectionAvailable( | 169 OnReceiverConnectionAvailable( |
| 178 PresentationSessionInfo sessionInfo, | 170 PresentationSessionInfo sessionInfo, |
| 179 PresentationConnection controller_connection_ptr, | 171 PresentationConnection controller_connection_ptr, |
| 180 PresentationConnection& receiver_connection_request); | 172 PresentationConnection& receiver_connection_request); |
| 181 }; | 173 }; |
| OLD | NEW |