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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
475 wm::GetWindowState(child)->Restore(); | 475 wm::GetWindowState(child)->Restore(); |
476 Relayout(); | 476 Relayout(); |
477 UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED); | 477 UpdateDockBounds(DockedWindowLayoutManagerObserver::CHILD_CHANGED); |
478 } | 478 } |
479 | 479 |
480 void DockedWindowLayoutManager::SetChildBounds( | 480 void DockedWindowLayoutManager::SetChildBounds( |
481 aura::Window* child, | 481 aura::Window* child, |
482 const gfx::Rect& requested_bounds) { | 482 const gfx::Rect& requested_bounds) { |
483 // Whenever one of our windows is moved or resized enforce layout. | 483 // Whenever one of our windows is moved or resized enforce layout. |
484 SetChildBoundsDirect(child, requested_bounds); | 484 SetChildBoundsDirect(child, requested_bounds); |
485 ShelfLayoutManager* shelf_layout = internal::ShelfLayoutManager::ForLauncher( | |
486 dock_container_->GetRootWindow()); | |
oshima
2013/12/02 19:34:42
ForLauncher takes a window, so you can just pass d
varkha
2013/12/02 20:26:19
Done.
| |
487 if (shelf_layout) | |
488 shelf_layout->UpdateVisibilityState(); | |
485 } | 489 } |
486 | 490 |
487 //////////////////////////////////////////////////////////////////////////////// | 491 //////////////////////////////////////////////////////////////////////////////// |
488 // DockLayoutManager, ash::ShellObserver implementation: | 492 // DockLayoutManager, ash::ShellObserver implementation: |
489 | 493 |
490 void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() { | 494 void DockedWindowLayoutManager::OnDisplayWorkAreaInsetsChanged() { |
491 Relayout(); | 495 Relayout(); |
492 UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED); | 496 UpdateDockBounds(DockedWindowLayoutManagerObserver::DISPLAY_INSETS_CHANGED); |
493 MaybeMinimizeChildrenExcept(dragged_window_); | 497 MaybeMinimizeChildrenExcept(dragged_window_); |
494 } | 498 } |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1054 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1058 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
1055 const gfx::Rect& keyboard_bounds) { | 1059 const gfx::Rect& keyboard_bounds) { |
1056 // This bounds change will have caused a change to the Shelf which does not | 1060 // This bounds change will have caused a change to the Shelf which does not |
1057 // propagate automatically to this class, so manually recalculate bounds. | 1061 // propagate automatically to this class, so manually recalculate bounds. |
1058 Relayout(); | 1062 Relayout(); |
1059 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1063 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
1060 } | 1064 } |
1061 | 1065 |
1062 } // namespace internal | 1066 } // namespace internal |
1063 } // namespace ash | 1067 } // namespace ash |
OLD | NEW |