| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "content/browser/renderer_host/input/web_input_event_util.h" | 9 #include "content/browser/renderer_host/input/web_input_event_util.h" |
| 10 #include "content/common/input/web_touch_event_traits.h" | 10 #include "content/common/input/web_touch_event_traits.h" |
| 11 #include "third_party/WebKit/public/web/WebInputEvent.h" | 11 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 12 #include "ui/events/base_event_utils.h" | 12 #include "ui/events/base_event_utils.h" |
| 13 #include "ui/events/blink/blink_event_util.h" | |
| 14 #include "ui/events/event.h" | 13 #include "ui/events/event.h" |
| 15 #include "ui/events/event_constants.h" | 14 #include "ui/events/event_constants.h" |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 ui::EventType WebTouchPointStateToEventType( | 18 ui::EventType WebTouchPointStateToEventType( |
| 20 blink::WebTouchPoint::State state) { | 19 blink::WebTouchPoint::State state) { |
| 21 switch (state) { | 20 switch (state) { |
| 22 case blink::WebTouchPoint::StateReleased: | 21 case blink::WebTouchPoint::StateReleased: |
| 23 return ui::ET_TOUCH_RELEASED; | 22 return ui::ET_TOUCH_RELEASED; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 type, gfx::Point(), flags, point.id, timestamp, point.radiusX, | 80 type, gfx::Point(), flags, point.id, timestamp, point.radiusX, |
| 82 point.radiusY, point.rotationAngle, point.force); | 81 point.radiusY, point.rotationAngle, point.force); |
| 83 uievent->set_location_f(location); | 82 uievent->set_location_f(location); |
| 84 uievent->set_root_location_f(location); | 83 uievent->set_root_location_f(location); |
| 85 uievent->set_latency(touch_with_latency.latency); | 84 uievent->set_latency(touch_with_latency.latency); |
| 86 list->push_back(uievent); | 85 list->push_back(uievent); |
| 87 } | 86 } |
| 88 return true; | 87 return true; |
| 89 } | 88 } |
| 90 | 89 |
| 91 blink::WebGestureEvent MakeWebGestureEventFromUIEvent( | |
| 92 const ui::GestureEvent& event) { | |
| 93 return ui::CreateWebGestureEvent( | |
| 94 event.details(), event.time_stamp(), event.location_f(), | |
| 95 event.root_location_f(), event.flags(), event.unique_touch_event_id()); | |
| 96 } | |
| 97 | |
| 98 } // namespace content | 90 } // namespace content |
| OLD | NEW |