| Index: content/public/browser/platform_notification_context.h
|
| diff --git a/content/public/browser/platform_notification_context.h b/content/public/browser/platform_notification_context.h
|
| index 660ff19d018b5d43af7851f9bfc45878c91065ea..74dd47100144fec3f20e0d174528b26fc9b91b82 100644
|
| --- a/content/public/browser/platform_notification_context.h
|
| +++ b/content/public/browser/platform_notification_context.h
|
| @@ -6,15 +6,15 @@
|
| #define CONTENT_PUBLIC_BROWSER_PLATFORM_NOTIFICATION_CONTEXT_H_
|
|
|
| #include <stdint.h>
|
| +#include <vector>
|
|
|
| #include "base/callback.h"
|
| +#include "content/public/browser/notification_database_data.h"
|
|
|
| class GURL;
|
|
|
| namespace content {
|
|
|
| -struct NotificationDatabaseData;
|
| -
|
| // Represents the storage context for persistent Web Notifications, specific to
|
| // the storage partition owning the instance. All methods defined in this
|
| // interface may only be used on the IO thread.
|
| @@ -24,6 +24,10 @@ class PlatformNotificationContext {
|
| base::Callback<void(bool /* success */,
|
| const NotificationDatabaseData&)>;
|
|
|
| + using ReadAllResultCallback =
|
| + base::Callback<void(bool /* success */,
|
| + const std::vector<NotificationDatabaseData>&)>;
|
| +
|
| using WriteResultCallback =
|
| base::Callback<void(bool /* success */,
|
| int64_t /* notification_id */)>;
|
| @@ -37,6 +41,14 @@ class PlatformNotificationContext {
|
| const GURL& origin,
|
| const ReadResultCallback& callback) = 0;
|
|
|
| + // Reads all data associated with |service_worker_registration_id| belonging
|
| + // to |origin| from the database. |callback| will be invoked with the success
|
| + // status and a vector with all read notification data when completed.
|
| + virtual void ReadAllNotificationDataForServiceWorkerRegistration(
|
| + const GURL& origin,
|
| + int64_t service_worker_registration_id,
|
| + const ReadAllResultCallback& callback) = 0;
|
| +
|
| // Writes the data associated with a notification to a database. When this
|
| // action completed, |callback| will be invoked with the success status and
|
| // the persistent notification id when written successfully.
|
|
|