| 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(); |
| 25 DestroyShelfWidget(); | 26 DestroyShelfWidget(); |
| 26 ShutdownShelf(); | 27 ShutdownShelf(); |
| 27 } | 28 } |
| 28 | 29 |
| 29 void WmShelfMus::WillDeleteShelfLayoutManager() { | 30 void WmShelfMus::WillDeleteShelfLayoutManager() { |
| 30 ShutdownShelfWidget(); | 31 ShutdownShelfWidget(); |
| 31 WmShelf::WillDeleteShelfLayoutManager(); | 32 WmShelf::WillDeleteShelfLayoutManager(); |
| 32 } | 33 } |
| 33 | 34 |
| 34 } // namespace mus | 35 } // namespace mus |
| 35 } // namespace ash | 36 } // namespace ash |
| OLD | NEW |