Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..757d067995311bb3c85508dcef251636dbf5dcf7 |
| --- /dev/null |
| +++ b/ash/laser/laser_pointer_controller_test_api.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ash/laser/laser_pointer_controller_test_api.h" |
| + |
| +#include "ash/laser/laser_pointer_controller.h" |
| +#include "ash/laser/laser_pointer_points.h" |
| +#include "ash/laser/laser_pointer_view.h" |
| + |
| +namespace ash { |
| + |
| +LaserPointerControllerTestApi::LaserPointerControllerTestApi( |
| + std::unique_ptr<LaserPointerController> instance) |
| + : instance_(std::move(instance)) {} |
|
jdufault
2016/09/12 21:10:11
Do you need std::move here?
sammiequon
2016/09/13 01:09:56
I think so.
|
| + |
| +LaserPointerControllerTestApi::~LaserPointerControllerTestApi() {} |
| + |
| +void LaserPointerControllerTestApi::OnEnable() { |
| + instance_->SetEnabled(true); |
| +} |
| + |
| +void LaserPointerControllerTestApi::OnDisable() { |
| + instance_->SetEnabled(false); |
| +} |
| + |
| +const LaserPointerPoints& LaserPointerControllerTestApi::laser_points() { |
| + return instance_->laser_pointer_view_->laser_points_; |
| +} |
| + |
| +LaserPointerView* LaserPointerControllerTestApi::laser_pointer_view() { |
| + return instance_->laser_pointer_view_.get(); |
| +} |
| + |
| +} // namespace ash |