| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |