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

Unified Diff: chromeos/ime/extension_ime_util.h

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: chromeos/ime/extension_ime_util.h
diff --git a/chromeos/ime/extension_ime_util.h b/chromeos/ime/extension_ime_util.h
index e663229a22043ecfdd35bd3827f2ac35df480b20..2bfc42b461fb4429e2f78924a583008dad2a5998 100644
--- a/chromeos/ime/extension_ime_util.h
+++ b/chromeos/ime/extension_ime_util.h
@@ -15,6 +15,26 @@ namespace chromeos {
// Extension IME related utilities.
namespace extension_ime_util {
+#if defined(OFFICIAL_BUILD)
+const char kXkbExtensionId[] = "jkghodnilhceideoidjikpgommlajknk";
+const char kM17nExtensionId[] = "habcdindjejkmepknlhkkloncjcpcnbf";
+const char kHangulExtensionId[] = "bdgdidmhaijohebebipajioienkglgfo";
+const char kMozcExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop";
+const char kT13nExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop";
+const char kChinesePinyinExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop";
+const char kChineseZhuyinExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop";
+const char kChineseCangjieExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop";
+#else
+const char kXkbExtensionId[] = "fgoepimhcoialccpbmpnnblemnepkkao";
+const char kM17nExtensionId[] = "jhffeifommiaekmbkkjlpmilogcfdohp";
+const char kHangulExtensionId[] = "bdgdidmhaijohebebipajioienkglgfo";
+const char kMozcExtensionId[] = "bbaiamgfapehflhememkfglaehiobjnk";
+const char kT13nExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop";
+const char kChinesePinyinExtensionId[] = "cpgalbafkoofkjmaeonnfijgpfennjjn";
+const char kChineseZhuyinExtensionId[] = "ekbifjdfhkmdeeajnolmgdlmkllopefi";
+const char kChineseCangjieExtensionId[] = "aeebooiibjahgpgmhkeocbeekccfknbj";
+#endif
+
// Returns InputMethodID for |engine_id| in |extension_id| of extension IME.
// This function does not check |extension_id| is installed extension IME nor
// |engine_id| is really a member of |extension_id|.
@@ -33,9 +53,12 @@ std::string CHROMEOS_EXPORT GetComponentInputMethodID(
std::string CHROMEOS_EXPORT GetExtensionIDFromInputMethodID(
const std::string& input_method_id);
-// Returns InputMethodID from keyboard layout (xkb) id (e.g. xkb:fr:fra).
-std::string CHROMEOS_EXPORT GetInputMethodIDByKeyboardLayout(
- const std::string& keyboard_layout_id);
+// Returns InputMethodID from engine id (e.g. xkb:fr:fra), or returns itself if
+// the |engine_id| is not a known engine id.
+// The caller must make sure the |engine_id| is from system input methods
+// instead of 3rd party input methods.
+std::string CHROMEOS_EXPORT GetInputMethodIDByEngineID(
+ const std::string& engine_id);
// Returns true if |input_method_id| is extension IME ID. This function does not
// check |input_method_id| is installed extension IME.
@@ -58,27 +81,12 @@ bool CHROMEOS_EXPORT IsMemberOfExtension(const std::string& input_method_id,
bool CHROMEOS_EXPORT IsKeyboardLayoutExtension(
const std::string& input_method_id);
-// Returns true to use the wrapped extension keyboards instead of the legacy
-// xkb keyboards, returns false otherwise.
-bool CHROMEOS_EXPORT UseWrappedExtensionKeyboardLayouts();
-
// Gets legacy xkb id (e.g. xkb:us::eng) from the new extension based xkb id
// (e.g. _comp_ime_...xkb:us::eng). If the given id is not prefixed with
// 'xkb:', just return the same as the given id.
std::string CHROMEOS_EXPORT MaybeGetLegacyXkbId(
const std::string& input_method_id);
-// The scoped class to temporarily set the flag to use extension based xkb
-// keyboards for testing.
-class CHROMEOS_EXPORT ScopedUseExtensionKeyboardFlagForTesting {
- public:
- explicit ScopedUseExtensionKeyboardFlagForTesting(bool new_flag);
- ~ScopedUseExtensionKeyboardFlagForTesting();
-
- private:
- base::AutoReset<bool> auto_reset_;
-};
-
} // namespace extension_ime_util
} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc ('k') | chromeos/ime/extension_ime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698