| OLD | NEW |
| 1 // Copyright 2016 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 UI_VIEWS_CONTROLS_TOUCH_TOUCH_HUD_DRAWER_H_ |
| 6 #define UI_VIEWS_CONTROLS_TOUCH_TOUCH_HUD_DRAWER_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 5 #include "base/macros.h" | 10 #include "base/macros.h" |
| 6 #include "ui/views/animation/ink_drop.h" | |
| 7 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
| 8 | 12 |
| 13 namespace ash { |
| 14 class TouchHudProjectionTest; |
| 15 } |
| 16 |
| 17 namespace ui { |
| 18 class LocatedEvent; |
| 19 } |
| 20 |
| 9 namespace views { | 21 namespace views { |
| 22 class TouchPointView; |
| 23 class Widget; |
| 10 | 24 |
| 11 // A stub implementation of an InkDrop that can be used when no visuals should | 25 class VIEWS_EXPORT TouchHudDrawer { |
| 12 // be shown. e.g. material design is enabled. | |
| 13 class VIEWS_EXPORT InkDropStub : public InkDrop { | |
| 14 public: | 26 public: |
| 15 InkDropStub(); | 27 TouchHudDrawer(); |
| 16 ~InkDropStub() override; | 28 ~TouchHudDrawer(); |
| 17 | 29 |
| 18 // InkDrop: | 30 // Called to clear touch points and traces from the screen. |
| 19 InkDropState GetTargetInkDropState() const override; | 31 void Clear(); |
| 20 void AnimateToState(InkDropState state) override; | 32 |
| 21 void SnapToActivated() override; | 33 void HandleTouchEvent(const ui::LocatedEvent* event, Widget* parent_widget); |
| 22 void SetHovered(bool is_hovered) override; | |
| 23 void SetFocused(bool is_hovered) override; | |
| 24 | 34 |
| 25 private: | 35 private: |
| 26 DISALLOW_COPY_AND_ASSIGN(InkDropStub); | 36 friend class ash::TouchHudProjectionTest; |
| 37 |
| 38 std::map<int, TouchPointView*> points_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(TouchHudDrawer); |
| 27 }; | 41 }; |
| 28 | 42 |
| 29 } // namespace views | 43 } // namespace views |
| 44 |
| 45 #endif // UI_VIEWS_CONTROLS_TOUCH_TOUCH_HUD_DRAWER_H_ |
| OLD | NEW |