Index: content/public/browser/platform_notification_service.h |
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h |
index afcc31921f340fdc322bcb9ea7c6092848f66591..620e09981f76146a9ab28fba1bcadbc1410435cf 100644 |
--- a/content/public/browser/platform_notification_service.h |
+++ b/content/public/browser/platform_notification_service.h |
@@ -5,27 +5,24 @@ |
#ifndef CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
#define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_ |
-#include <stdint.h> |
#include <string> |
-#include "base/callback_forward.h" |
-#include "base/memory/scoped_ptr.h" |
#include "content/common/content_export.h" |
#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h" |
class GURL; |
-class SkBitmap; |
+ |
+namespace message_center { |
+class Notification; |
+} |
namespace content { |
class BrowserContext; |
-class DesktopNotificationDelegate; |
-struct PlatformNotificationData; |
class ResourceContext; |
-// The service using which notifications can be presented to the user. There |
-// should be a unique instance of the PlatformNotificationService depending |
-// on the browsing context being used. |
+// Interface for the service through which platform notifications can be |
+// presented to the user. |
class CONTENT_EXPORT PlatformNotificationService { |
public: |
virtual ~PlatformNotificationService() {} |
@@ -47,31 +44,16 @@ class CONTENT_EXPORT PlatformNotificationService { |
const GURL& origin, |
int render_process_id) = 0; |
- // Displays the notification described in |params| to the user. A closure |
- // through which the notification can be closed will be stored in the |
- // |cancel_callback| argument. This method must be called on the UI thread. |
+ // Displays the |notification| to the user. This method must be called on the |
dewittj
2015/05/02 18:43:29
I like the simplification. If layering is an issu
|
+ // UI thread. |
virtual void DisplayNotification( |
BrowserContext* browser_context, |
- const GURL& origin, |
- const SkBitmap& icon, |
- const PlatformNotificationData& notification_data, |
- scoped_ptr<DesktopNotificationDelegate> delegate, |
- base::Closure* cancel_callback) = 0; |
- |
- // Displays the persistent notification described in |notification_data| to |
- // the user. This method must be called on the UI thread. |
- virtual void DisplayPersistentNotification( |
- BrowserContext* browser_context, |
- int64_t persistent_notification_id, |
- const GURL& origin, |
- const SkBitmap& icon, |
- const PlatformNotificationData& notification_data) = 0; |
+ const message_center::Notification& notification) = 0; |
- // Closes the persistent notification identified by |
- // |persistent_notification_id|. This method must be called on the UI thread. |
- virtual void ClosePersistentNotification( |
- BrowserContext* browser_context, |
- int64_t persistent_notification_id) = 0; |
+ // Ensures that the notification identified by |notification_id| will be |
+ // closed for the user. This method must be called on the UI thread. |
+ virtual void CloseNotification(BrowserContext* browser_context, |
+ const std::string& notification_id) = 0; |
}; |
} // namespace content |