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

Side by Side Diff: ash/wm/workspace/workspace_animations.h

Issue 11106003: Tweaks workspace animation code per latest from Nicholas. Additionally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace2.cc ('k') | ash/wm/workspace/workspace_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_
7
8 #include "ash/ash_export.h"
9 #include "base/time.h"
10
11 namespace aura {
12 class Window;
13 }
14
15 // Collection of functions and types needed for animating workspaces.
16
17 namespace ash {
18 namespace internal {
19
20 // Indicates the direction the workspace should appear to go.
21 enum WorkspaceAnimationDirection {
22 WORKSPACE_ANIMATE_UP,
23 WORKSPACE_ANIMATE_DOWN,
24 };
25
26 // The details of this dictate how the show/hide should be animated.
27 struct WorkspaceAnimationDetails {
28 WorkspaceAnimationDetails();
29 ~WorkspaceAnimationDetails();
30
31 // Direction to animate.
32 WorkspaceAnimationDirection direction;
33
34 // Whether to animate. If false the show/hide is immediate, otherwise it
35 // animates.
36 bool animate;
37
38 // Whether the opacity should be animated.
39 bool animate_opacity;
40
41 // Whether the scale should be animated.
42 bool animate_scale;
43
44 // The duration of the animation. If empty the default is used.
45 base::TimeDelta duration;
46
47 // Amount of time (in milliseconds) to pause before animating.
48 int pause_time_ms;
49 };
50
51 // Amount of time for the workspace switch animation.
52 extern const int kWorkspaceSwitchTimeMS;
53
54 // Shows or hides the workspace animating based on |details|.
55 ASH_EXPORT void ShowWorkspace(aura::Window* window,
56 const WorkspaceAnimationDetails& details);
57 ASH_EXPORT void HideWorkspace(aura::Window* window,
58 const WorkspaceAnimationDetails& details);
59 } // namespace internal
60 } // namespace ash
61
62 #endif // ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace2.cc ('k') | ash/wm/workspace/workspace_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698