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_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 bool using_saml); | 126 bool using_saml); |
127 | 127 |
128 void HandleUsingSAMLAPI(); | 128 void HandleUsingSAMLAPI(); |
129 void HandleScrapedPasswordCount(int password_count); | 129 void HandleScrapedPasswordCount(int password_count); |
130 void HandleScrapedPasswordVerificationFailed(); | 130 void HandleScrapedPasswordVerificationFailed(); |
131 | 131 |
132 void HandleGaiaUIReady(); | 132 void HandleGaiaUIReady(); |
133 | 133 |
134 void HandleToggleEasyBootstrap(); | 134 void HandleToggleEasyBootstrap(); |
135 | 135 |
| 136 void HandleAttemptLogin(const std::string& email); |
| 137 |
136 void HandleToggleWebviewSignin(); | 138 void HandleToggleWebviewSignin(); |
137 | 139 |
138 // This is called when ConsumerManagementService::SetOwner() returns. | 140 // This is called when ConsumerManagementService::SetOwner() returns. |
139 void OnSetOwnerDone(const std::string& gaia_id, | 141 void OnSetOwnerDone(const std::string& gaia_id, |
140 const std::string& typed_email, | 142 const std::string& typed_email, |
141 const std::string& password, | 143 const std::string& password, |
142 bool using_saml, | 144 bool using_saml, |
143 bool success); | 145 bool success); |
144 | 146 |
145 // Really handles the complete login message. | 147 // Really handles the complete login message. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 197 |
196 // TODO (antrim@): GaiaScreenHandler should implement | 198 // TODO (antrim@): GaiaScreenHandler should implement |
197 // NetworkStateInformer::Observer. | 199 // NetworkStateInformer::Observer. |
198 void UpdateState(NetworkError::ErrorReason reason); | 200 void UpdateState(NetworkError::ErrorReason reason); |
199 | 201 |
200 // TODO (antrim@): remove this dependency. | 202 // TODO (antrim@): remove this dependency. |
201 void SetSigninScreenHandler(SigninScreenHandler* handler); | 203 void SetSigninScreenHandler(SigninScreenHandler* handler); |
202 | 204 |
203 SigninScreenHandlerDelegate* Delegate(); | 205 SigninScreenHandlerDelegate* Delegate(); |
204 | 206 |
| 207 // Returns temporary unused device Id. |
| 208 std::string GetTemporaryDeviceId(); |
| 209 |
205 // Current state of Gaia frame. | 210 // Current state of Gaia frame. |
206 FrameState frame_state_; | 211 FrameState frame_state_; |
207 | 212 |
208 // Latest Gaia frame error. | 213 // Latest Gaia frame error. |
209 net::Error frame_error_; | 214 net::Error frame_error_; |
210 | 215 |
211 // Network state informer used to keep signin screen up. | 216 // Network state informer used to keep signin screen up. |
212 scoped_refptr<NetworkStateInformer> network_state_informer_; | 217 scoped_refptr<NetworkStateInformer> network_state_informer_; |
213 | 218 |
214 // Consumer management service for checking if enrollment is in progress. | 219 // Consumer management service for checking if enrollment is in progress. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 266 |
262 // Non-owning ptr to SigninScreenHandler instance. Should not be used | 267 // Non-owning ptr to SigninScreenHandler instance. Should not be used |
263 // in dtor. | 268 // in dtor. |
264 // TODO (antrim@): GaiaScreenHandler shouldn't communicate with | 269 // TODO (antrim@): GaiaScreenHandler shouldn't communicate with |
265 // signin_screen_handler directly. | 270 // signin_screen_handler directly. |
266 SigninScreenHandler* signin_screen_handler_; | 271 SigninScreenHandler* signin_screen_handler_; |
267 | 272 |
268 // GAIA extension loader. | 273 // GAIA extension loader. |
269 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; | 274 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; |
270 | 275 |
| 276 // Temporary DeviceId to be used for new users. |
| 277 // If it's empty, new deviceId should be generated. |
| 278 std::string temporary_device_id_; |
| 279 |
271 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; | 280 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; |
272 | 281 |
273 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); | 282 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); |
274 }; | 283 }; |
275 | 284 |
276 } // namespace chromeos | 285 } // namespace chromeos |
277 | 286 |
278 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 287 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
OLD | NEW |