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

Unified Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.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/ui/webui/chromeos/login/signin_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 138e06ff1a435fe887e73dbb1c9891ed4bf1b454..9ff3d1fabc45c8311cc1fe75a1285995065693ef 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -214,14 +214,16 @@ static bool SetUserInputMethodImpl(
return false;
}
- if (!Contains(manager->GetActiveInputMethodIds(), input_method)) {
- if (!manager->EnableInputMethod(input_method)) {
+ if (!Contains(manager->GetActiveIMEState()->GetActiveInputMethodIds(),
+ input_method)) {
+ if (!manager->GetActiveIMEState()->EnableInputMethod(input_method)) {
DLOG(ERROR) << "SigninScreenHandler::SetUserInputMethod('" << username
<< "'): user input method '" << input_method
<< "' is not enabled and enabling failed (ignored!).";
}
}
- manager->ChangeInputMethod(input_method);
+ manager->GetActiveIMEState()->ChangeInputMethod(input_method,
+ false /* show_message */);
return true;
}
@@ -995,7 +997,7 @@ void SigninScreenHandler::SetUserInputMethod(const std::string& username) {
DVLOG(0) << "SetUserInputMethod('" << username
<< "'): failed to set user layout. Switching to default.";
- manager->SetInputMethodLoginDefault();
+ manager->GetActiveIMEState()->SetInputMethodLoginDefault();
}
}

Powered by Google App Engine
This is Rietveld 408576698