Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2110)

Unified Diff: content/public/browser/platform_notification_service.h

Issue 1116693002: [NOT FOR REVIEW] Significantly simplify the PlatformNotificationService //content API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/shell/browser/layout_test/layout_test_notification_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/content_tests.gypi ('k') | content/shell/browser/layout_test/layout_test_notification_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698