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

Side by Side Diff: content/renderer/presentation/presentation_dispatcher.h

Issue 839773002: Plumbing from WebPresentationClient to the Presentation Mojo service for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the build Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(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_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 ~PresentationDispatcher() override;
23
24 private:
25 // WebPresentationClient implementation.
26 virtual void setController(
27 blink::WebPresentationController* controller);
28 virtual void addDeviceAvailabilityListener();
29 virtual void removeDeviceAvailabilityListener();
30
31 // PresentationServiceClient implementation.
32 void DeviceAvailabilityChanged(bool available) override;
33
34 void ConnectToPresentationServiceIfNeeded();
35
36 blink::WebPresentationController* controller_;
Peter Beverloo 2015/01/07 19:41:21 nit: maybe add a comment about controller_ being a
mlamouri (slow - plz ping) 2015/01/08 15:08:54 A comment pointing that it is a weak reference wou
whywhat 2015/01/08 17:28:53 Done.
whywhat 2015/01/08 17:28:53 Done.
37 presentation::PresentationServicePtr presentation_service_;
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698