| Index: ui/message_center/notification.h
|
| diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h
|
| index ec66e1d1e1171f08934a603b4b70245cb2160601..5f7ee12a4523e48ca4464f154fe476220176a1af 100644
|
| --- a/ui/message_center/notification.h
|
| +++ b/ui/message_center/notification.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/values.h"
|
| #include "ui/gfx/image/image.h"
|
| #include "ui/message_center/message_center_export.h"
|
| +#include "ui/message_center/notification_delegate.h"
|
| #include "ui/message_center/notification_types.h"
|
|
|
| namespace message_center {
|
| @@ -39,7 +40,8 @@ class MESSAGE_CENTER_EXPORT Notification {
|
| const string16& message,
|
| const string16& display_source,
|
| const std::string& extension_id,
|
| - const DictionaryValue* optional_fields); // May be NULL.
|
| + const DictionaryValue* optional_fields, // May be NULL.
|
| + NotificationDelegate* delegate); // May be NULL.
|
| virtual ~Notification();
|
|
|
| // Copies the internal on-memory state from |base|, i.e. shown_as_popup,
|
| @@ -89,6 +91,7 @@ class MESSAGE_CENTER_EXPORT Notification {
|
| unsigned serial_number() { return serial_number_; }
|
|
|
| bool never_timeout() const { return never_timeout_; }
|
| + NotificationDelegate* delegate() { return delegate_.get(); }
|
|
|
| private:
|
| // Unpacks the provided |optional_fields| and applies the values to override
|
| @@ -114,6 +117,10 @@ class MESSAGE_CENTER_EXPORT Notification {
|
| bool is_expanded_; // True if this has been expanded in the message center.
|
| bool never_timeout_; // True if it doesn't timeout when it appears as a toast.
|
|
|
| + // A proxy object that allows access back to the JavaScript object that
|
| + // represents the notification, for firing events.
|
| + scoped_refptr<NotificationDelegate> delegate_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Notification);
|
| };
|
|
|
|
|