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

Side by Side Diff: ash/wm/panels/panel_layout_manager.cc

Issue 1484383003: Use WindowTracker when resizing root window as it may delete other window in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/root_window_layout_manager.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/panels/panel_layout_manager.h" 5 #include "ash/wm/panels/panel_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 void PanelLayoutManager::WillChangeVisibilityState( 538 void PanelLayoutManager::WillChangeVisibilityState(
539 ShelfVisibilityState new_state) { 539 ShelfVisibilityState new_state) {
540 // On entering / leaving full screen mode the shelf visibility state is 540 // On entering / leaving full screen mode the shelf visibility state is
541 // changed to / from SHELF_HIDDEN. In this state, panel windows should hide 541 // changed to / from SHELF_HIDDEN. In this state, panel windows should hide
542 // to allow the full-screen application to use the full screen. 542 // to allow the full-screen application to use the full screen.
543 bool shelf_hidden = new_state == ash::SHELF_HIDDEN; 543 bool shelf_hidden = new_state == ash::SHELF_HIDDEN;
544 if (!shelf_hidden) { 544 if (!shelf_hidden) {
545 if (restore_windows_on_shelf_visible_) { 545 if (restore_windows_on_shelf_visible_) {
546 scoped_ptr<aura::WindowTracker> restore_windows( 546 scoped_ptr<aura::WindowTracker> restore_windows(
547 restore_windows_on_shelf_visible_.Pass()); 547 restore_windows_on_shelf_visible_.Pass());
548 for (aura::WindowTracker::Windows::const_iterator iter = 548 for (aura::Window::Windows::const_iterator iter =
549 restore_windows->windows().begin(); iter != 549 restore_windows->windows().begin();
550 restore_windows->windows().end(); ++iter) { 550 iter != restore_windows->windows().end(); ++iter) {
551 RestorePanel(*iter); 551 RestorePanel(*iter);
552 } 552 }
553 } 553 }
554 return; 554 return;
555 } 555 }
556 556
557 if (restore_windows_on_shelf_visible_) 557 if (restore_windows_on_shelf_visible_)
558 return; 558 return;
559 scoped_ptr<aura::WindowTracker> minimized_windows(new aura::WindowTracker); 559 scoped_ptr<aura::WindowTracker> minimized_windows(new aura::WindowTracker);
560 for (PanelList::iterator iter = panel_windows_.begin(); 560 for (PanelList::iterator iter = panel_windows_.begin();
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 // Keyboard hidden, restore original bounds if they exist. 951 // Keyboard hidden, restore original bounds if they exist.
952 SetChildBounds(panel, panel_state->GetRestoreBoundsInScreen()); 952 SetChildBounds(panel, panel_state->GetRestoreBoundsInScreen());
953 } 953 }
954 } 954 }
955 // This bounds change will have caused a change to the Shelf which does not 955 // This bounds change will have caused a change to the Shelf which does not
956 // propogate automatically to this class, so manually recalculate bounds. 956 // propogate automatically to this class, so manually recalculate bounds.
957 OnWindowResized(); 957 OnWindowResized();
958 } 958 }
959 959
960 } // namespace ash 960 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/root_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698