| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86       const std::string& language_code, | 86       const std::string& language_code, | 
| 87       const InputMethodDescriptor& current_input_method, | 87       const InputMethodDescriptor& current_input_method, | 
| 88       std::vector<std::string>* out_input_method_ids) const; | 88       std::vector<std::string>* out_input_method_ids) const; | 
| 89 | 89 | 
| 90   // Gets the language codes associated with the given input method IDs. | 90   // Gets the language codes associated with the given input method IDs. | 
| 91   // The returned language codes won't have duplicates. | 91   // The returned language codes won't have duplicates. | 
| 92   void GetLanguageCodesFromInputMethodIds( | 92   void GetLanguageCodesFromInputMethodIds( | 
| 93       const std::vector<std::string>& input_method_ids, | 93       const std::vector<std::string>& input_method_ids, | 
| 94       std::vector<std::string>* out_language_codes) const; | 94       std::vector<std::string>* out_language_codes) const; | 
| 95 | 95 | 
|  | 96   // Gets first input method associated with the language. | 
|  | 97   // Returns empty string on error. | 
|  | 98   std::string GetLanguageDefaultInputMethodId(const std::string& language_code); | 
|  | 99 | 
| 96   // Returns the input method ID of the hardware keyboard. e.g. "xkb:us::eng" | 100   // Returns the input method ID of the hardware keyboard. e.g. "xkb:us::eng" | 
| 97   // for the US Qwerty keyboard. | 101   // for the US Qwerty keyboard. | 
| 98   std::string GetHardwareInputMethodId() const; | 102   std::string GetHardwareInputMethodId() const; | 
| 99 | 103 | 
|  | 104   // Returns the login-allowed input method ID of the hardware keyboard. | 
|  | 105   std::string GetHardwareLoginInputMethodId() const; | 
|  | 106 | 
|  | 107   // Returns true if given input method can be used to input login data. | 
|  | 108   bool IsLoginKeyboard(const std::string& input_method_id) const; | 
|  | 109 | 
| 100   // Returns true if the given input method id is supported. | 110   // Returns true if the given input method id is supported. | 
| 101   bool IsValidInputMethodId(const std::string& input_method_id) const; | 111   bool IsValidInputMethodId(const std::string& input_method_id) const; | 
| 102 | 112 | 
| 103   // Returns true if the given input method id is for a keyboard layout. | 113   // Returns true if the given input method id is for a keyboard layout. | 
| 104   static bool IsKeyboardLayout(const std::string& input_method_id); | 114   static bool IsKeyboardLayout(const std::string& input_method_id); | 
| 105 | 115 | 
| 106   // Sets the list of component extension IMEs. | 116   // Sets the list of component extension IMEs. | 
| 107   void SetComponentExtensions(const InputMethodDescriptors& imes); | 117   void SetComponentExtensions(const InputMethodDescriptors& imes); | 
| 108 | 118 | 
| 109   // Returns the fallback input method descriptor (the very basic US | 119   // Returns the fallback input method descriptor (the very basic US | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 163 | 173 | 
| 164   InputMethodDelegate* delegate_; | 174   InputMethodDelegate* delegate_; | 
| 165 | 175 | 
| 166   DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); | 176   DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); | 
| 167 }; | 177 }; | 
| 168 | 178 | 
| 169 }  // namespace input_method | 179 }  // namespace input_method | 
| 170 }  // namespace chromeos | 180 }  // namespace chromeos | 
| 171 | 181 | 
| 172 #endif  // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 182 #endif  // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 
| OLD | NEW | 
|---|