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

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

Issue 11958025: Start delegating notifications to MessageCenter on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another build fix Created 7 years, 11 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') | chrome/browser/browser_process.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 05e6f6e7ba5aa7defaf5582d8afb58cc69795d9e..b04b761d2d63aa2c83560f5432ddbc5aa03de800 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -83,7 +83,7 @@ WebNotificationTray::WebNotificationTray(
: internal::TrayBackgroundView(status_area_widget),
button_(NULL),
show_message_center_on_unlock_(false) {
- message_center_ = message_center::MessageCenter::GetInstance();
+ message_center_ = ash::Shell::GetInstance()->message_center();
message_center_->AddObserver(this);
button_ = new views::ImageButton(this);
button_->set_triggerable_event_flags(
@@ -94,7 +94,7 @@ WebNotificationTray::WebNotificationTray(
}
WebNotificationTray::~WebNotificationTray() {
- // Ensure the message center doesn't notify a destroyed object.
+ // Ensure the message center doesn't notify an object under destruction.
message_center_->RemoveObserver(this);
// Release any child views that might have back pointers before ~View().
message_center_bubble_.reset();
@@ -171,8 +171,7 @@ void WebNotificationTray::ShowPopupBubble() {
} else if (message_center_->HasPopupNotifications()) {
popup_bubble_.reset(
new internal::WebNotificationBubbleWrapper(
- this, new message_center::MessagePopupBubble(
- message_center_)));
+ this, new message_center::MessagePopupBubble(message_center_)));
}
}
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | chrome/browser/browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698