| 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();
|
| }
|
|
|