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

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

Issue 776813004: Introduce new content APIs for persistent notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-sw-contentclient
Patch Set: Created 6 years 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
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 6176d5e17567c414ffbde50e963dde304561a3ce..65729b8998917776d2a6583dd998fe00c35fad0f 100644
--- a/content/public/browser/platform_notification_service.h
+++ b/content/public/browser/platform_notification_service.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
#define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_SERVICE_H_
+#include <string>
+
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
@@ -42,6 +44,20 @@ class CONTENT_EXPORT PlatformNotificationService {
scoped_ptr<DesktopNotificationDelegate> delegate,
int render_process_id,
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 service_worker_registration_id,
+ const ShowDesktopNotificationHostMsgParams& params,
+ int render_process_id) = 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,
+ const std::string& persistent_notification_id) = 0;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698