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

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 2029323002: mash: Convert AshPopupAlignmentDelegate to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 6 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/system/web_notification/web_notification_tray.h ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index ef6b5f85da9a068594adfc62cb0eea61afd1ccb5..122453efaa37a069ca03dc12b0d6ae35d4bb2302 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -14,11 +14,7 @@
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_window.h"
-#include "ash/root_window_controller.h"
#include "ash/shelf/shelf_layout_manager.h"
-#include "ash/shelf/shelf_layout_manager_observer.h"
-#include "ash/shelf/shelf_util.h"
-#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray.h"
@@ -219,8 +215,11 @@ WebNotificationTray::WebNotificationTray(StatusAreaWidget* status_area_widget)
message_center_tray_.reset(new message_center::MessageCenterTray(
this,
message_center::MessageCenter::Get()));
- popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate(
- status_area_widget->shelf_widget()->shelf_layout_manager()));
+ WmShelf* shelf = WmLookup::Get()
+ ->GetWindowForWidget(status_area_widget)
+ ->GetRootWindowController()
+ ->GetShelf();
+ popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate(shelf));
// TODO(jamescook): Either MessagePopupCollection needs to become aware of
// mus or we need some sort of parent/container provider.
popup_collection_.reset(new message_center::MessagePopupCollection(
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698