| 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_SESSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "chrome/browser/chromeos/arc/arc_support_host.h" | 16 #include "chrome/browser/chromeos/arc/arc_support_host.h" |
| 17 #include "chrome/browser/chromeos/policy/android_management_client.h" | 17 #include "chrome/browser/chromeos/policy/android_management_client.h" |
| 18 #include "components/arc/arc_session_observer.h" | 18 #include "components/arc/arc_session_observer.h" |
| 19 #include "components/prefs/pref_change_registrar.h" | 19 #include "components/prefs/pref_change_registrar.h" |
| 20 #include "components/sync_preferences/pref_service_syncable_observer.h" | 20 #include "components/sync_preferences/pref_service_syncable_observer.h" |
| 21 | 21 |
| 22 class ArcAppLauncher; | 22 class ArcAppLauncher; |
| 23 class Profile; | 23 class Profile; |
| 24 | 24 |
| 25 namespace ash { | |
| 26 class ShelfDelegate; | |
| 27 } | |
| 28 | |
| 29 namespace user_prefs { | 25 namespace user_prefs { |
| 30 class PrefRegistrySyncable; | 26 class PrefRegistrySyncable; |
| 31 } | 27 } |
| 32 | 28 |
| 33 namespace arc { | 29 namespace arc { |
| 34 | 30 |
| 35 class ArcAndroidManagementChecker; | 31 class ArcAndroidManagementChecker; |
| 36 class ArcAuthInfoFetcher; | 32 class ArcAuthInfoFetcher; |
| 37 class ArcAuthContext; | 33 class ArcAuthContext; |
| 38 class ArcSessionRunner; | 34 class ArcSessionRunner; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 107 |
| 112 static ArcSessionManager* Get(); | 108 static ArcSessionManager* Get(); |
| 113 | 109 |
| 114 // Exposed here for unit_tests validation. | 110 // Exposed here for unit_tests validation. |
| 115 static bool IsOobeOptInActive(); | 111 static bool IsOobeOptInActive(); |
| 116 | 112 |
| 117 // It is called from chrome/browser/prefs/browser_prefs.cc. | 113 // It is called from chrome/browser/prefs/browser_prefs.cc. |
| 118 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 114 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 119 | 115 |
| 120 static void DisableUIForTesting(); | 116 static void DisableUIForTesting(); |
| 121 static void SetShelfDelegateForTesting(ash::ShelfDelegate* shelf_delegate); | |
| 122 static void EnableCheckAndroidManagementForTesting(); | 117 static void EnableCheckAndroidManagementForTesting(); |
| 123 | 118 |
| 124 // Returns true if ARC is allowed to run for the current session. | 119 // Returns true if ARC is allowed to run for the current session. |
| 125 // TODO(hidehiko): The name is very close to IsArcAllowedForProfile(), but | 120 // TODO(hidehiko): The name is very close to IsArcAllowedForProfile(), but |
| 126 // has different meaning. Clean this up. | 121 // has different meaning. Clean this up. |
| 127 bool IsAllowed() const; | 122 bool IsAllowed() const; |
| 128 | 123 |
| 129 void OnPrimaryUserProfilePrepared(Profile* profile); | 124 void OnPrimaryUserProfilePrepared(Profile* profile); |
| 130 void Shutdown(); | 125 void Shutdown(); |
| 131 | 126 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); | 295 DISALLOW_COPY_AND_ASSIGN(ArcSessionManager); |
| 301 }; | 296 }; |
| 302 | 297 |
| 303 // Outputs the stringified |state| to |os|. This is only for logging purposes. | 298 // Outputs the stringified |state| to |os|. This is only for logging purposes. |
| 304 std::ostream& operator<<(std::ostream& os, | 299 std::ostream& operator<<(std::ostream& os, |
| 305 const ArcSessionManager::State& state); | 300 const ArcSessionManager::State& state); |
| 306 | 301 |
| 307 } // namespace arc | 302 } // namespace arc |
| 308 | 303 |
| 309 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ | 304 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_SESSION_MANAGER_H_ |
| OLD | NEW |