| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // This function should be called when Chrome's application locale is | 121 // This function should be called when Chrome's application locale is |
| 122 // changed, so that the internal maps of this library is reloaded. | 122 // changed, so that the internal maps of this library is reloaded. |
| 123 void OnLocaleChanged(); | 123 void OnLocaleChanged(); |
| 124 | 124 |
| 125 // Returns true if the given input method id is supported. | 125 // Returns true if the given input method id is supported. |
| 126 bool IsValidInputMethodId(const std::string& input_method_id) const; | 126 bool IsValidInputMethodId(const std::string& input_method_id) const; |
| 127 | 127 |
| 128 // Returns true if the given input method id is for a keyboard layout. | 128 // Returns true if the given input method id is for a keyboard layout. |
| 129 static bool IsKeyboardLayout(const std::string& input_method_id); | 129 static bool IsKeyboardLayout(const std::string& input_method_id); |
| 130 | 130 |
| 131 // Returns true if the given input method id is for an extension input method. | |
| 132 static bool IsExtensionInputMethod(const std::string& input_method_id); | |
| 133 | |
| 134 // Converts a language code to a language display name, using the | 131 // Converts a language code to a language display name, using the |
| 135 // current application locale. MaybeRewriteLanguageName() is called | 132 // current application locale. MaybeRewriteLanguageName() is called |
| 136 // internally. | 133 // internally. |
| 137 // Examples: "fi" => "Finnish" | 134 // Examples: "fi" => "Finnish" |
| 138 // "en-US" => "English (United States)" | 135 // "en-US" => "English (United States)" |
| 139 string16 GetLanguageDisplayNameFromCode( | 136 string16 GetLanguageDisplayNameFromCode( |
| 140 const std::string& language_code); | 137 const std::string& language_code); |
| 141 | 138 |
| 142 // Converts a language code to a language native display name. | 139 // Converts a language code to a language native display name. |
| 143 // MaybeRewriteLanguageName() is called internally. | 140 // MaybeRewriteLanguageName() is called internally. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 199 |
| 203 InputMethodDelegate* delegate_; | 200 InputMethodDelegate* delegate_; |
| 204 | 201 |
| 205 DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); | 202 DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); |
| 206 }; | 203 }; |
| 207 | 204 |
| 208 } // namespace input_method | 205 } // namespace input_method |
| 209 } // namespace chromeos | 206 } // namespace chromeos |
| 210 | 207 |
| 211 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 208 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| OLD | NEW |