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" | |
jdufault
2016/08/19 01:02:09
needed?
sammiequon
2016/08/19 20:28:47
Done.
| |
13 #include "ui/gfx/geometry/point.h" | |
jdufault
2016/08/19 01:02:09
forward declare
sammiequon
2016/08/19 20:28:47
Done.
| |
14 #include "ui/views/view.h" | |
15 #include "ui/views/widget/widget.h" | |
jdufault
2016/08/19 01:02:09
forward declare
sammiequon
2016/08/19 20:28:47
Done.
| |
16 | |
17 namespace ash { | |
18 | |
19 // LaserPointerView displays the palette tool laser pointer. It draws the laser, | |
20 // which consists of a point where the mouse cursor should be, as well as a | |
21 // trail of lines to help users track. | |
22 class LaserPointerView : public views::View { | |
23 public: | |
24 LaserPointerView(base::TimeDelta life_duration); | |
25 ~LaserPointerView() override; | |
26 | |
27 void AddNewPoint(const gfx::Point& new_point); | |
28 void Stop(); | |
29 | |
30 private: | |
31 friend class LaserPointerModeTestApi; | |
32 | |
33 // view::View: | |
34 void OnPaint(gfx::Canvas* canvas) override; | |
35 | |
36 LaserPointerPoints laser_points_; | |
37 std::unique_ptr<views::Widget> widget_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(LaserPointerView); | |
40 }; | |
41 | |
42 } // namespace ash | |
43 | |
44 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_VIEW_H_ | |
OLD | NEW |