OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 10 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // subsequent touch points of that touchdown to the appropriate guest until | 134 // subsequent touch points of that touchdown to the appropriate guest until |
135 // that touch point is released. | 135 // that touch point is released. |
136 ScopedVector<ui::TouchEvent> events; | 136 ScopedVector<ui::TouchEvent> events; |
137 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) | 137 if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES)) |
138 return; | 138 return; |
139 | 139 |
140 ui::EventResult result = (ack_result == | 140 ui::EventResult result = (ack_result == |
141 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 141 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
142 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), | 142 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), |
143 end = events.end(); iter != end; ++iter) { | 143 end = events.end(); iter != end; ++iter) { |
144 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(*(*iter), | 144 if (!gesture_recognizer_->ProcessTouchEventPreDispatch(*(*iter), this)) |
145 this)) { | |
146 continue; | 145 continue; |
147 } | 146 |
148 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; | 147 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; |
149 gestures.reset(ui::GestureRecognizer::Get()->ProcessTouchEventPostDispatch( | 148 gestures.reset(gesture_recognizer_->ProcessTouchEventPostDispatch( |
150 *(*iter), result, this)); | 149 *(*iter), result, this)); |
151 ProcessGestures(gestures.get()); | 150 ProcessGestures(gestures.get()); |
152 } | 151 } |
153 } | 152 } |
154 #endif | 153 #endif |
155 | 154 |
156 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const { | 155 gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const { |
157 if (!guest_) | 156 if (!guest_) |
158 return gfx::Rect(); | 157 return gfx::Rect(); |
159 | 158 |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 } | 604 } |
606 | 605 |
607 if (blink::WebInputEvent::isGestureEventType(event->type)) { | 606 if (blink::WebInputEvent::isGestureEventType(event->type)) { |
608 host_->ForwardGestureEvent( | 607 host_->ForwardGestureEvent( |
609 *static_cast<const blink::WebGestureEvent*>(event)); | 608 *static_cast<const blink::WebGestureEvent*>(event)); |
610 return; | 609 return; |
611 } | 610 } |
612 } | 611 } |
613 | 612 |
614 } // namespace content | 613 } // namespace content |
OLD | NEW |