OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ASH_LASER_LASER_POINTER_POINTS_TEST_API_H_ | 5 #ifndef ASH_LASER_LASER_POINTER_POINTS_TEST_API_H_ |
6 #define ASH_LASER_LASER_POINTER_POINTS_TEST_API_H_ | 6 #define ASH_LASER_LASER_POINTER_POINTS_TEST_API_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 | 9 |
10 namespace ash { | 10 namespace ash { |
11 | 11 |
12 class LaserPointerPoints; | 12 class LaserPointerPoints; |
13 | 13 |
14 // An api for testing the laser_pointer_points class. | 14 // An api for testing the laser_pointer_points class. |
15 class LaserPointerPointsTestApi { | 15 class LaserPointerPointsTestApi { |
16 public: | 16 public: |
17 LaserPointerPointsTestApi(LaserPointerPoints* instance); | 17 LaserPointerPointsTestApi(LaserPointerPoints* instance); |
18 ~LaserPointerPointsTestApi(); | 18 ~LaserPointerPointsTestApi(); |
19 | 19 |
20 int GetNumberOfPoints() const; | 20 int GetNumberOfPoints() const; |
21 // Moves existing points back in time by |delta| and adds a new point at | 21 // Moves existing points back in time by |delta| and adds a new point at |
22 // (0,0). | 22 // (0,0). |
23 void MoveForwardInTime(const base::TimeDelta& delta); | 23 void MoveForwardInTime(const base::TimeDelta& delta); |
24 double AgeAtIndex(int index); | |
jdufault
2016/10/04 22:04:13
What about doing GetPointAtIndex(int index) and th
sammiequon
2016/10/05 17:42:23
Done.
| |
24 | 25 |
25 private: | 26 private: |
26 // The time the new points are added. | |
27 base::Time new_point_time_; | |
28 LaserPointerPoints* instance_; | 27 LaserPointerPoints* instance_; |
29 | 28 |
30 DISALLOW_COPY_AND_ASSIGN(LaserPointerPointsTestApi); | 29 DISALLOW_COPY_AND_ASSIGN(LaserPointerPointsTestApi); |
31 }; | 30 }; |
32 } // namespace ash | 31 } // namespace ash |
33 | 32 |
34 #endif // ASH_LASER_LASER_POINTER_POINTS_TEST_API_H_ | 33 #endif // ASH_LASER_LASER_POINTER_POINTS_TEST_API_H_ |
OLD | NEW |