| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ | 5 #ifndef ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ |
| 6 #define ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ | 6 #define ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/touch/touch_observer_hud.h" | 10 #include "ash/touch/touch_observer_hud.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 | 12 |
| 13 namespace views { |
| 14 class TouchHudDrawer; |
| 15 } |
| 16 |
| 13 namespace ash { | 17 namespace ash { |
| 14 class TouchPointView; | |
| 15 | |
| 16 // A heads-up display to show active touch points on the screen. As a derivative | 18 // A heads-up display to show active touch points on the screen. As a derivative |
| 17 // of TouchObserverHUD, objects of this class manage their own lifetime. | 19 // of TouchObserverHUD, objects of this class manage their own lifetime. |
| 18 class TouchHudProjection : public TouchObserverHUD { | 20 class TouchHudProjection : public TouchObserverHUD { |
| 19 public: | 21 public: |
| 20 explicit TouchHudProjection(aura::Window* initial_root); | 22 explicit TouchHudProjection(aura::Window* initial_root); |
| 21 | 23 |
| 22 // Overriden from TouchObserverHUD. | 24 // Overriden from TouchObserverHUD. |
| 23 void Clear() override; | 25 void Clear() override; |
| 24 | 26 |
| 25 private: | 27 private: |
| 26 friend class TouchHudProjectionTest; | 28 friend class TouchHudProjectionTest; |
| 27 | 29 |
| 28 ~TouchHudProjection() override; | 30 ~TouchHudProjection() override; |
| 29 | 31 |
| 30 // Overriden from TouchObserverHUD. | 32 // Overriden from TouchObserverHUD. |
| 31 void OnTouchEvent(ui::TouchEvent* event) override; | 33 void OnTouchEvent(ui::TouchEvent* event) override; |
| 32 void SetHudForRootWindowController(RootWindowController* controller) override; | 34 void SetHudForRootWindowController(RootWindowController* controller) override; |
| 33 void UnsetHudForRootWindowController( | 35 void UnsetHudForRootWindowController( |
| 34 RootWindowController* controller) override; | 36 RootWindowController* controller) override; |
| 35 | 37 |
| 36 std::map<int, TouchPointView*> points_; | 38 views::TouchHudDrawer* touch_hud_drawer_ = nullptr; |
| 37 | 39 |
| 38 DISALLOW_COPY_AND_ASSIGN(TouchHudProjection); | 40 DISALLOW_COPY_AND_ASSIGN(TouchHudProjection); |
| 39 }; | 41 }; |
| 40 | 42 |
| 41 } // namespace ash | 43 } // namespace ash |
| 42 | 44 |
| 43 #endif // ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ | 45 #endif // ASH_TOUCH_TOUCH_HUD_PROJECTION_H_ |
| OLD | NEW |