| 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> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
| 11 | 12 |
| 12 namespace views { | 13 namespace views { |
| 13 | 14 |
| 14 // 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. |
| 15 enum class InkDropState { | 16 enum class InkDropState { |
| 16 // The ink drop is not visible. | 17 // The ink drop is not visible. |
| 17 HIDDEN, | 18 HIDDEN, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 29 ALTERNATE_ACTION_TRIGGERED, | 30 ALTERNATE_ACTION_TRIGGERED, |
| 30 // 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. |
| 31 // e.g. a pressed button that is showing a menu. | 32 // e.g. a pressed button that is showing a menu. |
| 32 ACTIVATED, | 33 ACTIVATED, |
| 33 // 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 |
| 34 // menu is closed. | 35 // menu is closed. |
| 35 DEACTIVATED, | 36 DEACTIVATED, |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 // Returns a human readable string for |state|. Useful for logging. | 39 // Returns a human readable string for |state|. Useful for logging. |
| 39 std::string ToString(InkDropState state); | 40 VIEWS_EXPORT std::string ToString(InkDropState state); |
| 41 |
| 42 // This is declared here for use in gtest-based unit tests but is defined in |
| 43 // the views_test_support target. Depend on that to use this in your unit test. |
| 44 // This should not be used in production code - call ToString() instead. |
| 45 void PrintTo(InkDropState ink_drop_state, ::std::ostream* os); |
| 40 | 46 |
| 41 } // namespace views | 47 } // namespace views |
| 42 | 48 |
| 43 #endif // UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ | 49 #endif // UI_VIEWS_ANIMATION_INK_DROP_STATE_H_ |
| OLD | NEW |