OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/screen_locker.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } | 224 } |
225 | 225 |
226 EnableInput(); | 226 EnableInput(); |
227 // Don't enable signout button here as we're showing | 227 // Don't enable signout button here as we're showing |
228 // MessageBubble. | 228 // MessageBubble. |
229 | 229 |
230 string16 msg = l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_AUTHENTICATING); | 230 string16 msg = l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_AUTHENTICATING); |
231 | 231 |
232 // TODO(ivankr): use a format string instead of concatenation. | 232 // TODO(ivankr): use a format string instead of concatenation. |
233 // Display a warning if Caps Lock is on. | 233 // Display a warning if Caps Lock is on. |
234 if (input_method::XKeyboard::CapsLockIsEnabled()) { | 234 input_method::InputMethodManager* ime_manager = |
| 235 input_method::InputMethodManager::GetInstance(); |
| 236 if (ime_manager->GetXKeyboard()->CapsLockIsEnabled()) { |
235 msg += ASCIIToUTF16("\n") + | 237 msg += ASCIIToUTF16("\n") + |
236 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_CAPS_LOCK_HINT); | 238 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_CAPS_LOCK_HINT); |
237 } | 239 } |
238 | 240 |
239 input_method::InputMethodManager* input_method_manager = | 241 input_method::InputMethodManager* input_method_manager = |
240 input_method::InputMethodManager::GetInstance(); | 242 input_method::InputMethodManager::GetInstance(); |
241 if (input_method_manager->GetNumActiveInputMethods() > 1) | 243 if (input_method_manager->GetNumActiveInputMethods() > 1) |
242 msg += ASCIIToUTF16("\n") + | 244 msg += ASCIIToUTF16("\n") + |
243 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT); | 245 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_KEYBOARD_SWITCH_HINT); |
244 | 246 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 bool state = true; | 442 bool state = true; |
441 content::NotificationService::current()->Notify( | 443 content::NotificationService::current()->Notify( |
442 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, | 444 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, |
443 content::Source<ScreenLocker>(this), | 445 content::Source<ScreenLocker>(this), |
444 content::Details<bool>(&state)); | 446 content::Details<bool>(&state)); |
445 DBusThreadManager::Get()->GetPowerManagerClient()-> | 447 DBusThreadManager::Get()->GetPowerManagerClient()-> |
446 NotifyScreenLockCompleted(); | 448 NotifyScreenLockCompleted(); |
447 } | 449 } |
448 | 450 |
449 } // namespace chromeos | 451 } // namespace chromeos |
OLD | NEW |