Index: chromeos/ime/extension_ime_util.h |
diff --git a/chromeos/ime/extension_ime_util.h b/chromeos/ime/extension_ime_util.h |
index bdcc896c631f321bd0bc72a315d2183e04c39c2d..541d7b8810ec66732bb08067dbabb95771649f95 100644 |
--- a/chromeos/ime/extension_ime_util.h |
+++ b/chromeos/ime/extension_ime_util.h |
@@ -32,6 +32,10 @@ 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). |
+const std::string CHROMEOS_EXPORT GetInputMethodIDByKeyboardLayout( |
Yuki
2014/03/04 04:04:45
const in |const std::string| is meaningless. If y
Shu Chen
2014/03/04 04:45:02
Done.
|
+ const std::string& keyboard_layout_id); |
+ |
// Returns true if |input_method_id| is extension IME ID. This function does not |
// check |input_method_id| is installed extension IME. |
bool CHROMEOS_EXPORT IsExtensionIME(const std::string& input_method_id); |
@@ -53,6 +57,22 @@ 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(); |
+ |
+// Sets true to forcibly let UseWrappedExtensionKeyboardLayouts() function |
+// return true for testing purpose, sets false to restore. |
+// Returns the original flag value. |
+bool CHROMEOS_EXPORT SetUseWrappedExtensionKeyboardLayoutsFlagForTesting( |
Yuki
2014/03/04 04:04:45
Please consider to make this a class named ScopedF
Shu Chen
2014/03/04 04:45:02
Done.
|
+ bool enabled); |
+ |
+// 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. |
+const std::string CHROMEOS_EXPORT MaybeGetLegacyXkbId( |
Yuki
2014/03/04 04:04:45
Ditto for const in |const std::string|.
Shu Chen
2014/03/04 04:45:02
Done.
|
+ const std::string& input_method_id); |
+ |
} // namespace extension_ime_util |
} // namespace chromeos |