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

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

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/toplevel_window_event_filter_unittest.cc ('k') | ash/wm/window_manager_unittest.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 "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/launcher/launcher.h" 10 #include "ash/launcher/launcher.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 ui::LayerAnimator::IMMEDIATELY_SET_NEW_TARGET); 375 ui::LayerAnimator::IMMEDIATELY_SET_NEW_TARGET);
376 } 376 }
377 377
378 gfx::Rect GetMinimizeRectForWindow(aura::Window* window) { 378 gfx::Rect GetMinimizeRectForWindow(aura::Window* window) {
379 gfx::Rect target_bounds = Shell::GetInstance()->launcher()-> 379 gfx::Rect target_bounds = Shell::GetInstance()->launcher()->
380 GetScreenBoundsOfItemIconForWindow(window); 380 GetScreenBoundsOfItemIconForWindow(window);
381 if (target_bounds.IsEmpty()) { 381 if (target_bounds.IsEmpty()) {
382 // Assume the launcher is overflowed, zoom off to the bottom right of the 382 // Assume the launcher is overflowed, zoom off to the bottom right of the
383 // work area. 383 // work area.
384 gfx::Rect work_area = 384 gfx::Rect work_area =
385 gfx::Screen::GetMonitorNearestWindow(window).work_area(); 385 gfx::Screen::GetDisplayNearestWindow(window).work_area();
386 target_bounds.SetRect(work_area.right(), work_area.bottom(), 0, 0); 386 target_bounds.SetRect(work_area.right(), work_area.bottom(), 0, 0);
387 } 387 }
388 return target_bounds; 388 return target_bounds;
389 } 389 }
390 390
391 void AddLayerAnimationsForMinimize(aura::Window* window, bool show) { 391 void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
392 // Recalculate the transform at restore time since the launcher item may have 392 // Recalculate the transform at restore time since the launcher item may have
393 // moved while the window was minimized. 393 // moved while the window was minimized.
394 gfx::Rect bounds = window->bounds(); 394 gfx::Rect bounds = window->bounds();
395 gfx::Rect target_bounds = GetMinimizeRectForWindow(window); 395 gfx::Rect target_bounds = GetMinimizeRectForWindow(window);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 return AnimateShowWindow(window); 759 return AnimateShowWindow(window);
760 } else { 760 } else {
761 // Don't start hiding the window again if it's already being hidden. 761 // Don't start hiding the window again if it's already being hidden.
762 return window->layer()->GetTargetOpacity() != 0.0f && 762 return window->layer()->GetTargetOpacity() != 0.0f &&
763 AnimateHideWindow(window); 763 AnimateHideWindow(window);
764 } 764 }
765 } 765 }
766 766
767 } // namespace internal 767 } // namespace internal
768 } // namespace ash 768 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_filter_unittest.cc ('k') | ash/wm/window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698