Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 2820203002: cros Revert DCHECKs added in crbug.com/699798. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/base_webui_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 1027
1028 void SigninScreenHandler::OnUserRemoved(const AccountId& account_id, 1028 void SigninScreenHandler::OnUserRemoved(const AccountId& account_id,
1029 bool last_user_removed) { 1029 bool last_user_removed) {
1030 CallJS("login.AccountPickerScreen.removeUser", account_id); 1030 CallJS("login.AccountPickerScreen.removeUser", account_id);
1031 if (last_user_removed) 1031 if (last_user_removed)
1032 OnShowAddUser(); 1032 OnShowAddUser();
1033 } 1033 }
1034 1034
1035 void SigninScreenHandler::OnUserImageChanged(const user_manager::User& user) { 1035 void SigninScreenHandler::OnUserImageChanged(const user_manager::User& user) {
1036 if (page_is_ready()) { 1036 if (page_is_ready()) {
1037 // TODO(jdufault): Remove DCHECK after resolving crbug.com/699798
1038 DCHECK(is_js_initialized_and_ready());
1039 CallJSOrDefer("login.AccountPickerScreen.updateUserImage", 1037 CallJSOrDefer("login.AccountPickerScreen.updateUserImage",
1040 user.GetAccountId()); 1038 user.GetAccountId());
1041 } 1039 }
1042 } 1040 }
1043 1041
1044 void SigninScreenHandler::OnPreferencesChanged() { 1042 void SigninScreenHandler::OnPreferencesChanged() {
1045 // Make sure that one of the login UI is fully functional now, otherwise 1043 // Make sure that one of the login UI is fully functional now, otherwise
1046 // preferences update would be picked up next time it will be shown. 1044 // preferences update would be picked up next time it will be shown.
1047 if (!webui_visible_) { 1045 if (!webui_visible_) {
1048 LOG(WARNING) << "Login UI is not active - postponed prefs change."; 1046 LOG(WARNING) << "Login UI is not active - postponed prefs change.";
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 1299
1302 void SigninScreenHandler::HandleToggleKioskAutolaunchScreen() { 1300 void SigninScreenHandler::HandleToggleKioskAutolaunchScreen() {
1303 policy::BrowserPolicyConnectorChromeOS* connector = 1301 policy::BrowserPolicyConnectorChromeOS* connector =
1304 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 1302 g_browser_process->platform_part()->browser_policy_connector_chromeos();
1305 if (delegate_ && !connector->IsEnterpriseManaged()) 1303 if (delegate_ && !connector->IsEnterpriseManaged())
1306 delegate_->ShowKioskAutolaunchScreen(); 1304 delegate_->ShowKioskAutolaunchScreen();
1307 } 1305 }
1308 1306
1309 void SigninScreenHandler::LoadUsers(const base::ListValue& users_list, 1307 void SigninScreenHandler::LoadUsers(const base::ListValue& users_list,
1310 bool showGuest) { 1308 bool showGuest) {
1311 // TODO(jdufault): Remove DCHECK after resolving crbug.com/699798
1312 DCHECK(is_js_initialized_and_ready());
1313 CallJSOrDefer("login.AccountPickerScreen.loadUsers", users_list, 1309 CallJSOrDefer("login.AccountPickerScreen.loadUsers", users_list,
1314 delegate_->IsShowGuest()); 1310 delegate_->IsShowGuest());
1315 } 1311 }
1316 1312
1317 void SigninScreenHandler::HandleAccountPickerReady() { 1313 void SigninScreenHandler::HandleAccountPickerReady() {
1318 VLOG(0) << "Login WebUI >> AccountPickerReady"; 1314 VLOG(0) << "Login WebUI >> AccountPickerReady";
1319 1315
1320 if (delegate_ && !ScreenLocker::default_screen_locker() && 1316 if (delegate_ && !ScreenLocker::default_screen_locker() &&
1321 !chromeos::IsMachineHWIDCorrect() && 1317 !chromeos::IsMachineHWIDCorrect() &&
1322 !oobe_ui_) { 1318 !oobe_ui_) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 rate.initial_delay_in_ms = auto_repeat_delay; 1655 rate.initial_delay_in_ms = auto_repeat_delay;
1660 rate.repeat_interval_in_ms = auto_repeat_interval; 1656 rate.repeat_interval_in_ms = auto_repeat_interval;
1661 input_method::InputMethodManager::Get() 1657 input_method::InputMethodManager::Get()
1662 ->GetImeKeyboard() 1658 ->GetImeKeyboard()
1663 ->SetAutoRepeatEnabled(true); 1659 ->SetAutoRepeatEnabled(true);
1664 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( 1660 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate(
1665 rate); 1661 rate);
1666 } 1662 }
1667 1663
1668 } // namespace chromeos 1664 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/base_webui_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698