| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/base/ime/chromeos/component_extension_ime_manager.h" | 5 #include "ui/base/ime/chromeos/component_extension_ime_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 "pl", | 49 "pl", |
| 50 "pt", | 50 "pt", |
| 51 "ro", | 51 "ro", |
| 52 "se", | 52 "se", |
| 53 "si", | 53 "si", |
| 54 "tr", | 54 "tr", |
| 55 "us", | 55 "us", |
| 56 "us(altgr-intl)", | 56 "us(altgr-intl)", |
| 57 "us(colemak)", | 57 "us(colemak)", |
| 58 "us(dvorak)", | 58 "us(dvorak)", |
| 59 "us(dvp)", |
| 59 "us(intl)" | 60 "us(intl)" |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 // Gets the input method category according to the given input method id. | 63 // Gets the input method category according to the given input method id. |
| 63 // This is used for sorting a list of input methods. | 64 // This is used for sorting a list of input methods. |
| 64 int GetInputMethodCategory(const std::string& id) { | 65 int GetInputMethodCategory(const std::string& id) { |
| 65 const std::string engine_id = | 66 const std::string engine_id = |
| 66 chromeos::extension_ime_util::GetComponentIDByInputMethodID(id); | 67 chromeos::extension_ime_util::GetComponentIDByInputMethodID(id); |
| 67 if (StartsWithASCII(engine_id, "xkb:", true)) | 68 if (StartsWithASCII(engine_id, "xkb:", true)) |
| 68 return 0; | 69 return 0; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist( | 233 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist( |
| 233 const std::vector<std::string>& layouts) { | 234 const std::vector<std::string>& layouts) { |
| 234 for (size_t i = 0; i < layouts.size(); ++i) { | 235 for (size_t i = 0; i < layouts.size(); ++i) { |
| 235 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end()) | 236 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end()) |
| 236 return true; | 237 return true; |
| 237 } | 238 } |
| 238 return false; | 239 return false; |
| 239 } | 240 } |
| 240 | 241 |
| 241 } // namespace chromeos | 242 } // namespace chromeos |
| OLD | NEW |