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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test fixed. Re-sorted methods of StateImpl and IMM. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/lock/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
index 3dd1dc84e4b2368864d53bb4057f3f7a02b1023f..47eea7e0fcfb594dde1365ee3cff2912a8ff6806 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -205,12 +205,17 @@ void ScreenLocker::OnAuthSuccess(const UserContext& user_context) {
const user_manager::User* user =
user_manager::UserManager::Get()->FindUser(user_context.GetUserID());
if (user) {
- if (!user->is_active())
+ if (user->is_active()) {
+ DCHECK(saved_ime_state_);
+ input_method::InputMethodManager::Get()->SetState(saved_ime_state_);
+ } else {
user_manager::UserManager::Get()->SwitchActiveUser(
user_context.GetUserID());
+ }
} else {
NOTREACHED() << "Logged in user not found.";
}
+ saved_ime_state_ = NULL;
authentication_capture_.reset(new AuthenticationParametersCapture());
authentication_capture_->user_context = user_context;
@@ -475,6 +480,12 @@ void ScreenLocker::ScreenLockReady() {
ash::Shell::GetInstance()->
desktop_background_controller()->MoveDesktopToLockedContainer();
+ input_method::InputMethodManager* imm =
+ input_method::InputMethodManager::Get();
+ saved_ime_state_ = imm->GetActiveIMEState();
+ imm->SetState(saved_ime_state_->Clone());
+ imm->GetActiveIMEState()->EnableLockScreenLayouts();
+
bool state = true;
VLOG(1) << "Emitting SCREEN_LOCK_STATE_CHANGED with state=" << state;
content::NotificationService::current()->Notify(
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.h ('k') | chrome/browser/chromeos/login/session/user_session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698