| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 class Profile; | 12 class Profile; |
| 13 | 13 |
| 14 namespace arc { | 14 namespace arc { |
| 15 | 15 |
| 16 class ArcPlayStoreEnabledPreferenceHandler; |
| 16 class ArcServiceManager; | 17 class ArcServiceManager; |
| 17 class ArcSessionManager; | 18 class ArcSessionManager; |
| 18 | 19 |
| 19 // Detects ARC availability and launches ARC bridge service. | 20 // Detects ARC availability and launches ARC bridge service. |
| 20 class ArcServiceLauncher { | 21 class ArcServiceLauncher { |
| 21 public: | 22 public: |
| 22 ArcServiceLauncher(); | 23 ArcServiceLauncher(); |
| 23 ~ArcServiceLauncher(); | 24 ~ArcServiceLauncher(); |
| 24 | 25 |
| 25 // This is to access OnPrimaryUserProfilePrepared() only. | 26 // This is to access OnPrimaryUserProfilePrepared() only. |
| 26 static ArcServiceLauncher* Get(); | 27 static ArcServiceLauncher* Get(); |
| 27 | 28 |
| 28 // Called before the main MessageLooop starts. | 29 // Called before the main MessageLooop starts. |
| 29 void Initialize(); | 30 void Initialize(); |
| 30 | 31 |
| 31 // Called after the main MessageLoop stops, but before the Profile is | 32 // Called after the main MessageLoop stops, but before the Profile is |
| 32 // destroyed. | 33 // destroyed. |
| 33 void Shutdown(); | 34 void Shutdown(); |
| 34 | 35 |
| 35 // Called when the main profile is initialized after user logs in. | 36 // Called when the main profile is initialized after user logs in. |
| 36 void OnPrimaryUserProfilePrepared(Profile* profile); | 37 void OnPrimaryUserProfilePrepared(Profile* profile); |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 std::unique_ptr<ArcServiceManager> arc_service_manager_; | 40 std::unique_ptr<ArcServiceManager> arc_service_manager_; |
| 40 std::unique_ptr<ArcSessionManager> arc_session_manager_; | 41 std::unique_ptr<ArcSessionManager> arc_session_manager_; |
| 42 std::unique_ptr<ArcPlayStoreEnabledPreferenceHandler> |
| 43 arc_play_store_enabled_preference_handler_; |
| 41 | 44 |
| 42 DISALLOW_COPY_AND_ASSIGN(ArcServiceLauncher); | 45 DISALLOW_COPY_AND_ASSIGN(ArcServiceLauncher); |
| 43 }; | 46 }; |
| 44 | 47 |
| 45 } // namespace arc | 48 } // namespace arc |
| 46 | 49 |
| 47 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ | 50 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SERVICE_LAUNCHER_H_ |
| OLD | NEW |