| Index: chrome/browser/notifications/platform_notification_service_impl.h
|
| diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h
|
| index 85ef42271ab759003dc352864d8ca4c1be6edd1c..a37e9b35054eab1ba3e950ec9d7c0f2d2716da97 100644
|
| --- a/chrome/browser/notifications/platform_notification_service_impl.h
|
| +++ b/chrome/browser/notifications/platform_notification_service_impl.h
|
| @@ -5,6 +5,9 @@
|
| #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
|
| #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
|
|
|
| +#include <stdint.h>
|
| +#include <map>
|
| +
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/singleton.h"
|
| #include "base/strings/string16.h"
|
| @@ -29,18 +32,6 @@ class PlatformNotificationServiceImpl
|
| // be called from any thread.
|
| static PlatformNotificationServiceImpl* GetInstance();
|
|
|
| - // To be called when a persistent notification has been clicked on. The
|
| - // Service Worker associated with the registration will be started if
|
| - // needed, on which the event will be fired. Must be called on the UI thread.
|
| - void OnPersistentNotificationClick(
|
| - content::BrowserContext* browser_context,
|
| - int64 service_worker_registration_id,
|
| - const std::string& notification_id,
|
| - const GURL& origin,
|
| - const content::PlatformNotificationData& notification_data,
|
| - const base::Callback<void(content::PersistentNotificationStatus)>&
|
| - callback) const;
|
| -
|
| // Returns the Notification UI Manager through which notifications can be
|
| // displayed to the user. Can be overridden for testing.
|
| NotificationUIManager* GetNotificationUIManager() const;
|
| @@ -63,13 +54,13 @@ class PlatformNotificationServiceImpl
|
| base::Closure* cancel_callback) override;
|
| void DisplayPersistentNotification(
|
| content::BrowserContext* browser_context,
|
| - int64 service_worker_registration_id,
|
| + int64_t persistent_notification_id,
|
| const GURL& origin,
|
| const SkBitmap& icon,
|
| const content::PlatformNotificationData& notification_data) override;
|
| void ClosePersistentNotification(
|
| content::BrowserContext* browser_context,
|
| - const std::string& persistent_notification_id) override;
|
| + int64_t persistent_notification_id) override;
|
|
|
| private:
|
| friend struct DefaultSingletonTraits<PlatformNotificationServiceImpl>;
|
| @@ -114,6 +105,10 @@ class PlatformNotificationServiceImpl
|
| // Weak reference. Ownership maintains with the test.
|
| NotificationUIManager* notification_ui_manager_for_tests_;
|
|
|
| + // Mapping between a persistent notification id and the id of the associated
|
| + // message_center::Notification object. Must only be used on the UI thread.
|
| + std::map<int64_t, std::string> persistent_notifications_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl);
|
| };
|
|
|
|
|