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

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

Issue 887563006: [Reland] Support listening for available screens for multiple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed non_export_base from RenderFrameObserver Created 5 years, 10 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
« no previous file with comments | « content/public/browser/presentation_service_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
7 7
8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h"
8 #include "content/common/presentation/presentation_service.mojom.h" 10 #include "content/common/presentation/presentation_service.mojom.h"
9 #include "content/public/renderer/render_frame_observer.h" 11 #include "content/public/renderer/render_frame_observer.h"
10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nClient.h" 12 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nClient.h"
11 13
12 namespace content { 14 namespace content {
13 15
14 // PresentationDispatcher is a delegate for Presentation API messages used by 16 // PresentationDispatcher is a delegate for Presentation API messages used by
15 // Blink. It forwards the calls to the Mojo PresentationService. 17 // Blink. It forwards the calls to the Mojo PresentationService.
16 class PresentationDispatcher 18 class CONTENT_EXPORT PresentationDispatcher
17 : public RenderFrameObserver, 19 : public RenderFrameObserver,
18 public blink::WebPresentationClient { 20 public NON_EXPORTED_BASE(blink::WebPresentationClient) {
19 public: 21 public:
20 explicit PresentationDispatcher(RenderFrame* render_frame); 22 explicit PresentationDispatcher(RenderFrame* render_frame);
21 ~PresentationDispatcher() override; 23 ~PresentationDispatcher() override;
22 24
23 private: 25 private:
24 // WebPresentationClient implementation. 26 // WebPresentationClient implementation.
25 virtual void setController( 27 virtual void setController(
26 blink::WebPresentationController* controller); 28 blink::WebPresentationController* controller);
27 virtual void updateAvailableChangeWatched(bool watched); 29 virtual void updateAvailableChangeWatched(bool watched);
28 30
29 void OnScreenAvailabilityChanged(bool available); 31 void OnScreenAvailabilityChanged(bool available);
30 32
31 void ConnectToPresentationServiceIfNeeded(); 33 void ConnectToPresentationServiceIfNeeded();
32 34
33 // Used as a weak reference. Can be null since lifetime is bound to the frame. 35 // Used as a weak reference. Can be null since lifetime is bound to the frame.
34 blink::WebPresentationController* controller_; 36 blink::WebPresentationController* controller_;
35 presentation::PresentationServicePtr presentation_service_; 37 presentation::PresentationServicePtr presentation_service_;
36 }; 38 };
37 39
38 } // namespace content 40 } // namespace content
39 41
40 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 42 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/public/browser/presentation_service_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698