summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 14:15:21 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 14:15:21 +0000
commitb096ce14f3a2bd6c9d1003b3cb0a68929515cda7 (patch)
treee16698efc0a64a55a9f5ca176792d0dbf9bacecb /views
parent4ae84c931861762184bdbeea7532560b3ed527e4 (diff)
downloadchromium_src-b096ce14f3a2bd6c9d1003b3cb0a68929515cda7.zip
chromium_src-b096ce14f3a2bd6c9d1003b3cb0a68929515cda7.tar.gz
chromium_src-b096ce14f3a2bd6c9d1003b3cb0a68929515cda7.tar.bz2
touch: Fix compile for the new MouseEvent ctors (r77221).
BUG=none TEST=touch compiles TBR=msw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/events/event.h1
-rw-r--r--views/events/event_x.cc17
-rw-r--r--views/focus/accelerator_handler_touch.cc12
3 files changed, 15 insertions, 15 deletions
diff --git a/views/events/event.h b/views/events/event.h
index 2d68e30..4173d53 100644
--- a/views/events/event.h
+++ b/views/events/event.h
@@ -237,7 +237,6 @@ class MouseEvent : public LocatedEvent {
////////////////////////////////////////////////////////////////////////////////
class TouchEvent : public LocatedEvent {
public:
- explicit TouchEvent(NativeEvent native_event);
TouchEvent(NativeEvent2 native_event_2, FromNativeEvent2 from_native);
// Create a new touch event.
diff --git a/views/events/event_x.cc b/views/events/event_x.cc
index d3187a2..c008c87 100644
--- a/views/events/event_x.cc
+++ b/views/events/event_x.cc
@@ -262,10 +262,6 @@ KeyEvent::KeyEvent(NativeEvent2 native_event_2, FromNativeEvent2 from_native)
////////////////////////////////////////////////////////////////////////////////
// MouseEvent, public:
-MouseEvent::MouseEvent(NativeEvent native_event)
- : LocatedEvent(native_event) {
-}
-
MouseEvent::MouseEvent(NativeEvent2 native_event_2,
FromNativeEvent2 from_native)
: LocatedEvent(native_event_2, from_native) {
@@ -276,7 +272,7 @@ MouseEvent::MouseEvent(NativeEvent2 native_event_2,
MouseWheelEvent::MouseWheelEvent(NativeEvent2 native_event_2,
FromNativeEvent2 from_native)
- : LocatedEvent(native_event_2, from_native),
+ : MouseEvent(native_event_2, from_native),
offset_(GetMouseWheelOffset(native_event_2)) {
}
@@ -284,11 +280,12 @@ MouseWheelEvent::MouseWheelEvent(NativeEvent2 native_event_2,
// TouchEvent, public:
#if defined(HAVE_XINPUT2)
-TouchEvent::TouchEvent(XEvent* xev)
- : LocatedEvent(GetTouchEventType(xev),
- GetTouchEventLocation(xev),
- GetTouchEventFlags(xev)),
- touch_id_(GetTouchIDFromXEvent(xev)) {
+TouchEvent::TouchEvent(NativeEvent2 native_event_2,
+ FromNativeEvent2 from_native)
+ : LocatedEvent(GetTouchEventType(native_event_2),
+ GetTouchEventLocation(native_event_2),
+ GetTouchEventFlags(native_event_2)),
+ touch_id_(GetTouchIDFromXEvent(native_event_2)) {
}
#endif
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index 0e163e5..ce15c51 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -73,7 +73,8 @@ bool DispatchX2Event(RootView* root, XEvent* xev) {
// Create a TouchEvent, and send it off to |root|. If the event
// is processed by |root|, then return. Otherwise let it fall through so it
// can be used (if desired) as a mouse event.
- TouchEvent touch(xev);
+ Event::FromNativeEvent2 from_native;
+ TouchEvent touch(xev, from_native);
if (root->OnTouchEvent(touch) != views::View::TOUCH_STATUS_UNKNOWN)
return true;
}
@@ -96,7 +97,8 @@ bool DispatchX2Event(RootView* root, XEvent* xev) {
return root->OnMouseWheel(wheelev);
}
- MouseEvent mouseev(xev);
+ Event::FromNativeEvent2 from_native;
+ MouseEvent mouseev(xev, from_native);
if (!touch_event) {
// Show the cursor, and decide whether or not the cursor should be
// automatically hidden after a certain time of inactivity.
@@ -178,7 +180,8 @@ bool DispatchXEvent(XEvent* xev) {
MouseWheelEvent wheelev(xev, from_native);
return root->OnMouseWheel(wheelev);
} else {
- MouseEvent mouseev(xev);
+ Event::FromNativeEvent2 from_native;
+ MouseEvent mouseev(xev, from_native);
if (xev->type == ButtonPress) {
return root->OnMousePressed(mouseev);
} else {
@@ -190,7 +193,8 @@ bool DispatchXEvent(XEvent* xev) {
}
case MotionNotify: {
- MouseEvent mouseev(xev);
+ Event::FromNativeEvent2 from_native;
+ MouseEvent mouseev(xev, from_native);
if (mouseev.type() == ui::ET_MOUSE_DRAGGED) {
return root->OnMouseDragged(mouseev);
} else {