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

Unified Diff: chrome/browser/chromeos/arc/arc_service_launcher.h

Issue 1701063003: Refactor ArcBridgeService detection and initialization to a separate class ArcServiceLauncher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reviewer feedback Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_service_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_service_launcher.h
diff --git a/chrome/browser/chromeos/arc/arc_service_launcher.h b/chrome/browser/chromeos/arc/arc_service_launcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..75236ee56a2af3206b32b689ecda8d02bf826b89
--- /dev/null
+++ b/chrome/browser/chromeos/arc/arc_service_launcher.h
@@ -0,0 +1,38 @@
+// Copyright 2016 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 CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/threading/thread_checker.h"
+#include "components/arc/arc_service_manager.h"
+
+namespace arc {
+
+// Detects ARC availability and launches ARC bridge service.
+class ArcServiceLauncher {
+ public:
+ ArcServiceLauncher();
+ ~ArcServiceLauncher();
+
+ void Initialize();
+ void Shutdown();
+
+ private:
+ // DBus callback.
+ void OnArcAvailable(bool available);
+
+ base::ThreadChecker thread_checker_;
+ scoped_ptr<ArcServiceManager> arc_service_manager_;
+ base::WeakPtrFactory<ArcServiceLauncher> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcServiceLauncher);
+};
+
+} // namespace arc
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_service_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698