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

Unified Diff: chrome/browser/extensions/api/notifications/notifications_api.cc

Issue 23462005: Adds the contextMessage field to notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust unit test due to bugfix in toast layout. Created 7 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 | « no previous file | chrome/common/extensions/api/notifications.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/notifications/notifications_api.cc
diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
index 51089fa6443fa4631d80f7a5b43329d4230fdef4..e78798e56482778adcff83e894975c915e66f645 100644
--- a/chrome/browser/extensions/api/notifications/notifications_api.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
@@ -284,6 +284,9 @@ bool NotificationsApiFunction::CreateNotification(
UTF8ToUTF16(*options->expanded_message);
}
+ if (options->context_message)
+ optional_fields.context_message = UTF8ToUTF16(*options->context_message);
+
bool has_image = NotificationBitmapToGfxImage(options->image_bitmap.get(),
&optional_fields.image);
// We should have an image if and only if the type is an image type.
@@ -384,6 +387,9 @@ bool NotificationsApiFunction::UpdateNotification(
}
}
+ if (options->context_message)
+ notification->set_context_message(UTF8ToUTF16(*options->context_message));
+
if (options->expanded_message) {
notification->set_expanded_message(
UTF8ToUTF16(*options->expanded_message));
« no previous file with comments | « no previous file | chrome/common/extensions/api/notifications.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698