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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 => (PresentationSessionInfo? sessionInfo, PresentationError? error); | 80 => (PresentationSessionInfo? sessionInfo, PresentationError? error); |
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 closeSession() is called by the frame. | 90 // Called when close() is called by the frame. |
91 CloseSession(string presentation_url, string presentation_id); | 91 CloseSession(string presentation_url, string presentation_id); |
92 | 92 |
| 93 // Called when terminate() is called by the frame. |
| 94 TerminateSession(string presentation_url, string presentation_id); |
| 95 |
93 // Starts listening for state changes for sessions created on this frame. | 96 // Starts listening for state changes for sessions created on this frame. |
94 // When state change occurs, PresentationServiceClient::OnSessionStateChanged | 97 // When state change occurs, PresentationServiceClient::OnSessionStateChanged |
95 // will be invoked with the session and its new state. | 98 // will be invoked with the session and its new state. |
96 // This is called after a presentation session is created. | 99 // This is called after a presentation session is created. |
97 ListenForSessionStateChange(); | 100 ListenForSessionStateChange(); |
98 | 101 |
99 // Starts listening for messages for session with |sessionInfo|. | 102 // Starts listening for messages for session with |sessionInfo|. |
100 // Messages will be received in | 103 // Messages will be received in |
101 // PresentationServiceClient::OnSessionMessagesReceived. | 104 // PresentationServiceClient::OnSessionMessagesReceived. |
102 // This is called after a presentation session is created. | 105 // This is called after a presentation session is created. |
(...skipping 17 matching lines...) Expand all Loading... |
120 OnSessionStateChanged(PresentationSessionInfo sessionInfo, | 123 OnSessionStateChanged(PresentationSessionInfo sessionInfo, |
121 PresentationConnectionState newState); | 124 PresentationConnectionState newState); |
122 | 125 |
123 // See PresentationService::ListenForSessionMessages. | 126 // See PresentationService::ListenForSessionMessages. |
124 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, | 127 OnSessionMessagesReceived(PresentationSessionInfo sessionInfo, |
125 array<SessionMessage> messages); | 128 array<SessionMessage> messages); |
126 | 129 |
127 // See PresentationService::SetDefaultPresentationURL. | 130 // See PresentationService::SetDefaultPresentationURL. |
128 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); | 131 OnDefaultSessionStarted(PresentationSessionInfo sessionInfo); |
129 }; | 132 }; |
OLD | NEW |