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

Side by Side Diff: ash/common/wm/dock/docked_window_layout_manager.cc

Issue 2051343002: Make various gfx classes more amenable to use as compile-time constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile and test fixes Created 4 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/magnifier/magnification_controller.cc » ('j') | cc/trees/occlusion_tracker_perftest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698