Index: telemetry/telemetry/internal/actions/swipe.js |
diff --git a/telemetry/telemetry/internal/actions/swipe.js b/telemetry/telemetry/internal/actions/swipe.js |
index 517485c22118f0b4bc5180980929f6ffb8c58559..189edfaecef85fa49b238e71a54f59002ba6af5a 100644 |
--- a/telemetry/telemetry/internal/actions/swipe.js |
+++ b/telemetry/telemetry/internal/actions/swipe.js |
@@ -13,13 +13,19 @@ |
this.direction_ = opt_options.direction; |
this.distance_ = opt_options.distance; |
this.speed_ = opt_options.speed; |
+ this.gesture_source_type_ = opt_options.gesture_source_type; |
+ this.velocity_x_ = opt_options.velocity_x; |
+ this.velocity_y_ = opt_options.velocity_y; |
} else { |
this.element_ = document.body; |
this.left_start_ratio_ = 0.5; |
this.top_start_ratio_ = 0.5; |
- this.direction_ = 'left'; |
+ this.direction_ = 'right'; |
this.distance_ = 0; |
this.speed_ = 800; |
+ this.gesture_source_type_ = chrome.gpuBenchmarking.DEFAULT_INPUT; |
+ this.velocity_x_ = 0; |
+ this.velocity_y_ = 0; |
} |
} |
@@ -53,15 +59,14 @@ |
this.beginMeasuringHook(); |
var rect = __GestureCommon_GetBoundingVisibleRect(this.options_.element_); |
- var start_left = |
+ var startLeft = |
rect.left + rect.width * this.options_.left_start_ratio_; |
- var start_top = |
+ var startTop = |
rect.top + rect.height * this.options_.top_start_ratio_; |
chrome.gpuBenchmarking.swipe(this.options_.direction_, |
- this.options_.distance_, |
- this.onGestureComplete_.bind(this), |
- start_left, start_top, |
- this.options_.speed_); |
+ this.options_.distance_, this.onGestureComplete_.bind(this), startLeft, |
+ startTop, this.options_.speed_, this.options_.gesture_source_type_, |
+ this.options_.velocity_x_, this.options_.velocity_y_); |
}; |
SwipeAction.prototype.onGestureComplete_ = function() { |