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

Unified 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: nit fix 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/arc_service_manager.h
diff --git a/components/arc/arc_service_manager.h b/components/arc/arc_service_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..7190df1496e3b1e52c1219ea97e89d61754aa711
--- /dev/null
+++ b/components/arc/arc_service_manager.h
@@ -0,0 +1,48 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
+#define COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace base {
+
+class SequencedTaskRunner;
+class SingleThreadTaskRunner;
+
+} // namespace base
+
+namespace arc {
+
+class ArcBridgeService;
+
+// Manages creation and destruction of ARC related services.
+class ArcServiceManager {
oshima 2015/12/04 18:33:34 Consider adding comment to avoid adding unrelated
denniskempin 2015/12/04 19:12:25 Done.
+ public:
+ ArcServiceManager(
+ const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
+ const scoped_refptr<base::SequencedTaskRunner>& file_task_runner);
+ virtual ~ArcServiceManager();
+
+ // |arc_bridge_service| can only be accessed on the thread that this
+ // class was created on.
+ ArcBridgeService* arc_bridge_service();
+
+ // Gets the global instance of the ARC Service Manager. This can only be
+ // called on the thread that this class was created on.
+ static ArcServiceManager* Get();
+
+ private:
+ scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
+ scoped_ptr<ArcBridgeService> arc_bridge_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_ARC_ARC_SERVICE_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698