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

Side by Side Diff: ui/base/gestures/velocity_calculator.h

Issue 11878022: ui: Convert scoped_arrays to the new scoped_ptr style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/dragdrop/gtk_dnd_util_unittest.cc ('k') | ui/base/win/ime_input.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef UI_BASE_GESTURES_VELOCITY_CALCULATOR_H_ 5 #ifndef UI_BASE_GESTURES_VELOCITY_CALCULATOR_H_
6 #define UI_BASE_GESTURES_VELOCITY_CALCULATOR_H_ 6 #define UI_BASE_GESTURES_VELOCITY_CALCULATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 25
26 private: 26 private:
27 struct Point { 27 struct Point {
28 int x; 28 int x;
29 int y; 29 int y;
30 int64 time; 30 int64 time;
31 }; 31 };
32 32
33 void UpdateVelocity(); 33 void UpdateVelocity();
34 34
35 typedef scoped_array<Point> HistoryBuffer; 35 typedef scoped_ptr<Point[]> HistoryBuffer;
36 HistoryBuffer buffer_; 36 HistoryBuffer buffer_;
37 37
38 // index_ points directly after the last point added. 38 // index_ points directly after the last point added.
39 int index_; 39 int index_;
40 size_t num_valid_entries_; 40 size_t num_valid_entries_;
41 const size_t buffer_size_; 41 const size_t buffer_size_;
42 float x_velocity_; 42 float x_velocity_;
43 float y_velocity_; 43 float y_velocity_;
44 bool velocities_stale_; 44 bool velocities_stale_;
45 DISALLOW_COPY_AND_ASSIGN(VelocityCalculator); 45 DISALLOW_COPY_AND_ASSIGN(VelocityCalculator);
46 }; 46 };
47 47
48 } // namespace ui 48 } // namespace ui
49 49
50 #endif // UI_BASE_GESTURES_VELOCITY_CALCULATOR_H_ 50 #endif // UI_BASE_GESTURES_VELOCITY_CALCULATOR_H_
OLDNEW
« no previous file with comments | « ui/base/dragdrop/gtk_dnd_util_unittest.cc ('k') | ui/base/win/ime_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698