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

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

Issue 2245133006: CL for perf tryjob on win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL for perf tryjob on mac Created 4 years, 4 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 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_tap_gesture.h" 5 #include "content/browser/renderer_host/input/synthetic_tap_gesture.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/public/web/WebInputEvent.h" 8 #include "third_party/WebKit/public/web/WebInputEvent.h"
9 #include "ui/events/latency_info.h" 9 #include "ui/events/latency_info.h"
10 10
(...skipping 13 matching lines...) Expand all
24 const base::TimeTicks& timestamp, SyntheticGestureTarget* target) { 24 const base::TimeTicks& timestamp, SyntheticGestureTarget* target) {
25 if (state_ == SETUP) { 25 if (state_ == SETUP) {
26 gesture_source_type_ = params_.gesture_source_type; 26 gesture_source_type_ = params_.gesture_source_type;
27 if (gesture_source_type_ == SyntheticGestureParams::DEFAULT_INPUT) 27 if (gesture_source_type_ == SyntheticGestureParams::DEFAULT_INPUT)
28 gesture_source_type_ = target->GetDefaultSyntheticGestureSourceType(); 28 gesture_source_type_ = target->GetDefaultSyntheticGestureSourceType();
29 29
30 state_ = PRESS; 30 state_ = PRESS;
31 } 31 }
32 32
33 DCHECK_NE(gesture_source_type_, SyntheticGestureParams::DEFAULT_INPUT); 33 DCHECK_NE(gesture_source_type_, SyntheticGestureParams::DEFAULT_INPUT);
34 34 VLOG(0) << "SyntheticTapGesture::ForwardInputEvents: " << gesture_source_type_
35 << " state:" << state_;
35 if (!synthetic_pointer_) 36 if (!synthetic_pointer_)
36 synthetic_pointer_ = SyntheticPointer::Create(gesture_source_type_); 37 synthetic_pointer_ = SyntheticPointer::Create(gesture_source_type_);
37 38
38 if (gesture_source_type_ == SyntheticGestureParams::TOUCH_INPUT || 39 if (gesture_source_type_ == SyntheticGestureParams::TOUCH_INPUT ||
39 gesture_source_type_ == SyntheticGestureParams::MOUSE_INPUT) 40 gesture_source_type_ == SyntheticGestureParams::MOUSE_INPUT)
40 ForwardTouchOrMouseInputEvents(timestamp, target); 41 ForwardTouchOrMouseInputEvents(timestamp, target);
41 else 42 else
42 return SyntheticGesture::GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED; 43 return SyntheticGesture::GESTURE_SOURCE_TYPE_NOT_IMPLEMENTED;
43 44
44 return (state_ == DONE) ? SyntheticGesture::GESTURE_FINISHED 45 return (state_ == DONE) ? SyntheticGesture::GESTURE_FINISHED
(...skipping 29 matching lines...) Expand all
74 case DONE: 75 case DONE:
75 NOTREACHED() << "State DONE invalid for synthetic tap gesture."; 76 NOTREACHED() << "State DONE invalid for synthetic tap gesture.";
76 } 77 }
77 } 78 }
78 79
79 base::TimeDelta SyntheticTapGesture::GetDuration() const { 80 base::TimeDelta SyntheticTapGesture::GetDuration() const {
80 return base::TimeDelta::FromMilliseconds(params_.duration_ms); 81 return base::TimeDelta::FromMilliseconds(params_.duration_ms);
81 } 82 }
82 83
83 } // namespace content 84 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698