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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 308623002: Initialize IMF with a whitelist of input methods so that login screen doesn't need to wait for comp… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
index 91f399329a424d4d64291328ea572ee443ee883c..ca247ab3ab1895139df1713a1a6f3418819a4777 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -117,7 +117,20 @@ InputMethodManagerImpl::GetSupportedInputMethods() const {
whitelist_.GetSupportedInputMethods();
if (!extension_ime_util::UseWrappedExtensionKeyboardLayouts())
return whitelist_imes.Pass();
- return scoped_ptr<InputMethodDescriptors>(new InputMethodDescriptors).Pass();
+
+ InputMethodDescriptors* input_methods = new InputMethodDescriptors;
+ if (!component_extension_ime_manager_->IsInitialized()) {
+ for (size_t i = 0; i < whitelist_imes->size(); ++i) {
+ const InputMethodDescriptor& ime = (*whitelist_imes.get())[i];
+ input_methods->push_back(InputMethodDescriptor(
+ extension_ime_util::GetInputMethodIDByKeyboardLayout(
+ ime.id()),
+ ime.name(), ime.indicator(), ime.keyboard_layouts(),
+ ime.language_codes(), ime.is_login_keyboard(),
+ ime.options_page_url(), ime.input_view_url()));
+ }
+ }
+ return scoped_ptr<InputMethodDescriptors>(input_methods).Pass();
}
scoped_ptr<InputMethodDescriptors>
@@ -329,9 +342,7 @@ bool InputMethodManagerImpl::ChangeInputMethodInternal(
}
if (!component_extension_ime_manager_->IsInitialized() &&
- (!InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch) ||
- extension_ime_util::IsKeyboardLayoutExtension(
- input_method_id_to_switch))) {
+ !InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch)) {
// We can't change input method before the initialization of
// component extension ime manager. ChangeInputMethod will be
// called with |pending_input_method_| when the initialization is
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698