OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_SIGNIN_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void SetDelegate(SigninScreenHandlerDelegate* delegate); | 186 void SetDelegate(SigninScreenHandlerDelegate* delegate); |
187 | 187 |
188 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); | 188 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); |
189 | 189 |
190 // NetworkStateInformer::NetworkStateInformerObserver implementation: | 190 // NetworkStateInformer::NetworkStateInformerObserver implementation: |
191 virtual void OnNetworkReady() OVERRIDE; | 191 virtual void OnNetworkReady() OVERRIDE; |
192 | 192 |
193 virtual void UpdateState(NetworkStateInformer::State state, | 193 virtual void UpdateState(NetworkStateInformer::State state, |
194 ErrorScreenActor::ErrorReason reason) OVERRIDE; | 194 ErrorScreenActor::ErrorReason reason) OVERRIDE; |
195 | 195 |
| 196 // Required Local State preferences. |
| 197 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 198 |
196 private: | 199 private: |
197 enum UIState { | 200 enum UIState { |
198 UI_STATE_UNKNOWN = 0, | 201 UI_STATE_UNKNOWN = 0, |
199 UI_STATE_GAIA_SIGNIN, | 202 UI_STATE_GAIA_SIGNIN, |
200 UI_STATE_ACCOUNT_PICKER, | 203 UI_STATE_ACCOUNT_PICKER, |
201 }; | 204 }; |
202 | 205 |
203 enum FrameState { | 206 enum FrameState { |
204 FRAME_STATE_UNKNOWN = 0, | 207 FRAME_STATE_UNKNOWN = 0, |
205 FRAME_STATE_LOADING, | 208 FRAME_STATE_LOADING, |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 375 |
373 // Returns true if guest signin is allowed. | 376 // Returns true if guest signin is allowed. |
374 bool IsGuestSigninAllowed() const; | 377 bool IsGuestSigninAllowed() const; |
375 | 378 |
376 // Returns true if offline login is allowed. | 379 // Returns true if offline login is allowed. |
377 bool IsOfflineLoginAllowed() const; | 380 bool IsOfflineLoginAllowed() const; |
378 | 381 |
379 // Attempts login for test. | 382 // Attempts login for test. |
380 void SubmitLoginFormForTest(); | 383 void SubmitLoginFormForTest(); |
381 | 384 |
| 385 // Update current input method (namely keyboard layout) to LRU by this user. |
| 386 void SetUserInputMethod(const std::string& username); |
| 387 |
| 388 // Update current input method to HW default. |
| 389 void SetUserInputMethodHWDefault(); |
| 390 |
382 // Current UI state of the signin screen. | 391 // Current UI state of the signin screen. |
383 UIState ui_state_; | 392 UIState ui_state_; |
384 | 393 |
385 // Current state of Gaia frame. | 394 // Current state of Gaia frame. |
386 FrameState frame_state_; | 395 FrameState frame_state_; |
387 | 396 |
388 // Latest Gaia frame error. | 397 // Latest Gaia frame error. |
389 net::Error frame_error_; | 398 net::Error frame_error_; |
390 | 399 |
391 // A delegate that glues this handler with backend LoginDisplay. | 400 // A delegate that glues this handler with backend LoginDisplay. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or | 467 // NOTIFICATION_AUTH_NEEDED and reset on either NOTIFICATION_AUTH_SUPPLIED or |
459 // NOTIFICATION_AUTH_CANCELLED. | 468 // NOTIFICATION_AUTH_CANCELLED. |
460 bool has_pending_auth_ui_; | 469 bool has_pending_auth_ui_; |
461 | 470 |
462 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 471 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
463 }; | 472 }; |
464 | 473 |
465 } // namespace chromeos | 474 } // namespace chromeos |
466 | 475 |
467 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 476 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |