OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | |
6 #define UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "ui/views/animation/ink_drop_state.h" | |
10 #include "ui/views/views_export.h" | |
11 | |
12 namespace ui { | |
13 class GestureEvent; | |
14 class Event; | |
15 } // namespace ui | |
16 | |
17 namespace views { | |
18 | |
19 class InkDrop; | |
20 | |
21 // Ink ripple animation delegate that starts and stops animations based on | |
22 // View states and events. | |
23 class VIEWS_EXPORT InkDropDelegate { | |
24 public: | |
25 InkDropDelegate() {} | |
26 virtual ~InkDropDelegate() {} | |
27 | |
28 // Called when ink ripple state changes. | |
29 // TODO(bruthig): Replace the InkDropState parameter with an InkDropAction | |
30 // enum. The InkDropAction enum should be a subset of the InkDropState values | |
31 // as well as a NONE value. | |
32 virtual void OnAction(InkDropState state) = 0; | |
33 | |
34 // Immediately snaps the InkDropState to ACTIVATED. | |
35 virtual void SnapToActivated() = 0; | |
36 | |
37 // Enables or disables the hover state. | |
38 virtual void SetHovered(bool is_hovered) = 0; | |
39 | |
40 // Returns the current InkDropState | |
41 virtual InkDropState GetTargetInkDropState() const = 0; | |
42 | |
43 // Returns the ink drop that this delegate controls. TODO(estade): remove the | |
44 // above pass throughs and convert callers to using this function. | |
45 virtual InkDrop* GetInkDrop() = 0; | |
46 | |
47 private: | |
48 DISALLOW_COPY_AND_ASSIGN(InkDropDelegate); | |
49 }; | |
50 | |
51 } // namespace views | |
52 | |
53 #endif // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | |
OLD | NEW |