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/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 protected: | 54 protected: |
55 virtual ~Delegate() {} | 55 virtual ~Delegate() {} |
56 }; | 56 }; |
57 | 57 |
58 StartupAppLauncher(Profile* profile, | 58 StartupAppLauncher(Profile* profile, |
59 const std::string& app_id, | 59 const std::string& app_id, |
60 bool diagnostic_mode, | 60 bool diagnostic_mode, |
61 Delegate* delegate); | 61 Delegate* delegate); |
62 | 62 |
63 virtual ~StartupAppLauncher(); | 63 ~StartupAppLauncher() override; |
64 | 64 |
65 // Prepares the environment for an app launch. | 65 // Prepares the environment for an app launch. |
66 void Initialize(); | 66 void Initialize(); |
67 | 67 |
68 // Continues the initialization after network is ready. | 68 // Continues the initialization after network is ready. |
69 void ContinueWithNetworkReady(); | 69 void ContinueWithNetworkReady(); |
70 | 70 |
71 // Launches the app after the initialization is successful. | 71 // Launches the app after the initialization is successful. |
72 void LaunchApp(); | 72 void LaunchApp(); |
73 | 73 |
(...skipping 19 matching lines...) Expand all Loading... |
93 void MaybeInitializeNetwork(); | 93 void MaybeInitializeNetwork(); |
94 void MaybeLaunchApp(); | 94 void MaybeLaunchApp(); |
95 | 95 |
96 void StartLoadingOAuthFile(); | 96 void StartLoadingOAuthFile(); |
97 static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params); | 97 static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params); |
98 void OnOAuthFileLoaded(KioskOAuthParams* auth_params); | 98 void OnOAuthFileLoaded(KioskOAuthParams* auth_params); |
99 | 99 |
100 void OnKioskAppDataLoadStatusChanged(const std::string& app_id); | 100 void OnKioskAppDataLoadStatusChanged(const std::string& app_id); |
101 | 101 |
102 // OAuth2TokenService::Observer overrides. | 102 // OAuth2TokenService::Observer overrides. |
103 virtual void OnRefreshTokenAvailable(const std::string& account_id) override; | 103 void OnRefreshTokenAvailable(const std::string& account_id) override; |
104 virtual void OnRefreshTokensLoaded() override; | 104 void OnRefreshTokensLoaded() override; |
105 | 105 |
106 // extensions::InstallObserver overrides. | 106 // extensions::InstallObserver overrides. |
107 virtual void OnFinishCrxInstall(const std::string& extension_id, | 107 void OnFinishCrxInstall(const std::string& extension_id, |
108 bool success) override; | 108 bool success) override; |
109 | 109 |
110 // KioskAppManagerObserver overrides. | 110 // KioskAppManagerObserver overrides. |
111 virtual void OnKioskExtensionLoadedInCache( | 111 void OnKioskExtensionLoadedInCache(const std::string& app_id) override; |
112 const std::string& app_id) override; | 112 void OnKioskExtensionDownloadFailed(const std::string& app_id) override; |
113 virtual void OnKioskExtensionDownloadFailed( | |
114 const std::string& app_id) override; | |
115 | 113 |
116 Profile* profile_; | 114 Profile* profile_; |
117 const std::string app_id_; | 115 const std::string app_id_; |
118 const bool diagnostic_mode_; | 116 const bool diagnostic_mode_; |
119 Delegate* delegate_; | 117 Delegate* delegate_; |
120 bool network_ready_handled_; | 118 bool network_ready_handled_; |
121 int launch_attempt_; | 119 int launch_attempt_; |
122 bool ready_to_launch_; | 120 bool ready_to_launch_; |
123 bool wait_for_crx_update_; | 121 bool wait_for_crx_update_; |
124 | 122 |
125 KioskOAuthParams auth_params_; | 123 KioskOAuthParams auth_params_; |
126 | 124 |
127 DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher); | 125 DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher); |
128 }; | 126 }; |
129 | 127 |
130 } // namespace chromeos | 128 } // namespace chromeos |
131 | 129 |
132 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ | 130 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_STARTUP_APP_LAUNCHER_H_ |
OLD | NEW |