OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
Peter Beverloo
2015/01/07 15:13:01
nit: no (c).
whywhat
2015/01/07 18:03:00
Done.
| |
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_service.mojom.h" | |
9 #include "content/public/renderer/render_frame_observer.h" | |
10 #include "third_party/WebKit/public/platform/WebPresentationClient.h" | |
11 | |
12 namespace content { | |
13 | |
14 // PresentationDispatcher is a delegate for Presentation API messages used by | |
15 // Blink. It forwards the calls to the Mojo PresentationService. | |
16 class PresentationDispatcher | |
17 : public RenderFrameObserver, | |
18 public blink::WebPresentationClient, | |
19 public mojo::InterfaceImpl<presentation::PresentationServiceClient> { | |
20 public: | |
21 explicit PresentationDispatcher(RenderFrame* render_frame); | |
22 virtual ~PresentationDispatcher(); | |
Peter Beverloo
2015/01/07 15:13:01
~PresentationDispatcher() override;
whywhat
2015/01/07 18:03:00
Done.
| |
23 | |
24 private: | |
25 // WebPresentationClient | |
Peter Beverloo
2015/01/07 15:13:01
nit: "WebPresentationClient implementation." or si
whywhat
2015/01/07 18:03:00
Done.
| |
26 virtual void setController( | |
27 blink::WebPresentationController* controller) override; | |
Peter Beverloo
2015/01/07 15:13:01
We don't use "override" for Blink API methods (it
whywhat
2015/01/07 18:03:00
Done.
| |
28 virtual void addDeviceAvailabilityListener() override; | |
29 virtual void removeDeviceAvailabilityListener() override; | |
30 | |
31 // PresentationServiceClient | |
32 void DeviceAvailabilityChanged(bool available) override; | |
33 | |
34 void DefaultPresentationStarted( | |
35 presentation::PresentationSessionPtr session) override; | |
36 | |
37 void ConnectToPresentationServiceIfNeeded(); | |
38 | |
39 blink::WebPresentationController* controller_; | |
40 presentation::PresentationServicePtr presentation_service_; | |
41 }; | |
42 | |
43 } // namespace content | |
44 | |
45 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ | |
OLD | NEW |