| 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_STARTUP_APP_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 std::string refresh_token; | 83 std::string refresh_token; |
| 84 std::string client_id; | 84 std::string client_id; |
| 85 std::string client_secret; | 85 std::string client_secret; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 void OnLaunchSuccess(); | 88 void OnLaunchSuccess(); |
| 89 void OnLaunchFailure(KioskAppLaunchError::Error error); | 89 void OnLaunchFailure(KioskAppLaunchError::Error error); |
| 90 | 90 |
| 91 void BeginInstall(); | 91 void BeginInstall(); |
| 92 void OnReadyToLaunch(); | 92 void OnReadyToLaunch(); |
| 93 void UpdateAppData(); | 93 void MaybeUpdateAppData(); |
| 94 | 94 |
| 95 void InitializeTokenService(); | 95 void InitializeTokenService(); |
| 96 void MaybeInitializeNetwork(); | 96 void MaybeInitializeNetwork(); |
| 97 void MaybeInstallSecondaryApps(); | 97 void MaybeInstallSecondaryApps(); |
| 98 void MaybeLaunchApp(); | 98 void MaybeLaunchApp(); |
| 99 | 99 |
| 100 void MaybeCheckExtensionUpdate(); | 100 void MaybeCheckExtensionUpdate(); |
| 101 void OnExtensionUpdateCheckFinished(); | 101 void OnExtensionUpdateCheckFinished(); |
| 102 | 102 |
| 103 void StartLoadingOAuthFile(); | 103 void StartLoadingOAuthFile(); |
| 104 static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params); | 104 static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params); |
| 105 void OnOAuthFileLoaded(KioskOAuthParams* auth_params); | 105 void OnOAuthFileLoaded(KioskOAuthParams* auth_params); |
| 106 | 106 |
| 107 void OnKioskAppDataLoadStatusChanged(const std::string& app_id); | 107 void OnKioskAppDataLoadStatusChanged(const std::string& app_id); |
| 108 | 108 |
| 109 // Returns true if any secondary app is pending. | 109 // Returns true if any secondary app is pending. |
| 110 bool IsAnySecondaryAppPending() const; | 110 bool IsAnySecondaryAppPending() const; |
| 111 | 111 |
| 112 // Returns true if all secondary apps have been installed. | 112 // Returns true if all secondary apps have been installed. |
| 113 bool AreSecondaryAppsInstalled() const; | 113 bool AreSecondaryAppsInstalled() const; |
| 114 | 114 |
| 115 // Returns true if secondary apps are declared in manifest. | 115 // Returns true if secondary apps are declared in manifest. |
| 116 bool HasSecondaryApps() const; | 116 bool HasSecondaryApps() const; |
| 117 | 117 |
| 118 // Returns true if the primary app has a pending update. |
| 119 bool PrimaryAppHasPendingUpdate() const; |
| 120 |
| 118 // Returns true if the app with |id| failed, and it is the primary or one of | 121 // Returns true if the app with |id| failed, and it is the primary or one of |
| 119 // the secondary apps. | 122 // the secondary apps. |
| 120 bool DidPrimaryOrSecondaryAppFailedToInstall(bool success, | 123 bool DidPrimaryOrSecondaryAppFailedToInstall(bool success, |
| 121 const std::string& id) const; | 124 const std::string& id) const; |
| 122 | 125 |
| 123 const extensions::Extension* GetPrimaryAppExtension() const; | 126 const extensions::Extension* GetPrimaryAppExtension() const; |
| 124 | 127 |
| 125 // OAuth2TokenService::Observer overrides. | 128 // OAuth2TokenService::Observer overrides. |
| 126 void OnRefreshTokenAvailable(const std::string& account_id) override; | 129 void OnRefreshTokenAvailable(const std::string& account_id) override; |
| 127 void OnRefreshTokensLoaded() override; | 130 void OnRefreshTokensLoaded() override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 152 | 155 |
| 153 KioskOAuthParams auth_params_; | 156 KioskOAuthParams auth_params_; |
| 154 content::NotificationRegistrar registrar_; | 157 content::NotificationRegistrar registrar_; |
| 155 | 158 |
| 156 DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher); | 159 DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher); |
| 157 }; | 160 }; |
| 158 | 161 |
| 159 } // namespace chromeos | 162 } // namespace chromeos |
| 160 | 163 |
| 161 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ | 164 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ |
| OLD | NEW |