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

Side by Side Diff: ui/events/gesture_detection/snap_scroll_controller.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/events/gesture_detection/snap_scroll_controller.h" 5 #include "ui/events/gesture_detection/snap_scroll_controller.h"
6 6
7 #include <algorithm>
7 #include <cmath> 8 #include <cmath>
8 9
9 #include "ui/events/gesture_detection/motion_event.h" 10 #include "ui/events/gesture_detection/motion_event.h"
10 11
11 namespace ui { 12 namespace ui {
12 namespace { 13 namespace {
13 14
14 // Minimum ratio between initial X and Y motion to allow snapping. 15 // Minimum ratio between initial X and Y motion to allow snapping.
15 const float kMinSnapRatio = 1.25f; 16 const float kMinSnapRatio = 1.25f;
16 17
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 116
116 bool SnapScrollController::IsSnapHorizontal() const { 117 bool SnapScrollController::IsSnapHorizontal() const {
117 return mode_ == SNAP_HORIZ; 118 return mode_ == SNAP_HORIZ;
118 } 119 }
119 120
120 bool SnapScrollController::IsSnappingScrolls() const { 121 bool SnapScrollController::IsSnappingScrolls() const {
121 return IsSnapHorizontal() || IsSnapVertical(); 122 return IsSnapHorizontal() || IsSnapVertical();
122 } 123 }
123 124
124 } // namespace ui 125 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/scale_gesture_detector.cc ('k') | ui/gfx/animation/linear_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698