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

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

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix conflict Created 6 years, 11 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
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 #include "ash/wm/window_animations.h" 5 #include "ash/wm/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/screen_ash.h" 12 #include "ash/screen_util.h"
13 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
14 #include "ash/shelf/shelf_layout_manager.h" 14 #include "ash/shelf/shelf_layout_manager.h"
15 #include "ash/shelf/shelf_widget.h" 15 #include "ash/shelf/shelf_widget.h"
16 #include "ash/shell.h" 16 #include "ash/shell.h"
17 #include "ash/wm/window_util.h" 17 #include "ash/wm/window_util.h"
18 #include "ash/wm/workspace_controller.h" 18 #include "ash/wm/workspace_controller.h"
19 #include "base/command_line.h" 19 #include "base/command_line.h"
20 #include "base/compiler_specific.h" 20 #include "base/compiler_specific.h"
21 #include "base/logging.h" 21 #include "base/logging.h"
22 #include "base/message_loop/message_loop.h" 22 #include "base/message_loop/message_loop.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } // namespace 70 } // namespace
71 71
72 const int kCrossFadeDurationMS = 200; 72 const int kCrossFadeDurationMS = 200;
73 73
74 void AddLayerAnimationsForMinimize(aura::Window* window, bool show) { 74 void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
75 // Recalculate the transform at restore time since the launcher item may have 75 // Recalculate the transform at restore time since the launcher item may have
76 // moved while the window was minimized. 76 // moved while the window was minimized.
77 gfx::Rect bounds = window->bounds(); 77 gfx::Rect bounds = window->bounds();
78 gfx::Rect target_bounds = GetMinimizeAnimationTargetBoundsInScreen(window); 78 gfx::Rect target_bounds = GetMinimizeAnimationTargetBoundsInScreen(window);
79 target_bounds = 79 target_bounds =
80 ScreenAsh::ConvertRectFromScreen(window->parent(), target_bounds); 80 ScreenUtil::ConvertRectFromScreen(window->parent(), target_bounds);
81 81
82 float scale_x = static_cast<float>(target_bounds.width()) / bounds.width(); 82 float scale_x = static_cast<float>(target_bounds.width()) / bounds.width();
83 float scale_y = static_cast<float>(target_bounds.height()) / bounds.height(); 83 float scale_y = static_cast<float>(target_bounds.height()) / bounds.height();
84 84
85 scoped_ptr<ui::InterpolatedTransform> scale( 85 scoped_ptr<ui::InterpolatedTransform> scale(
86 new ui::InterpolatedScale(gfx::Point3F(1, 1, 1), 86 new ui::InterpolatedScale(gfx::Point3F(1, 1, 1),
87 gfx::Point3F(scale_x, scale_y, 1))); 87 gfx::Point3F(scale_x, scale_y, 1)));
88 88
89 scoped_ptr<ui::InterpolatedTransform> translation( 89 scoped_ptr<ui::InterpolatedTransform> translation(
90 new ui::InterpolatedTranslation( 90 new ui::InterpolatedTranslation(
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 542
543 // Assume the shelf is overflowed, zoom off to the bottom right of the 543 // Assume the shelf is overflowed, zoom off to the bottom right of the
544 // work area. 544 // work area.
545 gfx::Rect work_area = 545 gfx::Rect work_area =
546 Shell::GetScreen()->GetDisplayNearestWindow(window).work_area(); 546 Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
547 return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0); 547 return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0);
548 } 548 }
549 549
550 } // namespace ash 550 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698