OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/common/wm/dock/docked_window_layout_manager.h" | 5 #include "ash/common/wm/dock/docked_window_layout_manager.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/shelf/shelf_constants.h" | 8 #include "ash/common/shelf/shelf_constants.h" |
9 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
10 #include "ash/common/shelf/wm_shelf_observer.h" | 10 #include "ash/common/shelf/wm_shelf_observer.h" |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 : DOCKED_ALIGNMENT_RIGHT; | 1046 : DOCKED_ALIGNMENT_RIGHT; |
1047 } | 1047 } |
1048 | 1048 |
1049 void DockedWindowLayoutManager::Relayout() { | 1049 void DockedWindowLayoutManager::Relayout() { |
1050 if (in_layout_) | 1050 if (in_layout_) |
1051 return; | 1051 return; |
1052 if (alignment_ == DOCKED_ALIGNMENT_NONE && !is_dragged_window_docked_) | 1052 if (alignment_ == DOCKED_ALIGNMENT_NONE && !is_dragged_window_docked_) |
1053 return; | 1053 return; |
1054 base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); | 1054 base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); |
1055 | 1055 |
1056 gfx::Rect dock_bounds = dock_container_->GetBoundsInScreen(); | |
1057 WmWindow* active_window = nullptr; | 1056 WmWindow* active_window = nullptr; |
1058 std::vector<WindowWithHeight> visible_windows; | 1057 std::vector<WindowWithHeight> visible_windows; |
1059 for (WmWindow* window : dock_container_->GetChildren()) { | 1058 for (WmWindow* window : dock_container_->GetChildren()) { |
1060 if (!IsWindowDocked(window) || window == dragged_window_) | 1059 if (!IsWindowDocked(window) || window == dragged_window_) |
1061 continue; | 1060 continue; |
1062 | 1061 |
1063 // If the shelf is currently hidden (full-screen mode), hide window until | 1062 // If the shelf is currently hidden (full-screen mode), hide window until |
1064 // full-screen mode is exited. | 1063 // full-screen mode is exited. |
1065 if (in_fullscreen_) { | 1064 if (in_fullscreen_) { |
1066 // The call to Hide does not set the minimize property, so the window will | 1065 // The call to Hide does not set the minimize property, so the window will |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 | 1325 |
1327 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1326 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
1328 const gfx::Rect& keyboard_bounds) { | 1327 const gfx::Rect& keyboard_bounds) { |
1329 // This bounds change will have caused a change to the Shelf which does not | 1328 // This bounds change will have caused a change to the Shelf which does not |
1330 // propagate automatically to this class, so manually recalculate bounds. | 1329 // propagate automatically to this class, so manually recalculate bounds. |
1331 Relayout(); | 1330 Relayout(); |
1332 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1331 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
1333 } | 1332 } |
1334 | 1333 |
1335 } // namespace ash | 1334 } // namespace ash |
OLD | NEW |