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

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

Issue 177093002: [IME] Loads chromeos-xkb extension and add the extension based xkb keyboards in the chrome://settin… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 months 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 | Annotate | Revision Log
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 "chromeos/ime/component_extension_ime_manager.h" 5 #include "chromeos/ime/component_extension_ime_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chromeos/ime/extension_ime_util.h" 9 #include "chromeos/ime/extension_ime_util.h"
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 } 124 }
125 return result; 125 return result;
126 } 126 }
127 127
128 input_method::InputMethodDescriptors 128 input_method::InputMethodDescriptors
129 ComponentExtensionIMEManager::GetAllIMEAsInputMethodDescriptor() { 129 ComponentExtensionIMEManager::GetAllIMEAsInputMethodDescriptor() {
130 input_method::InputMethodDescriptors result; 130 input_method::InputMethodDescriptors result;
131 for (size_t i = 0; i < component_extension_imes_.size(); ++i) { 131 for (size_t i = 0; i < component_extension_imes_.size(); ++i) {
132 for (size_t j = 0; j < component_extension_imes_[i].engines.size(); ++j) { 132 for (size_t j = 0; j < component_extension_imes_[i].engines.size(); ++j) {
133 const std::string input_method_id =
134 extension_ime_util::GetComponentInputMethodID(
135 component_extension_imes_[i].id,
136 component_extension_imes_[i].engines[j].engine_id);
133 result.push_back( 137 result.push_back(
134 input_method::InputMethodDescriptor( 138 input_method::InputMethodDescriptor(
135 extension_ime_util::GetComponentInputMethodID( 139 input_method_id,
136 component_extension_imes_[i].id,
137 component_extension_imes_[i].engines[j].engine_id),
138 component_extension_imes_[i].engines[j].display_name, 140 component_extension_imes_[i].engines[j].display_name,
139 std::string(), // TODO(uekawa): Set short name. 141 std::string(), // TODO(uekawa): Set short name.
140 component_extension_imes_[i].engines[j].layouts, 142 component_extension_imes_[i].engines[j].layouts,
141 component_extension_imes_[i].engines[j].language_codes, 143 component_extension_imes_[i].engines[j].language_codes,
142 false, // Do not use IME on login screen. 144 // Enables extension based xkb keyboards on login screen.
145 extension_ime_util::IsKeyboardLayoutExtension(input_method_id),
Seigo Nonaka 2014/02/25 06:57:19 Please making sure you can change layout on login/
Shu Chen 2014/02/25 08:52:51 Verified it works at login/lock screen.
143 component_extension_imes_[i].options_page_url, 146 component_extension_imes_[i].options_page_url,
144 component_extension_imes_[i].input_view_url)); 147 component_extension_imes_[i].input_view_url));
145 } 148 }
146 } 149 }
147 return result; 150 return result;
148 } 151 }
149 152
150 void ComponentExtensionIMEManager::AddObserver(Observer* observer) { 153 void ComponentExtensionIMEManager::AddObserver(Observer* observer) {
151 observers_.AddObserver(observer); 154 observers_.AddObserver(observer);
152 } 155 }
(...skipping 24 matching lines...) Expand all
177 *out_extension = component_extension_imes_[i]; 180 *out_extension = component_extension_imes_[i];
178 if (out_engine) 181 if (out_engine)
179 *out_engine = component_extension_imes_[i].engines[j]; 182 *out_engine = component_extension_imes_[i].engines[j];
180 return true; 183 return true;
181 } 184 }
182 } 185 }
183 return false; 186 return false;
184 } 187 }
185 188
186 } // namespace chromeos 189 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_util.cc ('k') | chromeos/ime/extension_ime_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698