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

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

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Sync and rebase. Created 4 years, 2 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) 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/common/wm/panels/panel_layout_manager.h" 5 #include "ash/common/wm/panels/panel_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 const gfx::Size min_size = child->GetMinimumSize(); 432 const gfx::Size min_size = child->GetMinimumSize();
433 bounds.set_width(std::max(min_size.width(), bounds.width())); 433 bounds.set_width(std::max(min_size.width(), bounds.width()));
434 bounds.set_height(std::max(min_size.height(), bounds.height())); 434 bounds.set_height(std::max(min_size.height(), bounds.height()));
435 } 435 }
436 436
437 child->SetBoundsDirect(bounds); 437 child->SetBoundsDirect(bounds);
438 Relayout(); 438 Relayout();
439 } 439 }
440 440
441 //////////////////////////////////////////////////////////////////////////////// 441 ////////////////////////////////////////////////////////////////////////////////
442 // PanelLayoutManager, WmShellObserver implementation: 442 // PanelLayoutManager, ShellObserver implementation:
443 443
444 void PanelLayoutManager::OnOverviewModeEnded() { 444 void PanelLayoutManager::OnOverviewModeEnded() {
445 Relayout(); 445 Relayout();
446 } 446 }
447 447
448 void PanelLayoutManager::OnShelfAlignmentChanged(WmWindow* root_window) { 448 void PanelLayoutManager::OnShelfAlignmentChanged(WmWindow* root_window) {
449 if (root_window_controller_->GetWindow() == root_window) 449 if (root_window_controller_->GetWindow() == root_window)
450 Relayout(); 450 Relayout();
451 } 451 }
452 452
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 } 902 }
903 } 903 }
904 // This bounds change will have caused a change to the Shelf which does not 904 // This bounds change will have caused a change to the Shelf which does not
905 // propogate automatically to this class, so manually recalculate bounds. 905 // propogate automatically to this class, so manually recalculate bounds.
906 OnWindowResized(); 906 OnWindowResized();
907 } 907 }
908 908
909 void PanelLayoutManager::OnKeyboardClosed() {} 909 void PanelLayoutManager::OnKeyboardClosed() {}
910 910
911 } // namespace ash 911 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698