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

Unified Diff: ash/laser/laser_pointer_controller_test_api.cc

Issue 2745953002: ash: Add basic prediction code to the laser pointer. (Closed)
Patch Set: more tests and nits Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/laser/laser_pointer_controller_test_api.h ('k') | ash/laser/laser_pointer_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/laser/laser_pointer_controller_test_api.cc
diff --git a/ash/laser/laser_pointer_controller_test_api.cc b/ash/laser/laser_pointer_controller_test_api.cc
index 165608acb50fd9e6f457e0741c28ccade7c21bad..c3fb23ae63241df52823b84c1cca9985d3e305f0 100644
--- a/ash/laser/laser_pointer_controller_test_api.cc
+++ b/ash/laser/laser_pointer_controller_test_api.cc
@@ -20,11 +20,11 @@ void LaserPointerControllerTestApi::SetEnabled(bool enabled) {
instance_->SetEnabled(enabled);
}
-bool LaserPointerControllerTestApi::IsShowingLaserPointer() {
+bool LaserPointerControllerTestApi::IsShowingLaserPointer() const {
return instance_->laser_pointer_view_ != nullptr;
}
-bool LaserPointerControllerTestApi::IsFadingAway() {
+bool LaserPointerControllerTestApi::IsFadingAway() const {
return IsShowingLaserPointer() && instance_->is_fading_away_;
}
@@ -32,11 +32,16 @@ void LaserPointerControllerTestApi::SetIsFadingAway(bool fading_away) {
instance_->is_fading_away_ = fading_away;
}
-const LaserPointerPoints& LaserPointerControllerTestApi::laser_points() {
+const LaserPointerPoints& LaserPointerControllerTestApi::laser_points() const {
return instance_->laser_pointer_view_->laser_points_;
}
-LaserPointerView* LaserPointerControllerTestApi::laser_pointer_view() {
+const LaserPointerPoints&
+LaserPointerControllerTestApi::predicted_laser_points() const {
+ return instance_->laser_pointer_view_->predicted_laser_points_;
+}
+
+LaserPointerView* LaserPointerControllerTestApi::laser_pointer_view() const {
return instance_->laser_pointer_view_.get();
}
« no previous file with comments | « ash/laser/laser_pointer_controller_test_api.h ('k') | ash/laser/laser_pointer_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698