| 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 674d45caa1e8170dc2c829b983025bc8dd6782c0..9cc1bb33f97afacb9a1f928fddfbe86dbd4ebf3b 100644
|
| --- a/chrome/browser/ui/views/ash/balloon_view_ash.cc
|
| +++ b/chrome/browser/ui/views/ash/balloon_view_ash.cc
|
| @@ -188,6 +188,11 @@ void BalloonViewAsh::SetNotificationIcon(const std::string& id,
|
| GetMessageCenter()->SetNotificationPrimaryIcon(id, image);
|
| }
|
|
|
| +void BalloonViewAsh::SetNotificationImage(const std::string& id,
|
| + const gfx::ImageSkia& image) {
|
| + GetMessageCenter()->SetNotificationImage(id, image);
|
| +}
|
| +
|
| void BalloonViewAsh::DownloadImages(const Notification& notification) {
|
| // Cancel any previous downloads.
|
| downloads_.clear();
|
| @@ -202,6 +207,19 @@ void BalloonViewAsh::DownloadImages(const Notification& notification) {
|
| base::Unretained(this)));
|
| }
|
|
|
| + // Set up a download for the notification's image if appropriate.
|
| + const base::DictionaryValue* optional_fields = notification.optional_fields();
|
| + if (optional_fields->HasKey(ui::notifications::kImageUrlKey)) {
|
| + string16 url;
|
| + optional_fields->GetString(ui::notifications::kImageUrlKey, &url);
|
| + if (!url.empty()) {
|
| + GetImageDownload(GURL(url)).AddCallback(
|
| + message_center::kNotificationPreferredImageSize, base::Bind(
|
| + &BalloonViewAsh::SetNotificationImage,
|
| + base::Unretained(this)));
|
| + }
|
| + }
|
| +
|
| // Start the downloads.
|
| for (ImageDownloads::const_iterator i = downloads_.begin();
|
| i != downloads_.end();
|
|
|