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

Unified Diff: ash/shelf/shelf_widget.cc

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wallpaper tests again Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 9f988018b68d0dfe0c8bc080a52c3f76feb0fb92..e974ccaaae037ee66d81a10d8337fae5d119345a 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -11,13 +11,13 @@
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/shelf_constants.h"
+#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
-#include "ash/shelf/shelf_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shelf/shelf_view.h"
@@ -725,13 +725,11 @@ bool ShelfWidget::GetDimsShelf() const {
void ShelfWidget::CreateShelf(WmShelfAura* wm_shelf_aura) {
DCHECK(!shelf_);
- ShelfDelegate* delegate = Shell::GetInstance()->GetShelfDelegate();
- shelf_.reset(
- new Shelf(WmShell::Get()->shelf_model(), delegate, wm_shelf_aura, this));
+ shelf_.reset(new Shelf(WmShell::Get()->shelf_model(), wm_shelf_aura, this));
// Must be initialized before the delegate is notified because the delegate
// may try to access the WmShelf.
wm_shelf_aura->SetShelf(shelf_.get());
- delegate->OnShelfCreated(shelf_.get());
+ WmShell::Get()->shelf_delegate()->OnShelfCreated(shelf_.get());
SetFocusCycler(WmShell::Get()->focus_cycler());
}
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698