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

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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 Notification& other); 67 Notification(const Notification& other);
68
68 Notification& operator=(const Notification& other); 69 Notification& operator=(const Notification& other);
70
69 virtual ~Notification(); 71 virtual ~Notification();
70 72
71 // Copies the internal on-memory state from |base|, i.e. shown_as_popup, 73 // Copies the internal on-memory state from |base|, i.e. shown_as_popup,
72 // is_read, and never_timeout. 74 // is_read, and never_timeout.
73 void CopyState(Notification* base); 75 void CopyState(Notification* base);
74 76
75 NotificationType type() const { return type_; } 77 NotificationType type() const { return type_; }
76 void set_type(NotificationType type) { type_ = type; } 78 void set_type(NotificationType type) { type_ = type; }
77 79
80 // Uniquely identifies a notification in the message center. For
81 // notification front ends that support multiple profiles, this id should
82 // identify a unique profile + frontend_notification_id combination. You can
83 // Use this id against the MessageCenter interface but not the
84 // NotificationUIManager interface.
78 const std::string& id() const { return id_; } 85 const std::string& id() const { return id_; }
79 86
80 const base::string16& title() const { return title_; } 87 const base::string16& title() const { return title_; }
81 void set_title(const base::string16& title) { title_ = title; } 88 void set_title(const base::string16& title) { title_ = title; }
82 89
83 const base::string16& message() const { return message_; } 90 const base::string16& message() const { return message_; }
84 void set_message(const base::string16& message) { message_ = message; } 91 void set_message(const base::string16& message) { message_ = message; }
85 92
86 // A display string for the source of the notification. 93 // A display string for the source of the notification.
87 const base::string16& display_source() const { return display_source_; } 94 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. 224 bool is_read_; // True if this has been seen in the message center.
218 225
219 // A proxy object that allows access back to the JavaScript object that 226 // A proxy object that allows access back to the JavaScript object that
220 // represents the notification, for firing events. 227 // represents the notification, for firing events.
221 scoped_refptr<NotificationDelegate> delegate_; 228 scoped_refptr<NotificationDelegate> delegate_;
222 }; 229 };
223 230
224 } // namespace message_center 231 } // namespace message_center
225 232
226 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_ 233 #endif // UI_MESSAGE_CENTER_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_center_impl_unittest.cc ('k') | ui/message_center/notification_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698