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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/workspace/workspace2.cc ('k') | ash/wm/workspace/workspace_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_animations.h
diff --git a/ash/wm/workspace/workspace_animations.h b/ash/wm/workspace/workspace_animations.h
new file mode 100644
index 0000000000000000000000000000000000000000..3e60c1b7a742d785f510375e000a17d41176226c
--- /dev/null
+++ b/ash/wm/workspace/workspace_animations.h
@@ -0,0 +1,62 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_
+#define ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_
+
+#include "ash/ash_export.h"
+#include "base/time.h"
+
+namespace aura {
+class Window;
+}
+
+// Collection of functions and types needed for animating workspaces.
+
+namespace ash {
+namespace internal {
+
+// Indicates the direction the workspace should appear to go.
+enum WorkspaceAnimationDirection {
+ WORKSPACE_ANIMATE_UP,
+ WORKSPACE_ANIMATE_DOWN,
+};
+
+// The details of this dictate how the show/hide should be animated.
+struct WorkspaceAnimationDetails {
+ WorkspaceAnimationDetails();
+ ~WorkspaceAnimationDetails();
+
+ // Direction to animate.
+ WorkspaceAnimationDirection direction;
+
+ // Whether to animate. If false the show/hide is immediate, otherwise it
+ // animates.
+ bool animate;
+
+ // Whether the opacity should be animated.
+ bool animate_opacity;
+
+ // Whether the scale should be animated.
+ bool animate_scale;
+
+ // The duration of the animation. If empty the default is used.
+ base::TimeDelta duration;
+
+ // Amount of time (in milliseconds) to pause before animating.
+ int pause_time_ms;
+};
+
+// Amount of time for the workspace switch animation.
+extern const int kWorkspaceSwitchTimeMS;
+
+// Shows or hides the workspace animating based on |details|.
+ASH_EXPORT void ShowWorkspace(aura::Window* window,
+ const WorkspaceAnimationDetails& details);
+ASH_EXPORT void HideWorkspace(aura::Window* window,
+ const WorkspaceAnimationDetails& details);
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_
« 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