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

Unified Diff: ui/ozone/platform/dri/ozone_platform_dri.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
Index: ui/ozone/platform/dri/ozone_platform_dri.cc
diff --git a/ui/ozone/platform/dri/ozone_platform_dri.cc b/ui/ozone/platform/dri/ozone_platform_dri.cc
index 5ac324c1f1a572f6c05e2bdd931b52e0264fb69e..b664e433f7c3056f8cf2acf75fee40527e424690 100644
--- a/ui/ozone/platform/dri/ozone_platform_dri.cc
+++ b/ui/ozone/platform/dri/ozone_platform_dri.cc
@@ -10,7 +10,6 @@
#include "ui/events/ozone/evdev/cursor_delegate_evdev.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_buffer.h"
#include "ui/ozone/platform/dri/dri_cursor.h"
@@ -28,6 +27,13 @@
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ui_thread_gpu.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 {
@@ -99,8 +105,13 @@ class OzonePlatformDri : 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()));
@@ -131,6 +142,10 @@ class OzonePlatformDri : public OzonePlatform {
UiThreadGpu ui_thread_gpu_;
+#if defined(USE_XKBCOMMON)
+ XkbEvdevCodes xkb_evdev_code_converter_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
};
« no previous file with comments | « ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698