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

Side by Side Diff: components/arc/video/arc_video_bridge.h

Issue 1596663002: arc-bridge: Introduce the ArcService class (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased + protected ArcService direct instantiation Created 4 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H 5 #ifndef COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H_
6 #define COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H 6 #define COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "components/arc/arc_bridge_service.h" 10 #include "components/arc/arc_bridge_service.h"
11 #include "components/arc/arc_service.h"
11 #include "components/arc/video/video_host_delegate.h" 12 #include "components/arc/video/video_host_delegate.h"
12 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
13 14
14 namespace arc { 15 namespace arc {
15 16
16 class VideoHostDelegate; 17 class VideoHostDelegate;
17 18
18 // ArcVideoBridge bridges ArcBridgeService and VideoHostDelegate. It observes 19 // ArcVideoBridge bridges ArcBridgeService and VideoHostDelegate. It observes
19 // ArcBridgeService events and pass VideoHost proxy to VideoInstance. 20 // ArcBridgeService events and pass VideoHost proxy to VideoInstance.
20 class ArcVideoBridge : public ArcBridgeService::Observer { 21 class ArcVideoBridge : public ArcService, public ArcBridgeService::Observer {
21 public: 22 public:
22 explicit ArcVideoBridge(scoped_ptr<VideoHostDelegate> video_host_delegate); 23 ArcVideoBridge(ArcBridgeService* bridge_service,
24 scoped_ptr<VideoHostDelegate> video_host_delegate);
23 ~ArcVideoBridge() override; 25 ~ArcVideoBridge() override;
24 26
25 // Starts listening to state changes of the ArcBridgeService.
26 void StartObservingBridgeServiceChanges();
27
28 // arc::ArcBridgeService::Observer implementation. 27 // arc::ArcBridgeService::Observer implementation.
29 void OnStateChanged(arc::ArcBridgeService::State state) override; 28 void OnStateChanged(arc::ArcBridgeService::State state) override;
30 void OnVideoInstanceReady() override; 29 void OnVideoInstanceReady() override;
31 30
32 private: 31 private:
33 scoped_ptr<VideoHostDelegate> video_host_delegate_; 32 scoped_ptr<VideoHostDelegate> video_host_delegate_;
34 mojo::Binding<arc::VideoHost> binding_; 33 mojo::Binding<arc::VideoHost> binding_;
35 34
36 DISALLOW_COPY_AND_ASSIGN(ArcVideoBridge); 35 DISALLOW_COPY_AND_ASSIGN(ArcVideoBridge);
37 }; 36 };
38 37
39 } // namespace arc 38 } // namespace arc
40 39
41 #endif // COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H 40 #endif // COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/arc/settings/arc_settings_bridge.cc ('k') | components/arc/video/arc_video_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698