| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(dvp)", |
| 60 "us(intl)" | 60 "us(intl)", |
| 61 "us(workman)", |
| 62 "us(workman-intl)" |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 // Gets the input method category according to the given input method id. | 65 // Gets the input method category according to the given input method id. |
| 64 // This is used for sorting a list of input methods. | 66 // This is used for sorting a list of input methods. |
| 65 int GetInputMethodCategory(const std::string& id) { | 67 int GetInputMethodCategory(const std::string& id) { |
| 66 const std::string engine_id = | 68 const std::string engine_id = |
| 67 chromeos::extension_ime_util::GetComponentIDByInputMethodID(id); | 69 chromeos::extension_ime_util::GetComponentIDByInputMethodID(id); |
| 68 if (base::StartsWith(engine_id, "xkb:", base::CompareCase::SENSITIVE)) | 70 if (base::StartsWith(engine_id, "xkb:", base::CompareCase::SENSITIVE)) |
| 69 return 0; | 71 return 0; |
| 70 if (base::StartsWith(engine_id, "vkd_", base::CompareCase::SENSITIVE)) | 72 if (base::StartsWith(engine_id, "vkd_", base::CompareCase::SENSITIVE)) |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist( | 235 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist( |
| 234 const std::vector<std::string>& layouts) { | 236 const std::vector<std::string>& layouts) { |
| 235 for (size_t i = 0; i < layouts.size(); ++i) { | 237 for (size_t i = 0; i < layouts.size(); ++i) { |
| 236 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end()) | 238 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end()) |
| 237 return true; | 239 return true; |
| 238 } | 240 } |
| 239 return false; | 241 return false; |
| 240 } | 242 } |
| 241 | 243 |
| 242 } // namespace chromeos | 244 } // namespace chromeos |
| OLD | NEW |