Chromium Code Reviews| 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..e66cc9105d77f3b3bdbbe874fbd6d33174e5fb41 100644 |
| --- a/ash/laser/laser_pointer_controller.h |
| +++ b/ash/laser/laser_pointer_controller.h |
| @@ -54,6 +54,18 @@ class ASH_EXPORT LaserPointerController : public ui::EventHandler, |
| // allows the trail to fade away when the mouse is stationary. |
| void AddStationaryPoint(); |
| + // Updates |laser_pointer_view_| by changing its root window or creating it if |
| + // needed. Also adds the latest point at |event_location|, stops propagation |
| + // of |event| and starts the timer if required. |
| + void UpdateLaserPointerView(aura::Window* current_window, |
|
jdufault
2016/10/14 21:59:47
Update comment (no more timer section).
sammiequon
2016/10/17 19:12:24
Done.
|
| + const gfx::Point& event_location, |
| + ui::MouseEvent* event); |
| + |
| + // Destroys |laser_pointer_view_|, if it exists. |
| + void DestroyLaserPointerView(); |
| + |
| + void RestartTimer(); |
| + |
| // 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_; |
| @@ -61,6 +73,12 @@ class ASH_EXPORT LaserPointerController : public ui::EventHandler, |
| bool enabled_ = false; |
| + // |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_; |