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

Unified Diff: chrome/browser/ui/views/ash/balloon_view_ash.cc

Issue 10855079: Fix Ash notification updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests. Created 8 years, 4 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 | « chrome/browser/ui/views/ash/balloon_view_ash.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/balloon_view_ash.cc
diff --git a/chrome/browser/ui/views/ash/balloon_view_ash.cc b/chrome/browser/ui/views/ash/balloon_view_ash.cc
index a578e127c9c7f071052373bd540cdcb0060e8891..7ceed7434e705e345f77bedcc037de7e0dc5950c 100644
--- a/chrome/browser/ui/views/ash/balloon_view_ash.cc
+++ b/chrome/browser/ui/views/ash/balloon_view_ash.cc
@@ -93,8 +93,9 @@ BalloonViewAsh::~BalloonViewAsh() {
void BalloonViewAsh::Show(Balloon* balloon) {
balloon_ = balloon;
const Notification& notification = balloon_->notification();
+ current_notification_id_ = notification.notification_id();
std::string extension_id = GetExtensionId(balloon);
- GetWebNotificationTray()->AddNotification(notification.notification_id(),
+ GetWebNotificationTray()->AddNotification(current_notification_id_,
notification.title(),
notification.body(),
notification.display_source(),
@@ -104,9 +105,12 @@ void BalloonViewAsh::Show(Balloon* balloon) {
void BalloonViewAsh::Update() {
const Notification& notification = balloon_->notification();
- GetWebNotificationTray()->UpdateNotification(notification.notification_id(),
+ std::string new_notification_id = notification.notification_id();
+ GetWebNotificationTray()->UpdateNotification(current_notification_id_,
+ new_notification_id,
notification.title(),
notification.body());
+ current_notification_id_ = new_notification_id;
FetchIcon(notification);
}
« no previous file with comments | « chrome/browser/ui/views/ash/balloon_view_ash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698