Chromium Code Reviews| 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 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 701 if (!oobe_ui_observer_added_) { | 701 if (!oobe_ui_observer_added_) { |
| 702 oobe_ui_observer_added_ = true; | 702 oobe_ui_observer_added_ = true; |
| 703 GetOobeUI()->AddObserver(this); | 703 GetOobeUI()->AddObserver(this); |
| 704 } | 704 } |
| 705 | 705 |
| 706 if (oobe_ui_) { | 706 if (oobe_ui_) { |
| 707 // Shows new user sign-in for OOBE. | 707 // Shows new user sign-in for OOBE. |
| 708 OnShowAddUser(); | 708 OnShowAddUser(); |
| 709 } else { | 709 } else { |
| 710 // Populates account picker. Animation is turned off for now until we | 710 // Populates account picker. Animation is turned off for now until we |
| 711 // figure out how to make it fast enough. | 711 // figure out how to make it fast enough. This will call LoadUsers. |
| 712 delegate_->HandleGetUsers(); | 712 delegate_->HandleGetUsers(); |
| 713 | 713 |
| 714 // Reset Caps Lock state when login screen is shown. | 714 // Reset Caps Lock state when login screen is shown. |
| 715 input_method::InputMethodManager::Get() | 715 input_method::InputMethodManager::Get() |
| 716 ->GetImeKeyboard() | 716 ->GetImeKeyboard() |
| 717 ->SetCapsLockEnabled(false); | 717 ->SetCapsLockEnabled(false); |
| 718 | 718 |
| 719 base::DictionaryValue params; | 719 base::DictionaryValue params; |
| 720 params.SetBoolean("disableAddUser", AllWhitelistedUsersPresent()); | 720 params.SetBoolean("disableAddUser", AllWhitelistedUsersPresent()); |
| 721 UpdateUIState(UI_STATE_ACCOUNT_PICKER, ¶ms); | 721 UpdateUIState(UI_STATE_ACCOUNT_PICKER, ¶ms); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1298 } | 1298 } |
| 1299 } | 1299 } |
| 1300 | 1300 |
| 1301 void SigninScreenHandler::HandleToggleKioskAutolaunchScreen() { | 1301 void SigninScreenHandler::HandleToggleKioskAutolaunchScreen() { |
| 1302 policy::BrowserPolicyConnectorChromeOS* connector = | 1302 policy::BrowserPolicyConnectorChromeOS* connector = |
| 1303 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 1303 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 1304 if (delegate_ && !connector->IsEnterpriseManaged()) | 1304 if (delegate_ && !connector->IsEnterpriseManaged()) |
| 1305 delegate_->ShowKioskAutolaunchScreen(); | 1305 delegate_->ShowKioskAutolaunchScreen(); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 void SigninScreenHandler::LoadUsers(const base::ListValue& users_list, | 1308 void SigninScreenHandler::LoadUsers(const user_manager::UserList& users, |
| 1309 bool showGuest) { | 1309 const base::ListValue& users_list) { |
|
Alexander Alekseev
2017/05/12 03:43:44
Why do we need |users| here?
jdufault
2017/05/12 16:46:41
It gets used in a separate CL, see this[1] file.
| |
| 1310 CallJSOrDefer("login.AccountPickerScreen.loadUsers", users_list, | 1310 CallJSOrDefer("login.AccountPickerScreen.loadUsers", users_list, |
| 1311 delegate_->IsShowGuest()); | 1311 delegate_->IsShowGuest()); |
| 1312 } | 1312 } |
| 1313 | 1313 |
| 1314 void SigninScreenHandler::HandleAccountPickerReady() { | 1314 void SigninScreenHandler::HandleAccountPickerReady() { |
| 1315 VLOG(0) << "Login WebUI >> AccountPickerReady"; | 1315 VLOG(0) << "Login WebUI >> AccountPickerReady"; |
| 1316 | 1316 |
| 1317 if (delegate_ && !ScreenLocker::default_screen_locker() && | 1317 if (delegate_ && !ScreenLocker::default_screen_locker() && |
| 1318 !chromeos::IsMachineHWIDCorrect() && | 1318 !chromeos::IsMachineHWIDCorrect() && |
| 1319 !oobe_ui_) { | 1319 !oobe_ui_) { |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1656 rate.initial_delay_in_ms = auto_repeat_delay; | 1656 rate.initial_delay_in_ms = auto_repeat_delay; |
| 1657 rate.repeat_interval_in_ms = auto_repeat_interval; | 1657 rate.repeat_interval_in_ms = auto_repeat_interval; |
| 1658 input_method::InputMethodManager::Get() | 1658 input_method::InputMethodManager::Get() |
| 1659 ->GetImeKeyboard() | 1659 ->GetImeKeyboard() |
| 1660 ->SetAutoRepeatEnabled(true); | 1660 ->SetAutoRepeatEnabled(true); |
| 1661 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( | 1661 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( |
| 1662 rate); | 1662 rate); |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 } // namespace chromeos | 1665 } // namespace chromeos |
| OLD | NEW |