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/blink/blink_event_util.h" |
10 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
11 #include "ui/events/event_constants.h" | 12 #include "ui/events/event_constants.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 ui::EventType WebTouchPointStateToEventType( | 16 ui::EventType WebTouchPointStateToEventType( |
16 blink::WebTouchPoint::State state) { | 17 blink::WebTouchPoint::State state) { |
17 switch (state) { | 18 switch (state) { |
18 case blink::WebTouchPoint::StateReleased: | 19 case blink::WebTouchPoint::StateReleased: |
19 return ui::ET_TOUCH_RELEASED; | 20 return ui::ET_TOUCH_RELEASED; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 point.rotationAngle, | 84 point.rotationAngle, |
84 point.force); | 85 point.force); |
85 uievent->set_latency(touch_with_latency.latency); | 86 uievent->set_latency(touch_with_latency.latency); |
86 list->push_back(uievent); | 87 list->push_back(uievent); |
87 } | 88 } |
88 return true; | 89 return true; |
89 } | 90 } |
90 | 91 |
91 blink::WebGestureEvent MakeWebGestureEventFromUIEvent( | 92 blink::WebGestureEvent MakeWebGestureEventFromUIEvent( |
92 const ui::GestureEvent& event) { | 93 const ui::GestureEvent& event) { |
93 return CreateWebGestureEvent(event.details(), | 94 return ui::CreateWebGestureEvent(event.details(), event.time_stamp(), |
94 event.time_stamp(), | 95 event.location_f(), event.root_location_f(), |
95 event.location_f(), | 96 event.flags()); |
96 event.root_location_f(), | |
97 event.flags()); | |
98 } | 97 } |
99 | 98 |
100 } // namespace content | 99 } // namespace content |
OLD | NEW |