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

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

Issue 2498613003: Add ARC++ kiosk menu items and ability to start kiosk session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 1 month 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
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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 AddCallback("firstIncorrectPasswordAttempt", 552 AddCallback("firstIncorrectPasswordAttempt",
553 &SigninScreenHandler::HandleFirstIncorrectPasswordAttempt); 553 &SigninScreenHandler::HandleFirstIncorrectPasswordAttempt);
554 AddCallback("maxIncorrectPasswordAttempts", 554 AddCallback("maxIncorrectPasswordAttempts",
555 &SigninScreenHandler::HandleMaxIncorrectPasswordAttempts); 555 &SigninScreenHandler::HandleMaxIncorrectPasswordAttempts);
556 AddCallback("sendFeedbackAndResyncUserData", 556 AddCallback("sendFeedbackAndResyncUserData",
557 &SigninScreenHandler::HandleSendFeedbackAndResyncUserData); 557 &SigninScreenHandler::HandleSendFeedbackAndResyncUserData);
558 558
559 // This message is sent by the kiosk app menu, but is handled here 559 // This message is sent by the kiosk app menu, but is handled here
560 // so we can tell the delegate to launch the app. 560 // so we can tell the delegate to launch the app.
561 AddCallback("launchKioskApp", &SigninScreenHandler::HandleLaunchKioskApp); 561 AddCallback("launchKioskApp", &SigninScreenHandler::HandleLaunchKioskApp);
562 AddCallback("launchArcKioskApp",
563 &SigninScreenHandler::HandleLaunchArcKioskApp);
562 } 564 }
563 565
564 void SigninScreenHandler::Show(const LoginScreenContext& context) { 566 void SigninScreenHandler::Show(const LoginScreenContext& context) {
565 CHECK(delegate_); 567 CHECK(delegate_);
566 568
567 // Just initialize internal fields from context and call ShowImpl(). 569 // Just initialize internal fields from context and call ShowImpl().
568 oobe_ui_ = context.oobe_ui(); 570 oobe_ui_ = context.oobe_ui();
569 571
570 std::string email; 572 std::string email;
571 email = context.email(); 573 email = context.email();
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 1380
1379 void SigninScreenHandler::HandleLaunchKioskApp(const AccountId& app_account_id, 1381 void SigninScreenHandler::HandleLaunchKioskApp(const AccountId& app_account_id,
1380 bool diagnostic_mode) { 1382 bool diagnostic_mode) {
1381 UserContext context(user_manager::USER_TYPE_KIOSK_APP, app_account_id); 1383 UserContext context(user_manager::USER_TYPE_KIOSK_APP, app_account_id);
1382 SigninSpecifics specifics; 1384 SigninSpecifics specifics;
1383 specifics.kiosk_diagnostic_mode = diagnostic_mode; 1385 specifics.kiosk_diagnostic_mode = diagnostic_mode;
1384 if (delegate_) 1386 if (delegate_)
1385 delegate_->Login(context, specifics); 1387 delegate_->Login(context, specifics);
1386 } 1388 }
1387 1389
1390 void SigninScreenHandler::HandleLaunchArcKioskApp(
1391 const AccountId& app_account_id) {
1392 UserContext context(user_manager::USER_TYPE_ARC_KIOSK_APP, app_account_id);
1393 if (delegate_)
1394 delegate_->Login(context, SigninSpecifics());
1395 }
1396
1388 void SigninScreenHandler::HandleGetTouchViewState() { 1397 void SigninScreenHandler::HandleGetTouchViewState() {
1389 if (max_mode_delegate_) { 1398 if (max_mode_delegate_) {
1390 CallJS("login.AccountPickerScreen.setTouchViewState", 1399 CallJS("login.AccountPickerScreen.setTouchViewState",
1391 max_mode_delegate_->IsMaximizeModeEnabled()); 1400 max_mode_delegate_->IsMaximizeModeEnabled());
1392 } 1401 }
1393 } 1402 }
1394 1403
1395 void SigninScreenHandler::HandleLogRemoveUserWarningShown() { 1404 void SigninScreenHandler::HandleLogRemoveUserWarningShown() {
1396 ProfileMetrics::LogProfileDeleteUser( 1405 ProfileMetrics::LogProfileDeleteUser(
1397 ProfileMetrics::DELETE_PROFILE_USER_MANAGER_SHOW_WARNING); 1406 ProfileMetrics::DELETE_PROFILE_USER_MANAGER_SHOW_WARNING);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 } 1505 }
1497 1506
1498 void SigninScreenHandler::OnFeedbackFinished() { 1507 void SigninScreenHandler::OnFeedbackFinished() {
1499 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1508 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1500 1509
1501 // Recreate user's cryptohome after the feedback is attempted. 1510 // Recreate user's cryptohome after the feedback is attempted.
1502 HandleResyncUserData(); 1511 HandleResyncUserData();
1503 } 1512 }
1504 1513
1505 } // namespace chromeos 1514 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698