| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" | 18 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" |
| 19 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" | 19 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" |
| 20 #include "chrome/browser/chromeos/login/ui/login_display.h" | 20 #include "chrome/browser/chromeos/login/ui/login_display.h" |
| 21 #include "chrome/browser/chromeos/login/users/user_manager.h" | 21 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 22 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 22 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 23 #include "chrome/browser/chromeos/settings/cros_settings.h" | 23 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 24 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 24 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
| 25 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
| 26 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 27 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 27 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 28 #include "chromeos/ime/ime_keyboard.h" |
| 28 #include "content/public/browser/notification_observer.h" | 29 #include "content/public/browser/notification_observer.h" |
| 29 #include "content/public/browser/notification_registrar.h" | 30 #include "content/public/browser/notification_registrar.h" |
| 30 #include "content/public/browser/web_ui.h" | 31 #include "content/public/browser/web_ui.h" |
| 31 #include "net/base/net_errors.h" | 32 #include "net/base/net_errors.h" |
| 32 #include "ui/events/event_handler.h" | 33 #include "ui/events/event_handler.h" |
| 33 | 34 |
| 34 namespace base { | 35 namespace base { |
| 35 class DictionaryValue; | 36 class DictionaryValue; |
| 36 class ListValue; | 37 class ListValue; |
| 37 } | 38 } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 virtual ~SigninScreenHandlerDelegate() {} | 200 virtual ~SigninScreenHandlerDelegate() {} |
| 200 }; | 201 }; |
| 201 | 202 |
| 202 // A class that handles the WebUI hooks in sign-in screen in OobeDisplay | 203 // A class that handles the WebUI hooks in sign-in screen in OobeDisplay |
| 203 // and LoginDisplay. | 204 // and LoginDisplay. |
| 204 class SigninScreenHandler | 205 class SigninScreenHandler |
| 205 : public BaseScreenHandler, | 206 : public BaseScreenHandler, |
| 206 public LoginDisplayWebUIHandler, | 207 public LoginDisplayWebUIHandler, |
| 207 public content::NotificationObserver, | 208 public content::NotificationObserver, |
| 208 public ui::EventHandler, | 209 public ui::EventHandler, |
| 209 public NetworkStateInformer::NetworkStateInformerObserver { | 210 public NetworkStateInformer::NetworkStateInformerObserver, |
| 211 public input_method::ImeKeyboard::Observer { |
| 210 public: | 212 public: |
| 211 SigninScreenHandler( | 213 SigninScreenHandler( |
| 212 const scoped_refptr<NetworkStateInformer>& network_state_informer, | 214 const scoped_refptr<NetworkStateInformer>& network_state_informer, |
| 213 ErrorScreenActor* error_screen_actor, | 215 ErrorScreenActor* error_screen_actor, |
| 214 CoreOobeActor* core_oobe_actor, | 216 CoreOobeActor* core_oobe_actor, |
| 215 GaiaScreenHandler* gaia_screen_handler); | 217 GaiaScreenHandler* gaia_screen_handler); |
| 216 virtual ~SigninScreenHandler(); | 218 virtual ~SigninScreenHandler(); |
| 217 | 219 |
| 218 // Shows the sign in screen. | 220 // Shows the sign in screen. |
| 219 void Show(const LoginScreenContext& context); | 221 void Show(const LoginScreenContext& context); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // Shows signin screen for |email|. | 443 // Shows signin screen for |email|. |
| 442 void OnShowAddUser(const std::string& email); | 444 void OnShowAddUser(const std::string& email); |
| 443 | 445 |
| 444 // Updates the member variable and UMA histogram indicating whether the | 446 // Updates the member variable and UMA histogram indicating whether the |
| 445 // principals API was used during SAML login. | 447 // principals API was used during SAML login. |
| 446 void SetSAMLPrincipalsAPIUsed(bool api_used); | 448 void SetSAMLPrincipalsAPIUsed(bool api_used); |
| 447 | 449 |
| 448 GaiaScreenHandler::FrameState FrameState() const; | 450 GaiaScreenHandler::FrameState FrameState() const; |
| 449 net::Error FrameError() const; | 451 net::Error FrameError() const; |
| 450 | 452 |
| 453 // input_method::ImeKeyboard::Observer implementation: |
| 454 virtual void OnCapsLockChanged(bool enabled) OVERRIDE; |
| 455 |
| 451 // Current UI state of the signin screen. | 456 // Current UI state of the signin screen. |
| 452 UIState ui_state_; | 457 UIState ui_state_; |
| 453 | 458 |
| 454 // A delegate that glues this handler with backend LoginDisplay. | 459 // A delegate that glues this handler with backend LoginDisplay. |
| 455 SigninScreenHandlerDelegate* delegate_; | 460 SigninScreenHandlerDelegate* delegate_; |
| 456 | 461 |
| 457 // A delegate used to get gfx::NativeWindow. | 462 // A delegate used to get gfx::NativeWindow. |
| 458 NativeWindowDelegate* native_window_delegate_; | 463 NativeWindowDelegate* native_window_delegate_; |
| 459 | 464 |
| 460 // Whether screen should be shown right after initialization. | 465 // Whether screen should be shown right after initialization. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 | 551 |
| 547 // Helper that retrieves the authenticated user's e-mail address. | 552 // Helper that retrieves the authenticated user's e-mail address. |
| 548 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; | 553 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; |
| 549 | 554 |
| 550 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 555 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
| 551 }; | 556 }; |
| 552 | 557 |
| 553 } // namespace chromeos | 558 } // namespace chromeos |
| 554 | 559 |
| 555 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 560 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| OLD | NEW |