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 bd0561f99966634022565d3eb70453e81072e6f8..e9c93fcce9e4eb8af383f6b1cd09d97dccc4d1e1 100644 |
--- a/ui/ozone/platform/dri/ozone_platform_dri.cc |
+++ b/ui/ozone/platform/dri/ozone_platform_dri.cc |
@@ -5,6 +5,7 @@ |
#include "ui/ozone/platform/dri/ozone_platform_dri.h" |
#include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
+#include "ui/events/ozone/evdev/device_manager_evdev.h" |
#include "ui/events/ozone/evdev/event_factory_evdev.h" |
#include "ui/ozone/ime/input_method_context_factory_ozone.h" |
#include "ui/ozone/ozone_platform.h" |
@@ -12,7 +13,16 @@ |
#include "ui/ozone/platform/dri/dri_surface_factory.h" |
#if defined(OS_CHROMEOS) |
+#include "ui/ozone/platform/dri/chromeos/display_event_listener.h" |
#include "ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h" |
+#if defined(USE_UDEV) |
spang
2014/04/25 19:52:26
OS_CHROMEOS implies USE_UDEV
|
+#include "ui/events/ozone/device_udev.h" |
+#include "ui/ozone/platform/dri/chromeos/display_event_listener_udev.h" |
+#endif // defined(USE_UDEV) |
+#endif // defined(OS_CHROMEOS) |
+ |
+#if defined(USE_UDEV) |
+#include "ui/events/ozone/evdev/device_manager_udev.h" |
#endif |
namespace ui { |
@@ -27,7 +37,13 @@ class OzonePlatformDri : public OzonePlatform { |
public: |
OzonePlatformDri() |
: cursor_factory_ozone_(&surface_factory_ozone_), |
- event_factory_ozone_(&cursor_factory_ozone_) {} |
+ event_factory_ozone_(&cursor_factory_ozone_, |
+#if defined(USE_UDEV) |
+ CreateDeviceManagerUdev(&udev_) |
+#else |
+ CreateDeviceManagerManual() |
+#endif |
spang
2014/04/25 19:50:28
This is too much.
We could remove DRI from the "e
|
+ ) {} |
virtual ~OzonePlatformDri() {} |
// OzonePlatform: |
@@ -47,12 +63,24 @@ class OzonePlatformDri : public OzonePlatform { |
#if defined(OS_CHROMEOS) |
virtual scoped_ptr<ui::NativeDisplayDelegate> CreateNativeDisplayDelegate() |
OVERRIDE { |
+ scoped_ptr<DisplayEventListener> display_listener; |
+#if defined(USE_UDEV) |
+ display_listener.reset(new DisplayEventListenerUdev(&udev_)); |
+#else |
+ NOTIMPLEMENTED() << "No DisplayEventListener implementation present."; |
+#endif |
+ |
return scoped_ptr<ui::NativeDisplayDelegate>( |
- new NativeDisplayDelegateDri(&surface_factory_ozone_)); |
+ new NativeDisplayDelegateDri(&surface_factory_ozone_, |
+ display_listener.Pass())); |
} |
#endif |
private: |
+#if defined(USE_UDEV) |
+ DeviceUdev udev_; |
+#endif |
+ |
ui::DriSurfaceFactory surface_factory_ozone_; |
ui::CursorFactoryEvdevDri cursor_factory_ozone_; |
ui::EventFactoryEvdev event_factory_ozone_; |