Chromium Code Reviews| Index: content/public/browser/presentation_service_delegate.h |
| diff --git a/content/public/browser/presentation_service_delegate.h b/content/public/browser/presentation_service_delegate.h |
| index cbe2c5f1cc9c5c64cbc46d32beb5b1cca81c4950..2f981aa7dc4b97a834efbbb8b1f5bc4fa71e9b69 100644 |
| --- a/content/public/browser/presentation_service_delegate.h |
| +++ b/content/public/browser/presentation_service_delegate.h |
| @@ -47,6 +47,26 @@ struct PresentationConnectionStateChangeInfo { |
| using PresentationConnectionStateChangedCallback = |
| base::Callback<void(const PresentationConnectionStateChangeInfo&)>; |
| +// This class serves as a proxy to PSImpl. |
| +class OffscreenPresentationClient { |
| + public: |
| + OffscreenPresentationClient() {} |
| + |
| + // For controller, add a receiver client |
| + // For receiver, add a controller client |
| + virtual void SetOffscreenPresentationClient(OffscreenPresentationClient*) = 0; |
|
imcheng
2016/09/28 07:28:37
param name.
imcheng
2016/09/28 07:28:37
Please document ownership of the input client.
zhaobin
2016/09/29 17:20:45
code removed in new patch
zhaobin
2016/09/29 17:20:45
code removed in new patch
|
| + |
| + virtual void RemoveOffscreenPresentationClient( |
| + OffscreenPresentationClient*) = 0; |
|
imcheng
2016/09/28 07:28:37
param name
zhaobin
2016/09/29 17:20:45
code removed in new patch
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(OffscreenPresentationClient); |
|
imcheng
2016/09/28 07:28:37
This is not needed for interfaces.
zhaobin
2016/09/29 17:20:45
code removed in new patch
|
| +}; |
| + |
| +using ReceiverConnectionAvailableCallback = |
| + base::Callback<void(const content::PresentationSessionInfo&, |
| + OffscreenPresentationClient*)>; |
| + |
| // An interface implemented by embedders to handle presentation API calls |
| // forwarded from PresentationServiceImpl. |
| class CONTENT_EXPORT PresentationServiceDelegate { |
| @@ -203,6 +223,26 @@ class CONTENT_EXPORT PresentationServiceDelegate { |
| int render_frame_id, |
| const PresentationSessionInfo& connection, |
| const PresentationConnectionStateChangedCallback& state_changed_cb) = 0; |
| + |
| + // In receiverPSDImpl, register receiver_available_callback with |
| + // OffscreenPresentationManager; |
| + // In controllerPSDImpl, no-op. |
| + // |receiver_available_callback|: Invoked when successfully starting a |
| + // offscreen presentation session. |
| + virtual void RegisterReceiverAvailableCallback( |
| + const content::ReceiverConnectionAvailableCallback& |
| + receiver_available_callback) = 0; |
| + |
| + // In receiverPSDImpl, no-op; |
| + // In controllerPSDImpl, register current PSImpl as an |
| + // OffscreenPresentationClient object to PSDImpl. |
| + // |render_process_id|, |render_frame_id|: ID of originating frame. |
| + // |client|: Pointer to current PSImpl, not owned by this class. To be used in |
| + // offscreen_presentation_manager->RegisterOffscreenPresentationController(). |
| + virtual void RegisterOffscreenPresentationClient( |
| + int render_process_id, |
| + int render_frame_id, |
| + OffscreenPresentationClient*) = 0; |
|
imcheng
2016/09/28 07:28:37
param name
zhaobin
2016/09/29 17:20:45
Done.
|
| }; |
| } // namespace content |