Index: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
index e22468a10f886eccc8c92530c65371d3ced0e970..7aa4404d1a8fa4ecb3bf0d53a120d429702c2d16 100644 |
--- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
+++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc |
@@ -694,15 +694,7 @@ bool XkbKeyboardLayoutEngine::SetCurrentLayoutByName( |
reply_callback)); |
return true; |
#else |
- // Required by ozone-wayland (at least) for non ChromeOS builds. See |
- // http://xkbcommon.org/doc/current/md_doc_quick-guide.html for further info. |
- xkb_keymap* keymap = xkb_keymap_new_from_string( |
- xkb_context_.get(), layout_name.c_str(), XKB_KEYMAP_FORMAT_TEXT_V1, |
- XKB_KEYMAP_COMPILE_NO_FLAGS); |
- if (!keymap) |
- return false; |
- SetKeymap(keymap); |
- return true; |
+ LOG(ERROR) << "Currently the only evdev client is ChromeOS." |
spang
2017/01/20 17:41:14
Please don't remove the return statement.
This er
tonikitoo
2017/01/20 18:58:10
Done.
|
#endif // defined(OS_CHROMEOS) |
} |
@@ -802,13 +794,17 @@ bool XkbKeyboardLayoutEngine::Lookup(DomCode dom_code, |
return true; |
} |
-void XkbKeyboardLayoutEngine::SetKeymapFromStringForTest( |
- const char* keymap_string) { |
+bool XkbKeyboardLayoutEngine::SetCurrentLayoutFromString( |
+ const std::string& keymap_string) { |
xkb_keymap* keymap = xkb_keymap_new_from_string( |
- xkb_context_.get(), keymap_string, XKB_KEYMAP_FORMAT_TEXT_V1, |
+ xkb_context_.get(), keymap_string.c_str(), XKB_KEYMAP_FORMAT_TEXT_V1, |
XKB_KEYMAP_COMPILE_NO_FLAGS); |
+ if (!keymap) |
+ return false; |
+ |
if (keymap) |
SetKeymap(keymap); |
+ return true; |
} |
void XkbKeyboardLayoutEngine::SetKeymap(xkb_keymap* keymap) { |