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

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 WallpaperManagerBrowserTest 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
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 9f988018b68d0dfe0c8bc080a52c3f76feb0fb92..fc79790219009da4f4df79d77d909da2284951c3 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,7 +725,8 @@ bool ShelfWidget::GetDimsShelf() const {
void ShelfWidget::CreateShelf(WmShelfAura* wm_shelf_aura) {
DCHECK(!shelf_);
- ShelfDelegate* delegate = Shell::GetInstance()->GetShelfDelegate();
+ ShelfDelegate* delegate = WmShell::Get()->shelf_delegate();
+ DCHECK(delegate);
shelf_.reset(
new Shelf(WmShell::Get()->shelf_model(), delegate, wm_shelf_aura, this));
// Must be initialized before the delegate is notified because the delegate

Powered by Google App Engine
This is Rietveld 408576698