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

Unified Diff: ui/ozone/platform/dri/ozone_platform_gbm.cc

Issue 778503002: XKB implementation of Ozone key layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@x430194-layout
Patch Set: address review comments (spang, 3) Created 6 years 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
Index: ui/ozone/platform/dri/ozone_platform_gbm.cc
diff --git a/ui/ozone/platform/dri/ozone_platform_gbm.cc b/ui/ozone/platform/dri/ozone_platform_gbm.cc
index d3a090ad36d550303ecc998e1915f0e363c89a46..c7975baaa8abe091effcdbb1874904d8a24ab6ce 100644
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc
@@ -15,7 +15,12 @@
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
+#if defined(USE_XKBCOMMON)
spang 2014/12/15 19:53:44 move downwards
kpschoedel 2014/12/15 20:10:22 Done.
+#include "ui/events/ozone/layout/xkb/xkb_evdev_codes.h"
+#include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h"
+#else
#include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
+#endif
#include "ui/ozone/platform/dri/display_manager.h"
#include "ui/ozone/platform/dri/dri_cursor.h"
#include "ui/ozone/platform/dri/dri_gpu_platform_support.h"
@@ -128,8 +133,13 @@ class OzonePlatformGbm : public OzonePlatform {
cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
window_manager_.reset(
new DriWindowManager(gpu_platform_support_host_.get()));
+#if defined(USE_XKBCOMMON)
+ KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(make_scoped_ptr(
+ new XkbKeyboardLayoutEngine(xkb_evdev_code_converter_)));
+#else
KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
make_scoped_ptr(new StubKeyboardLayoutEngine()));
+#endif
event_factory_ozone_.reset(new EventFactoryEvdev(
window_manager_->cursor(), device_manager_.get(),
KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
@@ -175,6 +185,10 @@ class OzonePlatformGbm : public OzonePlatform {
scoped_ptr<DriWindowManager> window_manager_;
scoped_ptr<DisplayManager> display_manager_;
+#if defined(USE_XKBCOMMON)
+ XkbEvdevCodes xkb_evdev_code_converter_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(OzonePlatformGbm);
};

Powered by Google App Engine
This is Rietveld 408576698