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

Unified Diff: ash/wm/window_animations.cc

Issue 21966005: Removes workspace_animations.(h,cc) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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/window_animations.h ('k') | ash/wm/workspace/workspace_animations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 0278a93f0d93945e6c348ed61e7bd9a3efa91e38..a3c0ca80621d645670282782ad7f3a35d751fb82 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -15,7 +15,6 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/workspace_animations.h"
#include "ash/wm/workspace_controller.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
@@ -73,6 +72,8 @@ int64 Round64(float f) {
} // namespace
+const int kCrossFadeDurationMS = 200;
+
void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
// Recalculate the transform at restore time since the launcher item may have
// moved while the window was minimized.
@@ -436,12 +437,12 @@ base::TimeDelta GetCrossFadeDuration(const gfx::Rect& old_bounds,
int max_area = std::max(old_area, new_area);
// Avoid divide by zero.
if (max_area == 0)
- return base::TimeDelta::FromMilliseconds(internal::kWorkspaceSwitchTimeMS);
+ return base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS);
int delta_area = std::abs(old_area - new_area);
// If the area didn't change, the animation is instantaneous.
if (delta_area == 0)
- return base::TimeDelta::FromMilliseconds(internal::kWorkspaceSwitchTimeMS);
+ return base::TimeDelta::FromMilliseconds(kCrossFadeDurationMS);
float factor =
static_cast<float>(delta_area) / static_cast<float>(max_area);
« no previous file with comments | « ash/wm/window_animations.h ('k') | ash/wm/workspace/workspace_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698