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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 AddCallback("firstIncorrectPasswordAttempt", | 557 AddCallback("firstIncorrectPasswordAttempt", |
558 &SigninScreenHandler::HandleFirstIncorrectPasswordAttempt); | 558 &SigninScreenHandler::HandleFirstIncorrectPasswordAttempt); |
559 AddCallback("maxIncorrectPasswordAttempts", | 559 AddCallback("maxIncorrectPasswordAttempts", |
560 &SigninScreenHandler::HandleMaxIncorrectPasswordAttempts); | 560 &SigninScreenHandler::HandleMaxIncorrectPasswordAttempts); |
561 AddCallback("sendFeedbackAndResyncUserData", | 561 AddCallback("sendFeedbackAndResyncUserData", |
562 &SigninScreenHandler::HandleSendFeedbackAndResyncUserData); | 562 &SigninScreenHandler::HandleSendFeedbackAndResyncUserData); |
563 | 563 |
564 // This message is sent by the kiosk app menu, but is handled here | 564 // This message is sent by the kiosk app menu, but is handled here |
565 // so we can tell the delegate to launch the app. | 565 // so we can tell the delegate to launch the app. |
566 AddCallback("launchKioskApp", &SigninScreenHandler::HandleLaunchKioskApp); | 566 AddCallback("launchKioskApp", &SigninScreenHandler::HandleLaunchKioskApp); |
| 567 AddCallback("launchArcKioskApp", |
| 568 &SigninScreenHandler::HandleLaunchArcKioskApp); |
567 } | 569 } |
568 | 570 |
569 void SigninScreenHandler::Show(const LoginScreenContext& context) { | 571 void SigninScreenHandler::Show(const LoginScreenContext& context) { |
570 CHECK(delegate_); | 572 CHECK(delegate_); |
571 | 573 |
572 // Just initialize internal fields from context and call ShowImpl(). | 574 // Just initialize internal fields from context and call ShowImpl(). |
573 oobe_ui_ = context.oobe_ui(); | 575 oobe_ui_ = context.oobe_ui(); |
574 | 576 |
575 std::string email; | 577 std::string email; |
576 email = context.email(); | 578 email = context.email(); |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 | 1395 |
1394 void SigninScreenHandler::HandleLaunchKioskApp(const AccountId& app_account_id, | 1396 void SigninScreenHandler::HandleLaunchKioskApp(const AccountId& app_account_id, |
1395 bool diagnostic_mode) { | 1397 bool diagnostic_mode) { |
1396 UserContext context(user_manager::USER_TYPE_KIOSK_APP, app_account_id); | 1398 UserContext context(user_manager::USER_TYPE_KIOSK_APP, app_account_id); |
1397 SigninSpecifics specifics; | 1399 SigninSpecifics specifics; |
1398 specifics.kiosk_diagnostic_mode = diagnostic_mode; | 1400 specifics.kiosk_diagnostic_mode = diagnostic_mode; |
1399 if (delegate_) | 1401 if (delegate_) |
1400 delegate_->Login(context, specifics); | 1402 delegate_->Login(context, specifics); |
1401 } | 1403 } |
1402 | 1404 |
| 1405 void SigninScreenHandler::HandleLaunchArcKioskApp( |
| 1406 const AccountId& app_account_id) { |
| 1407 UserContext context(user_manager::USER_TYPE_ARC_KIOSK_APP, app_account_id); |
| 1408 if (delegate_) |
| 1409 delegate_->Login(context, SigninSpecifics()); |
| 1410 } |
| 1411 |
1403 void SigninScreenHandler::HandleGetTouchViewState() { | 1412 void SigninScreenHandler::HandleGetTouchViewState() { |
1404 if (max_mode_delegate_) { | 1413 if (max_mode_delegate_) { |
1405 CallJS("login.AccountPickerScreen.setTouchViewState", | 1414 CallJS("login.AccountPickerScreen.setTouchViewState", |
1406 max_mode_delegate_->IsMaximizeModeEnabled()); | 1415 max_mode_delegate_->IsMaximizeModeEnabled()); |
1407 } | 1416 } |
1408 } | 1417 } |
1409 | 1418 |
1410 void SigninScreenHandler::HandleLogRemoveUserWarningShown() { | 1419 void SigninScreenHandler::HandleLogRemoveUserWarningShown() { |
1411 ProfileMetrics::LogProfileDeleteUser( | 1420 ProfileMetrics::LogProfileDeleteUser( |
1412 ProfileMetrics::DELETE_PROFILE_USER_MANAGER_SHOW_WARNING); | 1421 ProfileMetrics::DELETE_PROFILE_USER_MANAGER_SHOW_WARNING); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 } | 1520 } |
1512 | 1521 |
1513 void SigninScreenHandler::OnFeedbackFinished() { | 1522 void SigninScreenHandler::OnFeedbackFinished() { |
1514 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); | 1523 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); |
1515 | 1524 |
1516 // Recreate user's cryptohome after the feedback is attempted. | 1525 // Recreate user's cryptohome after the feedback is attempted. |
1517 HandleResyncUserData(); | 1526 HandleResyncUserData(); |
1518 } | 1527 } |
1519 | 1528 |
1520 } // namespace chromeos | 1529 } // namespace chromeos |
OLD | NEW |