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

Unified Diff: ash/laser/laser_pointer_controller.h

Issue 2362063002: cros: Laser pointer fades out on release, do not cover palette. (Closed)
Patch Set: Moved age logic to laser pointer points class. Created 4 years, 3 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 | « no previous file | ash/laser/laser_pointer_controller.cc » ('j') | ash/laser/laser_pointer_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/laser/laser_pointer_controller.h
diff --git a/ash/laser/laser_pointer_controller.h b/ash/laser/laser_pointer_controller.h
index 21697ca3ac0a8ce023983ffe66f3066b39250cde..cfaf974e14cfa372d1a80489efeadeebf0561457 100644
--- a/ash/laser/laser_pointer_controller.h
+++ b/ash/laser/laser_pointer_controller.h
@@ -54,12 +54,20 @@ class ASH_EXPORT LaserPointerController : public ui::EventHandler,
// allows the trail to fade away when the mouse is stationary.
void AddStationaryPoint();
+ // Destroys |laser_pointer_view_|, if it exists.
+ void DestroyLaserPointerView();
+
// Timer which will add a new stationary point when the mouse stops moving.
// This will remove points that are too old.
std::unique_ptr<base::Timer> stationary_timer_;
int stationary_timer_repeat_count_ = 0;
bool enabled_ = false;
jdufault 2016/10/04 22:04:13 newline
sammiequon 2016/10/05 17:42:23 Done.
+ // |is_fading_away_| determines whether the laser pointer view should accept
+ // points normally, or just advance the |laser_points_| time so that current
+ // points start fading away. This should be set to true when the view is about
+ // to be destroyed, such as when the stylus is released.
+ bool is_fading_away_ = false;
// The last seen mouse location in screen coordinates.
gfx::Point current_mouse_location_;
« no previous file with comments | « no previous file | ash/laser/laser_pointer_controller.cc » ('j') | ash/laser/laser_pointer_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698