Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: ash/mus/bridge/wm_shelf_mus.cc

Issue 2302673002: mash: Avoid shelf crashes on display removal. (Closed)
Patch Set: Sync and rebase; remove Screen/Display changes; cleanup. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698