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

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

Issue 2108813002: Added strings of i18n and made the pin-keyboard work for rtl lang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebased. Created 4 years, 5 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 (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>
11 11
12 #include "ash/common/system/chromeos/devicetype_utils.h" 12 #include "ash/common/system/chromeos/devicetype_utils.h"
13 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/wm/lock_state_controller.h" 15 #include "ash/wm/lock_state_controller.h"
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/i18n/number_formatting.h"
17 #include "base/location.h" 18 #include "base/location.h"
18 #include "base/logging.h" 19 #include "base/logging.h"
19 #include "base/macros.h" 20 #include "base/macros.h"
20 #include "base/metrics/histogram.h" 21 #include "base/metrics/histogram.h"
21 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
22 #include "base/strings/string16.h" 23 #include "base/strings/string16.h"
23 #include "base/strings/string_number_conversions.h" 24 #include "base/strings/string_number_conversions.h"
24 #include "base/strings/string_util.h" 25 #include "base/strings/string_util.h"
25 #include "base/strings/stringprintf.h" 26 #include "base/strings/stringprintf.h"
26 #include "base/strings/utf_string_conversions.h" 27 #include "base/strings/utf_string_conversions.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 if (!succeed) { 359 if (!succeed) {
359 DVLOG(0) << "SetUserInputMethod('" << username 360 DVLOG(0) << "SetUserInputMethod('" << username
360 << "'): failed to set user layout. Switching to default."; 361 << "'): failed to set user layout. Switching to default.";
361 362
362 ime_state->SetInputMethodLoginDefault(); 363 ime_state->SetInputMethodLoginDefault();
363 } 364 }
364 } 365 }
365 366
366 void SigninScreenHandler::DeclareLocalizedValues( 367 void SigninScreenHandler::DeclareLocalizedValues(
367 ::login::LocalizedValuesBuilder* builder) { 368 ::login::LocalizedValuesBuilder* builder) {
369 // Format numbers to be used on the pin keyboard.
370 for (int j = 0; j <= 9; j++) {
371 builder->Add("pinKeyboard" + base::IntToString(j),
372 base::FormatNumber(int64_t{j}));
373 }
374
368 builder->Add("passwordHint", IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT); 375 builder->Add("passwordHint", IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT);
376 builder->Add("pinKeyboardPlaceholderPin",
377 IDS_PIN_KEYBOARD_HINT_TEXT_PIN);
378 builder->Add("pinKeyboardPlaceholderPinPassword",
379 IDS_PIN_KEYBOARD_HINT_TEXT_PIN_PASSWORD);
380 builder->Add("pinKeyboardClear", IDS_PIN_KEYBOARD_CLEAR);
369 builder->Add("signingIn", IDS_LOGIN_POD_SIGNING_IN); 381 builder->Add("signingIn", IDS_LOGIN_POD_SIGNING_IN);
370 builder->Add("podMenuButtonAccessibleName", 382 builder->Add("podMenuButtonAccessibleName",
371 IDS_LOGIN_POD_MENU_BUTTON_ACCESSIBLE_NAME); 383 IDS_LOGIN_POD_MENU_BUTTON_ACCESSIBLE_NAME);
372 builder->Add("podMenuRemoveItemAccessibleName", 384 builder->Add("podMenuRemoveItemAccessibleName",
373 IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME); 385 IDS_LOGIN_POD_MENU_REMOVE_ITEM_ACCESSIBLE_NAME);
374 builder->Add("passwordFieldAccessibleName", 386 builder->Add("passwordFieldAccessibleName",
375 IDS_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME); 387 IDS_LOGIN_POD_PASSWORD_FIELD_ACCESSIBLE_NAME);
376 builder->Add("signedIn", IDS_SCREEN_LOCK_ACTIVE_USER); 388 builder->Add("signedIn", IDS_SCREEN_LOCK_ACTIVE_USER);
377 builder->Add("launchAppButton", IDS_LAUNCH_APP_BUTTON); 389 builder->Add("launchAppButton", IDS_LAUNCH_APP_BUTTON);
378 builder->Add("restart", IDS_RESTART_BUTTON); 390 builder->Add("restart", IDS_RESTART_BUTTON);
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 } 1492 }
1481 1493
1482 void SigninScreenHandler::OnFeedbackFinished() { 1494 void SigninScreenHandler::OnFeedbackFinished() {
1483 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1495 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1484 1496
1485 // Recreate user's cryptohome after the feedback is attempted. 1497 // Recreate user's cryptohome after the feedback is attempted.
1486 HandleResyncUserData(); 1498 HandleResyncUserData();
1487 } 1499 }
1488 1500
1489 } // namespace chromeos 1501 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698