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

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: fix boneheaded license paste 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
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c7fca0143d60dcf2b735ad45d4d371cbf5b74792 100644
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc
@@ -15,7 +15,6 @@
#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"
-#include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
#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"
@@ -37,6 +36,13 @@
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
+#if defined(USE_XKBCOMMON)
+#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
+
namespace ui {
namespace {
@@ -128,8 +134,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 +186,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);
};
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698