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

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: make sure screen_for_shutdown is reset everytime 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
« no previous file with comments | « ash/wm/solo_window_tracker_unittest.cc ('k') | ash/wm/window_positioner.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 #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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const int kCrossFadeDurationMS = 200; 72 const int kCrossFadeDurationMS = 200;
73 73
74 void AddLayerAnimationsForMinimize(aura::Window* window, 74 void AddLayerAnimationsForMinimize(aura::Window* window,
75 const base::TimeDelta& duration, 75 const base::TimeDelta& duration,
76 bool show) { 76 bool show) {
77 // Recalculate the transform at restore time since the launcher item may have 77 // Recalculate the transform at restore time since the launcher item may have
78 // moved while the window was minimized. 78 // moved while the window was minimized.
79 gfx::Rect bounds = window->bounds(); 79 gfx::Rect bounds = window->bounds();
80 gfx::Rect target_bounds = GetMinimizeAnimationTargetBoundsInScreen(window); 80 gfx::Rect target_bounds = GetMinimizeAnimationTargetBoundsInScreen(window);
81 target_bounds = 81 target_bounds =
82 ScreenAsh::ConvertRectFromScreen(window->parent(), target_bounds); 82 ScreenUtil::ConvertRectFromScreen(window->parent(), target_bounds);
83 83
84 float scale_x = static_cast<float>(target_bounds.width()) / bounds.width(); 84 float scale_x = static_cast<float>(target_bounds.width()) / bounds.width();
85 float scale_y = static_cast<float>(target_bounds.height()) / bounds.height(); 85 float scale_y = static_cast<float>(target_bounds.height()) / bounds.height();
86 86
87 scoped_ptr<ui::InterpolatedTransform> scale( 87 scoped_ptr<ui::InterpolatedTransform> scale(
88 new ui::InterpolatedScale(gfx::Point3F(1, 1, 1), 88 new ui::InterpolatedScale(gfx::Point3F(1, 1, 1),
89 gfx::Point3F(scale_x, scale_y, 1))); 89 gfx::Point3F(scale_x, scale_y, 1)));
90 90
91 scoped_ptr<ui::InterpolatedTransform> translation( 91 scoped_ptr<ui::InterpolatedTransform> translation(
92 new ui::InterpolatedTranslation( 92 new ui::InterpolatedTranslation(
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 545 }
546 546
547 // Assume the shelf is overflowed, zoom off to the bottom right of the 547 // Assume the shelf is overflowed, zoom off to the bottom right of the
548 // work area. 548 // work area.
549 gfx::Rect work_area = 549 gfx::Rect work_area =
550 Shell::GetScreen()->GetDisplayNearestWindow(window).work_area(); 550 Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
551 return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0); 551 return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0);
552 } 552 }
553 553
554 } // namespace ash 554 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/solo_window_tracker_unittest.cc ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698