1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/events/gestures/gesture_util.h"
9 #include "ui/events/gestures/gesture_configuration.h"
10 #include "ui/gfx/point.h"
15 bool IsInsideManhattanSquare(const gfx::Point& p1,
16 const gfx::Point& p2) {
17 int manhattan_distance = abs(p1.x() - p2.x()) + abs(p1.y() - p2.y());
18 return manhattan_distance <
19 GestureConfiguration::max_touch_move_in_pixels_for_click();
22 } // namespace gestures