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

Unified Diff: chromeos/ime/input_method_descriptor.cc

Issue 13949015: Supporting multiple keyboard layouts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comment Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/ime/input_method_descriptor.h ('k') | chromeos/ime/input_method_whitelist.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/ime/input_method_descriptor.cc
diff --git a/chromeos/ime/input_method_descriptor.cc b/chromeos/ime/input_method_descriptor.cc
index 3215b681e14cec89160a94fbdb1d065f55820938..9ceab2e1b3d36f1c103f8ba688d1d972177eec80 100644
--- a/chromeos/ime/input_method_descriptor.cc
+++ b/chromeos/ime/input_method_descriptor.cc
@@ -15,16 +15,22 @@ namespace input_method {
InputMethodDescriptor::InputMethodDescriptor(
const std::string& id,
const std::string& name,
- const std::string& keyboard_layout,
+ const std::vector<std::string>& keyboard_layouts,
const std::string& language_code,
const std::string& options_page_url)
: id_(id),
name_(name),
- keyboard_layout_(keyboard_layout),
+ keyboard_layouts_(keyboard_layouts),
language_code_(language_code),
options_page_url_(options_page_url) {
}
+std::string InputMethodDescriptor::GetPreferredKeyboardLayout() const {
+ // TODO(nona): Investigate better way to guess the preferred layout
+ // http://crbug.com/170601.
+ return keyboard_layouts_.empty() ? "us" : keyboard_layouts_[0];
+}
+
InputMethodDescriptor::InputMethodDescriptor() {
}
« no previous file with comments | « chromeos/ime/input_method_descriptor.h ('k') | chromeos/ime/input_method_whitelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698