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

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

Issue 309623005: Remove the flag g_use_wrapped_extension_keyboard_layouts. (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
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 58ddabe580544c5ec2d7456f1b2e322564f2d76e..5db79918d225c8b855a2a05be3e93fa079dca0ca 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -35,9 +35,6 @@ namespace input_method {
namespace {
-const char nacl_mozc_jp_id[] =
- "_comp_ime_gjaehgfemfahhmlgpdfknkhdnemmolopnacl_mozc_jp";
-
bool Contains(const std::vector<std::string>& container,
const std::string& value) {
return std::find(container.begin(), container.end(), value) !=
@@ -115,7 +112,7 @@ scoped_ptr<InputMethodDescriptors>
InputMethodManagerImpl::GetSupportedInputMethods() const {
scoped_ptr<InputMethodDescriptors> whitelist_imes =
whitelist_.GetSupportedInputMethods();
- if (!extension_ime_util::UseWrappedExtensionKeyboardLayouts())
+ if (!component_extension_ime_manager_->IsInitialized())
return whitelist_imes.Pass();
return scoped_ptr<InputMethodDescriptors>(new InputMethodDescriptors).Pass();
}
@@ -229,8 +226,7 @@ void InputMethodManagerImpl::EnableLoginLayouts(
// you can pass empty |initial_layout|.
ChangeInputMethod(initial_layouts.empty() ? "" :
- extension_ime_util::GetInputMethodIDByKeyboardLayout(
- initial_layouts[0]));
+ extension_ime_util::GetInputMethodIDByEngineID(initial_layouts[0]));
}
// Adds new input method to given list.
@@ -670,15 +666,19 @@ bool InputMethodManagerImpl::SwitchInputMethod(
std::vector<std::string> input_method_ids_to_switch;
switch (accelerator.key_code()) {
case ui::VKEY_CONVERT: // Henkan key on JP106 keyboard
- input_method_ids_to_switch.push_back(nacl_mozc_jp_id);
+ input_method_ids_to_switch.push_back(
+ extension_ime_util::GetInputMethodIDByEngineID("nacl_mozc_jp"));
break;
case ui::VKEY_NONCONVERT: // Muhenkan key on JP106 keyboard
- input_method_ids_to_switch.push_back("xkb:jp::jpn");
+ input_method_ids_to_switch.push_back(
+ extension_ime_util::GetInputMethodIDByEngineID("xkb:jp::jpn"));
break;
case ui::VKEY_DBE_SBCSCHAR: // ZenkakuHankaku key on JP106 keyboard
case ui::VKEY_DBE_DBCSCHAR:
- input_method_ids_to_switch.push_back(nacl_mozc_jp_id);
- input_method_ids_to_switch.push_back("xkb:jp::jpn");
+ input_method_ids_to_switch.push_back(
+ extension_ime_util::GetInputMethodIDByEngineID("nacl_mozc_jp"));
+ input_method_ids_to_switch.push_back(
+ extension_ime_util::GetInputMethodIDByEngineID("xkb:jp::jpn"));
break;
default:
NOTREACHED();
@@ -689,8 +689,6 @@ bool InputMethodManagerImpl::SwitchInputMethod(
return false;
}
- MigrateInputMethods(&input_method_ids_to_switch);
-
// Obtain the intersection of input_method_ids_to_switch and
// active_input_method_ids_. The order of IDs in active_input_method_ids_ is
// preserved.

Powered by Google App Engine
This is Rietveld 408576698