OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 21 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
22 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 22 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
23 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 23 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
24 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 24 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
25 #include "chrome/browser/chromeos/language_preferences.h" | 25 #include "chrome/browser/chromeos/language_preferences.h" |
26 #include "chrome/browser/chromeos/login/authenticator.h" | 26 #include "chrome/browser/chromeos/login/authenticator.h" |
27 #include "chrome/browser/chromeos/login/login_performer.h" | 27 #include "chrome/browser/chromeos/login/login_performer.h" |
28 #include "chrome/browser/chromeos/login/login_utils.h" | 28 #include "chrome/browser/chromeos/login/login_utils.h" |
29 #include "chrome/browser/chromeos/login/user_manager.h" | 29 #include "chrome/browser/chromeos/login/user_manager.h" |
30 #include "chrome/browser/chromeos/login/webui_screen_locker.h" | 30 #include "chrome/browser/chromeos/login/webui_screen_locker.h" |
| 31 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
31 #include "chrome/browser/profiles/profile.h" | 32 #include "chrome/browser/profiles/profile.h" |
32 #include "chrome/browser/profiles/profile_manager.h" | 33 #include "chrome/browser/profiles/profile_manager.h" |
33 #include "chrome/browser/sync/profile_sync_service.h" | 34 #include "chrome/browser/sync/profile_sync_service.h" |
34 #include "chrome/browser/ui/browser.h" | 35 #include "chrome/browser/ui/browser.h" |
35 #include "chrome/browser/ui/browser_list.h" | 36 #include "chrome/browser/ui/browser_list.h" |
36 #include "chrome/browser/ui/browser_window.h" | 37 #include "chrome/browser/ui/browser_window.h" |
37 #include "chrome/common/chrome_notification_types.h" | 38 #include "chrome/common/chrome_notification_types.h" |
38 #include "chrome/common/chrome_switches.h" | 39 #include "chrome/common/chrome_switches.h" |
39 #include "content/public/browser/browser_thread.h" | 40 #include "content/public/browser/browser_thread.h" |
40 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 81 |
81 virtual void LockScreen() OVERRIDE { | 82 virtual void LockScreen() OVERRIDE { |
82 VLOG(1) << "In: ScreenLockObserver::LockScreen"; | 83 VLOG(1) << "In: ScreenLockObserver::LockScreen"; |
83 SetupInputMethodsForScreenLocker(); | 84 SetupInputMethodsForScreenLocker(); |
84 chromeos::ScreenLocker::Show(); | 85 chromeos::ScreenLocker::Show(); |
85 } | 86 } |
86 | 87 |
87 virtual void UnlockScreen() OVERRIDE { | 88 virtual void UnlockScreen() OVERRIDE { |
88 RestoreInputMethods(); | 89 RestoreInputMethods(); |
89 chromeos::ScreenLocker::Hide(); | 90 chromeos::ScreenLocker::Hide(); |
| 91 chromeos::StatusAreaViewChromeos::SetScreenMode( |
| 92 chromeos::StatusAreaViewChromeos::BROWSER_MODE); |
| 93 |
90 } | 94 } |
91 | 95 |
92 virtual void UnlockScreenFailed() OVERRIDE { | 96 virtual void UnlockScreenFailed() OVERRIDE { |
93 chromeos::ScreenLocker::UnlockScreenFailed(); | 97 chromeos::ScreenLocker::UnlockScreenFailed(); |
94 } | 98 } |
95 | 99 |
96 private: | 100 private: |
97 // Temporarily deactivates all input methods (e.g. Chinese, Japanese, Arabic) | 101 // Temporarily deactivates all input methods (e.g. Chinese, Japanese, Arabic) |
98 // since they are not necessary to input a login password. Users are still | 102 // since they are not necessary to input a login password. Users are still |
99 // able to use/switch active keyboard layouts (e.g. US qwerty, US dvorak, | 103 // able to use/switch active keyboard layouts (e.g. US qwerty, US dvorak, |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 bool state = true; | 459 bool state = true; |
456 content::NotificationService::current()->Notify( | 460 content::NotificationService::current()->Notify( |
457 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, | 461 chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, |
458 content::Source<ScreenLocker>(this), | 462 content::Source<ScreenLocker>(this), |
459 content::Details<bool>(&state)); | 463 content::Details<bool>(&state)); |
460 DBusThreadManager::Get()->GetPowerManagerClient()-> | 464 DBusThreadManager::Get()->GetPowerManagerClient()-> |
461 NotifyScreenLockCompleted(); | 465 NotifyScreenLockCompleted(); |
462 } | 466 } |
463 | 467 |
464 } // namespace chromeos | 468 } // namespace chromeos |
OLD | NEW |