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/views_export.h" | |
10 | |
11 namespace ui { | |
12 class GestureEvent; | |
13 class Event; | |
14 } // namespace ui | |
15 | |
16 namespace views { | |
17 | |
18 // Ink ripple animation delegate that starts and stops animations based on | |
19 // View states and events. | |
20 class VIEWS_EXPORT InkDropDelegate { | |
21 public: | |
22 InkDropDelegate() {} | |
23 virtual ~InkDropDelegate() {} | |
24 | |
25 // Sets sizes for the animation layers. | |
26 virtual void SetInkDropSize(int large_size, | |
27 int large_corner_radius, | |
28 int small_size, | |
29 int small_corner_radius) = 0; | |
30 | |
31 // Called when the View's layout changes necessitating change in positioning | |
32 // of ink ripple layers. | |
33 virtual void OnLayout() = 0; | |
34 | |
35 // Called when ink ripple should be hidden. | |
36 virtual void OnActionComplete() = 0; | |
bruthig
2015/11/16 22:37:11
What do you think about having a single function O
varkha
2015/11/18 22:56:44
Done.
| |
37 | |
38 // Called to activate the ink ripple. | |
39 virtual void OnActionPending() = 0; | |
40 | |
41 // Called to start showing QUICK_ACTION ripple. | |
42 virtual void OnActionQuick() = 0; | |
43 | |
44 // Called to start showing ACTIVATED (menu) ripple. | |
45 virtual void OnActivated() = 0; | |
46 | |
47 // Called to animate end of ACTIVATED (menu) ripple. | |
48 virtual void OnDeactivated() = 0; | |
49 | |
50 private: | |
51 DISALLOW_COPY_AND_ASSIGN(InkDropDelegate); | |
52 }; | |
53 | |
54 } // namespace views | |
55 | |
56 #endif // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | |
OLD | NEW |