Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1704)

Unified Diff: ui/views/widget/widget.h

Issue 693523003: MacViews: Put wm window animation calls behind an interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-clipboard
Patch Set: Fix windows build Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/native_widget_private.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.h
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 4fb573a9a13dc55b341de435359e3eeba5252838..fa7c771746fc067887a022c8eabd3c268d6264a8 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;
@@ -133,6 +137,14 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
MOVE_LOOP_ESCAPE_BEHAVIOR_DONT_HIDE,
};
+ // Type of visibility change transition that should animate.
+ enum VisibilityTransition {
+ ANIMATE_SHOW = 0x1,
+ ANIMATE_HIDE = 0x2,
+ ANIMATE_BOTH = ANIMATE_SHOW | ANIMATE_HIDE,
+ ANIMATE_NONE = 0x4,
+ };
+
struct VIEWS_EXPORT InitParams {
enum Type {
TYPE_WINDOW, // A decorated Window, like a frame window.
@@ -420,6 +432,13 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Default is true.
void SetVisibilityChangedAnimationsEnabled(bool value);
+ // Sets the duration of visibility change animations.
+ void SetVisibilityAnimationDuration(const base::TimeDelta& duration);
+
+ // Sets the visibility transitions that should animate.
+ // Default behavior is to animate both show and hide.
+ void SetVisibilityAnimationTransition(VisibilityTransition transition);
+
// 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
« no previous file with comments | « ui/views/widget/native_widget_private.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698