Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_VIEW_H_ | |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_VIEW_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "ash/common/system/chromeos/palette/tools/laser_pointer_points.h" | |
| 11 #include "base/macros.h" | |
| 12 #include "ui/events/event.h" | |
| 13 #include "ui/gfx/animation/linear_animation.h" | |
|
jdufault
2016/08/12 19:58:00
Cleanup includes
sammiequon
2016/08/16 17:00:06
Done.
| |
| 14 #include "ui/gfx/geometry/point.h" | |
| 15 #include "ui/views/view.h" | |
| 16 #include "ui/views/widget/widget.h" | |
| 17 | |
| 18 namespace ash { | |
| 19 | |
| 20 // LaserPointerView displays the palette tool laser pointer. It draws the laser | |
| 21 // as a point which replaces the mouse cursor, as well as a trail of lines to | |
| 22 // help users with tracking the laser. | |
|
jdufault
2016/08/12 19:58:00
What about "... to help users track the laser."?
sammiequon
2016/08/16 17:00:06
Done.
| |
| 23 class LaserPointerView : public views::View { | |
| 24 public: | |
| 25 LaserPointerView(); | |
| 26 ~LaserPointerView() override; | |
| 27 | |
| 28 void SetNewPoints(const LaserPointerPoints& laser_points); | |
| 29 void Stop(); | |
| 30 | |
| 31 private: | |
| 32 // view::View overrides; | |
|
jdufault
2016/08/12 19:58:00
// view::View:
sammiequon
2016/08/16 17:00:06
Done.
| |
| 33 void OnPaint(gfx::Canvas* canvas) override; | |
| 34 | |
| 35 LaserPointerPoints laser_points_; | |
|
jdufault
2016/08/12 19:58:00
Instead of constantly copying points, what about u
sammiequon
2016/08/16 17:00:06
Done.
| |
| 36 std::unique_ptr<views::Widget> widget_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(LaserPointerView); | |
| 39 }; | |
| 40 | |
| 41 } // namespace ash | |
| 42 | |
| 43 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_VIEW_H_ | |
| OLD | NEW |