Chromium Code Reviews| 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..683090c15dbb7768ee9d1ec44ebda223a0d0cc0e |
| --- /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 Launch(); |
|
xiyuan
2016/02/26 17:38:01
nit: Launch -> Initialize, Initialize is used in a
arthurhsu
2016/02/26 19:10:06
Done.
|
| + 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_ |