Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: content/browser/renderer_host/ui_events_helper.cc

Issue 1034713004: Refactors gesture conversion functions to ui/events/blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix M_PI usage for windows Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698