Chromium Code Reviews| 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/wm/dock/docked_window_layout_manager.h" | 5 #include "ash/wm/dock/docked_window_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
| 9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 wm::GetWindowState(child)->Restore(); | 476 wm::GetWindowState(child)->Restore(); |
| 477 Relayout(); | 477 Relayout(); |
| 478 UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED); | 478 UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED); |
| 479 } | 479 } |
| 480 | 480 |
| 481 void DockedWindowLayoutManager::SetChildBounds( | 481 void DockedWindowLayoutManager::SetChildBounds( |
| 482 aura::Window* child, | 482 aura::Window* child, |
| 483 const gfx::Rect& requested_bounds) { | 483 const gfx::Rect& requested_bounds) { |
| 484 // Whenever one of our windows is moved or resized enforce layout. | 484 // Whenever one of our windows is moved or resized enforce layout. |
| 485 SetChildBoundsDirect(child, requested_bounds); | 485 SetChildBoundsDirect(child, requested_bounds); |
| 486 ShelfLayoutManager* shelf_layout = internal::ShelfLayoutManager::ForLauncher( | |
| 487 dock_container_); | |
| 488 if (shelf_layout) | |
|
oshima
2013/12/03 17:31:28
I forgot to ask.
Can this be NULL?
varkha
2013/12/03 18:01:27
In Ash it can only be NULL during startup or shutd
oshima
2013/12/03 18:08:49
I believe this is from ancient spec where shelf wa
| |
| 489 shelf_layout->UpdateVisibilityState(); | |
| 486 } | 490 } |
| 487 | 491 |
| 488 //////////////////////////////////////////////////////////////////////////////// | 492 //////////////////////////////////////////////////////////////////////////////// |
| 489 // DockLayoutManager, ash::ShellObserver implementation: | 493 // DockLayoutManager, ash::ShellObserver implementation: |
| 490 | 494 |
| 491 void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() { | 495 void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() { |
| 492 Relayout(); | 496 Relayout(); |
| 493 UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED); | 497 UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED); |
| 494 MaybeMinimizeChildrenExcept(dragged_window_); | 498 MaybeMinimizeChildrenExcept(dragged_window_); |
| 495 } | 499 } |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1063 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1067 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
| 1064 const gfx::Rect& keyboard_bounds) { | 1068 const gfx::Rect& keyboard_bounds) { |
| 1065 // This bounds change will have caused a change to the Shelf which does not | 1069 // This bounds change will have caused a change to the Shelf which does not |
| 1066 // propagate automatically to this class, so manually recalculate bounds. | 1070 // propagate automatically to this class, so manually recalculate bounds. |
| 1067 Relayout(); | 1071 Relayout(); |
| 1068 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1072 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
| 1069 } | 1073 } |
| 1070 | 1074 |
| 1071 } // namespace internal | 1075 } // namespace internal |
| 1072 } // namespace ash | 1076 } // namespace ash |
| OLD | NEW |