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

Side by Side Diff: ash/touch_hud/touch_hud_renderer.h

Issue 2118223004: ash: Refactor touch hud drawing to ash/touch_hud as a separate component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete MakeUnique<>. Created 4 years, 5 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
« no previous file with comments | « ash/touch_hud/BUILD.gn ('k') | ash/touch_hud/touch_hud_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TOUCH_HUD_TOUCH_HUD_RENDERER_H_
6 #define ASH_TOUCH_HUD_TOUCH_HUD_RENDERER_H_
7
8 #include <map>
9
10 #include "base/macros.h"
11
12 namespace ui {
13 class LocatedEvent;
14 }
15
16 namespace views {
17 class Widget;
18 }
19
20 namespace ash {
21 class TouchHudProjectionTest;
22 class TouchPointView;
23
24 // Handles touch events to draw out touch points accordingly.
25 class TouchHudRenderer {
26 public:
27 explicit TouchHudRenderer(views::Widget* parent_widget);
28 ~TouchHudRenderer();
29
30 // Called to clear touch points and traces from the screen.
31 void Clear();
32
33 // Receives a touch event and draws its touch point.
34 void HandleTouchEvent(const ui::LocatedEvent* event);
sadrul 2016/07/13 00:31:48 Send in a const-ref instead
riajiang 2016/07/13 18:33:45 Done.
35
36 private:
37 friend class TouchHudProjectionTest;
38
39 // The parent widget that all touch points would be drawn in.
40 views::Widget* parent_widget_;
41
42 // A map of touch ids to TouchPointView.
43 std::map<int, TouchPointView*> points_;
44
45 DISALLOW_COPY_AND_ASSIGN(TouchHudRenderer);
46 };
47
48 } // namespace ash
49
50 #endif // ASH_TOUCH_HUD_TOUCH_HUD_RENDERER_H_
OLDNEW
« no previous file with comments | « ash/touch_hud/BUILD.gn ('k') | ash/touch_hud/touch_hud_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698