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

Side by Side Diff: ui/events/gesture_detection/velocity_tracker.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 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 #ifndef UI_EVENTS_GESTURE_DETECTION_VELOCITY_TRACKER_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_VELOCITY_TRACKER_H_
6 #define UI_EVENTS_GESTURE_DETECTION_VELOCITY_TRACKER_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_VELOCITY_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "ui/events/gesture_detection/bitset_32.h" 14 #include "ui/events/gesture_detection/bitset_32.h"
14 15
15 namespace ui { 16 namespace ui {
16 17
17 class MotionEvent; 18 class MotionEvent;
18 class VelocityTrackerStrategy; 19 class VelocityTrackerStrategy;
19 20
20 namespace { 21 namespace {
21 struct Estimator; 22 struct Estimator;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 BitSet32 id_bits, 138 BitSet32 id_bits,
138 const Position* positions); 139 const Position* positions);
139 140
140 // Gets an estimator for the recent movements of the specified pointer id. 141 // Gets an estimator for the recent movements of the specified pointer id.
141 // Returns false if the pointer velocity is unknown. 142 // Returns false if the pointer velocity is unknown.
142 bool GetEstimator(uint32_t id, Estimator* out_estimator) const; 143 bool GetEstimator(uint32_t id, Estimator* out_estimator) const;
143 144
144 base::TimeTicks last_event_time_; 145 base::TimeTicks last_event_time_;
145 BitSet32 current_pointer_id_bits_; 146 BitSet32 current_pointer_id_bits_;
146 int32_t active_pointer_id_; 147 int32_t active_pointer_id_;
147 scoped_ptr<VelocityTrackerStrategy> strategy_; 148 std::unique_ptr<VelocityTrackerStrategy> strategy_;
148 149
149 DISALLOW_COPY_AND_ASSIGN(VelocityTracker); 150 DISALLOW_COPY_AND_ASSIGN(VelocityTracker);
150 }; 151 };
151 152
152 } // namespace ui 153 } // namespace ui
153 154
154 #endif // UI_EVENTS_GESTURE_DETECTION_VELOCITY_TRACKER_H_ 155 #endif // UI_EVENTS_GESTURE_DETECTION_VELOCITY_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698