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/geometry/point.h" | |
14 #include "ui/views/view.h" | |
15 #include "ui/views/widget/widget.h" | |
16 | |
17 namespace ash { | |
18 | |
19 class LaserPointerModeTestApi; | |
jdufault
2016/08/16 19:33:58
Please verify that this is needed
sammiequon
2016/08/16 23:18:56
Done.
| |
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 | |
jdufault
2016/08/16 19:33:58
I'm a bit confused by "It draws the laser as a poi
sammiequon
2016/08/16 23:18:56
Done.
| |
22 // help users track the laser. | |
23 class LaserPointerView : public views::View { | |
24 friend class LaserPointerModeTestApi; | |
jdufault
2016/08/16 19:33:58
Move friend class decl to right below private:
sammiequon
2016/08/16 23:18:56
Done.
| |
25 | |
26 public: | |
27 LaserPointerView(base::TimeDelta life_duration); | |
28 ~LaserPointerView() override; | |
29 | |
30 void AddNewPoint(const gfx::Point& new_point); | |
31 void Stop(); | |
32 | |
33 private: | |
34 // view::View: | |
35 void OnPaint(gfx::Canvas* canvas) override; | |
36 | |
37 LaserPointerPoints laser_points_; | |
38 std::unique_ptr<views::Widget> widget_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(LaserPointerView); | |
41 }; | |
42 | |
43 } // namespace ash | |
44 | |
45 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_VIEW_H_ | |
OLD | NEW |