OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_ANIMATION_INK_DROP_STATE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ |
6 #define UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ |
7 | 7 |
| 8 #include <iosfwd> |
| 9 #include <string> |
| 10 |
| 11 #include "ui/views/views_export.h" |
| 12 |
8 namespace views { | 13 namespace views { |
9 | 14 |
10 // The different states that the ink drop animation can be animated to. | 15 // The different states that the ink drop animation can be animated to. |
11 enum class InkDropState { | 16 enum class InkDropState { |
12 // The ink drop is not visible. | 17 // The ink drop is not visible. |
13 HIDDEN, | 18 HIDDEN, |
14 // The view is being interacted with but the action to be triggered has not | 19 // The view is being interacted with but the action to be triggered has not |
15 // yet been determined. | 20 // yet been determined. |
16 ACTION_PENDING, | 21 ACTION_PENDING, |
17 // The quick action for the view has been triggered. e.g. A tap gesture to | 22 // The quick action for the view has been triggered. e.g. a tap gesture to |
18 // click a button. | 23 // click a button. |
19 QUICK_ACTION, | 24 QUICK_ACTION, |
20 // A view is being interacted with and the pending action will be a 'slow' | 25 // A view is being interacted with and the pending action will be a 'slow' |
21 // action. e.g. A long press that is still active before releasing. | 26 // action. e.g. a long press that is still active before releasing. |
22 SLOW_ACTION_PENDING, | 27 SLOW_ACTION_PENDING, |
23 // The slow action for the view has been triggered. e.g. A long press release | 28 // The slow action for the view has been triggered. e.g. a long press release |
24 // to bring up a menu. | 29 // to bring up a menu. |
25 SLOW_ACTION, | 30 SLOW_ACTION, |
26 // An active state for a view that is not currently being interacted with. | 31 // An active state for a view that is not currently being interacted with. |
27 // e.g. A pressed button that is showing a menu. | 32 // e.g. a pressed button that is showing a menu. |
28 ACTIVATED, | 33 ACTIVATED, |
29 // A previously active state has been toggled to inactive. e.g. A drop down | 34 // A previously active state has been toggled to inactive. e.g. a drop down |
30 // menu is closed. | 35 // menu is closed. |
31 DEACTIVATED, | 36 DEACTIVATED, |
32 }; | 37 }; |
33 | 38 |
| 39 // Returns a human readable string for |state|. Useful for logging. |
| 40 std::string ToString(InkDropState state); |
| 41 |
34 } // namespace views | 42 } // namespace views |
35 | 43 |
36 #endif // UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ | 44 #endif // UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ |
OLD | NEW |