OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/shelf/shelf_layout_manager.h" | 9 #include "ash/common/shelf/shelf_layout_manager.h" |
10 #include "ash/common/shelf/shelf_widget.h" | 10 #include "ash/common/shelf/shelf_widget.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 // Notify shell observers that the shelf has been created. | 242 // Notify shell observers that the shelf has been created. |
243 // TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will | 243 // TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will |
244 // require changing AttachedPanelWidgetTargeter's access to WmShelf. | 244 // require changing AttachedPanelWidgetTargeter's access to WmShelf. |
245 WmShell::Get()->NotifyShelfCreatedForRootWindow( | 245 WmShell::Get()->NotifyShelfCreatedForRootWindow( |
246 WmWindowAura::Get(GetRootWindow())); | 246 WmWindowAura::Get(GetRootWindow())); |
247 | 247 |
248 wm_shelf_->shelf_widget()->PostCreateShelf(); | 248 wm_shelf_->shelf_widget()->PostCreateShelf(); |
249 } | 249 } |
250 | 250 |
| 251 void RootWindowController::ShowShelf() { |
| 252 if (!wm_shelf_->IsShelfInitialized()) |
| 253 return; |
| 254 // TODO(jamescook): Move this into WmShelf. |
| 255 wm_shelf_->shelf_widget()->SetShelfVisibility(true); |
| 256 wm_shelf_->shelf_widget()->status_area_widget()->Show(); |
| 257 } |
| 258 |
251 const WmWindow* RootWindowController::GetWindow() const { | 259 const WmWindow* RootWindowController::GetWindow() const { |
252 return WmWindowAura::Get(GetRootWindow()); | 260 return WmWindowAura::Get(GetRootWindow()); |
253 } | 261 } |
254 | 262 |
255 const WmWindow* RootWindowController::GetWmContainer(int container_id) const { | 263 const WmWindow* RootWindowController::GetWmContainer(int container_id) const { |
256 const aura::Window* window = GetContainer(container_id); | 264 const aura::Window* window = GetContainer(container_id); |
257 return WmWindowAura::Get(window); | 265 return WmWindowAura::Get(window); |
258 } | 266 } |
259 | 267 |
260 void RootWindowController::ConfigureWidgetInitParamsForContainer( | 268 void RootWindowController::ConfigureWidgetInitParamsForContainer( |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 } | 632 } |
625 | 633 |
626 void RootWindowController::OnMenuClosed() { | 634 void RootWindowController::OnMenuClosed() { |
627 menu_runner_.reset(); | 635 menu_runner_.reset(); |
628 menu_model_adapter_.reset(); | 636 menu_model_adapter_.reset(); |
629 menu_model_.reset(); | 637 menu_model_.reset(); |
630 wm_shelf_->UpdateVisibilityState(); | 638 wm_shelf_->UpdateVisibilityState(); |
631 } | 639 } |
632 | 640 |
633 } // namespace ash | 641 } // namespace ash |
OLD | NEW |