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

Side by Side Diff: ash/common/system/chromeos/palette/tools/laser_pointer_view.h

Issue 2239743004: Palette tool laser prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch
Patch Set: Refactored drawing code. 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 unified diff | Download patch
OLDNEW
(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/views/view.h"
13
14 namespace gfx {
15 class Point;
16 }
17
18 namespace views {
19 class Widget;
20 }
21
22 namespace ash {
23
24 // LaserPointerView displays the palette tool laser pointer. It draws the laser,
25 // which consists of a point where the mouse cursor should be, as well as a
26 // trail of lines to help users track.
27 class LaserPointerView : public views::View {
28 public:
29 LaserPointerView(base::TimeDelta life_duration);
oshima 2016/08/24 23:01:04 explicit
sammiequon 2016/08/25 17:59:05 Done.
30 ~LaserPointerView() override;
31
32 void AddNewPoint(const gfx::Point& new_point);
33 void Stop();
34
35 private:
36 friend class LaserPointerModeTestApi;
37
38 // view::View:
39 void OnPaint(gfx::Canvas* canvas) override;
40
41 LaserPointerPoints laser_points_;
42 std::unique_ptr<views::Widget> widget_;
43
44 DISALLOW_COPY_AND_ASSIGN(LaserPointerView);
45 };
46
47 } // namespace ash
48
49 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_TOOLS_LASER_POINTER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698