Index: chrome/browser/notifications/notification.h |
=================================================================== |
--- chrome/browser/notifications/notification.h (revision 31723) |
+++ chrome/browser/notifications/notification.h (working copy) |
@@ -5,6 +5,8 @@ |
#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ |
#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ |
+#include <string> |
+ |
#include "base/basictypes.h" |
#include "chrome/browser/notifications/notification_object_proxy.h" |
#include "googleurl/src/gurl.h" |
@@ -15,15 +17,18 @@ |
class Notification { |
public: |
Notification(const GURL& origin_url, const GURL& content_url, |
+ const std::wstring& display_source, |
NotificationObjectProxy* proxy) |
: origin_url_(origin_url), |
content_url_(content_url), |
+ display_source_(display_source), |
proxy_(proxy) { |
} |
Notification(const Notification& notification) |
: origin_url_(notification.origin_url()), |
content_url_(notification.content_url()), |
+ display_source_(notification.display_source()), |
proxy_(notification.proxy()) { |
} |
@@ -33,6 +38,9 @@ |
// The origin URL of the script which requested the notification. |
const GURL& origin_url() const { return origin_url_; } |
+ // A display string for the source of the notification. |
+ const std::wstring& display_source() const { return display_source_; } |
+ |
void Display() const { proxy()->Display(); } |
void Error() const { proxy()->Error(); } |
void Close(bool by_user) const { proxy()->Close(by_user); } |
@@ -51,6 +59,10 @@ |
// string-based notifications). |
GURL content_url_; |
+ // The display string for the source of the notification. Could be |
+ // the same as origin_url_, or the name of an extension. |
+ std::wstring display_source_; |
+ |
// A proxy object that allows access back to the JavaScript object that |
// represents the notification, for firing events. |
scoped_refptr<NotificationObjectProxy> proxy_; |