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

Unified Diff: ui/ozone/platform/egltest/ozone_platform_egltest.cc

Issue 566673003: ozone: events: Centralize & document our NativeEvent woes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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
« ui/events/ozone/events_ozone.h ('K') | « ui/ozone/platform/dri/dri_window.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/egltest/ozone_platform_egltest.cc
diff --git a/ui/ozone/platform/egltest/ozone_platform_egltest.cc b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
index 67c010cf5aaf2c017f1c78e8149932413fd9a91a..266f77a9ca59078fafc980cfe5afc9ec0e9cdf65 100644
--- a/ui/ozone/platform/egltest/ozone_platform_egltest.cc
+++ b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
@@ -4,6 +4,7 @@
#include "ui/ozone/platform/egltest/ozone_platform_egltest.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/files/file_path.h"
@@ -12,6 +13,7 @@
#include "third_party/khronos/EGL/egl.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
+#include "ui/events/ozone/events_ozone.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/ozone/public/cursor_factory_ozone.h"
@@ -150,9 +152,12 @@ bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) {
return true;
}
-uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& ne) {
- ui::Event* event = static_cast<ui::Event*>(ne);
- delegate_->DispatchEvent(event);
+uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) {
+ DispatchEventFromNativeUiEvent(
+ native_event,
+ base::Bind(&PlatformWindowDelegate::DispatchEvent,
+ base::Unretained(delegate_)));
+
return ui::POST_DISPATCH_STOP_PROPAGATION;
}
« ui/events/ozone/events_ozone.h ('K') | « ui/ozone/platform/dri/dri_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698