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

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 OWNERS for platform/modules/background_sync 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..b0545ebb266547b9d10e759c12c3627610450c65 100644
--- a/public/platform/modules/background_sync/WebSyncProvider.h
+++ b/public/platform/modules/background_sync/WebSyncProvider.h
@@ -7,23 +7,34 @@
#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:
virtual ~WebSyncProvider() { }
// Takes ownership of the WebSyncRegistrationCallbacks.
- // Does not take ownership of the WebServiceWorkerRegistration.
- virtual void registerBackgroundSync(const WebSyncRegistrationOptions*, WebSyncRegistrationCallbacks*) = 0;
+ virtual void registerBackgroundSync(const WebSyncRegistration*, WebSyncRegistrationCallbacks*) = 0;
+
+ // Takes ownership of the WebSyncUnregistrationCallbacks.
+ virtual void unregisterBackgroundSync(const WebString&, WebSyncUnregistrationCallbacks*) = 0;
+
+ // Takes ownership of the WebSyncRegistrationCallbacks.
+ virtual void getRegistration(const WebString&, WebSyncRegistrationCallbacks*) = 0;
+
+ // Takes ownership of the WebSyncGetRegistrationsCallbacks.
+ virtual void getRegistrations(WebSyncGetRegistrationsCallbacks*) = 0;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698