OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/ui_events_helper.h" | 5 #include "content/browser/renderer_host/ui_events_helper.h" |
6 | 6 |
7 #include "content/browser/renderer_host/input/web_input_event_util.h" | 7 #include "content/browser/renderer_host/input/web_input_event_util.h" |
8 #include "content/common/input/web_touch_event_traits.h" | 8 #include "content/common/input/web_touch_event_traits.h" |
9 #include "third_party/WebKit/public/web/WebInputEvent.h" | 9 #include "third_party/WebKit/public/web/WebInputEvent.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 for (unsigned i = 0; i < web_event->touchesLength; ++i) { | 183 for (unsigned i = 0; i < web_event->touchesLength; ++i) { |
184 blink::WebTouchPoint* iter = web_event->touches + i; | 184 blink::WebTouchPoint* iter = web_event->touches + i; |
185 if (iter != point) | 185 if (iter != point) |
186 iter->state = blink::WebTouchPoint::StateStationary; | 186 iter->state = blink::WebTouchPoint::StateStationary; |
187 } | 187 } |
188 | 188 |
189 // Update the type of the touch event. | 189 // Update the type of the touch event. |
190 WebTouchEventTraits::ResetType(TouchEventTypeFromEvent(event), | 190 WebTouchEventTraits::ResetType(TouchEventTypeFromEvent(event), |
191 event.time_stamp().InSecondsF(), | 191 event.time_stamp().InSecondsF(), |
192 web_event); | 192 web_event); |
| 193 web_event->causesScrollingIfUncanceled = event.may_cause_scrolling(); |
193 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); | 194 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); |
194 | 195 |
195 return point; | 196 return point; |
196 } | 197 } |
197 | 198 |
198 } // namespace content | 199 } // namespace content |
OLD | NEW |