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

Side by Side Diff: ash/laser/laser_pointer_controller_test_api.cc

Issue 2362063002: cros: Laser pointer fades out on release, do not cover palette. (Closed)
Patch Set: Nit. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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/laser/laser_pointer_controller_test_api.h" 5 #include "ash/laser/laser_pointer_controller_test_api.h"
6 6
7 #include "ash/laser/laser_pointer_controller.h" 7 #include "ash/laser/laser_pointer_controller.h"
8 #include "ash/laser/laser_pointer_points.h" 8 #include "ash/laser/laser_pointer_points.h"
9 #include "ash/laser/laser_pointer_view.h" 9 #include "ash/laser/laser_pointer_view.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 LaserPointerControllerTestApi::LaserPointerControllerTestApi( 13 LaserPointerControllerTestApi::LaserPointerControllerTestApi(
14 LaserPointerController* instance) 14 LaserPointerController* instance)
15 : instance_(instance) {} 15 : instance_(instance) {}
16 16
17 LaserPointerControllerTestApi::~LaserPointerControllerTestApi() {} 17 LaserPointerControllerTestApi::~LaserPointerControllerTestApi() {}
18 18
19 void LaserPointerControllerTestApi::SetEnabled(bool enabled) { 19 void LaserPointerControllerTestApi::SetEnabled(bool enabled) {
20 instance_->SetEnabled(enabled); 20 instance_->SetEnabled(enabled);
21 } 21 }
22 22
23 bool LaserPointerControllerTestApi::IsShowingLaserPointer() { 23 bool LaserPointerControllerTestApi::IsShowingLaserPointer() {
24 return instance_->laser_pointer_view_ != nullptr; 24 return instance_->laser_pointer_view_ != nullptr;
25 } 25 }
26 26
27 bool LaserPointerControllerTestApi::IsFadingAway() {
28 return IsShowingLaserPointer() && instance_->is_fading_away_;
29 }
30
31 void LaserPointerControllerTestApi::SetIsFadingAway(bool fading_away) {
32 instance_->is_fading_away_ = fading_away;
33 }
34
27 const LaserPointerPoints& LaserPointerControllerTestApi::laser_points() { 35 const LaserPointerPoints& LaserPointerControllerTestApi::laser_points() {
28 return instance_->laser_pointer_view_->laser_points_; 36 return instance_->laser_pointer_view_->laser_points_;
29 } 37 }
30 38
31 LaserPointerView* LaserPointerControllerTestApi::laser_pointer_view() { 39 LaserPointerView* LaserPointerControllerTestApi::laser_pointer_view() {
32 return instance_->laser_pointer_view_.get(); 40 return instance_->laser_pointer_view_.get();
33 } 41 }
34 42
35 } // namespace ash 43 } // namespace ash
OLDNEW
« 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