| 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 <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // |success| indicates if all the updates are completed successfully. | 211 // |success| indicates if all the updates are completed successfully. |
| 212 void OnKioskAppExternalUpdateComplete(bool success); | 212 void OnKioskAppExternalUpdateComplete(bool success); |
| 213 | 213 |
| 214 // Installs the validated external extension into cache. | 214 // Installs the validated external extension into cache. |
| 215 void PutValidatedExternalExtension( | 215 void PutValidatedExternalExtension( |
| 216 const std::string& app_id, | 216 const std::string& app_id, |
| 217 const base::FilePath& crx_path, | 217 const base::FilePath& crx_path, |
| 218 const std::string& version, | 218 const std::string& version, |
| 219 const ExternalCache::PutExternalExtensionCallback& callback); | 219 const ExternalCache::PutExternalExtensionCallback& callback); |
| 220 | 220 |
| 221 bool external_loader_created() const { return external_loader_created_; } | 221 // Whether the current platform is compliant with the given required |
| 222 bool secondary_app_external_loader_created() const { | 222 // platform version. |
| 223 return secondary_app_external_loader_created_; | 223 bool IsPlatformCompliant(const std::string& required_platform_version) const; |
| 224 } | 224 |
| 225 // Whether the platform is compliant for the given app. |
| 226 bool IsPlatformCompliantWithApp(const extensions::Extension* app) const; |
| 225 | 227 |
| 226 // Notifies the KioskAppManager that a given app was auto-launched | 228 // Notifies the KioskAppManager that a given app was auto-launched |
| 227 // automatically with no delay on startup. Certain privacy-sensitive | 229 // automatically with no delay on startup. Certain privacy-sensitive |
| 228 // kiosk-mode behavior (such as network reporting) is only enabled for | 230 // kiosk-mode behavior (such as network reporting) is only enabled for |
| 229 // kiosk apps that are immediately auto-launched on startup. | 231 // kiosk apps that are immediately auto-launched on startup. |
| 230 void SetAppWasAutoLaunchedWithZeroDelay(const std::string& app_id); | 232 void SetAppWasAutoLaunchedWithZeroDelay(const std::string& app_id); |
| 231 | 233 |
| 232 // Initialize |app_session_|. | 234 // Initialize |app_session_|. |
| 233 void InitSession(Profile* profile, const std::string& app_id); | 235 void InitSession(Profile* profile, const std::string& app_id); |
| 234 | 236 |
| 235 AppSession* app_session() { return app_session_.get(); } | 237 AppSession* app_session() { return app_session_.get(); } |
| 238 bool external_loader_created() const { return external_loader_created_; } |
| 239 bool secondary_app_external_loader_created() const { |
| 240 return secondary_app_external_loader_created_; |
| 241 } |
| 236 | 242 |
| 237 private: | 243 private: |
| 238 friend struct base::DefaultLazyInstanceTraits<KioskAppManager>; | 244 friend struct base::DefaultLazyInstanceTraits<KioskAppManager>; |
| 239 friend std::default_delete<KioskAppManager>; | 245 friend std::default_delete<KioskAppManager>; |
| 240 friend class KioskAppManagerTest; | 246 friend class KioskAppManagerTest; |
| 241 friend class KioskTest; | 247 friend class KioskTest; |
| 242 friend class KioskUpdateTest; | 248 friend class KioskUpdateTest; |
| 243 | 249 |
| 244 enum AutoLoginState { | 250 enum AutoLoginState { |
| 245 AUTOLOGIN_NONE = 0, | 251 AUTOLOGIN_NONE = 0, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 base::WeakPtr<KioskAppExternalLoader> secondary_app_external_loader_; | 337 base::WeakPtr<KioskAppExternalLoader> secondary_app_external_loader_; |
| 332 | 338 |
| 333 std::unique_ptr<AppSession> app_session_; | 339 std::unique_ptr<AppSession> app_session_; |
| 334 | 340 |
| 335 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); | 341 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); |
| 336 }; | 342 }; |
| 337 | 343 |
| 338 } // namespace chromeos | 344 } // namespace chromeos |
| 339 | 345 |
| 340 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ | 346 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
| OLD | NEW |