Chromium Code Reviews| Index: ui/views/widget/root_view.cc |
| diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc |
| index 2e799a8f2324b16b68e29a426cbc8beb5646d2c9..b176dec81b35ced8020d548e6de0ca8bb9e0922b 100644 |
| --- a/ui/views/widget/root_view.cc |
| +++ b/ui/views/widget/root_view.cc |
| @@ -455,6 +455,17 @@ ui::GestureStatus RootView::OnGestureEvent(const GestureEvent& event) { |
| GestureEvent e(event, this); |
| ui::GestureStatus status = ui::GESTURE_STATUS_UNKNOWN; |
| + if (!gesture_handler_) { |
|
sadrul
2012/07/26 18:41:28
This is not the right place. The event will not bu
tdanderson
2012/07/27 15:27:04
Done.
|
| + gfx::Rect bounding_box(event.details().bounding_box()); |
| + gfx::Point bounding_box_location(bounding_box.x(), bounding_box.y()); |
| + ConvertPointToScreen(this, &bounding_box_location); |
| + gfx::Rect touch_rect(bounding_box_location.x(), |
| + bounding_box_location.y(), |
| + bounding_box.width(), |
| + bounding_box.height()); |
| + gesture_handler_ = GetEventHandlerForRect(touch_rect); |
|
sadrul
2012/07/26 18:41:28
You could perhaps use bounding_box.set_origin here
tdanderson
2012/07/27 15:27:04
Done.
|
| + } |
| + |
| if (gesture_handler_) { |
| // |gesture_handler_| (or |scroll_gesture_handler_|) can be deleted during |
| // processing. |