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 20 matching lines...) Expand all Loading... |
31 #include "base/trace_event/trace_event.h" | 31 #include "base/trace_event/trace_event.h" |
32 #include "chrome/browser/browser_process.h" | 32 #include "chrome/browser/browser_process.h" |
33 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 33 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
34 #include "chrome/browser/browser_shutdown.h" | 34 #include "chrome/browser/browser_shutdown.h" |
35 #include "chrome/browser/chrome_notification_types.h" | 35 #include "chrome/browser/chrome_notification_types.h" |
36 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 36 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
37 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 37 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
38 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" | 38 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" |
39 #include "chrome/browser/chromeos/login/hwid_checker.h" | 39 #include "chrome/browser/chromeos/login/hwid_checker.h" |
40 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 40 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 41 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" |
41 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h" | 42 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h" |
42 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.h" | 43 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.h" |
43 #include "chrome/browser/chromeos/login/reauth_stats.h" | 44 #include "chrome/browser/chromeos/login/reauth_stats.h" |
44 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" | 45 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" |
45 #include "chrome/browser/chromeos/login/screens/network_error.h" | 46 #include "chrome/browser/chromeos/login/screens/network_error.h" |
46 #include "chrome/browser/chromeos/login/startup_utils.h" | 47 #include "chrome/browser/chromeos/login/startup_utils.h" |
47 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 48 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
48 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 49 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
49 #include "chrome/browser/chromeos/login/ui/login_feedback.h" | 50 #include "chrome/browser/chromeos/login/ui/login_feedback.h" |
50 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 51 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 } | 1225 } |
1225 | 1226 |
1226 is_account_picker_showing_first_time_ = true; | 1227 is_account_picker_showing_first_time_ = true; |
1227 | 1228 |
1228 if (delegate_) | 1229 if (delegate_) |
1229 delegate_->OnSigninScreenReady(); | 1230 delegate_->OnSigninScreenReady(); |
1230 } | 1231 } |
1231 | 1232 |
1232 void SigninScreenHandler::HandleWallpaperReady() { | 1233 void SigninScreenHandler::HandleWallpaperReady() { |
1233 if (ScreenLocker::default_screen_locker()) { | 1234 if (ScreenLocker::default_screen_locker()) { |
1234 ScreenLocker::default_screen_locker()->delegate()-> | 1235 ScreenLocker::default_screen_locker() |
1235 OnLockBackgroundDisplayed(); | 1236 ->web_ui() |
| 1237 ->OnLockBackgroundDisplayed(); |
1236 } | 1238 } |
1237 } | 1239 } |
1238 | 1240 |
1239 void SigninScreenHandler::HandleSignOutUser() { | 1241 void SigninScreenHandler::HandleSignOutUser() { |
1240 if (delegate_) | 1242 if (delegate_) |
1241 delegate_->Signout(); | 1243 delegate_->Signout(); |
1242 } | 1244 } |
1243 | 1245 |
1244 void SigninScreenHandler::HandleOpenProxySettings() { | 1246 void SigninScreenHandler::HandleOpenProxySettings() { |
1245 LoginDisplayHost::default_host()->OpenProxySettings(); | 1247 LoginDisplayHost::default_host()->OpenProxySettings(); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 return true; | 1445 return true; |
1444 } | 1446 } |
1445 | 1447 |
1446 void SigninScreenHandler::CancelPasswordChangedFlowInternal() { | 1448 void SigninScreenHandler::CancelPasswordChangedFlowInternal() { |
1447 if (delegate_) { | 1449 if (delegate_) { |
1448 ShowImpl(); | 1450 ShowImpl(); |
1449 delegate_->CancelPasswordChangedFlow(); | 1451 delegate_->CancelPasswordChangedFlow(); |
1450 } | 1452 } |
1451 } | 1453 } |
1452 | 1454 |
1453 OobeUI* SigninScreenHandler::GetOobeUI() const { | |
1454 return static_cast<OobeUI*>(web_ui()->GetController()); | |
1455 } | |
1456 | |
1457 bool SigninScreenHandler::IsGaiaVisible() const { | 1455 bool SigninScreenHandler::IsGaiaVisible() const { |
1458 return IsSigninScreen(GetCurrentScreen()) && | 1456 return IsSigninScreen(GetCurrentScreen()) && |
1459 ui_state_ == UI_STATE_GAIA_SIGNIN; | 1457 ui_state_ == UI_STATE_GAIA_SIGNIN; |
1460 } | 1458 } |
1461 | 1459 |
1462 bool SigninScreenHandler::IsGaiaHiddenByError() const { | 1460 bool SigninScreenHandler::IsGaiaHiddenByError() const { |
1463 return IsSigninScreenHiddenByError() && | 1461 return IsSigninScreenHiddenByError() && |
1464 ui_state_ == UI_STATE_GAIA_SIGNIN; | 1462 ui_state_ == UI_STATE_GAIA_SIGNIN; |
1465 } | 1463 } |
1466 | 1464 |
(...skipping 27 matching lines...) Expand all Loading... |
1494 } | 1492 } |
1495 | 1493 |
1496 void SigninScreenHandler::OnFeedbackFinished() { | 1494 void SigninScreenHandler::OnFeedbackFinished() { |
1497 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); | 1495 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); |
1498 | 1496 |
1499 // Recreate user's cryptohome after the feedback is attempted. | 1497 // Recreate user's cryptohome after the feedback is attempted. |
1500 HandleResyncUserData(); | 1498 HandleResyncUserData(); |
1501 } | 1499 } |
1502 | 1500 |
1503 } // namespace chromeos | 1501 } // namespace chromeos |
OLD | NEW |