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_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_POINTS_TESTAPI_H_ | 5 #ifndef ASH_LASER_LASER_POINTER_POINTS_TESTAPI_H_ |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_POINTS_TESTAPI_H_ | 6 #define ASH_LASER_LASER_POINTER_POINTS_TESTAPI_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 class LaserPointerPoints; | 14 class LaserPointerPoints; |
15 | 15 |
16 // An api for testing the laser_pointer_points class. | 16 // An api for testing the laser_pointer_points class. |
17 class LaserPointerPointsTestApi { | 17 class LaserPointerPointsTestApi { |
18 public: | 18 public: |
19 LaserPointerPointsTestApi(std::unique_ptr<LaserPointerPoints> instance); | 19 LaserPointerPointsTestApi(LaserPointerPoints* instance); |
20 ~LaserPointerPointsTestApi(); | 20 ~LaserPointerPointsTestApi(); |
21 | 21 |
22 int GetNumberOfPoints() const; | 22 int GetNumberOfPoints() const; |
23 // Moves existing points back in time by |delta| and adds a new point at | 23 // Moves existing points back in time by |delta| and adds a new point at |
24 // (0,0). | 24 // (0,0). |
25 void MoveForwardInTime(const base::TimeDelta& delta); | 25 void MoveForwardInTime(const base::TimeDelta& delta); |
26 | 26 |
27 private: | 27 private: |
28 // The time the new points are added. | 28 // The time the new points are added. |
29 base::Time new_point_time_; | 29 base::Time new_point_time_; |
30 std::unique_ptr<LaserPointerPoints> instance_; | 30 LaserPointerPoints* instance_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(LaserPointerPointsTestApi); | 32 DISALLOW_COPY_AND_ASSIGN(LaserPointerPointsTestApi); |
33 }; | 33 }; |
34 } // namespace ash | 34 } // namespace ash |
35 | 35 |
36 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_POINTS_TESTAPI
_H_ | 36 #endif // ASH_LASER_LASER_POINTER_POINTS_TESTAPI_H_ |
OLD | NEW |