OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_IME_EXTENSION_IME_UTIL_H_ | 5 #ifndef CHROMEOS_IME_EXTENSION_IME_UTIL_H_ |
6 #define CHROMEOS_IME_EXTENSION_IME_UTIL_H_ | 6 #define CHROMEOS_IME_EXTENSION_IME_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 // Returns true if the |input_method| is a member of |extension_id| of extension | 74 // Returns true if the |input_method| is a member of |extension_id| of extension |
75 // IME, otherwise returns false. | 75 // IME, otherwise returns false. |
76 bool CHROMEOS_EXPORT IsMemberOfExtension(const std::string& input_method_id, | 76 bool CHROMEOS_EXPORT IsMemberOfExtension(const std::string& input_method_id, |
77 const std::string& extension_id); | 77 const std::string& extension_id); |
78 | 78 |
79 // Returns true if the |input_method_id| is the extension based xkb keyboard, | 79 // Returns true if the |input_method_id| is the extension based xkb keyboard, |
80 // otherwise returns false. | 80 // otherwise returns false. |
81 bool CHROMEOS_EXPORT IsKeyboardLayoutExtension( | 81 bool CHROMEOS_EXPORT IsKeyboardLayoutExtension( |
82 const std::string& input_method_id); | 82 const std::string& input_method_id); |
83 | 83 |
84 // Returns legacy engine id from the extension-based InputMethodID. This | |
Shu Chen
2014/07/02 02:29:04
s/legacy//
and mention only support component IME
michaelpg
2014/07/10 00:46:01
Done.
| |
85 // function does not check that |input_method_id| is installed. | |
86 std::string CHROMEOS_EXPORT GetEngineIDByInputMethodID( | |
87 const std::string& input_method_id); | |
88 | |
84 // Gets legacy xkb id (e.g. xkb:us::eng) from the new extension based xkb id | 89 // Gets legacy xkb id (e.g. xkb:us::eng) from the new extension based xkb id |
85 // (e.g. _comp_ime_...xkb:us::eng). If the given id is not prefixed with | 90 // (e.g. _comp_ime_...xkb:us::eng). If the given id is not prefixed with |
86 // 'xkb:', just return the same as the given id. | 91 // 'xkb:', just return the same as the given id. |
87 std::string CHROMEOS_EXPORT MaybeGetLegacyXkbId( | 92 std::string CHROMEOS_EXPORT MaybeGetLegacyXkbId( |
88 const std::string& input_method_id); | 93 const std::string& input_method_id); |
89 | 94 |
90 } // namespace extension_ime_util | 95 } // namespace extension_ime_util |
91 | 96 |
92 } // namespace chromeos | 97 } // namespace chromeos |
93 | 98 |
94 #endif // CHROMEOS_IME_EXTENSION_IME_UTIL_H_ | 99 #endif // CHROMEOS_IME_EXTENSION_IME_UTIL_H_ |
OLD | NEW |