summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/input_method
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-10 06:31:35 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-10 06:31:35 +0000
commit2779ec27dd4df5a5879069afee9f28138f3fe79e (patch)
tree2ec86dcd4e8cd5da8ed515c933fd36cd897f60d9 /chrome/browser/chromeos/input_method
parent54ac022e8357cfb6fc397d593930f12ca8c9750e (diff)
downloadchromium_src-2779ec27dd4df5a5879069afee9f28138f3fe79e.zip
chromium_src-2779ec27dd4df5a5879069afee9f28138f3fe79e.tar.gz
chromium_src-2779ec27dd4df5a5879069afee9f28138f3fe79e.tar.bz2
Convert GetHardwareInputMethodDescriptor to GetHardwareInputMethodId()
We plan to save the hardware kayboard layout information as ID like "xkb:us::eng", hence the function to get the information should just return the ID, rather than a descriptor struct. BUG=chromium-os:10964 TEST=input methods work as before on the netbook Review URL: http://codereview.chromium.org/6465022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74410 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/input_method')
-rw-r--r--chrome/browser/chromeos/input_method/input_method_util.cc7
-rw-r--r--chrome/browser/chromeos/input_method/input_method_util.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/input_method/input_method_util.cc b/chrome/browser/chromeos/input_method/input_method_util.cc
index 1b857e2..405f381 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util.cc
@@ -577,8 +577,7 @@ void EnableInputMethods(const std::string& language_code, InputMethodType type,
GetInputMethodIdsFromLanguageCode(language_code, type, &input_method_ids);
// Add the hardware keyboard.
- const std::string keyboard =
- input_method::GetHardwareInputMethodDescriptor().id;
+ const std::string keyboard = GetHardwareInputMethodId();
if (std::count(input_method_ids.begin(), input_method_ids.end(),
keyboard) == 0) {
input_method_ids.push_back(keyboard);
@@ -599,9 +598,9 @@ void EnableInputMethods(const std::string& language_code, InputMethodType type,
}
}
-InputMethodDescriptor GetHardwareInputMethodDescriptor() {
+std::string GetHardwareInputMethodId() {
// TODO(satorux): Rework this function. crosbug.com/11528.
- return GetFallbackInputMethodDescriptor();
+ return GetFallbackInputMethodDescriptor().id;
}
InputMethodDescriptor GetFallbackInputMethodDescriptor() {
diff --git a/chrome/browser/chromeos/input_method/input_method_util.h b/chrome/browser/chromeos/input_method/input_method_util.h
index 338d93d..184fa87 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.h
+++ b/chrome/browser/chromeos/input_method/input_method_util.h
@@ -156,8 +156,8 @@ bool GetInputMethodIdsFromLanguageCode(
void EnableInputMethods(const std::string& language_code, InputMethodType type,
const std::string& initial_input_method_id);
-// Returns the input method descriptor of the hardware keyboard.
-InputMethodDescriptor GetHardwareInputMethodDescriptor();
+// Returns the input method ID of the hardware keyboard.
+std::string GetHardwareInputMethodId();
// Returns the fallback input method descriptor (the very basic US
// keyboard). This function is mostly used for testing, but may be used