| 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 #include "ash/common/system/chromeos/palette/tools/laser_pointer_points.h" | 5 #include "ash/laser/laser_pointer_points.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 namespace ash { | 10 namespace ash { |
| 11 | 11 |
| 12 LaserPointerPoints::LaserPointerPoints(base::TimeDelta life_duration) | 12 LaserPointerPoints::LaserPointerPoints(base::TimeDelta life_duration) |
| 13 : life_duration_(life_duration) {} | 13 : life_duration_(life_duration) {} |
| 14 | 14 |
| 15 LaserPointerPoints::~LaserPointerPoints() {} | 15 LaserPointerPoints::~LaserPointerPoints() {} |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void LaserPointerPoints::ClearOldPoints() { | 65 void LaserPointerPoints::ClearOldPoints() { |
| 66 DCHECK(!IsEmpty()); | 66 DCHECK(!IsEmpty()); |
| 67 auto first_alive_point = | 67 auto first_alive_point = |
| 68 std::find_if(points_.begin(), points_.end(), [this](LaserPoint& p) { | 68 std::find_if(points_.begin(), points_.end(), [this](LaserPoint& p) { |
| 69 return GetNewest().creation_time - p.creation_time < life_duration_; | 69 return GetNewest().creation_time - p.creation_time < life_duration_; |
| 70 }); | 70 }); |
| 71 points_.erase(points_.begin(), first_alive_point); | 71 points_.erase(points_.begin(), first_alive_point); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace ash | 74 } // namespace ash |
| OLD | NEW |