OLD | NEW |
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 COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 5 #ifndef COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ |
6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_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 "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
11 | 11 |
12 namespace arc { | 12 namespace arc { |
13 | 13 |
14 class ArcAuthService; | 14 class ArcAuthService; |
15 class ArcBridgeService; | 15 class ArcBridgeService; |
16 class ArcInputBridge; | 16 class ArcInputBridge; |
| 17 class ArcPowerBridge; |
17 class ArcSettingsBridge; | 18 class ArcSettingsBridge; |
18 class ArcPowerBridge; | 19 class ArcVideoBridge; |
19 | 20 |
20 // Manages creation and destruction of services that communicate with the ARC | 21 // Manages creation and destruction of services that communicate with the ARC |
21 // instance via the ArcBridgeService. | 22 // instance via the ArcBridgeService. |
22 class ArcServiceManager { | 23 class ArcServiceManager { |
23 public: | 24 public: |
24 ArcServiceManager(scoped_ptr<ArcAuthService> auth_service, | 25 ArcServiceManager(scoped_ptr<ArcAuthService> auth_service, |
25 scoped_ptr<ArcSettingsBridge> settings_bridge); | 26 scoped_ptr<ArcSettingsBridge> settings_bridge, |
| 27 scoped_ptr<ArcVideoBridge> video_bridge); |
26 virtual ~ArcServiceManager(); | 28 virtual ~ArcServiceManager(); |
27 | 29 |
28 // |arc_bridge_service| can only be accessed on the thread that this | 30 // |arc_bridge_service| can only be accessed on the thread that this |
29 // class was created on. | 31 // class was created on. |
30 ArcBridgeService* arc_bridge_service(); | 32 ArcBridgeService* arc_bridge_service(); |
31 | 33 |
32 // Gets the global instance of the ARC Service Manager. This can only be | 34 // Gets the global instance of the ARC Service Manager. This can only be |
33 // called on the thread that this class was created on. | 35 // called on the thread that this class was created on. |
34 static ArcServiceManager* Get(); | 36 static ArcServiceManager* Get(); |
35 | 37 |
36 private: | 38 private: |
37 base::ThreadChecker thread_checker_; | 39 base::ThreadChecker thread_checker_; |
38 scoped_ptr<ArcBridgeService> arc_bridge_service_; | 40 scoped_ptr<ArcBridgeService> arc_bridge_service_; |
39 | 41 |
40 // Individual services | 42 // Individual services |
41 scoped_ptr<ArcAuthService> arc_auth_service_; | 43 scoped_ptr<ArcAuthService> arc_auth_service_; |
42 scoped_ptr<ArcInputBridge> arc_input_bridge_; | 44 scoped_ptr<ArcInputBridge> arc_input_bridge_; |
43 scoped_ptr<ArcSettingsBridge> arc_settings_bridge_; | 45 scoped_ptr<ArcSettingsBridge> arc_settings_bridge_; |
44 scoped_ptr<ArcPowerBridge> arc_power_bridge_; | 46 scoped_ptr<ArcPowerBridge> arc_power_bridge_; |
| 47 scoped_ptr<ArcVideoBridge> arc_video_bridge_; |
45 | 48 |
46 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); | 49 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); |
47 }; | 50 }; |
48 | 51 |
49 } // namespace arc | 52 } // namespace arc |
50 | 53 |
51 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | 54 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ |
OLD | NEW |