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_ARC_SERVICE_MANAGER_H_ | |
6 #define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 namespace base { | |
13 | |
14 class SequencedTaskRunner; | |
15 class SingleThreadTaskRunner; | |
16 | |
17 } // namespace base | |
18 | |
19 namespace arc { | |
20 | |
21 class ArcBridgeService; | |
22 | |
23 // Manages creation and destruction of ARC related services. | |
24 class ArcServiceManager { | |
oshima
2015/12/04 18:33:34
Consider adding comment to avoid adding unrelated
denniskempin
2015/12/04 19:12:25
Done.
| |
25 public: | |
26 ArcServiceManager( | |
27 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, | |
28 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner); | |
29 virtual ~ArcServiceManager(); | |
30 | |
31 // |arc_bridge_service| can only be accessed on the thread that this | |
32 // class was created on. | |
33 ArcBridgeService* arc_bridge_service(); | |
34 | |
35 // Gets the global instance of the ARC Service Manager. This can only be | |
36 // called on the thread that this class was created on. | |
37 static ArcServiceManager* Get(); | |
38 | |
39 private: | |
40 scoped_refptr<base::SequencedTaskRunner> origin_task_runner_; | |
41 scoped_ptr<ArcBridgeService> arc_bridge_service_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); | |
44 }; | |
45 | |
46 } // namespace arc | |
47 | |
48 #endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_ | |
OLD | NEW |