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 COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H | |
6 #define COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "components/arc/arc_bridge_service.h" | |
10 #include "components/arc/video/video_host_delegate.h" | |
11 #include "mojo/public/cpp/bindings/binding.h" | |
12 | |
13 namespace arc { | |
14 | |
15 class VideoHostDelegate; | |
16 | |
17 // ArcVideoBridge bridges ArcBridgeService and VideoHostDelegate. It observes | |
18 // ArcBridgeService events and pass VideoHost proxy to VideoInstance. | |
19 class ArcVideoBridge : public ArcBridgeService::Observer { | |
20 public: | |
21 ArcVideoBridge(scoped_ptr<VideoHostDelegate> video_host_delegate); | |
Pawel Osciak
2015/12/30 07:39:15
explicit
kcwu
2015/12/30 09:40:33
Done.
| |
22 ~ArcVideoBridge() override; | |
23 | |
24 // Starts listening to state changes of the ArcBridgeService. | |
25 void StartObservingBridgeServiceChanges(); | |
26 | |
27 // arc::ArcBridgeService::Observer implementation. | |
28 void OnStateChanged(arc::ArcBridgeService::State state) override; | |
29 void OnVideoInstanceReady() override; | |
30 | |
31 private: | |
32 scoped_ptr<VideoHostDelegate> video_host_delegate_; | |
33 mojo::Binding<arc::VideoHost> binding_; | |
34 }; | |
35 | |
36 } // namespace arc | |
37 | |
38 #endif // COMPONENTS_ARC_VIDEO_ARC_VIDEO_BRIDGE_H | |
OLD | NEW |