| 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 20 matching lines...) Expand all Loading... |
| 31 class Extension; | 31 class Extension; |
| 32 class ExternalLoader; | 32 class ExternalLoader; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace chromeos { | 35 namespace chromeos { |
| 36 | 36 |
| 37 class KioskAppData; | 37 class KioskAppData; |
| 38 class KioskAppExternalLoader; | 38 class KioskAppExternalLoader; |
| 39 class KioskAppManagerObserver; | 39 class KioskAppManagerObserver; |
| 40 class KioskExternalUpdater; | 40 class KioskExternalUpdater; |
| 41 class OwnerSettingsServiceChromeOS; |
| 41 | 42 |
| 42 // KioskAppManager manages cached app data. | 43 // KioskAppManager manages cached app data. |
| 43 class KioskAppManager : public KioskAppDataDelegate, | 44 class KioskAppManager : public KioskAppDataDelegate, |
| 44 public ExternalCache::Delegate { | 45 public ExternalCache::Delegate { |
| 45 public: | 46 public: |
| 46 enum ConsumerKioskAutoLaunchStatus { | 47 enum ConsumerKioskAutoLaunchStatus { |
| 47 // Consumer kiosk mode auto-launch feature can be enabled on this machine. | 48 // Consumer kiosk mode auto-launch feature can be enabled on this machine. |
| 48 CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE, | 49 CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE, |
| 49 // Consumer kiosk auto-launch feature is enabled on this machine. | 50 // Consumer kiosk auto-launch feature is enabled on this machine. |
| 50 CONSUMER_KIOSK_AUTO_LAUNCH_ENABLED, | 51 CONSUMER_KIOSK_AUTO_LAUNCH_ENABLED, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void EnableConsumerKioskAutoLaunch( | 115 void EnableConsumerKioskAutoLaunch( |
| 115 const EnableKioskAutoLaunchCallback& callback); | 116 const EnableKioskAutoLaunchCallback& callback); |
| 116 | 117 |
| 117 // Returns true if this device is consumer kiosk auto launch enabled. | 118 // Returns true if this device is consumer kiosk auto launch enabled. |
| 118 bool IsConsumerKioskDeviceWithAutoLaunch(); | 119 bool IsConsumerKioskDeviceWithAutoLaunch(); |
| 119 | 120 |
| 120 // Returns auto launcher app id or an empty string if there is none. | 121 // Returns auto launcher app id or an empty string if there is none. |
| 121 std::string GetAutoLaunchApp() const; | 122 std::string GetAutoLaunchApp() const; |
| 122 | 123 |
| 123 // Sets |app_id| as the app to auto launch at start up. | 124 // Sets |app_id| as the app to auto launch at start up. |
| 124 void SetAutoLaunchApp(const std::string& app_id); | 125 void SetAutoLaunchApp(const std::string& app_id, |
| 126 OwnerSettingsServiceChromeOS* service); |
| 125 | 127 |
| 126 // Returns true if there is a pending auto-launch request. | 128 // Returns true if there is a pending auto-launch request. |
| 127 bool IsAutoLaunchRequested() const; | 129 bool IsAutoLaunchRequested() const; |
| 128 | 130 |
| 129 // Returns true if owner/policy enabled auto launch. | 131 // Returns true if owner/policy enabled auto launch. |
| 130 bool IsAutoLaunchEnabled() const; | 132 bool IsAutoLaunchEnabled() const; |
| 131 | 133 |
| 132 // Enable auto launch setter. | 134 // Enable auto launch setter. |
| 133 void SetEnableAutoLaunch(bool value); | 135 void SetEnableAutoLaunch(bool value); |
| 134 | 136 |
| 135 // Adds/removes a kiosk app by id. When removed, all locally cached data | 137 // Adds/removes a kiosk app by id. When removed, all locally cached data |
| 136 // will be removed as well. | 138 // will be removed as well. |
| 137 void AddApp(const std::string& app_id); | 139 void AddApp(const std::string& app_id, OwnerSettingsServiceChromeOS* service); |
| 138 void RemoveApp(const std::string& app_id); | 140 void RemoveApp(const std::string& app_id, |
| 141 OwnerSettingsServiceChromeOS* service); |
| 139 | 142 |
| 140 // Gets info of all apps that have no meta data load error. | 143 // Gets info of all apps that have no meta data load error. |
| 141 void GetApps(Apps* apps) const; | 144 void GetApps(Apps* apps) const; |
| 142 | 145 |
| 143 // Gets app data for the given app id. Returns true if |app_id| is known and | 146 // Gets app data for the given app id. Returns true if |app_id| is known and |
| 144 // |app| is populated. Otherwise, return false. | 147 // |app| is populated. Otherwise, return false. |
| 145 bool GetApp(const std::string& app_id, App* app) const; | 148 bool GetApp(const std::string& app_id, App* app) const; |
| 146 | 149 |
| 147 // Gets whether the bailout shortcut is disabled. | 150 // Gets whether the bailout shortcut is disabled. |
| 148 bool GetDisableBailoutShortcut() const; | 151 bool GetDisableBailoutShortcut() const; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // The extension external loader for installing kiosk app. | 291 // The extension external loader for installing kiosk app. |
| 289 bool external_loader_created_; | 292 bool external_loader_created_; |
| 290 base::WeakPtr<KioskAppExternalLoader> external_loader_; | 293 base::WeakPtr<KioskAppExternalLoader> external_loader_; |
| 291 | 294 |
| 292 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); | 295 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); |
| 293 }; | 296 }; |
| 294 | 297 |
| 295 } // namespace chromeos | 298 } // namespace chromeos |
| 296 | 299 |
| 297 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ | 300 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
| OLD | NEW |