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_widget.h" | 7 #include "ash/common/shelf/shelf_widget.h" |
8 #include "ash/common/wm_root_window_controller.h" | 8 #include "ash/common/wm_root_window_controller.h" |
9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
10 #include "ash/common/wm_window.h" | 10 #include "ash/common/wm_window.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace mus { | 13 namespace mus { |
14 | 14 |
15 WmShelfMus::WmShelfMus(WmWindow* root_window) { | 15 WmShelfMus::WmShelfMus(WmWindow* root_window) { |
16 DCHECK(root_window); | 16 DCHECK(root_window); |
17 WmShell::Get()->CreateShelfDelegate(); | 17 WmShell::Get()->CreateShelfDelegate(); |
18 CreateShelfWidget(root_window); | 18 CreateShelfWidget(root_window); |
19 InitializeShelf(); | 19 InitializeShelf(); |
20 WmShell::Get()->NotifyShelfCreatedForRootWindow(root_window); | 20 WmShell::Get()->NotifyShelfCreatedForRootWindow(root_window); |
21 shelf_widget()->PostCreateShelf(); | 21 shelf_widget()->PostCreateShelf(); |
22 } | 22 } |
23 | 23 |
24 WmShelfMus::~WmShelfMus() { | 24 WmShelfMus::~WmShelfMus() {} |
25 ShutdownShelfWidget(); | |
26 DestroyShelfWidget(); | |
27 ShutdownShelf(); | |
28 } | |
29 | 25 |
30 void WmShelfMus::WillDeleteShelfLayoutManager() { | 26 void WmShelfMus::WillDeleteShelfLayoutManager() { |
31 ShutdownShelfWidget(); | 27 ShutdownShelfWidget(); |
32 WmShelf::WillDeleteShelfLayoutManager(); | 28 WmShelf::WillDeleteShelfLayoutManager(); |
33 } | 29 } |
34 | 30 |
35 } // namespace mus | 31 } // namespace mus |
36 } // namespace ash | 32 } // namespace ash |
OLD | NEW |