| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 keyboard->RemoveObserver(this); | 280 keyboard->RemoveObserver(this); |
| 281 weak_factory_.InvalidateWeakPtrs(); | 281 weak_factory_.InvalidateWeakPtrs(); |
| 282 if (delegate_) | 282 if (delegate_) |
| 283 delegate_->SetWebUIHandler(nullptr); | 283 delegate_->SetWebUIHandler(nullptr); |
| 284 network_state_informer_->RemoveObserver(this); | 284 network_state_informer_->RemoveObserver(this); |
| 285 if (max_mode_delegate_) { | 285 if (max_mode_delegate_) { |
| 286 max_mode_delegate_->RemoveObserver(this); | 286 max_mode_delegate_->RemoveObserver(this); |
| 287 max_mode_delegate_.reset(nullptr); | 287 max_mode_delegate_.reset(nullptr); |
| 288 } | 288 } |
| 289 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(nullptr); | 289 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(nullptr); |
| 290 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(""); | 290 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(EmptyAccountId()); |
| 291 } | 291 } |
| 292 | 292 |
| 293 // static | 293 // static |
| 294 std::string SigninScreenHandler::GetUserLRUInputMethod( | 294 std::string SigninScreenHandler::GetUserLRUInputMethod( |
| 295 const std::string& username) { | 295 const std::string& username) { |
| 296 PrefService* const local_state = g_browser_process->local_state(); | 296 PrefService* const local_state = g_browser_process->local_state(); |
| 297 const base::DictionaryValue* users_lru_input_methods = | 297 const base::DictionaryValue* users_lru_input_methods = |
| 298 local_state->GetDictionary(prefs::kUsersLRUInputMethod); | 298 local_state->GetDictionary(prefs::kUsersLRUInputMethod); |
| 299 | 299 |
| 300 if (!users_lru_input_methods) { | 300 if (!users_lru_input_methods) { |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess(); | 1216 ScreenLocker::default_screen_locker()->UnlockOnLoginSuccess(); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 void SigninScreenHandler::HandleShowLoadingTimeoutError() { | 1219 void SigninScreenHandler::HandleShowLoadingTimeoutError() { |
| 1220 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT); | 1220 UpdateState(NetworkError::ERROR_REASON_LOADING_TIMEOUT); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { | 1223 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { |
| 1224 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); | 1224 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); |
| 1225 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); | 1225 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); |
| 1226 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser( | 1226 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id); |
| 1227 account_id.GetUserEmail()); | |
| 1228 if (delegate_) | 1227 if (delegate_) |
| 1229 delegate_->CheckUserStatus(account_id); | 1228 delegate_->CheckUserStatus(account_id); |
| 1230 if (!test_focus_pod_callback_.is_null()) | 1229 if (!test_focus_pod_callback_.is_null()) |
| 1231 test_focus_pod_callback_.Run(); | 1230 test_focus_pod_callback_.Run(); |
| 1232 | 1231 |
| 1233 bool use_24hour_clock = false; | 1232 bool use_24hour_clock = false; |
| 1234 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref( | 1233 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref( |
| 1235 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { | 1234 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { |
| 1236 g_browser_process->platform_part() | 1235 g_browser_process->platform_part() |
| 1237 ->GetSystemClock() | 1236 ->GetSystemClock() |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 return gaia_screen_handler_->frame_error(); | 1381 return gaia_screen_handler_->frame_error(); |
| 1383 } | 1382 } |
| 1384 | 1383 |
| 1385 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1384 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
| 1386 caps_lock_enabled_ = enabled; | 1385 caps_lock_enabled_ = enabled; |
| 1387 if (page_is_ready()) | 1386 if (page_is_ready()) |
| 1388 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1387 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
| 1389 } | 1388 } |
| 1390 | 1389 |
| 1391 } // namespace chromeos | 1390 } // namespace chromeos |
| OLD | NEW |