Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // "m17n:ar:kbd" => "kbd (m17n)" | 87 // "m17n:ar:kbd" => "kbd (m17n)" |
| 88 std::string GetInputMethodDisplayNameFromId(const std::string& input_method_id); | 88 std::string GetInputMethodDisplayNameFromId(const std::string& input_method_id); |
| 89 | 89 |
| 90 // Converts an input method ID to an input method descriptor. Returns NULL | 90 // Converts an input method ID to an input method descriptor. Returns NULL |
| 91 // when |input_method_id| is unknown. | 91 // when |input_method_id| is unknown. |
| 92 // Example: "pinyin" => { id: "pinyin", display_name: "Pinyin", | 92 // Example: "pinyin" => { id: "pinyin", display_name: "Pinyin", |
| 93 // keyboard_layout: "us", language_code: "zh" } | 93 // keyboard_layout: "us", language_code: "zh" } |
| 94 const InputMethodDescriptor* GetInputMethodDescriptorFromId( | 94 const InputMethodDescriptor* GetInputMethodDescriptorFromId( |
| 95 const std::string& input_method_id); | 95 const std::string& input_method_id); |
| 96 | 96 |
| 97 // Converts a XKB layout ID to an input method descriptor. Returns NULL when | |
|
mazda
2011/08/17 02:13:27
nit: an XKB
Yusuke Sato
2011/08/17 02:30:21
Done.
| |
| 98 // |xkb_id| is unknown. | |
| 99 // Example: "us(dvorak)" => { id: "xkb:us:dvorak:eng", display_name: "US Dv..", | |
| 100 // keyboard_layout: "us(dvorak)", language_code: "eng" } | |
| 101 const InputMethodDescriptor* GetInputMethodDescriptorFromXkbId( | |
| 102 const std::string& xkb_id); | |
| 103 | |
| 97 // Converts a language code to a language display name, using the | 104 // Converts a language code to a language display name, using the |
| 98 // current application locale. MaybeRewriteLanguageName() is called | 105 // current application locale. MaybeRewriteLanguageName() is called |
| 99 // internally. | 106 // internally. |
| 100 // Examples: "fi" => "Finnish" | 107 // Examples: "fi" => "Finnish" |
| 101 // "en-US" => "English (United States)" | 108 // "en-US" => "English (United States)" |
| 102 string16 GetLanguageDisplayNameFromCode(const std::string& language_code); | 109 string16 GetLanguageDisplayNameFromCode(const std::string& language_code); |
| 103 | 110 |
| 104 // Converts a language code to a language native display name. | 111 // Converts a language code to a language native display name. |
| 105 // MaybeRewriteLanguageName() is called internally. | 112 // MaybeRewriteLanguageName() is called internally. |
| 106 // Examples: "fi" => "suomi" (rather than Finnish) | 113 // Examples: "fi" => "suomi" (rather than Finnish) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 const std::string& normalized_language_code, | 189 const std::string& normalized_language_code, |
| 183 InputMethodType type, | 190 InputMethodType type, |
| 184 std::vector<std::string>* out_input_method_ids); | 191 std::vector<std::string>* out_input_method_ids); |
| 185 | 192 |
| 186 void ReloadInternalMaps(); | 193 void ReloadInternalMaps(); |
| 187 | 194 |
| 188 } // namespace input_method | 195 } // namespace input_method |
| 189 } // namespace chromeos | 196 } // namespace chromeos |
| 190 | 197 |
| 191 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 198 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| OLD | NEW |