| 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 <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 14 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 namespace input_method { | 17 namespace input_method { |
| 18 | 18 |
| 19 // The list of language that do not have associated input methods in IBus. | 19 // The list of language that do not have associated input methods in IBus. |
| 20 // For these languages, we associate input methods here. | 20 // For these languages, we associate input methods here. |
| 21 const struct ExtraLanguage { | 21 const struct ExtraLanguage { |
| 22 const char* language_code; | 22 const char* language_code; |
| 23 const char* input_method_id; | 23 const char* input_method_id; |
| 24 } kExtraLanguages[] = { | 24 } kExtraLanguages[] = { |
| 25 { "en-AU", "xkb:us::eng" }, // For Austrailia, use US keyboard layout. | 25 { "en-AU", "xkb:us::eng" }, // For Austrailia, use US keyboard layout. |
| 26 { "id", "xkb:us::eng" }, // For Indonesian, use US keyboard layout. | 26 { "id", "xkb:us::eng" }, // For Indonesian, use US keyboard layout. |
| 27 // The code "fil" comes from app/l10_util.cc. | 27 // The code "fil" comes from app/l10_util.cc. |
| 28 { "fil", "xkb:us::eng" }, // For Filipino, use US keyboard layout. | 28 { "fil", "xkb:us::eng" }, // For Filipino, use US keyboard layout. |
| 29 // For Netherlands, use US international keyboard layout. |
| 30 { "nl", "xkb:us:intl:eng" }, |
| 29 // The code "es-419" comes from app/l10_util.cc. | 31 // The code "es-419" comes from app/l10_util.cc. |
| 30 // For Spanish in Latin America, use Latin American keyboard layout. | 32 // For Spanish in Latin America, use Latin American keyboard layout. |
| 31 { "es-419", "xkb:latam::spa" }, | 33 { "es-419", "xkb:latam::spa" }, |
| 32 }; | 34 }; |
| 33 // TODO(yusukes): Move |kExtraLanguages| to input_method_util.cc. | 35 // TODO(yusukes): Move |kExtraLanguages| to input_method_util.cc. |
| 34 | 36 |
| 35 // Converts a string sent from IBus IME engines, which is written in English, | 37 // Converts a string sent from IBus IME engines, which is written in English, |
| 36 // into Chrome's string ID, then pulls internationalized resource string from | 38 // into Chrome's string ID, then pulls internationalized resource string from |
| 37 // the resource bundle and returns it. These functions are not thread-safe. | 39 // the resource bundle and returns it. These functions are not thread-safe. |
| 38 // Non-UI threads are not allowed to call them. | 40 // Non-UI threads are not allowed to call them. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 const std::string& normalized_language_code, | 200 const std::string& normalized_language_code, |
| 199 InputMethodType type, | 201 InputMethodType type, |
| 200 std::vector<std::string>* out_input_method_ids); | 202 std::vector<std::string>* out_input_method_ids); |
| 201 | 203 |
| 202 void ReloadInternalMaps(); | 204 void ReloadInternalMaps(); |
| 203 | 205 |
| 204 } // namespace input_method | 206 } // namespace input_method |
| 205 } // namespace chromeos | 207 } // namespace chromeos |
| 206 | 208 |
| 207 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ | 209 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ |
| OLD | NEW |