OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "ui/base/gestures/gesture_point.h" | 5 #include "ui/base/gestures/gesture_point.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/base/events/event.h" | 10 #include "ui/base/events/event.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 if (event.radius_x() || event.radius_y()) | 184 if (event.radius_x() || event.radius_y()) |
185 radius = std::max(event.radius_x(), event.radius_y()); | 185 radius = std::max(event.radius_x(), event.radius_y()); |
186 else | 186 else |
187 radius = GestureConfiguration::default_radius(); | 187 radius = GestureConfiguration::default_radius(); |
188 | 188 |
189 gfx::Rect rect(event.location().x() - radius, | 189 gfx::Rect rect(event.location().x() - radius, |
190 event.location().y() - radius, | 190 event.location().y() - radius, |
191 radius * 2, | 191 radius * 2, |
192 radius * 2); | 192 radius * 2); |
193 if (IsInClickWindow(event)) | 193 if (IsInClickWindow(event)) |
194 enclosing_rect_ = enclosing_rect_.Union(rect); | 194 enclosing_rect_.Union(rect); |
195 else | 195 else |
196 enclosing_rect_ = rect; | 196 enclosing_rect_ = rect; |
197 } | 197 } |
198 | 198 |
199 } // namespace ui | 199 } // namespace ui |
OLD | NEW |