Chromium Code Reviews| Index: ui/views/widget/widget.h |
| diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h |
| index 4fb573a9a13dc55b341de435359e3eeba5252838..5e231acc4f3592ee7b5ab434f2b85e9696dc38cb 100644 |
| --- a/ui/views/widget/widget.h |
| +++ b/ui/views/widget/widget.h |
| @@ -37,6 +37,10 @@ |
| #endif |
| #endif |
| +namespace base { |
| +class TimeDelta; |
| +} |
| + |
| namespace gfx { |
| class Canvas; |
| class Point; |
| @@ -420,6 +424,28 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, |
| // Default is true. |
| void SetVisibilityChangedAnimationsEnabled(bool value); |
| + // An interface for configuring visibility animations. |
| + class VisibilityAnimation { |
| + public: |
| + virtual ~VisibilityAnimation() {} |
| + |
| + // Sets the animation's duration. |
| + virtual void SetDuration(const base::TimeDelta& duration) = 0; |
| + |
| + // Type of visibility change transition that a window should animate. |
| + // Default behavior is to animate both show and hide. |
| + enum Transition { |
| + ANIMATE_SHOW = 0x1, |
| + ANIMATE_HIDE = 0x2, |
| + ANIMATE_BOTH = ANIMATE_SHOW | ANIMATE_HIDE, |
| + ANIMATE_NONE = 0x4, |
| + }; |
| + virtual void SetTransition(Transition transition) = 0; |
| + }; |
| + |
| + // Returns the object for configuring visibility animations. |
| + VisibilityAnimation* GetVisibilityAnimation() const; |
|
sky
2014/10/30 22:54:43
I would rather have a single function that falls t
|
| + |
| // Starts a nested message loop that moves the window. This can be used to |
| // start a window move operation from a mouse or touch event. This returns |
| // when the move completes. |drag_offset| is the offset from the top left |