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

Unified Diff: chromeos_keyboard.cc

Issue 3155020: Add GetHardwareKeyboardLayoutName method instead of kHardwareLayout (Closed) Base URL: http://src.chromium.org/git/cros.git
Patch Set: add GethardwareKeyboardLayoutName() Created 10 years, 4 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_keyboard.h ('k') | load.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos_keyboard.cc
diff --git a/chromeos_keyboard.cc b/chromeos_keyboard.cc
index 2fa42d568e832cffe66f4e4cc24ca0f5e9c3b0ea..ff3d95b5a55c32e7d35518f9889a42990dc2d16d 100644
--- a/chromeos_keyboard.cc
+++ b/chromeos_keyboard.cc
@@ -80,6 +80,12 @@ class XKeyboard {
return SetLayoutInternal(layout_name, modifier_map);
}
+ // Returns the hardware layout name.
+ std::string GetHardwareLayout() {
+ // TODO(peria): write practical code.
+ return "xkb:us::eng";
+ }
+
// Returns the current layout name like "us". On error, returns "".
std::string GetLayout() {
// TODO(yusukes): write auto tests for the function.
@@ -526,6 +532,11 @@ bool ChromeOSRemapModifierKeys(const chromeos::ModifierMap& modifier_map) {
}
extern "C"
+const std::string ChromeOSGetHardwareKeyboardLayoutName() {
+ return XKeyboard::Get()->GetHardwareLayout();
+}
+
+extern "C"
const std::string ChromeOSGetCurrentKeyboardLayoutName() {
return XKeyboard::Get()->GetLayout();
}
« no previous file with comments | « chromeos_keyboard.h ('k') | load.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698