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

Side by Side Diff: ui/message_center/notification.h

Issue 324583002: The 1st patch to disambiguate message center notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_ 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_H_
6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_ 6 #define UI_MESSAGE_CENTER_NOTIFICATION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 Notification(NotificationType type, 57 Notification(NotificationType type,
58 const std::string& id, 58 const std::string& id,
59 const base::string16& title, 59 const base::string16& title,
60 const base::string16& message, 60 const base::string16& message,
61 const gfx::Image& icon, 61 const gfx::Image& icon,
62 const base::string16& display_source, 62 const base::string16& display_source,
63 const NotifierId& notifier_id, 63 const NotifierId& notifier_id,
64 const RichNotificationData& optional_fields, 64 const RichNotificationData& optional_fields,
65 NotificationDelegate* delegate); 65 NotificationDelegate* delegate);
66 66
67 Notification(const std::string& id, const Notification& other);
dewittj 2014/06/09 20:00:30 by the way, are you using this new constructor in
juyik 2014/06/09 21:28:08 Done.
68
67 Notification(const Notification& other); 69 Notification(const Notification& other);
70
68 Notification& operator=(const Notification& other); 71 Notification& operator=(const Notification& other);
72
69 virtual ~Notification(); 73 virtual ~Notification();
70 74
71 // Copies the internal on-memory state from |base|, i.e. shown_as_popup, 75 // Copies the internal on-memory state from |base|, i.e. shown_as_popup,
72 // is_read, and never_timeout. 76 // is_read, and never_timeout.
73 void CopyState(Notification* base); 77 void CopyState(Notification* base);
74 78
75 NotificationType type() const { return type_; } 79 NotificationType type() const { return type_; }
76 void set_type(NotificationType type) { type_ = type; } 80 void set_type(NotificationType type) { type_ = type; }
77 81
82 // Uniquely identifies a notification in the message center. For
83 // notification front ends that support multiple profiles, this id should
84 // identify a unique profile + frontend_notification_id combination. You can
85 // Use this id against the MessageCenter interface but not the
86 // NotificationUIManager interface.
78 const std::string& id() const { return id_; } 87 const std::string& id() const { return id_; }
79 88
80 const base::string16& title() const { return title_; } 89 const base::string16& title() const { return title_; }
81 void set_title(const base::string16& title) { title_ = title; } 90 void set_title(const base::string16& title) { title_ = title; }
82 91
83 const base::string16& message() const { return message_; } 92 const base::string16& message() const { return message_; }
84 void set_message(const base::string16& message) { message_ = message; } 93 void set_message(const base::string16& message) { message_ = message; }
85 94
86 // A display string for the source of the notification. 95 // A display string for the source of the notification.
87 const base::string16& display_source() const { return display_source_; } 96 const base::string16& display_source() const { return display_source_; }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 bool is_read_; // True if this has been seen in the message center. 226 bool is_read_; // True if this has been seen in the message center.
218 227
219 // A proxy object that allows access back to the JavaScript object that 228 // A proxy object that allows access back to the JavaScript object that
220 // represents the notification, for firing events. 229 // represents the notification, for firing events.
221 scoped_refptr<NotificationDelegate> delegate_; 230 scoped_refptr<NotificationDelegate> delegate_;
222 }; 231 };
223 232
224 } // namespace message_center 233 } // namespace message_center
225 234
226 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 235 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698