| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const std::vector<std::string>& input_method_ids, | 97 const std::vector<std::string>& input_method_ids, |
| 98 std::vector<std::string>* out_language_codes) const; | 98 std::vector<std::string>* out_language_codes) const; |
| 99 | 99 |
| 100 // Gets first input method associated with the language. | 100 // Gets first input method associated with the language. |
| 101 // Returns empty string on error. | 101 // Returns empty string on error. |
| 102 std::string GetLanguageDefaultInputMethodId(const std::string& language_code); | 102 std::string GetLanguageDefaultInputMethodId(const std::string& language_code); |
| 103 | 103 |
| 104 // Migrates the legacy xkb id to extension based xkb id. | 104 // Migrates the legacy xkb id to extension based xkb id. |
| 105 // Returns true if the given input method id list is modified, | 105 // Returns true if the given input method id list is modified, |
| 106 // returns false otherwise. | 106 // returns false otherwise. |
| 107 // TODO(shuchen): Remove this function after few milestones are passed. | 107 // This method should not be removed because it's required to transfer XKB |
| 108 // See: http://crbug.com/345604 | 108 // input method ID from VPD into extension-based XKB input method ID. |
| 109 bool MigrateXkbInputMethods( | 109 bool MigrateInputMethods(std::vector<std::string>* input_method_ids); |
| 110 std::vector<std::string>* input_method_ids); | |
| 111 | 110 |
| 112 // Updates the internal cache of hardware layouts. | 111 // Updates the internal cache of hardware layouts. |
| 113 void UpdateHardwareLayoutCache(); | 112 void UpdateHardwareLayoutCache(); |
| 114 | 113 |
| 115 // Set hardware keyboard layout for testing purpose. This is for simulating | 114 // Set hardware keyboard layout for testing purpose. This is for simulating |
| 116 // "keyboard_layout" entry in VPD values. | 115 // "keyboard_layout" entry in VPD values. |
| 117 void SetHardwareKeyboardLayoutForTesting(const std::string& layout); | 116 void SetHardwareKeyboardLayoutForTesting(const std::string& layout); |
| 118 | 117 |
| 119 // Fills the input method IDs of the hardware keyboard. e.g. "xkb:us::eng" | 118 // Fills the input method IDs of the hardware keyboard. e.g. "xkb:us::eng" |
| 120 // for US Qwerty keyboard or "xkb:ru::rus" for Russian keyboard. | 119 // for US Qwerty keyboard or "xkb:ru::rus" for Russian keyboard. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 std::vector<std::string> hardware_login_layouts_; | 201 std::vector<std::string> hardware_login_layouts_; |
| 203 std::vector<std::string> cached_hardware_layouts_; | 202 std::vector<std::string> cached_hardware_layouts_; |
| 204 | 203 |
| 205 DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); | 204 DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); |
| 206 }; | 205 }; |
| 207 | 206 |
| 208 } // namespace input_method | 207 } // namespace input_method |
| 209 } // namespace chromeos | 208 } // namespace chromeos |
| 210 | 209 |
| 211 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 210 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| OLD | NEW |