| 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 "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 keyboard->RemoveObserver(this); | 320 keyboard->RemoveObserver(this); |
| 321 weak_factory_.InvalidateWeakPtrs(); | 321 weak_factory_.InvalidateWeakPtrs(); |
| 322 if (delegate_) | 322 if (delegate_) |
| 323 delegate_->SetWebUIHandler(NULL); | 323 delegate_->SetWebUIHandler(NULL); |
| 324 network_state_informer_->RemoveObserver(this); | 324 network_state_informer_->RemoveObserver(this); |
| 325 if (max_mode_delegate_) { | 325 if (max_mode_delegate_) { |
| 326 max_mode_delegate_->RemoveObserver(this); | 326 max_mode_delegate_->RemoveObserver(this); |
| 327 max_mode_delegate_.reset(NULL); | 327 max_mode_delegate_.reset(NULL); |
| 328 } | 328 } |
| 329 ScreenlockBridge::Get()->SetLockHandler(NULL); | 329 ScreenlockBridge::Get()->SetLockHandler(NULL); |
| 330 ScreenlockBridge::Get()->SetFocusedUser(""); |
| 330 } | 331 } |
| 331 | 332 |
| 332 void SigninScreenHandler::DeclareLocalizedValues( | 333 void SigninScreenHandler::DeclareLocalizedValues( |
| 333 LocalizedValuesBuilder* builder) { | 334 LocalizedValuesBuilder* builder) { |
| 334 builder->Add("passwordHint", IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT); | 335 builder->Add("passwordHint", IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT); |
| 335 builder->Add("podMenuButtonAccessibleName", | 336 builder->Add("podMenuButtonAccessibleName", |
| 336 IDS_LOGIN_POD_MENU_BUTTON_ACCESSIBLE_NAME); | 337 IDS_LOGIN_POD_MENU_BUTTON_ACCESSIBLE_NAME); |
| 337 builder->Add("podMenuRemoveItemAccessibleName", | 338 builder->Add("podMenuRemoveItemAccessibleName", |
| 338 IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME); | 339 IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME); |
| 339 builder->Add("passwordFieldAccessibleName", | 340 builder->Add("passwordFieldAccessibleName", |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 UpdateState(ErrorScreenActor::ERROR_REASON_LOADING_TIMEOUT); | 1320 UpdateState(ErrorScreenActor::ERROR_REASON_LOADING_TIMEOUT); |
| 1320 } | 1321 } |
| 1321 | 1322 |
| 1322 void SigninScreenHandler::HandleUpdateOfflineLogin(bool offline_login_active) { | 1323 void SigninScreenHandler::HandleUpdateOfflineLogin(bool offline_login_active) { |
| 1323 offline_login_active_ = offline_login_active; | 1324 offline_login_active_ = offline_login_active; |
| 1324 } | 1325 } |
| 1325 | 1326 |
| 1326 void SigninScreenHandler::HandleFocusPod(const std::string& user_id) { | 1327 void SigninScreenHandler::HandleFocusPod(const std::string& user_id) { |
| 1327 SetUserInputMethod(user_id); | 1328 SetUserInputMethod(user_id); |
| 1328 WallpaperManager::Get()->SetUserWallpaperDelayed(user_id); | 1329 WallpaperManager::Get()->SetUserWallpaperDelayed(user_id); |
| 1330 ScreenlockBridge::Get()->SetFocusedUser(user_id); |
| 1329 } | 1331 } |
| 1330 | 1332 |
| 1331 void SigninScreenHandler::HandleHardlockPod(const std::string& user_id) { | 1333 void SigninScreenHandler::HandleHardlockPod(const std::string& user_id) { |
| 1332 SetAuthType(user_id, | 1334 SetAuthType(user_id, |
| 1333 ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD, | 1335 ScreenlockBridge::LockHandler::FORCE_OFFLINE_PASSWORD, |
| 1334 base::string16()); | 1336 base::string16()); |
| 1335 HideUserPodCustomIcon(user_id); | 1337 HideUserPodCustomIcon(user_id); |
| 1336 } | 1338 } |
| 1337 | 1339 |
| 1338 void SigninScreenHandler::HandleRetrieveAuthenticatedUserEmail( | 1340 void SigninScreenHandler::HandleRetrieveAuthenticatedUserEmail( |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 return gaia_screen_handler_->frame_error(); | 1514 return gaia_screen_handler_->frame_error(); |
| 1513 } | 1515 } |
| 1514 | 1516 |
| 1515 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { | 1517 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { |
| 1516 caps_lock_enabled_ = enabled; | 1518 caps_lock_enabled_ = enabled; |
| 1517 if (page_is_ready()) | 1519 if (page_is_ready()) |
| 1518 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); | 1520 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); |
| 1519 } | 1521 } |
| 1520 | 1522 |
| 1521 } // namespace chromeos | 1523 } // namespace chromeos |
| OLD | NEW |