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

Side by Side Diff: ash/wm/overview/window_selector.cc

Issue 256413004: Relayout windows in overview when display size changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge and remove extra newline. Created 6 years, 8 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/overview/window_overview.cc ('k') | ash/wm/overview/window_selector_item.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/overview/window_selector.h" 5 #include "ash/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 void WindowSelector::OnWindowBoundsChanged(aura::Window* window, 408 void WindowSelector::OnWindowBoundsChanged(aura::Window* window,
409 const gfx::Rect& old_bounds, 409 const gfx::Rect& old_bounds,
410 const gfx::Rect& new_bounds) { 410 const gfx::Rect& new_bounds) {
411 if (!window_overview_) 411 if (!window_overview_)
412 return; 412 return;
413 413
414 ScopedVector<WindowSelectorItem>::iterator iter = 414 ScopedVector<WindowSelectorItem>::iterator iter =
415 std::find_if(windows_.begin(), windows_.end(), 415 std::find_if(windows_.begin(), windows_.end(),
416 WindowSelectorItemTargetComparator(window)); 416 WindowSelectorItemTargetComparator(window));
417 DCHECK(window == restore_focus_window_ || iter != windows_.end());
418 if (iter == windows_.end()) 417 if (iter == windows_.end())
419 return; 418 return;
420 419
421 // Immediately finish any active bounds animation. 420 // Immediately finish any active bounds animation.
422 window->layer()->GetAnimator()->StopAnimatingProperty( 421 window->layer()->GetAnimator()->StopAnimatingProperty(
423 ui::LayerAnimationElement::BOUNDS); 422 ui::LayerAnimationElement::BOUNDS);
424 423
425 // Recompute the transform for the window. 424 // Recompute the transform for the window.
426 (*iter)->RecomputeWindowTransforms(); 425 (*iter)->RecomputeWindowTransforms();
427 } 426 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // If the window is in the observed_windows_ list it needs to continue to be 468 // If the window is in the observed_windows_ list it needs to continue to be
470 // observed. 469 // observed.
471 if (observed_windows_.find(restore_focus_window_) == 470 if (observed_windows_.find(restore_focus_window_) ==
472 observed_windows_.end()) { 471 observed_windows_.end()) {
473 restore_focus_window_->RemoveObserver(this); 472 restore_focus_window_->RemoveObserver(this);
474 } 473 }
475 restore_focus_window_ = NULL; 474 restore_focus_window_ = NULL;
476 } 475 }
477 476
478 } // namespace ash 477 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_overview.cc ('k') | ash/wm/overview/window_selector_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698