Chromium Code Reviews| 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_TOUCH_HUD_TOUCH_HUD_RENDERER_H_ | |
| 6 #define ASH_TOUCH_HUD_TOUCH_HUD_RENDERER_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <memory> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 | |
| 13 namespace ui { | |
| 14 class LocatedEvent; | |
| 15 } | |
| 16 | |
| 17 namespace views { | |
| 18 class Widget; | |
| 19 } | |
| 20 | |
| 21 namespace ash { | |
| 22 class TouchHudProjectionTest; | |
| 23 class TouchPointView; | |
| 24 | |
| 25 // Handles touch events to draw out touch points accordingly. | |
| 26 class TouchHudRenderer { | |
| 27 public: | |
| 28 TouchHudRenderer(); | |
| 29 ~TouchHudRenderer(); | |
| 30 | |
| 31 // Called to clear touch points and traces from the screen. | |
| 32 void Clear(); | |
| 33 | |
| 34 // Receives a touch event and draws its touch point under parent_widget. | |
| 35 void HandleTouchEvent(const ui::LocatedEvent* event, | |
| 36 views::Widget* parent_widget); | |
|
sadrul
2016/07/11 18:41:05
Instead of sending the Widget here, can the Widget
riajiang
2016/07/11 20:39:34
Changed to set parent_widget in the ctor.
| |
| 37 | |
| 38 private: | |
| 39 friend class TouchHudProjectionTest; | |
| 40 | |
| 41 // a map of touch ids to TouchPointView | |
| 42 std::map<int, TouchPointView*> points_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(TouchHudRenderer); | |
| 45 }; | |
| 46 | |
| 47 } // namespace ash | |
| 48 | |
| 49 #endif // ASH_TOUCH_HUD_TOUCH_HUD_RENDERER_H_ | |
| OLD | NEW |