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

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

Issue 14631005: Enable users of NotificationUIManager to specify binary images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove fake image from synced notification, stop checking icon_url in unit test. Created 7 years, 7 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 3e24b23e2d353f65a2e006e74c50e750bacd42ec..0ac7dd2cc17c4f5a6f1a11fad93e8d1d7f4a237d 100644
--- a/chrome/browser/notifications/notification.cc
+++ b/chrome/browser/notifications/notification.cc
@@ -17,6 +17,7 @@ Notification::Notification(const GURL& origin_url,
content_url_(content_url),
display_source_(display_source),
replace_id_(replace_id),
+ has_rich_notification_(false),
delegate_(delegate) {}
Notification::Notification(const GURL& origin_url,
@@ -35,6 +36,7 @@ Notification::Notification(const GURL& origin_url,
body_(body),
display_source_(display_source),
replace_id_(replace_id),
+ has_rich_notification_(false),
delegate_(delegate) {
// "Upconvert" the string parameters to a data: URL.
content_url_ = GURL(DesktopNotificationService::CreateDataUrl(
@@ -60,6 +62,7 @@ Notification::Notification(message_center::NotificationType type,
display_source_(display_source),
replace_id_(replace_id),
optional_fields_(NULL),
+ has_rich_notification_(false),
delegate_(delegate) {
if (optional_fields)
optional_fields_.reset(optional_fields->DeepCopy());
@@ -69,6 +72,27 @@ Notification::Notification(message_center::NotificationType type,
icon_url, title, body, dir));
}
+Notification::Notification(
+ message_center::NotificationType type,
+ const GURL& origin_url,
+ const string16& title,
+ const string16& body,
+ WebKit::WebTextDirection dir,
+ const string16& display_source,
+ const string16& replace_id,
+ const message_center::RichNotificationData& rich_notification_data,
+ NotificationDelegate* delegate)
+ : type_(type),
+ origin_url_(origin_url),
+ is_html_(false),
+ title_(title),
+ body_(body),
+ display_source_(display_source),
+ replace_id_(replace_id),
+ has_rich_notification_(true),
+ rich_notification_data_(rich_notification_data),
+ delegate_(delegate) {}
+
Notification::Notification(const GURL& origin_url,
const gfx::Image& icon,
const string16& title,
@@ -85,6 +109,7 @@ Notification::Notification(const GURL& origin_url,
body_(body),
display_source_(display_source),
replace_id_(replace_id),
+ has_rich_notification_(false),
delegate_(delegate) {}
Notification::Notification(const Notification& notification)
@@ -98,6 +123,8 @@ Notification::Notification(const Notification& notification)
body_(notification.body()),
display_source_(notification.display_source()),
replace_id_(notification.replace_id()),
+ has_rich_notification_(notification.has_rich_notification()),
+ rich_notification_data_(notification.rich_notification_data()),
delegate_(notification.delegate()) {
if (notification.optional_fields())
optional_fields_.reset(notification.optional_fields()->DeepCopy());

Powered by Google App Engine
This is Rietveld 408576698