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

Side by Side Diff: ash/wm/window_animations.h

Issue 80323002: Restores maximized browser before dragging a tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restores maximized browser before dragging a tab (rebase) Created 7 years 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 | « no previous file | ash/wm/window_animations.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 ASH_WM_WINDOW_ANIMATIONS_H_ 5 #ifndef ASH_WM_WINDOW_ANIMATIONS_H_
6 #define ASH_WM_WINDOW_ANIMATIONS_H_ 6 #define ASH_WM_WINDOW_ANIMATIONS_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ui/gfx/transform.h" 9 #include "ui/gfx/transform.h"
10 #include "ui/views/corewm/window_animations.h" 10 #include "ui/views/corewm/window_animations.h"
(...skipping 27 matching lines...) Expand all
38 }; 38 };
39 39
40 // Amount of time for the cross fade animation. 40 // Amount of time for the cross fade animation.
41 extern const int kCrossFadeDurationMS; 41 extern const int kCrossFadeDurationMS;
42 42
43 // Animate a cross-fade of |window| from its current bounds to |new_bounds|. 43 // Animate a cross-fade of |window| from its current bounds to |new_bounds|.
44 ASH_EXPORT void CrossFadeToBounds(aura::Window* window, 44 ASH_EXPORT void CrossFadeToBounds(aura::Window* window,
45 const gfx::Rect& new_bounds); 45 const gfx::Rect& new_bounds);
46 46
47 // Returns the duration of the cross-fade animation based on the |old_bounds| 47 // Returns the duration of the cross-fade animation based on the |old_bounds|
48 // and |new_bounds| of the window. 48 // and |new_bounds| of the |window|.
49 ASH_EXPORT base::TimeDelta GetCrossFadeDuration(const gfx::Rect& old_bounds, 49 ASH_EXPORT base::TimeDelta GetCrossFadeDuration(aura::Window* window,
50 const gfx::Rect& old_bounds,
50 const gfx::Rect& new_bounds); 51 const gfx::Rect& new_bounds);
51 52
52 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, 53 ASH_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window,
53 bool visible); 54 bool visible);
54 55
55 // Creates vector of animation sequences that lasts for |duration| and changes 56 // Creates vector of animation sequences that lasts for |duration| and changes
56 // brightness and grayscale to |target_value|. Caller takes ownership of 57 // brightness and grayscale to |target_value|. Caller takes ownership of
57 // returned LayerAnimationSequence objects. 58 // returned LayerAnimationSequence objects.
58 ASH_EXPORT std::vector<ui::LayerAnimationSequence*> 59 ASH_EXPORT std::vector<ui::LayerAnimationSequence*>
59 CreateBrightnessGrayscaleAnimationSequence(float target_value, 60 CreateBrightnessGrayscaleAnimationSequence(float target_value,
60 base::TimeDelta duration); 61 base::TimeDelta duration);
61 62
62 // Applies scale related to the specified AshWindowScaleType. 63 // Applies scale related to the specified AshWindowScaleType.
63 ASH_EXPORT void SetTransformForScaleAnimation( 64 ASH_EXPORT void SetTransformForScaleAnimation(
64 ui::Layer* layer, 65 ui::Layer* layer,
65 LayerScaleAnimationDirection type); 66 LayerScaleAnimationDirection type);
66 67
67 // Returns the approximate bounds to which |window| will be animated when it 68 // Returns the approximate bounds to which |window| will be animated when it
68 // is minimized. The bounds are approximate because the minimize animation 69 // is minimized. The bounds are approximate because the minimize animation
69 // involves rotation. 70 // involves rotation.
70 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen( 71 ASH_EXPORT gfx::Rect GetMinimizeAnimationTargetBoundsInScreen(
71 aura::Window* window); 72 aura::Window* window);
72 73
73 } // namespace ash 74 } // namespace ash
74 75
75 #endif // ASH_WM_WINDOW_ANIMATIONS_H_ 76 #endif // ASH_WM_WINDOW_ANIMATIONS_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698