Index: ash/common/wm_shell.cc |
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc |
index dc9c495cb82de834c25feba6c91cf73669db83a7..28c6c32b9ac65e84b4fc11e4687a171b15fa5945 100644 |
--- a/ash/common/wm_shell.cc |
+++ b/ash/common/wm_shell.cc |
@@ -76,7 +76,7 @@ void WmShell::Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool) { |
toast_manager_.reset(new ToastManager); |
// Create the app list item in the shelf data model. |
- AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model_.get()); |
+ AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model()); |
// Install the custom factory early on so that views::FocusManagers for Tray, |
// Shelf, and WallPaper could be created by the factory. |
@@ -96,7 +96,7 @@ void WmShell::Shutdown() { |
shelf_window_watcher_.reset(); |
// ShelfItemDelegate subclasses it owns have complex cleanup to run (e.g. ARC |
// shelf items in Chrome) so explicitly shutdown early. |
- shelf_model_->DestroyItemDelegates(); |
+ shelf_model()->DestroyItemDelegates(); |
// Must be destroyed before FocusClient. |
shelf_delegate_.reset(); |
@@ -126,8 +126,8 @@ void WmShell::CreateShelfDelegate() { |
// about multi-profile login state. |
DCHECK(GetSessionStateDelegate()); |
DCHECK_GT(GetSessionStateDelegate()->NumberOfLoggedInUsers(), 0); |
- shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model_.get())); |
- shelf_window_watcher_.reset(new ShelfWindowWatcher(shelf_model_.get())); |
+ shelf_delegate_.reset(delegate_->CreateShelfDelegate(shelf_model())); |
+ shelf_window_watcher_.reset(new ShelfWindowWatcher(shelf_model())); |
} |
void WmShell::OnMaximizeModeStarted() { |
@@ -204,7 +204,7 @@ WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate) |
: delegate_(std::move(shell_delegate)), |
focus_cycler_(new FocusCycler), |
immersive_context_(base::MakeUnique<ImmersiveContextAsh>()), |
- shelf_model_(new ShelfModel), // Must create before ShelfDelegate. |
+ shelf_controller_(new ShelfController), // Model needed by ShelfDelegate. |
sky
2016/10/07 16:10:17
MakeUnique?
msw
2016/10/07 22:45:57
Done.
|
system_tray_controller_( |
new SystemTrayController(delegate_->GetShellConnector())), |
system_tray_notifier_(new SystemTrayNotifier), |