Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | |
| 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | |
| 7 | |
| 8 #include "content/common/presentation/presentation_service.mojom.h" | |
| 9 #include "content/common/presentation/presentation_service_client.mojom.h" | |
| 10 #include "content/public/renderer/render_frame_observer.h" | |
| 11 #include "third_party/WebKit/public/platform/WebPresentationClient.h" | |
| 12 | |
| 13 namespace content { | |
| 14 | |
| 15 // PresentationDispatcher is a delegate for Presentation API messages used by | |
| 16 // Blink. It forwards the calls to the Mojo PresentationService. | |
| 17 class PresentationDispatcher | |
| 18 : public RenderFrameObserver, | |
| 19 public blink::WebPresentationClient, | |
|
mlamouri (slow - plz ping)
2015/01/15 11:40:13
You might need NON_EXPORTED_BASE() around blink::W
whywhat
2015/01/25 23:06:31
From the description, I need it if the base class
| |
| 20 public mojo::InterfaceImpl<presentation::PresentationServiceClient> { | |
| 21 public: | |
| 22 explicit PresentationDispatcher(RenderFrame* render_frame); | |
| 23 ~PresentationDispatcher() override; | |
| 24 | |
| 25 private: | |
| 26 // WebPresentationClient implementation. | |
| 27 virtual void setController( | |
| 28 blink::WebPresentationController* controller); | |
| 29 virtual void updateAvailableChangeWatched(bool watched); | |
| 30 | |
| 31 // PresentationServiceClient implementation. | |
| 32 void DeviceAvailabilityChanged(bool available) override; | |
| 33 | |
| 34 void ConnectToPresentationServiceIfNeeded(); | |
| 35 | |
| 36 // Used as a weak reference. Can be null since lifetime is bound to the frame. | |
| 37 blink::WebPresentationController* controller_; | |
| 38 presentation::PresentationServicePtr presentation_service_; | |
| 39 }; | |
| 40 | |
| 41 } // namespace content | |
| 42 | |
| 43 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | |
| OLD | NEW |