| 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 20fba084f74af58a0b5a476e7ee98c3599eb1587..469a9ffff80db5c046e8dd2abe5c3baab392548c 100644
|
| --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
|
| +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
|
| @@ -115,10 +115,11 @@ const struct MigrationHangulKeyboardToInputMethodID {
|
|
|
| } // namespace
|
|
|
| -bool InputMethodManagerImpl::IsFullLatinKeyboard(
|
| +bool InputMethodManagerImpl::IsLoginKeyboard(
|
| const std::string& layout) const {
|
| - const std::string& lang = util_.GetLanguageCodeFromInputMethodId(layout);
|
| - return full_latin_keyboard_checker.IsFullLatinKeyboard(layout, lang);
|
| + const InputMethodDescriptor* ime =
|
| + util_.GetInputMethodDescriptorFromId(layout);
|
| + return ime ? ime->is_login_keyboard() : false;
|
| }
|
|
|
| InputMethodManagerImpl::InputMethodManagerImpl(
|
| @@ -246,7 +247,7 @@ void InputMethodManagerImpl::EnableLayouts(const std::string& language_code,
|
| // layouts, so it appears first on the list of active input
|
| // methods at the input language status menu.
|
| if (util_.IsValidInputMethodId(initial_layout) &&
|
| - InputMethodUtil::IsKeyboardLayout(initial_layout)) {
|
| + IsLoginKeyboard(initial_layout)) {
|
| layouts.push_back(initial_layout);
|
| } else if (!initial_layout.empty()) {
|
| DVLOG(1) << "EnableLayouts: ignoring non-keyboard or invalid ID: "
|
| @@ -258,7 +259,7 @@ void InputMethodManagerImpl::EnableLayouts(const std::string& language_code,
|
| const std::string& candidate = candidates[i];
|
| // Not efficient, but should be fine, as the two vectors are very
|
| // short (2-5 items).
|
| - if (!Contains(layouts, candidate))
|
| + if (!Contains(layouts, candidate) && IsLoginKeyboard(candidate))
|
| layouts.push_back(candidate);
|
| }
|
|
|
| @@ -575,7 +576,7 @@ void InputMethodManagerImpl::AddInputMethodExtension(
|
| }
|
|
|
| extra_input_methods_[id] =
|
| - InputMethodDescriptor(id, name, layouts, languages, options_url);
|
| + InputMethodDescriptor(id, name, layouts, languages, false, options_url);
|
| if (Contains(enabled_extension_imes_, id) &&
|
| !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) {
|
| if (!Contains(active_input_method_ids_, id)) {
|
| @@ -938,7 +939,7 @@ void InputMethodManagerImpl::OnScreenLocked() {
|
| const std::string& input_method_id = saved_active_input_method_ids_[i];
|
| // Skip if it's not a keyboard layout. Drop input methods including
|
| // extension ones.
|
| - if (!InputMethodUtil::IsKeyboardLayout(input_method_id))
|
| + if (!IsLoginKeyboard(input_method_id))
|
| continue;
|
| active_input_method_ids_.push_back(input_method_id);
|
| if (input_method_id == hardware_keyboard_id)
|
|
|