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

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

Issue 11651002: Updated multiple item notification view to match latest mockups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgotten EXPORT fix. Created 7 years, 12 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') | ui/message_center/message_center.gyp » ('j') | 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 59804d0dc5cd4189fa04b819e12cebfb956adc1c..0f50a5b77c732ae7e1666c02d96a09f06f544285 100644
--- a/chrome/browser/ui/views/ash/balloon_view_ash.cc
+++ b/chrome/browser/ui/views/ash/balloon_view_ash.cc
@@ -22,6 +22,7 @@
#include "ipc/ipc_message_macros.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/message_center/message_center.h"
+#include "ui/message_center/message_center_constants.h"
#include "webkit/glue/image_resource_fetcher.h"
namespace {
@@ -160,41 +161,23 @@ BalloonHost* BalloonViewAsh::GetHost() const {
return NULL;
}
-void BalloonViewAsh::SetNotificationPrimaryIcon(const std::string& id,
- const gfx::ImageSkia& image) {
+void BalloonViewAsh::SetNotificationIcon(const std::string& id,
+ const gfx::ImageSkia& image) {
GetMessageCenter()->SetNotificationPrimaryIcon(id, image);
}
-void BalloonViewAsh::SetNotificationSecondaryIcon(const std::string& id,
- const gfx::ImageSkia& image) {
- GetMessageCenter()->SetNotificationSecondaryIcon(id, image);
-}
-
void BalloonViewAsh::DownloadImages(const Notification& notification) {
// Cancel any previous downloads.
downloads_.clear();
// Set the notification's primary icon, or start a download for it.
if (!notification.icon().isNull()) {
- SetNotificationPrimaryIcon(notification_id_, notification.icon());
+ SetNotificationIcon(notification_id_, notification.icon());
} else if (!notification.icon_url().is_empty()) {
downloads_.push_back(linked_ptr<ImageDownload>(new ImageDownload(
- notification, notification.icon_url(), kPrimaryIconImageSize,
- base::Bind(&BalloonViewAsh::SetNotificationPrimaryIcon,
- base::Unretained(this), notification.notification_id()))));
- }
-
- // Start a download for the notification's secondary icon if appropriate.
- const base::DictionaryValue* optional_fields = notification.optional_fields();
- if (optional_fields &&
- optional_fields->HasKey(ui::notifications::kSecondIconUrlKey)) {
- string16 url;
- optional_fields->GetString(ui::notifications::kSecondIconUrlKey, &url);
- if (!url.empty()) {
- downloads_.push_back(linked_ptr<ImageDownload>(new ImageDownload(
- notification, GURL(url), kSecondaryIconImageSize,
- base::Bind(&BalloonViewAsh::SetNotificationSecondaryIcon,
+ notification, notification.icon_url(),
+ message_center::kNotificationIconWidth,
+ base::Bind(&BalloonViewAsh::SetNotificationIcon,
base::Unretained(this), notification.notification_id()))));
- }
}
}
« no previous file with comments | « chrome/browser/ui/views/ash/balloon_view_ash.h ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698