| 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/mus/bridge/wm_shelf_mus.h" | 5 #include "ash/mus/bridge/wm_shelf_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf.h" |
| 7 #include "ash/common/shelf/shelf_delegate.h" | 8 #include "ash/common/shelf/shelf_delegate.h" |
| 9 #include "ash/common/shelf/shelf_widget.h" |
| 8 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/common/wm_root_window_controller.h" | 11 #include "ash/common/wm_root_window_controller.h" |
| 10 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
| 11 #include "ash/common/wm_window.h" | 13 #include "ash/common/wm_window.h" |
| 12 #include "ash/shelf/shelf.h" | |
| 13 #include "ash/shelf/shelf_widget.h" | |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace mus { | 16 namespace mus { |
| 17 | 17 |
| 18 WmShelfMus::WmShelfMus(WmRootWindowController* root_window_controller) { | 18 WmShelfMus::WmShelfMus(WmRootWindowController* root_window_controller) { |
| 19 DCHECK(root_window_controller); | 19 DCHECK(root_window_controller); |
| 20 WmShell::Get()->CreateShelfDelegate(); | 20 WmShell::Get()->CreateShelfDelegate(); |
| 21 WmWindow* root = root_window_controller->GetWindow(); | 21 WmWindow* root = root_window_controller->GetWindow(); |
| 22 shelf_widget_.reset(new ShelfWidget( | 22 shelf_widget_.reset(new ShelfWidget( |
| 23 root->GetChildByShellWindowId(kShellWindowId_ShelfContainer), | 23 root->GetChildByShellWindowId(kShellWindowId_ShelfContainer), |
| (...skipping 14 matching lines...) Expand all Loading... |
| 38 WmShelf::ClearShelf(); | 38 WmShelf::ClearShelf(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void WmShelfMus::WillDeleteShelfLayoutManager() { | 41 void WmShelfMus::WillDeleteShelfLayoutManager() { |
| 42 shelf_widget_->Shutdown(); | 42 shelf_widget_->Shutdown(); |
| 43 WmShelf::WillDeleteShelfLayoutManager(); | 43 WmShelf::WillDeleteShelfLayoutManager(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace mus | 46 } // namespace mus |
| 47 } // namespace ash | 47 } // namespace ash |
| OLD | NEW |