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

Unified Diff: ui/message_center/notification.h

Issue 20136004: Allow partial update for notification update API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more tests per feedback Created 7 years, 5 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/renderer/resources/extensions/notifications_custom_bindings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification.h
diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h
index 4217ac4dbdd31c871de2172cc3f7184e1b3268a9..bda6900fb0c0924d7f61b8df7ff3ec056fec199b 100644
--- a/ui/message_center/notification.h
+++ b/ui/message_center/notification.h
@@ -69,9 +69,15 @@ class MESSAGE_CENTER_EXPORT Notification {
void CopyState(Notification* base);
NotificationType type() const { return type_; }
+ void set_type(NotificationType type) { type_ = type; }
+
const std::string& id() const { return id_; }
+
const string16& title() const { return title_; }
+ void set_title(const string16& title) { title_ = title; }
+
const string16& message() const { return message_; }
+ void set_message(const string16& message) { message_ = message; }
// A display string for the source of the notification.
const string16& display_source() const { return display_source_; }
@@ -82,14 +88,29 @@ class MESSAGE_CENTER_EXPORT Notification {
// Begin unpacked values from optional_fields.
int priority() const { return optional_fields_.priority; }
+ void set_priority(int priority) { optional_fields_.priority = priority; }
+
base::Time timestamp() const { return optional_fields_.timestamp; }
+ void set_timestamp(const base::Time& timestamp) {
+ optional_fields_.timestamp = timestamp;
+ }
+
const string16& expanded_message() const {
return optional_fields_.expanded_message;
}
+ void set_expanded_message(const string16& expanded_message) {
+ optional_fields_.expanded_message = expanded_message;
+ }
+
const std::vector<NotificationItem>& items() const {
return optional_fields_.items;
}
+ void set_items(const std::vector<NotificationItem>& items) {
+ optional_fields_.items = items;
+ }
+
int progress() const { return optional_fields_.progress; }
+ void set_progress(int progress) { optional_fields_.progress = progress; }
// End unpacked values.
// Images fetched asynchronously.
« no previous file with comments | « chrome/renderer/resources/extensions/notifications_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698