Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1123)

Side by Side Diff: ui/base/ime/chromeos/component_extension_ime_manager.cc

Issue 1411603005: Add Workman keyboard layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add trailing comma according to review feedback Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698