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

Unified Diff: public/platform/modules/background_sync/WebSyncProvider.h

Issue 963683002: Add IDL and initial Blink API for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing serviceWorkerRegistration.syncManager to interface tests Created 5 years, 9 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
Index: public/platform/modules/background_sync/WebSyncProvider.h
diff --git a/public/platform/modules/background_sync/WebSyncProvider.h b/public/platform/modules/background_sync/WebSyncProvider.h
index 841bfd5ad7c733c5ab73f8c63b4be1daa7e25f7b..4ad004cabb5ec586e00ec67025220feab20801c0 100644
--- a/public/platform/modules/background_sync/WebSyncProvider.h
+++ b/public/platform/modules/background_sync/WebSyncProvider.h
@@ -7,15 +7,18 @@
#include "public/platform/WebCallbacks.h"
#include "public/platform/WebCommon.h"
+#include "public/platform/WebString.h"
+#include "public/platform/WebVector.h"
namespace blink {
class WebServiceWorkerRegistration;
struct WebSyncError;
struct WebSyncRegistration;
-struct WebSyncRegistrationOptions;
using WebSyncRegistrationCallbacks = WebCallbacks<WebSyncRegistration, WebSyncError>;
+using WebSyncUnregistrationCallbacks = WebCallbacks<bool, WebSyncError>;
+using WebSyncGetRegistrationsCallbacks = WebCallbacks<WebVector<WebSyncRegistration>, WebSyncError>;
class WebSyncProvider {
public:
@@ -23,7 +26,19 @@ public:
// Takes ownership of the WebSyncRegistrationCallbacks.
// Does not take ownership of the WebServiceWorkerRegistration.
- virtual void registerBackgroundSync(const WebSyncRegistrationOptions*, WebSyncRegistrationCallbacks*) = 0;
+ virtual void registerBackgroundSync(const WebSyncRegistration*, WebServiceWorkerRegistration*, WebSyncRegistrationCallbacks*) = 0;
+
+ // Takes ownership of the WebSyncUnregistrationCallbacks.
+ // Does not take ownership of the WebServiceWorkerRegistration.
+ virtual void unregisterBackgroundSync(const WebString&, WebServiceWorkerRegistration*, WebSyncUnregistrationCallbacks*) = 0;
+
+ // Takes ownership of the WebSyncRegistrationCallbacks.
+ // Does not take ownership of the WebServiceWorkerRegistration.
+ virtual void getRegistration(const WebString&, WebServiceWorkerRegistration*, WebSyncRegistrationCallbacks*) = 0;
+
+ // Takes ownership of the WebSyncGetRegistrationsCallbacks.
+ // Does not take ownership of the WebServiceWorkerRegistration.
+ virtual void getRegistrations(WebServiceWorkerRegistration*, WebSyncGetRegistrationsCallbacks*) = 0;
};
} // namespace blink
« no previous file with comments | « public/platform/modules/background_sync/OWNERS ('k') | public/platform/modules/background_sync/WebSyncRegistration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698