| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_APP_MODE_KIOSK_APP_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 friend class KioskUpdateTest; | 210 friend class KioskUpdateTest; |
| 211 | 211 |
| 212 enum AutoLoginState { | 212 enum AutoLoginState { |
| 213 AUTOLOGIN_NONE = 0, | 213 AUTOLOGIN_NONE = 0, |
| 214 AUTOLOGIN_REQUESTED = 1, | 214 AUTOLOGIN_REQUESTED = 1, |
| 215 AUTOLOGIN_APPROVED = 2, | 215 AUTOLOGIN_APPROVED = 2, |
| 216 AUTOLOGIN_REJECTED = 3, | 216 AUTOLOGIN_REJECTED = 3, |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 KioskAppManager(); | 219 KioskAppManager(); |
| 220 virtual ~KioskAppManager(); | 220 ~KioskAppManager() override; |
| 221 | 221 |
| 222 // Stop all data loading and remove its dependency on CrosSettings. | 222 // Stop all data loading and remove its dependency on CrosSettings. |
| 223 void CleanUp(); | 223 void CleanUp(); |
| 224 | 224 |
| 225 // Gets KioskAppData for the given app id. | 225 // Gets KioskAppData for the given app id. |
| 226 const KioskAppData* GetAppData(const std::string& app_id) const; | 226 const KioskAppData* GetAppData(const std::string& app_id) const; |
| 227 KioskAppData* GetAppDataMutable(const std::string& app_id); | 227 KioskAppData* GetAppDataMutable(const std::string& app_id); |
| 228 | 228 |
| 229 // Updates app data |apps_| based on CrosSettings. | 229 // Updates app data |apps_| based on CrosSettings. |
| 230 void UpdateAppData(); | 230 void UpdateAppData(); |
| 231 | 231 |
| 232 // KioskAppDataDelegate overrides: | 232 // KioskAppDataDelegate overrides: |
| 233 virtual void GetKioskAppIconCacheDir(base::FilePath* cache_dir) override; | 233 void GetKioskAppIconCacheDir(base::FilePath* cache_dir) override; |
| 234 virtual void OnKioskAppDataChanged(const std::string& app_id) override; | 234 void OnKioskAppDataChanged(const std::string& app_id) override; |
| 235 virtual void OnKioskAppDataLoadFailure(const std::string& app_id) override; | 235 void OnKioskAppDataLoadFailure(const std::string& app_id) override; |
| 236 | 236 |
| 237 // ExternalCache::Delegate: | 237 // ExternalCache::Delegate: |
| 238 virtual void OnExtensionListsUpdated( | 238 void OnExtensionListsUpdated(const base::DictionaryValue* prefs) override; |
| 239 const base::DictionaryValue* prefs) override; | 239 void OnExtensionLoadedInCache(const std::string& id) override; |
| 240 virtual void OnExtensionLoadedInCache(const std::string& id) override; | 240 void OnExtensionDownloadFailed( |
| 241 virtual void OnExtensionDownloadFailed( | |
| 242 const std::string& id, | 241 const std::string& id, |
| 243 extensions::ExtensionDownloaderDelegate::Error error) override; | 242 extensions::ExtensionDownloaderDelegate::Error error) override; |
| 244 | 243 |
| 245 // Callback for EnterpriseInstallAttributes::LockDevice() during | 244 // Callback for EnterpriseInstallAttributes::LockDevice() during |
| 246 // EnableConsumerModeKiosk() call. | 245 // EnableConsumerModeKiosk() call. |
| 247 void OnLockDevice( | 246 void OnLockDevice( |
| 248 const EnableKioskAutoLaunchCallback& callback, | 247 const EnableKioskAutoLaunchCallback& callback, |
| 249 policy::EnterpriseInstallAttributes::LockResult result); | 248 policy::EnterpriseInstallAttributes::LockResult result); |
| 250 | 249 |
| 251 // Callback for EnterpriseInstallAttributes::ReadImmutableAttributes() during | 250 // Callback for EnterpriseInstallAttributes::ReadImmutableAttributes() during |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // The extension external loader for installing kiosk app. | 284 // The extension external loader for installing kiosk app. |
| 286 bool external_loader_created_; | 285 bool external_loader_created_; |
| 287 base::WeakPtr<KioskAppExternalLoader> external_loader_; | 286 base::WeakPtr<KioskAppExternalLoader> external_loader_; |
| 288 | 287 |
| 289 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); | 288 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); |
| 290 }; | 289 }; |
| 291 | 290 |
| 292 } // namespace chromeos | 291 } // namespace chromeos |
| 293 | 292 |
| 294 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ | 293 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
| OLD | NEW |