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

Side by Side 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: Two functions Created 6 years, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 #undef IsMaximized 30 #undef IsMaximized
31 #endif 31 #endif
32 #if defined(IsMinimized) 32 #if defined(IsMinimized)
33 #undef IsMinimized 33 #undef IsMinimized
34 #endif 34 #endif
35 #if defined(CreateWindow) 35 #if defined(CreateWindow)
36 #undef CreateWindow 36 #undef CreateWindow
37 #endif 37 #endif
38 #endif 38 #endif
39 39
40 namespace base {
41 class TimeDelta;
42 }
43
40 namespace gfx { 44 namespace gfx {
41 class Canvas; 45 class Canvas;
42 class Point; 46 class Point;
43 class Rect; 47 class Rect;
44 } 48 }
45 49
46 namespace ui { 50 namespace ui {
47 class Accelerator; 51 class Accelerator;
48 class Compositor; 52 class Compositor;
49 class DefaultThemeProvider; 53 class DefaultThemeProvider;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 417
414 // Like SetBounds(), but ensures the Widget is fully visible on screen, 418 // Like SetBounds(), but ensures the Widget is fully visible on screen,
415 // resizing and/or repositioning as necessary. This is only useful for 419 // resizing and/or repositioning as necessary. This is only useful for
416 // non-child widgets. 420 // non-child widgets.
417 void SetBoundsConstrained(const gfx::Rect& bounds); 421 void SetBoundsConstrained(const gfx::Rect& bounds);
418 422
419 // Sets whether animations that occur when visibility is changed are enabled. 423 // Sets whether animations that occur when visibility is changed are enabled.
420 // Default is true. 424 // Default is true.
421 void SetVisibilityChangedAnimationsEnabled(bool value); 425 void SetVisibilityChangedAnimationsEnabled(bool value);
422 426
427 // Sets the duration of visibility change animations.
428 void SetVisibilityAnimationDuration(const base::TimeDelta& duration);
429
430 // Type of visibility change transition that a window should animate.
431 // Default behavior is to animate both show and hide.
sky 2014/10/31 22:58:43 nit: move enum to top of section (like style guide
Andre 2014/10/31 23:05:10 Done.
432 enum VisibilityTransition {
433 ANIMATE_SHOW = 0x1,
434 ANIMATE_HIDE = 0x2,
435 ANIMATE_BOTH = ANIMATE_SHOW | ANIMATE_HIDE,
436 ANIMATE_NONE = 0x4,
437 };
438 void SetVisibilityAnimationTransition(VisibilityTransition transition);
439
423 // Starts a nested message loop that moves the window. This can be used to 440 // Starts a nested message loop that moves the window. This can be used to
424 // start a window move operation from a mouse or touch event. This returns 441 // start a window move operation from a mouse or touch event. This returns
425 // when the move completes. |drag_offset| is the offset from the top left 442 // when the move completes. |drag_offset| is the offset from the top left
426 // corner of the window to the point where the cursor is dragging, and is used 443 // corner of the window to the point where the cursor is dragging, and is used
427 // to offset the bounds of the window from the cursor. 444 // to offset the bounds of the window from the cursor.
428 MoveLoopResult RunMoveLoop(const gfx::Vector2d& drag_offset, 445 MoveLoopResult RunMoveLoop(const gfx::Vector2d& drag_offset,
429 MoveLoopSource source, 446 MoveLoopSource source,
430 MoveLoopEscapeBehavior escape_behavior); 447 MoveLoopEscapeBehavior escape_behavior);
431 448
432 // Stops a previously started move loop. This is not immediate. 449 // Stops a previously started move loop. This is not immediate.
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 bool movement_disabled_; 969 bool movement_disabled_;
953 970
954 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 971 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
955 972
956 DISALLOW_COPY_AND_ASSIGN(Widget); 973 DISALLOW_COPY_AND_ASSIGN(Widget);
957 }; 974 };
958 975
959 } // namespace views 976 } // namespace views
960 977
961 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 978 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« 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