| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 { "USA", IDS_STATUSBAR_LAYOUT_USA }, | 192 { "USA", IDS_STATUSBAR_LAYOUT_USA }, |
| 193 { "Lithuania", IDS_STATUSBAR_LAYOUT_LITHUANIA }, | 193 { "Lithuania", IDS_STATUSBAR_LAYOUT_LITHUANIA }, |
| 194 { "United Kingdom - Extended - Winkeys", | 194 { "United Kingdom - Extended - Winkeys", |
| 195 IDS_STATUSBAR_LAYOUT_UNITED_KINGDOM }, | 195 IDS_STATUSBAR_LAYOUT_UNITED_KINGDOM }, |
| 196 { "Slovakia", IDS_STATUSBAR_LAYOUT_SLOVAKIA }, | 196 { "Slovakia", IDS_STATUSBAR_LAYOUT_SLOVAKIA }, |
| 197 { "Russia", IDS_STATUSBAR_LAYOUT_RUSSIA }, | 197 { "Russia", IDS_STATUSBAR_LAYOUT_RUSSIA }, |
| 198 { "Greece", IDS_STATUSBAR_LAYOUT_GREECE }, | 198 { "Greece", IDS_STATUSBAR_LAYOUT_GREECE }, |
| 199 { "Belgium", IDS_STATUSBAR_LAYOUT_BELGIUM }, | 199 { "Belgium", IDS_STATUSBAR_LAYOUT_BELGIUM }, |
| 200 { "Bulgaria", IDS_STATUSBAR_LAYOUT_BULGARIA }, | 200 { "Bulgaria", IDS_STATUSBAR_LAYOUT_BULGARIA }, |
| 201 { "Switzerland", IDS_STATUSBAR_LAYOUT_SWITZERLAND }, | 201 { "Switzerland", IDS_STATUSBAR_LAYOUT_SWITZERLAND }, |
| 202 { "Switzerland - French", IDS_STATUSBAR_LAYOUT_SWITZERLAND_FRENCH }, |
| 202 { "Turkey", IDS_STATUSBAR_LAYOUT_TURKEY }, | 203 { "Turkey", IDS_STATUSBAR_LAYOUT_TURKEY }, |
| 203 { "Portugal", IDS_STATUSBAR_LAYOUT_PORTUGAL }, | 204 { "Portugal", IDS_STATUSBAR_LAYOUT_PORTUGAL }, |
| 204 { "Spain", IDS_STATUSBAR_LAYOUT_SPAIN }, | 205 { "Spain", IDS_STATUSBAR_LAYOUT_SPAIN }, |
| 205 { "Finland", IDS_STATUSBAR_LAYOUT_FINLAND }, | 206 { "Finland", IDS_STATUSBAR_LAYOUT_FINLAND }, |
| 206 { "Ukraine", IDS_STATUSBAR_LAYOUT_UKRAINE }, | 207 { "Ukraine", IDS_STATUSBAR_LAYOUT_UKRAINE }, |
| 207 { "Spain - Catalan variant with middle-dot L", | 208 { "Spain - Catalan variant with middle-dot L", |
| 208 IDS_STATUSBAR_LAYOUT_SPAIN_CATALAN }, | 209 IDS_STATUSBAR_LAYOUT_SPAIN_CATALAN }, |
| 209 { "France", IDS_STATUSBAR_LAYOUT_FRANCE }, | 210 { "France", IDS_STATUSBAR_LAYOUT_FRANCE }, |
| 210 { "Norway", IDS_STATUSBAR_LAYOUT_NORWAY }, | 211 { "Norway", IDS_STATUSBAR_LAYOUT_NORWAY }, |
| 211 { "Sweden", IDS_STATUSBAR_LAYOUT_SWEDEN }, | 212 { "Sweden", IDS_STATUSBAR_LAYOUT_SWEDEN }, |
| 212 { "Netherlands", IDS_STATUSBAR_LAYOUT_NETHERLANDS }, | 213 { "Netherlands", IDS_STATUSBAR_LAYOUT_NETHERLANDS }, |
| 213 { "Latvia", IDS_STATUSBAR_LAYOUT_LATVIA }, | 214 { "Latvia", IDS_STATUSBAR_LAYOUT_LATVIA }, |
| 215 { "Canada", IDS_STATUSBAR_LAYOUT_CANADA }, |
| 216 { "Canada - English", IDS_STATUSBAR_LAYOUT_CANADA_ENGLISH }, |
| 214 }; | 217 }; |
| 215 const size_t kNumEntries = arraysize(kEnglishToResourceIdArray); | 218 const size_t kNumEntries = arraysize(kEnglishToResourceIdArray); |
| 216 | 219 |
| 217 // There are some differences between ISO 639-2 (T) and ISO 639-2 B, and | 220 // There are some differences between ISO 639-2 (T) and ISO 639-2 B, and |
| 218 // some language codes are not recognized by ICU (i.e. ICU cannot convert | 221 // some language codes are not recognized by ICU (i.e. ICU cannot convert |
| 219 // these codes to two-letter language codes and display names). Hence we | 222 // these codes to two-letter language codes and display names). Hence we |
| 220 // convert these codes to ones that ICU recognize. | 223 // convert these codes to ones that ICU recognize. |
| 221 // | 224 // |
| 222 // See http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for details. | 225 // See http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for details. |
| 223 const char* kIso639VariantMapping[][2] = { | 226 const char* kIso639VariantMapping[][2] = { |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 value.string_list_value = input_method_ids; | 611 value.string_list_value = input_method_ids; |
| 609 InputMethodLibrary* library = CrosLibrary::Get()->GetInputMethodLibrary(); | 612 InputMethodLibrary* library = CrosLibrary::Get()->GetInputMethodLibrary(); |
| 610 library->SetImeConfig(kGeneralSectionName, kPreloadEnginesConfigName, value); | 613 library->SetImeConfig(kGeneralSectionName, kPreloadEnginesConfigName, value); |
| 611 if (!initial_input_method_id.empty()) { | 614 if (!initial_input_method_id.empty()) { |
| 612 library->ChangeInputMethod(initial_input_method_id); | 615 library->ChangeInputMethod(initial_input_method_id); |
| 613 } | 616 } |
| 614 } | 617 } |
| 615 | 618 |
| 616 } // namespace input_method | 619 } // namespace input_method |
| 617 } // namespace chromeos | 620 } // namespace chromeos |
| OLD | NEW |