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

Unified Diff: chrome/browser/ui/webui/chromeos/login/network_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/network_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
index 47cb912b3188b4fe6d7715dc74b26171534b399b..e2e9ea325883805fa6621e8f50d14189361b0465 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
@@ -193,13 +193,16 @@ void NetworkScreenHandler::GetAdditionalParameters(
const std::string selected_language = selected_language_code_.empty() ?
application_locale : selected_language_code_;
const std::string selected_input_method =
- input_method::InputMethodManager::Get()->GetCurrentInputMethod().id();
+ input_method::InputMethodManager::Get()
+ ->GetActiveIMEState()
+ ->GetCurrentInputMethod()
+ .id();
dict->Set("languageList",
GetUILanguageList(NULL, selected_language).release());
dict->Set("inputMethodsList",
- GetLoginKeyboardLayouts(application_locale,
- selected_input_method).release());
+ GetAndActivateLoginKeyboardLayouts(
+ application_locale, selected_input_method).release());
dict->Set("timezoneList", GetTimezoneList());
}
@@ -303,7 +306,9 @@ void NetworkScreenHandler::HandleOnLanguageChanged(const std::string& locale) {
}
void NetworkScreenHandler::HandleOnInputMethodChanged(const std::string& id) {
- input_method::InputMethodManager::Get()->ChangeInputMethod(id);
+ input_method::InputMethodManager::Get()
+ ->GetActiveIMEState()
+ ->ChangeInputMethod(id, false /* show_message */);
}
void NetworkScreenHandler::HandleOnTimezoneChanged(
@@ -324,7 +329,8 @@ void NetworkScreenHandler::OnSystemTimezoneChanged() {
void NetworkScreenHandler::InputMethodChanged(
input_method::InputMethodManager* manager, bool show_message) {
- CallJS("setInputMethod", manager->GetCurrentInputMethod().id());
+ CallJS("setInputMethod",
+ manager->GetActiveIMEState()->GetCurrentInputMethod().id());
}
void NetworkScreenHandler::ReloadLocalizedContent() {
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/l10n_util.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698