Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2970)

Unified Diff: content/renderer/presentation/presentation_dispatcher.h

Issue 1131053005: [Presentation API] Convert screen availability API into Client style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed 1st set comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/presentation/presentation_dispatcher.h
diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h
index c88786357c747663c30d61b430e55fa311084f94..6bf980a3806e2ba21e92ed16604e4e8a7ddd7010 100644
--- a/content/renderer/presentation/presentation_dispatcher.h
+++ b/content/renderer/presentation/presentation_dispatcher.h
@@ -21,7 +21,8 @@ namespace content {
// Blink. It forwards the calls to the Mojo PresentationService.
class CONTENT_EXPORT PresentationDispatcher
: public RenderFrameObserver,
- public NON_EXPORTED_BASE(blink::WebPresentationClient) {
+ public NON_EXPORTED_BASE(blink::WebPresentationClient),
+ public NON_EXPORTED_BASE(presentation::PresentationServiceClient) {
public:
explicit PresentationDispatcher(RenderFrame* render_frame);
~PresentationDispatcher() override;
@@ -46,9 +47,9 @@ class CONTENT_EXPORT PresentationDispatcher
// RenderFrameObserver
void DidChangeDefaultPresentation() override;
- void OnScreenAvailabilityChanged(
- const std::string& presentation_url,
- bool available);
+ // presentation::PresentationServiceClient
+ void OnScreenAvailabilityUpdated(bool available) override;
+
void OnSessionCreated(
blink::WebPresentationSessionClientCallbacks* callback,
presentation::PresentationSessionInfoPtr session_info,
@@ -63,13 +64,10 @@ class CONTENT_EXPORT PresentationDispatcher
void ConnectToPresentationServiceIfNeeded();
- void DoUpdateAvailableChangeWatched(
- const std::string& presentation_url,
- bool watched);
-
// Used as a weak reference. Can be null since lifetime is bound to the frame.
blink::WebPresentationController* controller_;
presentation::PresentationServicePtr presentation_service_;
+ mojo::Binding<presentation::PresentationServiceClient> binding_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698