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 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 int render_frame_id, | 173 int render_frame_id, |
174 const std::string& presentation_id) = 0; | 174 const std::string& presentation_id) = 0; |
175 | 175 |
176 // Terminates an existing presentation. | 176 // Terminates an existing presentation. |
177 // |render_process_id|, |render_frame_id|: ID for originating frame. | 177 // |render_process_id|, |render_frame_id|: ID for originating frame. |
178 // |presentation_id|: The ID of the presentation to terminate. | 178 // |presentation_id|: The ID of the presentation to terminate. |
179 virtual void Terminate(int render_process_id, | 179 virtual void Terminate(int render_process_id, |
180 int render_frame_id, | 180 int render_frame_id, |
181 const std::string& presentation_id) = 0; | 181 const std::string& presentation_id) = 0; |
182 | 182 |
183 // Listens for messages from a presentation. | |
184 // |render_process_id|, |render_frame_id|: ID for originating frame. | |
185 // |presentation_info|: URL and ID of presentation to listen for messages. | |
186 // |message_cb|: Invoked with a non-empty list of messages whenever there are | |
187 // messages. | |
188 virtual void ListenForConnectionMessages( | |
189 int render_process_id, | |
190 int render_frame_id, | |
191 const content::PresentationInfo& presentation_info, | |
192 const PresentationConnectionMessageCallback& message_cb) = 0; | |
193 | |
194 // Sends a message (string or binary data) to a presentation. | 183 // Sends a message (string or binary data) to a presentation. |
195 // |render_process_id|, |render_frame_id|: ID of originating frame. | 184 // |render_process_id|, |render_frame_id|: ID of originating frame. |
196 // |presentation_info|: The presentation to send the message to. | 185 // |presentation_info|: The presentation to send the message to. |
197 // |message|: The message to send. The embedder takes ownership of |message|. | 186 // |message|: The message to send. The embedder takes ownership of |message|. |
198 // Must not be null. | 187 // Must not be null. |
199 // |send_message_cb|: Invoked after handling the send message request. | 188 // |send_message_cb|: Invoked after handling the send message request. |
200 virtual void SendMessage(int render_process_id, | 189 virtual void SendMessage(int render_process_id, |
201 int render_frame_id, | 190 int render_frame_id, |
202 const content::PresentationInfo& presentation_info, | 191 const content::PresentationInfo& presentation_info, |
203 PresentationConnectionMessage message, | 192 PresentationConnectionMessage message, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // |receiver_available_callback|: Invoked when successfully starting a | 229 // |receiver_available_callback|: Invoked when successfully starting a |
241 // offscreen presentation. | 230 // offscreen presentation. |
242 virtual void RegisterReceiverConnectionAvailableCallback( | 231 virtual void RegisterReceiverConnectionAvailableCallback( |
243 const content::ReceiverConnectionAvailableCallback& | 232 const content::ReceiverConnectionAvailableCallback& |
244 receiver_available_callback) = 0; | 233 receiver_available_callback) = 0; |
245 }; | 234 }; |
246 | 235 |
247 } // namespace content | 236 } // namespace content |
248 | 237 |
249 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 238 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
OLD | NEW |