| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Called when send() is called by the frame. The true in the | 82 // Called when send() is called by the frame. The true in the |
| 83 // result callback notifies that the service is ready for next message. | 83 // result callback notifies that the service is ready for next message. |
| 84 // The false in the result callback notifies the renderer to stop sending | 84 // The false in the result callback notifies the renderer to stop sending |
| 85 // the send requests and invalidate all pending requests. This occurs | 85 // the send requests and invalidate all pending requests. This occurs |
| 86 // for eg., when frame is deleted or navigated away. | 86 // for eg., when frame is deleted or navigated away. |
| 87 SendSessionMessage(PresentationSessionInfo sessionInfo, | 87 SendSessionMessage(PresentationSessionInfo sessionInfo, |
| 88 SessionMessage message_request) => (bool success); | 88 SessionMessage message_request) => (bool success); |
| 89 | 89 |
| 90 // Called when close() is called by the frame. | 90 // Called when close() is called by the frame. |
| 91 CloseSession(string presentation_url, string presentation_id); | 91 CloseConnection(string presentation_url, string presentation_id); |
| 92 | 92 |
| 93 // Called when terminate() is called by the frame. | 93 // Called when terminate() is called by the frame. |
| 94 TerminateSession(string presentation_url, string presentation_id); | 94 Terminate(string presentation_url, string presentation_id); |
| 95 | 95 |
| 96 // Starts listening for messages for session with |sessionInfo|. | 96 // Starts listening for messages for session with |sessionInfo|. |
| 97 // Messages will be received in | 97 // Messages will be received in |
| 98 // PresentationServiceClient::OnSessionMessagesReceived. | 98 // PresentationServiceClient::OnSessionMessagesReceived. |
| 99 // This is called after a presentation session is created. | 99 // This is called after a presentation session is created. |
| 100 ListenForSessionMessages(PresentationSessionInfo sessionInfo); | 100 ListenForSessionMessages(PresentationSessionInfo sessionInfo); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 interface PresentationServiceClient { | 103 interface PresentationServiceClient { |
| 104 // Called when the client tries to listen for screen availability changes for | 104 // Called when the client tries to listen for screen availability changes for |
| (...skipping 13 matching lines...) Expand all Loading... |
| 118 OnConnectionStateChanged(PresentationSessionInfo connection, | 118 OnConnectionStateChanged(PresentationSessionInfo connection, |
| 119 PresentationConnectionState newState); | 119 PresentationConnectionState newState); |
| 120 | 120 |
| 121 // See PresentationService::ListenForSessionMessages. | 121 // See PresentationService::ListenForSessionMessages. |
| 122 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, | 122 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, |
| 123 array<SessionMessage> messages); | 123 array<SessionMessage> messages); |
| 124 | 124 |
| 125 // See PresentationService::SetDefaultPresentationURL. | 125 // See PresentationService::SetDefaultPresentationURL. |
| 126 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); | 126 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); |
| 127 }; | 127 }; |
| OLD | NEW |