| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const std::string& input_method_id) const; | 66 const std::string& input_method_id) const; |
| 67 | 67 |
| 68 // Converts an input method ID to a display name of the IME. Returns | 68 // Converts an input method ID to a display name of the IME. Returns |
| 69 // an empty strng when |input_method_id| is unknown. | 69 // an empty strng when |input_method_id| is unknown. |
| 70 // Examples: "pinyin" => "Pinyin" | 70 // Examples: "pinyin" => "Pinyin" |
| 71 std::string GetInputMethodDisplayNameFromId( | 71 std::string GetInputMethodDisplayNameFromId( |
| 72 const std::string& input_method_id) const; | 72 const std::string& input_method_id) const; |
| 73 | 73 |
| 74 string16 GetInputMethodShortName( | 74 string16 GetInputMethodShortName( |
| 75 const InputMethodDescriptor& input_method) const; | 75 const InputMethodDescriptor& input_method) const; |
| 76 string16 GetInputMethodLongName(const InputMethodDescriptor& ime) const; | 76 string16 GetInputMethodMediumName( |
| 77 const InputMethodDescriptor& input_method) const; |
| 78 string16 GetInputMethodLongName( |
| 79 const InputMethodDescriptor& input_method) const; |
| 77 | 80 |
| 78 // Converts an input method ID to an input method descriptor. Returns NULL | 81 // Converts an input method ID to an input method descriptor. Returns NULL |
| 79 // when |input_method_id| is unknown. | 82 // when |input_method_id| is unknown. |
| 80 // Example: "pinyin" => { id: "pinyin", display_name: "Pinyin", | 83 // Example: "pinyin" => { id: "pinyin", display_name: "Pinyin", |
| 81 // keyboard_layout: "us", language_code: "zh" } | 84 // keyboard_layout: "us", language_code: "zh" } |
| 82 const InputMethodDescriptor* GetInputMethodDescriptorFromId( | 85 const InputMethodDescriptor* GetInputMethodDescriptorFromId( |
| 83 const std::string& input_method_id) const; | 86 const std::string& input_method_id) const; |
| 84 | 87 |
| 85 // Converts an XKB layout ID to an input method descriptor. Returns NULL when | 88 // Converts an XKB layout ID to an input method descriptor. Returns NULL when |
| 86 // |xkb_id| is unknown. | 89 // |xkb_id| is unknown. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 typedef base::hash_map<std::string, int> HashType; | 201 typedef base::hash_map<std::string, int> HashType; |
| 199 HashType english_to_resource_id_; | 202 HashType english_to_resource_id_; |
| 200 | 203 |
| 201 std::string hardware_input_method_id_for_testing_; | 204 std::string hardware_input_method_id_for_testing_; |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace input_method | 207 } // namespace input_method |
| 205 } // namespace chromeos | 208 } // namespace chromeos |
| 206 | 209 |
| 207 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 210 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| OLD | NEW |