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

Unified Diff: ash/shelf/shelf_layout_manager.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_delegate.h ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 2c34c109d16922a4337f2f25baef12354958627b..e1c3425d7c8666b1db189f581efbe6afc12e50fc 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -16,6 +16,7 @@
#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/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/status_area_widget.h"
@@ -28,7 +29,6 @@
#include "ash/screen_util.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_bezel_event_filter.h"
-#include "ash/shelf/shelf_delegate.h"
#include "ash/shelf/shelf_layout_manager_observer.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shelf/shelf_widget.h"
@@ -686,7 +686,8 @@ void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) {
// The delegate must be notified after |state_| is updated so that it can
// query the new target bounds.
- ShelfDelegate* shelf_delegate = Shell::GetInstance()->GetShelfDelegate();
+ ShelfDelegate* shelf_delegate = WmShell::Get()->shelf_delegate();
+ DCHECK(shelf_delegate);
if (old_state.visibility_state != state_.visibility_state)
shelf_delegate->OnShelfVisibilityStateChanged(shelf_widget_->shelf());
« no previous file with comments | « ash/shelf/shelf_delegate.h ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698