| Index: content/browser/presentation/presentation_service_impl.h
|
| diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h
|
| index dea2c88c37d89940f495810411836156aac20d6c..292bbff20361be3b15ca8077229c5f42c593fc8c 100644
|
| --- a/content/browser/presentation/presentation_service_impl.h
|
| +++ b/content/browser/presentation/presentation_service_impl.h
|
| @@ -48,7 +48,8 @@ class RenderFrameHost;
|
| class CONTENT_EXPORT PresentationServiceImpl
|
| : public NON_EXPORTED_BASE(blink::mojom::PresentationService),
|
| public WebContentsObserver,
|
| - public PresentationServiceDelegate::Observer {
|
| + public PresentationServiceDelegate::Observer,
|
| + public OffscreenPresentationClient {
|
| public:
|
| using NewSessionCallback =
|
| base::Callback<void(blink::mojom::PresentationSessionInfoPtr,
|
| @@ -234,6 +235,15 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| const ScopedVector<PresentationSessionMessage>& messages,
|
| bool pass_ownership);
|
|
|
| + // OffscreenPresentationClient Implementation
|
| + void OnReceiverConnectionAvailable(
|
| + const content::PresentationSessionInfo&) override;
|
| +
|
| + void AddOffscreenPresentationObserver(OffscreenPresentationClient*) override;
|
| +
|
| + void RemoveOffscreenPresentationObserver(
|
| + OffscreenPresentationClient*) override;
|
| +
|
| // Associates a JoinSession |callback| with a unique request ID and
|
| // stores it in a map.
|
| // Returns a positive value on success.
|
| @@ -284,6 +294,11 @@ class CONTENT_EXPORT PresentationServiceImpl
|
| int render_process_id_;
|
| int render_frame_id_;
|
|
|
| + // Offscreen presentation observer list for current frame.
|
| + // For controller PSImpl, it contains corresponding receiver PSImpl,
|
| + // and vise versa.
|
| + std::set<OffscreenPresentationClient*> offscreen_presentation_observers_;
|
| +
|
| // NOTE: Weak pointers must be invalidated before all other member variables.
|
| base::WeakPtrFactory<PresentationServiceImpl> weak_factory_;
|
|
|
|
|