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

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

Issue 1496193002: arc: Add ArcServiceManager to own all future ARC services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: readded file Created 5 years 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
(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 services that communicate with the ARC
24 // instance via the ArcBridgeService.
25 class ArcServiceManager {
26 public:
27 ArcServiceManager(
28 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
29 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner);
30 virtual ~ArcServiceManager();
31
32 // |arc_bridge_service| can only be accessed on the thread that this
33 // class was created on.
34 ArcBridgeService* arc_bridge_service();
35
36 // Gets the global instance of the ARC Service Manager. This can only be
37 // called on the thread that this class was created on.
38 static ArcServiceManager* Get();
39
40 private:
41 scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
42 scoped_ptr<ArcBridgeService> arc_bridge_service_;
43
44 DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
45 };
46
47 } // namespace arc
48
49 #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