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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture.cc

Issue 119323007: Add timestamps to synthesized events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/input/synthetic_gesture.h" 5 #include "content/browser/renderer_host/input/synthetic_gesture.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" 8 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
9 #include "content/browser/renderer_host/input/synthetic_pinch_gesture.h" 9 #include "content/browser/renderer_host/input/synthetic_pinch_gesture.h"
10 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h" 10 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h"
(...skipping 25 matching lines...) Expand all
36 return CreateGesture<SyntheticPinchGesture, 36 return CreateGesture<SyntheticPinchGesture,
37 SyntheticPinchGestureParams>(gesture_params); 37 SyntheticPinchGestureParams>(gesture_params);
38 case SyntheticGestureParams::TAP_GESTURE: 38 case SyntheticGestureParams::TAP_GESTURE:
39 return CreateGesture<SyntheticTapGesture, 39 return CreateGesture<SyntheticTapGesture,
40 SyntheticTapGestureParams>(gesture_params); 40 SyntheticTapGestureParams>(gesture_params);
41 } 41 }
42 NOTREACHED() << "Invalid synthetic gesture type"; 42 NOTREACHED() << "Invalid synthetic gesture type";
43 return scoped_ptr<SyntheticGesture>(); 43 return scoped_ptr<SyntheticGesture>();
44 } 44 }
45 45
46 // static
47 double SyntheticGesture::ConvertTimestampToSeconds(
48 const base::TimeTicks& timestamp) {
49 return (timestamp - base::TimeTicks::UnixEpoch()).InSecondsF();
jdduke (slow) 2014/01/03 18:24:30 The documentation for WebInputEvent is somewhat mi
Dominik Grewe 2014/01/06 11:46:07 Done.
50 }
51
46 } // namespace content 52 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698