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

Unified Diff: content/browser/renderer_host/input/synthetic_tap_gesture.cc

Issue 2478423002: Rename SyntheticPointer to SyntheticPointerDriver (Closed)
Patch Set: rename Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_tap_gesture.cc
diff --git a/content/browser/renderer_host/input/synthetic_tap_gesture.cc b/content/browser/renderer_host/input/synthetic_tap_gesture.cc
index 46dc23aeab463413865d57c2143972e737de596b..d13be599edfe6364c1b8d2fdcd7e1cd31691189c 100644
--- a/content/browser/renderer_host/input/synthetic_tap_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_tap_gesture.cc
@@ -32,8 +32,9 @@ SyntheticGesture::Result SyntheticTapGesture::ForwardInputEvents(
DCHECK_NE(gesture_source_type_, SyntheticGestureParams::DEFAULT_INPUT);
- if (!synthetic_pointer_)
- synthetic_pointer_ = SyntheticPointer::Create(gesture_source_type_);
+ if (!synthetic_pointer_driver_)
tdresser 2016/11/10 14:58:32 Add {}
lanwei 2016/11/10 19:45:22 Done.
+ synthetic_pointer_driver_ =
+ SyntheticPointerDriver::Create(gesture_source_type_);
if (gesture_source_type_ == SyntheticGestureParams::TOUCH_INPUT ||
gesture_source_type_ == SyntheticGestureParams::MOUSE_INPUT)
@@ -49,13 +50,13 @@ void SyntheticTapGesture::ForwardTouchOrMouseInputEvents(
const base::TimeTicks& timestamp, SyntheticGestureTarget* target) {
switch (state_) {
case PRESS:
- synthetic_pointer_->Press(params_.position.x(), params_.position.y(),
- target, timestamp);
- synthetic_pointer_->DispatchEvent(target, timestamp);
+ synthetic_pointer_driver_->Press(params_.position.x(),
+ params_.position.y());
+ synthetic_pointer_driver_->DispatchEvent(target, timestamp);
// Release immediately if duration is 0.
if (params_.duration_ms == 0) {
- synthetic_pointer_->Release(0, target, timestamp);
- synthetic_pointer_->DispatchEvent(target, timestamp);
+ synthetic_pointer_driver_->Release();
+ synthetic_pointer_driver_->DispatchEvent(target, timestamp);
state_ = DONE;
} else {
start_time_ = timestamp;
@@ -64,8 +65,9 @@ void SyntheticTapGesture::ForwardTouchOrMouseInputEvents(
break;
case WAITING_TO_RELEASE:
if (timestamp - start_time_ >= GetDuration()) {
- synthetic_pointer_->Release(0, target, start_time_ + GetDuration());
- synthetic_pointer_->DispatchEvent(target, start_time_ + GetDuration());
+ synthetic_pointer_driver_->Release();
+ synthetic_pointer_driver_->DispatchEvent(target,
+ start_time_ + GetDuration());
state_ = DONE;
}
break;

Powered by Google App Engine
This is Rietveld 408576698