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

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: Fixed patch set 4 errors. Created 4 years, 4 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/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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698