OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ash/laser/laser_pointer_controller_test_api.h" |
| 6 |
| 7 #include "ash/laser/laser_pointer_controller.h" |
| 8 #include "ash/laser/laser_pointer_points.h" |
| 9 #include "ash/laser/laser_pointer_view.h" |
| 10 |
| 11 namespace ash { |
| 12 |
| 13 LaserPointerControllerTestApi::LaserPointerControllerTestApi( |
| 14 std::unique_ptr<LaserPointerController> instance) |
| 15 : instance_(std::move(instance)) {} |
| 16 |
| 17 LaserPointerControllerTestApi::~LaserPointerControllerTestApi() {} |
| 18 |
| 19 void LaserPointerControllerTestApi::OnEnable() { |
| 20 instance_->SetEnabled(true); |
| 21 } |
| 22 |
| 23 void LaserPointerControllerTestApi::OnDisable() { |
| 24 instance_->SetEnabled(false); |
| 25 } |
| 26 |
| 27 bool LaserPointerControllerTestApi::IsShowingLaserPointer() { |
| 28 return instance_->laser_pointer_view_ != nullptr; |
| 29 } |
| 30 |
| 31 const LaserPointerPoints& LaserPointerControllerTestApi::laser_points() { |
| 32 return instance_->laser_pointer_view_->laser_points_; |
| 33 } |
| 34 |
| 35 LaserPointerView* LaserPointerControllerTestApi::laser_pointer_view() { |
| 36 return instance_->laser_pointer_view_.get(); |
| 37 } |
| 38 |
| 39 } // namespace ash |
OLD | NEW |