Index: chrome/browser/push_messaging/push_messaging_service_impl.h |
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h |
index 920f44e8180b6d20c1d5ff1835888729027a12ed..b5ebac1256533e254d003f4c9ca19591aa41c10b 100644 |
--- a/chrome/browser/push_messaging/push_messaging_service_impl.h |
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h |
@@ -26,6 +26,8 @@ |
#include "components/gcm_driver/gcm_client.h" |
#include "components/gcm_driver/instance_id/instance_id.h" |
#include "components/keyed_service/core/keyed_service.h" |
+#include "content/public/browser/notification_observer.h" |
+#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/push_messaging_service.h" |
#include "content/public/common/push_event_payload.h" |
#include "content/public/common/push_messaging_status.h" |
@@ -47,6 +49,7 @@ class InstanceIDDriver; |
} |
class PushMessagingServiceImpl : public content::PushMessagingService, |
+ public content::NotificationObserver, |
public gcm::GCMAppHandler, |
public content_settings::Observer, |
public KeyedService, |
@@ -71,6 +74,11 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
const std::string& message_id) override; |
bool CanHandle(const std::string& app_id) const override; |
+ // content::NotificationObserver: |
+ void Observe(int type, |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) override; |
+ |
// content::PushMessagingService implementation: |
GURL GetEndpoint(bool standard_protocol) const override; |
void SubscribeFromDocument(const GURL& requesting_origin, |
@@ -266,6 +274,8 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
std::unique_ptr<PushMessagingServiceObserver> |
push_messaging_service_observer_; |
+ content::NotificationRegistrar registrar_; |
+ |
#if BUILDFLAG(ENABLE_BACKGROUND) |
// KeepAlive registered while we have in-flight push messages, to make sure |
// we can finish processing them without being interrupted. |