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

Side by Side Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 1722843002: MD user manager (html/js/css for create profile flow) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments #6 Created 4 years, 9 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/signin/user_manager_screen_handler.h" 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 const std::string& secret, 364 const std::string& secret,
365 const std::string& key_label) { 365 const std::string& key_label) {
366 NOTREACHED(); 366 NOTREACHED();
367 } 367 }
368 368
369 void UserManagerScreenHandler::HandleInitialize(const base::ListValue* args) { 369 void UserManagerScreenHandler::HandleInitialize(const base::ListValue* args) {
370 // If the URL has a hash parameter, store it for later. 370 // If the URL has a hash parameter, store it for later.
371 args->GetString(0, &url_hash_); 371 args->GetString(0, &url_hash_);
372 372
373 SendUserList(); 373 SendUserList();
374 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showUserManagerScreen", 374 web_ui()->CallJavascriptFunction("cr.ui.UserManager.showUserManagerScreen",
375 base::FundamentalValue(IsGuestModeEnabled()), 375 base::FundamentalValue(IsGuestModeEnabled()),
376 base::FundamentalValue(IsAddPersonEnabled())); 376 base::FundamentalValue(IsAddPersonEnabled()));
377 377
378 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(this); 378 proximity_auth::ScreenlockBridge::Get()->SetLockHandler(this);
379 } 379 }
380 380
381 void UserManagerScreenHandler::HandleAddUser(const base::ListValue* args) { 381 void UserManagerScreenHandler::HandleAddUser(const base::ListValue* args) {
382 if (!IsAddPersonEnabled()) { 382 if (!IsAddPersonEnabled()) {
383 // The 'Add User' UI should not be showing. 383 // The 'Add User' UI should not be showing.
384 NOTREACHED(); 384 NOTREACHED();
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 email_address_.clear(); 908 email_address_.clear();
909 909
910 if (success) { 910 if (success) {
911 profiles::SwitchToProfile( 911 profiles::SwitchToProfile(
912 authenticating_profile_path_, true, 912 authenticating_profile_path_, true,
913 base::Bind(&UserManagerScreenHandler::OnSwitchToProfileComplete, 913 base::Bind(&UserManagerScreenHandler::OnSwitchToProfileComplete,
914 weak_ptr_factory_.GetWeakPtr()), 914 weak_ptr_factory_.GetWeakPtr()),
915 ProfileMetrics::SWITCH_PROFILE_UNLOCK); 915 ProfileMetrics::SWITCH_PROFILE_UNLOCK);
916 } else { 916 } else {
917 web_ui()->CallJavascriptFunction( 917 web_ui()->CallJavascriptFunction(
918 "cr.ui.Oobe.showSignInError", 918 "cr.ui.UserManager.showSignInError",
919 base::FundamentalValue(0), 919 base::FundamentalValue(0),
920 base::StringValue(l10n_util::GetStringUTF8( 920 base::StringValue(l10n_util::GetStringUTF8(
921 auth == ProfileMetrics::AUTH_FAILED_OFFLINE ? 921 auth == ProfileMetrics::AUTH_FAILED_OFFLINE ?
922 IDS_LOGIN_ERROR_AUTHENTICATING_OFFLINE : 922 IDS_LOGIN_ERROR_AUTHENTICATING_OFFLINE :
923 IDS_LOGIN_ERROR_AUTHENTICATING)), 923 IDS_LOGIN_ERROR_AUTHENTICATING)),
924 base::StringValue(""), 924 base::StringValue(""),
925 base::FundamentalValue(0)); 925 base::FundamentalValue(0));
926 } 926 }
927 } 927 }
928 928
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 Profile* profile, Profile::CreateStatus profile_create_status) { 978 Profile* profile, Profile::CreateStatus profile_create_status) {
979 Browser* browser = chrome::FindAnyBrowser(profile, false); 979 Browser* browser = chrome::FindAnyBrowser(profile, false);
980 if (browser && browser->window()) { 980 if (browser && browser->window()) {
981 OnBrowserWindowReady(browser); 981 OnBrowserWindowReady(browser);
982 } else { 982 } else {
983 registrar_.Add(this, 983 registrar_.Add(this,
984 chrome::NOTIFICATION_BROWSER_WINDOW_READY, 984 chrome::NOTIFICATION_BROWSER_WINDOW_READY,
985 content::NotificationService::AllSources()); 985 content::NotificationService::AllSources());
986 } 986 }
987 } 987 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler.cc ('k') | third_party/closure_compiler/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698