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

Unified Diff: ash/laser/laser_pointer_view.h

Issue 2362063002: cros: Laser pointer fades out on release, do not cover palette. (Closed)
Patch Set: 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
Index: ash/laser/laser_pointer_view.h
diff --git a/ash/laser/laser_pointer_view.h b/ash/laser/laser_pointer_view.h
index 11ff272965901cbd8b7fb4433c2ba0adb999e3c9..bf06e619b95f5441c94e091afa186482dc14a45c 100644
--- a/ash/laser/laser_pointer_view.h
+++ b/ash/laser/laser_pointer_view.h
@@ -35,6 +35,9 @@ class LaserPointerView : public views::View {
void AddNewPoint(const gfx::Point& new_point);
void Stop();
+ void SetIsFadingAway(bool is_fading);
jdufault 2016/09/23 23:59:20 Rename to set_is_fading_away. Trival methods (like
sammiequon 2016/09/26 19:30:38 Done.
+ bool GetIsFadingAway() const;
jdufault 2016/09/23 23:59:20 Rename to is_fading_away() and inline the definiti
sammiequon 2016/09/26 19:30:38 Done.
+
aura::Window* GetRootWindow();
// Reparents the widget if needed.
@@ -48,6 +51,11 @@ class LaserPointerView : public views::View {
LaserPointerPoints laser_points_;
std::unique_ptr<views::Widget> widget_;
+ // |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;
DISALLOW_COPY_AND_ASSIGN(LaserPointerView);
};

Powered by Google App Engine
This is Rietveld 408576698