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

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: Fix trybots 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
Index: ui/message_center/notification.h
diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h
index 4217ac4dbdd31c871de2172cc3f7184e1b3268a9..eb304260c16a642d755540f9d9a84577ef78a021 100644
--- a/ui/message_center/notification.h
+++ b/ui/message_center/notification.h
@@ -50,6 +50,7 @@ class MESSAGE_CENTER_EXPORT RichNotificationData {
class MESSAGE_CENTER_EXPORT Notification {
public:
+ Notification();
Notification(NotificationType type,
const std::string& id,
const string16& title,
@@ -69,9 +70,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 +89,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.

Powered by Google App Engine
This is Rietveld 408576698