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

Unified Diff: chrome/browser/ui/webui/chromeos/login/l10n_util.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/l10n_util.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
index 34a690dcedd22a20ce269d68ee05312756be3294..9916106027bf28b933156825609273396fdc4165 100644
--- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
+++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
@@ -382,7 +382,7 @@ scoped_ptr<base::ListValue> GetAcceptLanguageList() {
false);
}
-scoped_ptr<base::ListValue> GetLoginKeyboardLayouts(
+scoped_ptr<base::ListValue> GetAndActivateLoginKeyboardLayouts(
const std::string& locale,
const std::string& selected) {
scoped_ptr<base::ListValue> input_methods_list(new base::ListValue);
@@ -392,10 +392,12 @@ scoped_ptr<base::ListValue> GetLoginKeyboardLayouts(
const std::vector<std::string>& hardware_login_input_methods =
util->GetHardwareLoginInputMethodIds();
- manager->EnableLoginLayouts(locale, hardware_login_input_methods);
+
+ manager->GetActiveIMEState()->EnableLoginLayouts(
+ locale, hardware_login_input_methods);
scoped_ptr<input_method::InputMethodDescriptors> input_methods(
- manager->GetActiveInputMethods());
+ manager->GetActiveIMEState()->GetActiveInputMethods());
std::set<std::string> input_methods_added;
for (std::vector<std::string>::const_iterator i =
@@ -468,7 +470,9 @@ void GetKeyboardLayoutsForLocale(
scoped_ptr<base::DictionaryValue> GetCurrentKeyboardLayout() {
const input_method::InputMethodDescriptor current_input_method =
- input_method::InputMethodManager::Get()->GetCurrentInputMethod();
+ input_method::InputMethodManager::Get()
+ ->GetActiveIMEState()
+ ->GetCurrentInputMethod();
return CreateInputMethodsEntry(current_input_method,
current_input_method.id());
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/l10n_util.h ('k') | chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698