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

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

Issue 2279533002: ash: Convert ShelfDelegate to use WmShelf* instead of Shelf* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: curlies 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/wm_shelf.cc ('k') | ash/mus/shell_delegate_mus.cc » ('j') | 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.h" 7 #include "ash/common/shelf/shelf.h"
8 #include "ash/common/shelf/shelf_delegate.h" 8 #include "ash/common/shelf/shelf_delegate.h"
9 #include "ash/common/shelf/shelf_widget.h" 9 #include "ash/common/shelf/shelf_widget.h"
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 10 matching lines...) Expand all
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),
24 root->GetChildByShellWindowId(kShellWindowId_StatusContainer), this)); 24 root->GetChildByShellWindowId(kShellWindowId_StatusContainer), this));
25 shelf_.reset( 25 shelf_.reset(
26 new Shelf(this, shelf_widget_->CreateShelfView(), shelf_widget_.get())); 26 new Shelf(this, shelf_widget_->CreateShelfView(), shelf_widget_.get()));
27 shelf_widget_->set_shelf(shelf_.get()); 27 shelf_widget_->set_shelf(shelf_.get());
28 // Must be initialized before the delegate is notified because the delegate 28 // Must be initialized before the delegate is notified because the delegate
29 // may try to access the WmShelf. 29 // may try to access the WmShelf.
30 SetShelf(shelf_.get()); 30 SetShelf(shelf_.get());
31 WmShell::Get()->shelf_delegate()->OnShelfCreated(shelf_.get()); 31 WmShell::Get()->shelf_delegate()->OnShelfCreated(this);
32 WmShell::Get()->NotifyShelfCreatedForRootWindow(root); 32 WmShell::Get()->NotifyShelfCreatedForRootWindow(root);
33 shelf_widget_->PostCreateShelf(); 33 shelf_widget_->PostCreateShelf();
34 } 34 }
35 35
36 WmShelfMus::~WmShelfMus() { 36 WmShelfMus::~WmShelfMus() {
37 shelf_widget_.reset(); 37 shelf_widget_.reset();
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
OLDNEW
« no previous file with comments | « ash/common/shelf/wm_shelf.cc ('k') | ash/mus/shell_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698