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

Unified Diff: chrome/browser/notifications/notification.cc

Issue 554213003: Request the icon of a Web Notification in the renderer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the tests Created 6 years, 3 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
Index: chrome/browser/notifications/notification.cc
diff --git a/chrome/browser/notifications/notification.cc b/chrome/browser/notifications/notification.cc
index e2f82b06ea6949c2c40f81be87a26a7d41fded16..12340299471d3c462fa56bd0718fdf60aaa5e59f 100644
--- a/chrome/browser/notifications/notification.cc
+++ b/chrome/browser/notifications/notification.cc
@@ -5,10 +5,9 @@
#include "chrome/browser/notifications/notification.h"
Notification::Notification(const GURL& origin_url,
- const GURL& icon_url,
const base::string16& title,
const base::string16& body,
- blink::WebTextDirection dir,
+ const gfx::Image& icon,
const base::string16& display_source,
const base::string16& replace_id,
NotificationDelegate* delegate)
@@ -16,13 +15,12 @@ Notification::Notification(const GURL& origin_url,
delegate->id(),
title,
body,
- gfx::Image(),
+ icon,
display_source,
message_center::NotifierId(origin_url),
message_center::RichNotificationData(),
delegate),
origin_url_(origin_url),
- icon_url_(icon_url),
replace_id_(replace_id),
delegate_(delegate) {}
@@ -49,15 +47,11 @@ Notification::Notification(
delegate),
origin_url_(origin_url),
replace_id_(replace_id),
- delegate_(delegate) {
- // It's important to leave |icon_url_| empty with rich notifications enabled,
- // to prevent "Downloading" the data url and overwriting the existing |icon|.
-}
+ delegate_(delegate) {}
Notification::Notification(const Notification& notification)
: message_center::Notification(notification),
origin_url_(notification.origin_url()),
- icon_url_(notification.icon_url()),
button_one_icon_url_(notification.button_one_icon_url()),
button_two_icon_url_(notification.button_two_icon_url()),
image_url_(notification.image_url()),
@@ -69,7 +63,6 @@ Notification::~Notification() {}
Notification& Notification::operator=(const Notification& notification) {
message_center::Notification::operator=(notification);
origin_url_ = notification.origin_url();
- icon_url_ = notification.icon_url();
button_one_icon_url_ = notification.button_one_icon_url();
button_two_icon_url_ = notification.button_two_icon_url();
image_url_ = notification.image_url();

Powered by Google App Engine
This is Rietveld 408576698