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

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

Issue 293683002: Synthetic pinch gesture take scale factor as parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_gesture_target_base.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
index 987dff4f7c84ff8a896ae5fa31aef858baf47064..e1fd3b06f3136572db2eb024dcee478faa9f961e 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.cc
@@ -28,7 +28,7 @@ const int kPointerAssumedStoppedTimeMs = 100;
// SyntheticGestureTargetBase passes input events straight on to the renderer
// without going through a gesture recognition framework. There is thus no touch
// slop.
-const int kTouchSlopInDips = 0;
+const float kTouchSlopInDips = 0.0f;
} // namespace
@@ -117,10 +117,17 @@ base::TimeDelta SyntheticGestureTargetBase::PointerAssumedStoppedTime()
return base::TimeDelta::FromMilliseconds(kPointerAssumedStoppedTimeMs);
}
-int SyntheticGestureTargetBase::GetTouchSlopInDips() const {
+float SyntheticGestureTargetBase::GetTouchSlopInDips() const {
return kTouchSlopInDips;
}
+float SyntheticGestureTargetBase::GetMinScalingSpanInDips() const {
+ // The minimum scaling distance is only relevant for touch gestures and the
+ // base target doesn't support touch.
+ NOTREACHED();
+ return 0.0f;
+}
+
bool SyntheticGestureTargetBase::PointIsWithinContents(int x, int y) const {
gfx::Rect bounds = host_->GetView()->GetViewBounds();
bounds -= bounds.OffsetFromOrigin(); // Translate the bounds to (0,0).

Powered by Google App Engine
This is Rietveld 408576698