| 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..1d271bda6143948d3ec77f5465882477fe0969ad 100644
|
| --- a/content/public/browser/presentation_service_delegate.h
|
| +++ b/content/public/browser/presentation_service_delegate.h
|
| @@ -47,6 +47,28 @@ struct PresentationConnectionStateChangeInfo {
|
| using PresentationConnectionStateChangedCallback =
|
| base::Callback<void(const PresentationConnectionStateChangeInfo&)>;
|
|
|
| +// This class serves as a proxy to PSImpl.
|
| +class OffscreenPresentationClient {
|
| + public:
|
| + OffscreenPresentationClient() {}
|
| + // Called when 1. receiver page is rendered for a presentation;
|
| + // 2. new controller is connected to the presentation.
|
| + virtual void OnReceiverConnectionAvailable(
|
| + const content::PresentationSessionInfo&) = 0;
|
| + // For controller, add a receiver client to its observer list, and the list
|
| + // contains at most one element;
|
| + // For receiver, add a controller client to its observer list, and the list
|
| + // may contain multiple elements.
|
| + virtual void AddOffscreenPresentationObserver(
|
| + OffscreenPresentationClient*) = 0;
|
| +
|
| + virtual void RemoveOffscreenPresentationObserver(
|
| + OffscreenPresentationClient*) = 0;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(OffscreenPresentationClient);
|
| +};
|
| +
|
| // An interface implemented by embedders to handle presentation API calls
|
| // forwarded from PresentationServiceImpl.
|
| class CONTENT_EXPORT PresentationServiceDelegate {
|
| @@ -203,6 +225,24 @@ class CONTENT_EXPORT PresentationServiceDelegate {
|
| int render_frame_id,
|
| const PresentationSessionInfo& connection,
|
| const PresentationConnectionStateChangedCallback& state_changed_cb) = 0;
|
| +
|
| + // Called when receiver PSImpl is connected with receiver render process.
|
| + virtual void RegisterOffscreenPresentationReceiver(
|
| + OffscreenPresentationClient*) = 0;
|
| +
|
| + // Called when receiver frame is destroyed.
|
| + virtual void UnregisterOffscreenPresentationReceiver(
|
| + OffscreenPresentationClient*) = 0;
|
| +
|
| + // Called when successfully starting presentation session.
|
| + virtual void RegisterOffscreenPresentationController(
|
| + const std::string& presentationId,
|
| + OffscreenPresentationClient*) = 0;
|
| +
|
| + // Called when presentation connection is closed.
|
| + virtual void UnregisterOffscreenPresentationController(
|
| + const std::string& presentationId,
|
| + OffscreenPresentationClient*) = 0;
|
| };
|
|
|
| } // namespace content
|
|
|