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

Side by Side Diff: components/arc/arc_service_manager.h

Issue 1495723004: Minimum implementation of ARC clipboard Bridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and address review comments 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
« no previous file with comments | « components/arc/arc_bridge_service.cc ('k') | components/arc/arc_service_manager.cc » ('j') | 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 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 ArcClipboardBridge;
16 class ArcInputBridge; 17 class ArcInputBridge;
17 class ArcSettingsBridge; 18 class ArcSettingsBridge;
18 class ArcPowerBridge; 19 class ArcPowerBridge;
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);
26 virtual ~ArcServiceManager(); 27 virtual ~ArcServiceManager();
27 28
28 // |arc_bridge_service| can only be accessed on the thread that this 29 // |arc_bridge_service| can only be accessed on the thread that this
29 // class was created on. 30 // class was created on.
30 ArcBridgeService* arc_bridge_service(); 31 ArcBridgeService* arc_bridge_service();
31 32
32 // Gets the global instance of the ARC Service Manager. This can only be 33 // Gets the global instance of the ARC Service Manager. This can only be
33 // called on the thread that this class was created on. 34 // called on the thread that this class was created on.
34 static ArcServiceManager* Get(); 35 static ArcServiceManager* Get();
35 36
36 private: 37 private:
37 base::ThreadChecker thread_checker_; 38 base::ThreadChecker thread_checker_;
38 scoped_ptr<ArcBridgeService> arc_bridge_service_; 39 scoped_ptr<ArcBridgeService> arc_bridge_service_;
39 40
40 // Individual services 41 // Individual services
41 scoped_ptr<ArcAuthService> arc_auth_service_; 42 scoped_ptr<ArcAuthService> arc_auth_service_;
43 scoped_ptr<ArcClipboardBridge> arc_clipboard_bridge_;
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_;
45 47
46 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); 48 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
47 }; 49 };
48 50
49 } // namespace arc 51 } // namespace arc
50 52
51 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ 53 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service.cc ('k') | components/arc/arc_service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698