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