| 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 <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "ash/public/interfaces/touch_view.mojom.h" | 13 #include "ash/public/interfaces/touch_view.mojom.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "chrome/browser/chromeos/login/screens/network_error_model.h" | 20 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 21 #include "chrome/browser/chromeos/login/signin_specifics.h" | 21 #include "chrome/browser/chromeos/login/signin_specifics.h" |
| 22 #include "chrome/browser/chromeos/login/ui/login_display.h" | 22 #include "chrome/browser/chromeos/login/ui/login_display.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/network_state_informer.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 27 #include "chromeos/dbus/power_manager_client.h" | 27 #include "chromeos/dbus/power_manager_client.h" |
| 28 #include "chromeos/network/portal_detector/network_portal_detector.h" | 28 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 29 #include "components/proximity_auth/screenlock_bridge.h" | 29 #include "components/proximity_auth/screenlock_bridge.h" |
| 30 #include "components/user_manager/user_manager.h" | 30 #include "components/user_manager/user_manager.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 public LoginDisplayWebUIHandler, | 216 public LoginDisplayWebUIHandler, |
| 217 public content::NotificationObserver, | 217 public content::NotificationObserver, |
| 218 public NetworkStateInformer::NetworkStateInformerObserver, | 218 public NetworkStateInformer::NetworkStateInformerObserver, |
| 219 public PowerManagerClient::Observer, | 219 public PowerManagerClient::Observer, |
| 220 public input_method::ImeKeyboard::Observer, | 220 public input_method::ImeKeyboard::Observer, |
| 221 public ash::mojom::TouchViewObserver, | 221 public ash::mojom::TouchViewObserver, |
| 222 public OobeUI::Observer { | 222 public OobeUI::Observer { |
| 223 public: | 223 public: |
| 224 SigninScreenHandler( | 224 SigninScreenHandler( |
| 225 const scoped_refptr<NetworkStateInformer>& network_state_informer, | 225 const scoped_refptr<NetworkStateInformer>& network_state_informer, |
| 226 NetworkErrorModel* network_error_model, | 226 ErrorScreen* error_screen, |
| 227 CoreOobeActor* core_oobe_actor, | 227 CoreOobeActor* core_oobe_actor, |
| 228 GaiaScreenHandler* gaia_screen_handler); | 228 GaiaScreenHandler* gaia_screen_handler); |
| 229 ~SigninScreenHandler() override; | 229 ~SigninScreenHandler() override; |
| 230 | 230 |
| 231 static std::string GetUserLRUInputMethod(const std::string& username); | 231 static std::string GetUserLRUInputMethod(const std::string& username); |
| 232 | 232 |
| 233 // Update current input method (namely keyboard layout) in the given IME state | 233 // Update current input method (namely keyboard layout) in the given IME state |
| 234 // to LRU by this user. | 234 // to LRU by this user. |
| 235 static void SetUserInputMethod( | 235 static void SetUserInputMethod( |
| 236 const std::string& username, | 236 const std::string& username, |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 // Is account picker being shown for the first time. | 449 // Is account picker being shown for the first time. |
| 450 bool is_account_picker_showing_first_time_ = false; | 450 bool is_account_picker_showing_first_time_ = false; |
| 451 | 451 |
| 452 // Network state informer used to keep signin screen up. | 452 // Network state informer used to keep signin screen up. |
| 453 scoped_refptr<NetworkStateInformer> network_state_informer_; | 453 scoped_refptr<NetworkStateInformer> network_state_informer_; |
| 454 | 454 |
| 455 // Set to true once |LOGIN_WEBUI_VISIBLE| notification is observed. | 455 // Set to true once |LOGIN_WEBUI_VISIBLE| notification is observed. |
| 456 bool webui_visible_ = false; | 456 bool webui_visible_ = false; |
| 457 bool preferences_changed_delayed_ = false; | 457 bool preferences_changed_delayed_ = false; |
| 458 | 458 |
| 459 NetworkErrorModel* network_error_model_; | 459 ErrorScreen* error_screen_ = nullptr; |
| 460 CoreOobeActor* core_oobe_actor_; | 460 CoreOobeActor* core_oobe_actor_ = nullptr; |
| 461 | 461 |
| 462 NetworkStateInformer::State last_network_state_ = | 462 NetworkStateInformer::State last_network_state_ = |
| 463 NetworkStateInformer::UNKNOWN; | 463 NetworkStateInformer::UNKNOWN; |
| 464 | 464 |
| 465 base::CancelableClosure update_state_closure_; | 465 base::CancelableClosure update_state_closure_; |
| 466 base::CancelableClosure connecting_closure_; | 466 base::CancelableClosure connecting_closure_; |
| 467 | 467 |
| 468 content::NotificationRegistrar registrar_; | 468 content::NotificationRegistrar registrar_; |
| 469 | 469 |
| 470 // Whether there is an auth UI pending. This flag is set on receiving | 470 // Whether there is an auth UI pending. This flag is set on receiving |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 std::unique_ptr<LoginFeedback> login_feedback_; | 512 std::unique_ptr<LoginFeedback> login_feedback_; |
| 513 | 513 |
| 514 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; | 514 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
| 515 | 515 |
| 516 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 516 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
| 517 }; | 517 }; |
| 518 | 518 |
| 519 } // namespace chromeos | 519 } // namespace chromeos |
| 520 | 520 |
| 521 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 521 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
| OLD | NEW |