Index: chrome/browser/notifications/persistent_notification_delegate.cc |
diff --git a/chrome/browser/notifications/persistent_notification_delegate.cc b/chrome/browser/notifications/persistent_notification_delegate.cc |
index bf1516d6734008eb53b6891b1a24997854185e84..1e05cbf76f76557777370a98758c20a37c70e71d 100644 |
--- a/chrome/browser/notifications/persistent_notification_delegate.cc |
+++ b/chrome/browser/notifications/persistent_notification_delegate.cc |
@@ -5,15 +5,14 @@ |
#include "chrome/browser/notifications/persistent_notification_delegate.h" |
#include "chrome/browser/notifications/platform_notification_service_impl.h" |
+#include "url/gurl.h" |
PersistentNotificationDelegate::PersistentNotificationDelegate( |
content::BrowserContext* browser_context, |
const std::string& notification_id, |
const GURL& origin, |
int notification_settings_index) |
- : browser_context_(browser_context), |
- notification_id_(notification_id), |
- origin_(origin), |
+ : WebNotificationDelegate(browser_context, notification_id, origin), |
notification_settings_index_(notification_settings_index) {} |
PersistentNotificationDelegate::~PersistentNotificationDelegate() {} |
@@ -22,33 +21,21 @@ void PersistentNotificationDelegate::Display() {} |
void PersistentNotificationDelegate::Close(bool by_user) { |
PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose( |
- browser_context_, notification_id_, origin_, by_user); |
+ browser_context(), id(), origin(), by_user); |
} |
void PersistentNotificationDelegate::Click() { |
PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( |
- browser_context_, notification_id_, origin_, -1 /* action_index */); |
+ browser_context(), id(), origin(), -1 /* action_index */); |
} |
void PersistentNotificationDelegate::ButtonClick(int button_index) { |
DCHECK_GE(button_index, 0); |
if (button_index == notification_settings_index_) { |
- NotificationCommon::OpenNotificationSettings(browser_context_); |
+ NotificationCommon::OpenNotificationSettings(browser_context()); |
return; |
} |
PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick( |
- browser_context_, notification_id_, origin_, button_index); |
-} |
- |
-void PersistentNotificationDelegate::SettingsClick() { |
- NotificationCommon::OpenNotificationSettings(browser_context_); |
-} |
- |
-bool PersistentNotificationDelegate::ShouldDisplaySettingsButton() { |
- return true; |
-} |
- |
-std::string PersistentNotificationDelegate::id() const { |
- return notification_id_; |
+ browser_context(), id(), origin(), button_index); |
} |