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

Side by Side Diff: content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc

Issue 392013005: [#1] Delete reduntdant 19 header files in ui/gfx (8 of 19 by this) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted includes Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h" 5 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/gfx/point_f.h" 8 #include "ui/gfx/geometry/point_f.h"
9 9
10 namespace content { 10 namespace content {
11 namespace { 11 namespace {
12 12
13 gfx::Vector2d FloorTowardZero(const gfx::Vector2dF& vector) { 13 gfx::Vector2d FloorTowardZero(const gfx::Vector2dF& vector) {
14 int x = vector.x() > 0 ? floor(vector.x()) : ceil(vector.x()); 14 int x = vector.x() > 0 ? floor(vector.x()) : ceil(vector.x());
15 int y = vector.y() > 0 ? floor(vector.y()) : ceil(vector.y()); 15 int y = vector.y() > 0 ? floor(vector.y()) : ceil(vector.y());
16 return gfx::Vector2d(x, y); 16 return gfx::Vector2d(x, y);
17 } 17 }
18 18
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 static_cast<int>(params_.distances.size())); 261 static_cast<int>(params_.distances.size()));
262 return current_scroll_segment_ == 262 return current_scroll_segment_ ==
263 static_cast<int>(params_.distances.size()) - 1; 263 static_cast<int>(params_.distances.size()) - 1;
264 } 264 }
265 265
266 bool SyntheticSmoothScrollGesture::ScrollIsNoOp() const { 266 bool SyntheticSmoothScrollGesture::ScrollIsNoOp() const {
267 return params_.distances.size() == 0 || params_.distances[0].IsZero(); 267 return params_.distances.size() == 0 || params_.distances[0].IsZero();
268 } 268 }
269 269
270 } // namespace content 270 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698