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

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

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/webui_login_display.h" 5 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 8 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" 10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 input_method::InputMethodManager* ime_manager = 167 input_method::InputMethodManager* ime_manager =
168 input_method::InputMethodManager::Get(); 168 input_method::InputMethodManager::Get();
169 if (ime_manager->GetImeKeyboard()->CapsLockIsEnabled()) { 169 if (ime_manager->GetImeKeyboard()->CapsLockIsEnabled()) {
170 // TODO(ivankr): use a format string instead of concatenation. 170 // TODO(ivankr): use a format string instead of concatenation.
171 error_text += "\n" + 171 error_text += "\n" +
172 l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_CAPS_LOCK_HINT); 172 l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_CAPS_LOCK_HINT);
173 } 173 }
174 174
175 // Display a hint to switch keyboards if there are other active input 175 // Display a hint to switch keyboards if there are other active input
176 // methods. 176 // methods.
177 if (ime_manager->GetNumActiveInputMethods() > 1) { 177 if (ime_manager->GetActiveIMEState()->GetNumActiveInputMethods() > 1) {
178 error_text += "\n" + 178 error_text += "\n" +
179 l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT); 179 l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT);
180 } 180 }
181 } 181 }
182 182
183 std::string help_link; 183 std::string help_link;
184 switch (error_msg_id) { 184 switch (error_msg_id) {
185 case IDS_LOGIN_ERROR_AUTHENTICATING_HOSTED: 185 case IDS_LOGIN_ERROR_AUTHENTICATING_HOSTED:
186 help_link = l10n_util::GetStringUTF8(IDS_LEARN_MORE); 186 help_link = l10n_util::GetStringUTF8(IDS_LEARN_MORE);
187 break; 187 break;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 delegate_->Signout(); 345 delegate_->Signout();
346 } 346 }
347 347
348 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) { 348 void WebUILoginDisplay::OnUserActivity(const ui::Event* event) {
349 if (delegate_) 349 if (delegate_)
350 delegate_->ResetPublicSessionAutoLoginTimer(); 350 delegate_->ResetPublicSessionAutoLoginTimer();
351 } 351 }
352 352
353 353
354 } // namespace chromeos 354 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698