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

Unified Diff: ui/base/wayland/events_wayland.cc

Issue 8113028: Consolidate ui::NativeEvent and base::NativeEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new patch Created 9 years, 2 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
Index: ui/base/wayland/events_wayland.cc
diff --git a/ui/base/wayland/events_wayland.cc b/ui/base/wayland/events_wayland.cc
index 35d5c09eb06375888414d90d1de28060acb5c776..df6ffacc048a0972f40f54cf10ff46ca0fcd8d5c 100644
--- a/ui/base/wayland/events_wayland.cc
+++ b/ui/base/wayland/events_wayland.cc
@@ -36,7 +36,7 @@ int GetEventFlagsFromState(unsigned int state) {
return flags;
}
-int GetButtonEventFlagsFromNativeEvent(const ui::NativeEvent& native_event) {
+int GetButtonEventFlagsFromNativeEvent(const base::NativeEvent& native_event) {
// TODO(dnicoara): Need to add double click.
int flags = 0;
switch (native_event->button.button) {
@@ -54,7 +54,7 @@ int GetButtonEventFlagsFromNativeEvent(const ui::NativeEvent& native_event) {
namespace ui {
-EventType EventTypeFromNative(const NativeEvent& native_event) {
+EventType EventTypeFromNative(const base::NativeEvent& native_event) {
switch (native_event->type) {
case WAYLAND_BUTTON:
switch (native_event->button.button) {
@@ -85,7 +85,7 @@ EventType EventTypeFromNative(const NativeEvent& native_event) {
return ET_UNKNOWN;
}
-int EventFlagsFromNative(const NativeEvent& native_event) {
+int EventFlagsFromNative(const base::NativeEvent& native_event) {
switch (native_event->type) {
case WAYLAND_BUTTON:
return GetButtonEventFlagsFromNativeEvent(native_event) |
@@ -101,7 +101,7 @@ int EventFlagsFromNative(const NativeEvent& native_event) {
}
}
-gfx::Point EventLocationFromNative(const NativeEvent& native_event) {
+gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
switch (native_event->type) {
case WAYLAND_BUTTON:
return gfx::Point(native_event->button.x, native_event->button.y);
@@ -115,17 +115,17 @@ gfx::Point EventLocationFromNative(const NativeEvent& native_event) {
}
}
-KeyboardCode KeyboardCodeFromNative(const NativeEvent& native_event) {
+KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
return KeyboardCodeFromXKeysym(native_event->key.sym);
}
-bool IsMouseEvent(const NativeEvent& native_event) {
+bool IsMouseEvent(const base::NativeEvent& native_event) {
return native_event->type == WAYLAND_BUTTON ||
native_event->type == WAYLAND_MOTION ||
native_event->type == WAYLAND_POINTER_FOCUS;
}
-int GetMouseWheelOffset(const NativeEvent& native_event) {
+int GetMouseWheelOffset(const base::NativeEvent& native_event) {
return native_event->button.button == ui::SCROLL_UP ?
kWheelScrollAmount : -kWheelScrollAmount;
}
« ui/base/events.h ('K') | « ui/base/events.h ('k') | ui/base/win/events_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698