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

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

Issue 11740009: Removed references to the old sourceDevice field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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 "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
8 #include "ui/base/events/event.h" 8 #include "ui/base/events/event.h"
9 #include "ui/base/events/event_constants.h" 9 #include "ui/base/events/event_constants.h"
10 10
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 gesture_event.type = WebKit::WebInputEvent::GesturePinchUpdate; 182 gesture_event.type = WebKit::WebInputEvent::GesturePinchUpdate;
183 gesture_event.data.pinchUpdate.scale = event.details().scale(); 183 gesture_event.data.pinchUpdate.scale = event.details().scale();
184 break; 184 break;
185 case ui::ET_GESTURE_PINCH_END: 185 case ui::ET_GESTURE_PINCH_END:
186 gesture_event.type = WebKit::WebInputEvent::GesturePinchEnd; 186 gesture_event.type = WebKit::WebInputEvent::GesturePinchEnd;
187 break; 187 break;
188 case ui::ET_SCROLL_FLING_START: 188 case ui::ET_SCROLL_FLING_START:
189 gesture_event.type = WebKit::WebInputEvent::GestureFlingStart; 189 gesture_event.type = WebKit::WebInputEvent::GestureFlingStart;
190 gesture_event.data.flingStart.velocityX = event.details().velocity_x(); 190 gesture_event.data.flingStart.velocityX = event.details().velocity_x();
191 gesture_event.data.flingStart.velocityY = event.details().velocity_y(); 191 gesture_event.data.flingStart.velocityY = event.details().velocity_y();
192 // FIXME(mohsen || rjkroege): Remove following line after removing uses of
193 // flingStart.sourceDevice in WebKit, but before removing the field
194 // itself.
195 gesture_event.data.flingStart.sourceDevice =
196 WebKit::WebGestureEvent::Touchscreen;
197 break; 192 break;
198 case ui::ET_SCROLL_FLING_CANCEL: 193 case ui::ET_SCROLL_FLING_CANCEL:
199 gesture_event.type = WebKit::WebInputEvent::GestureFlingCancel; 194 gesture_event.type = WebKit::WebInputEvent::GestureFlingCancel;
200 break; 195 break;
201 case ui::ET_GESTURE_LONG_PRESS: 196 case ui::ET_GESTURE_LONG_PRESS:
202 gesture_event.type = WebKit::WebInputEvent::GestureLongPress; 197 gesture_event.type = WebKit::WebInputEvent::GestureLongPress;
203 gesture_event.data.longPress.width = 198 gesture_event.data.longPress.width =
204 event.details().bounding_box().width(); 199 event.details().bounding_box().width();
205 gesture_event.data.longPress.height = 200 gesture_event.data.longPress.height =
206 event.details().bounding_box().height(); 201 event.details().bounding_box().height();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 316
322 // Update the type of the touch event. 317 // Update the type of the touch event.
323 web_event->type = TouchEventTypeFromEvent(event); 318 web_event->type = TouchEventTypeFromEvent(event);
324 web_event->timeStampSeconds = event.time_stamp().InSecondsF(); 319 web_event->timeStampSeconds = event.time_stamp().InSecondsF();
325 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); 320 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags());
326 321
327 return point; 322 return point;
328 } 323 }
329 324
330 } // namespace content 325 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_unittest.cc ('k') | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698