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

Unified Diff: ui/views/widget/root_view.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.cc
===================================================================
--- ui/views/widget/root_view.cc (revision 151481)
+++ ui/views/widget/root_view.cc (working copy)
@@ -378,7 +378,7 @@
}
}
-bool RootView::OnMouseWheel(const MouseWheelEvent& event) {
+bool RootView::OnMouseWheel(const ui::MouseWheelEvent& event) {
bool consumed = false;
for (View* v = GetFocusManager()->GetFocusedView();
v && v != this && !consumed; v = v->parent())
@@ -386,7 +386,7 @@
return consumed;
}
-bool RootView::OnScrollEvent(const ScrollEvent& event) {
+bool RootView::OnScrollEvent(const ui::ScrollEvent& event) {
bool consumed = false;
for (View* v = GetEventHandlerForPoint(event.location());
v && v != this && !consumed; v = v->parent())
@@ -394,7 +394,7 @@
return consumed;
}
-ui::TouchStatus RootView::OnTouchEvent(const TouchEvent& event) {
+ui::TouchStatus RootView::OnTouchEvent(const ui::TouchEvent& event) {
// TODO: this looks all wrong. On a TOUCH_PRESSED we should figure out the
// view and target that view with all touches with the same id until the
// release (or keep it if captured).
@@ -405,7 +405,8 @@
ui::TouchStatus status = ui::TOUCH_STATUS_UNKNOWN;
if (touch_pressed_handler_) {
- TouchEvent touch_event(event, this, touch_pressed_handler_);
+ ui::TouchEvent touch_event(event, static_cast<View*>(this),
+ touch_pressed_handler_);
status = touch_pressed_handler_->ProcessTouchEvent(touch_event);
if (status == ui::TOUCH_STATUS_END)
touch_pressed_handler_ = NULL;
@@ -423,7 +424,8 @@
}
// See if this view wants to handle the touch
- TouchEvent touch_event(event, this, touch_pressed_handler_);
+ ui::TouchEvent touch_event(event, static_cast<View*>(this),
+ touch_pressed_handler_);
status = touch_pressed_handler_->ProcessTouchEvent(touch_event);
// The view could have removed itself from the tree when handling
@@ -452,7 +454,7 @@
return status;
}
-ui::GestureStatus RootView::OnGestureEvent(const GestureEvent& event) {
+ui::GestureStatus RootView::OnGestureEvent(const ui::GestureEvent& event) {
ui::GestureStatus status = ui::GESTURE_STATUS_UNKNOWN;
if (gesture_handler_) {
@@ -461,7 +463,7 @@
View* handler = scroll_gesture_handler_ &&
(event.IsScrollGestureEvent() || event.IsFlingScrollEvent()) ?
scroll_gesture_handler_ : gesture_handler_;
- GestureEvent handler_event(event, this, handler);
+ ui::GestureEvent handler_event(event, static_cast<View*>(this), handler);
ui::GestureStatus status = handler->ProcessGestureEvent(handler_event);
@@ -487,7 +489,8 @@
for (scroll_gesture_handler_ = gesture_handler_->parent();
scroll_gesture_handler_ && scroll_gesture_handler_ != this;
scroll_gesture_handler_ = scroll_gesture_handler_->parent()) {
- GestureEvent gesture_event(event, this, scroll_gesture_handler_);
+ ui::GestureEvent gesture_event(event, static_cast<View*>(this),
+ scroll_gesture_handler_);
status = scroll_gesture_handler_->ProcessGestureEvent(gesture_event);
if (status == ui::GESTURE_STATUS_CONSUMED)
return status;
@@ -508,7 +511,8 @@
}
// See if this view wants to handle the Gesture.
- GestureEvent gesture_event(event, this, gesture_handler_);
+ ui::GestureEvent gesture_event(event, static_cast<View*>(this),
+ gesture_handler_);
status = gesture_handler_->ProcessGestureEvent(gesture_event);
// The view could have removed itself from the tree when handling
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698