Index: modules/background_sync/SyncManager.idl |
diff --git a/modules/background_sync/SyncManager.idl b/modules/background_sync/SyncManager.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a8a996271f5ef079979f3b28e3d552e35a3bdbc6 |
--- /dev/null |
+++ b/modules/background_sync/SyncManager.idl |
@@ -0,0 +1,21 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+enum SyncPermissionState { |
+ "default", |
+ "denied", |
+ "granted" |
+}; |
+ |
+[ |
+ Exposed=(Window,ServiceWorker), |
+ GarbageCollected, |
+ RuntimeEnabled=BackgroundSync, |
+ TypeChecking=Interface, |
+] interface SyncManager { |
+ [CallWith=ScriptState,ImplementedAs=registerFunction] Promise<SyncRegistration> register([RuntimeEnabled=BackgroundSyncV2] optional SyncRegistrationOptions options); |
+ [RuntimeEnabled=BackgroundSyncV2, CallWith=ScriptState] Promise<SyncRegistration> getRegistration(DOMString tag); |
+ [RuntimeEnabled=BackgroundSyncV2, CallWith=ScriptState] Promise<sequence<SyncRegistration>> getRegistrations(); |
+ [RuntimeEnabled=BackgroundSyncV2, CallWith=ScriptState] Promise<SyncPermissionState> permissionState(); |
+}; |