1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 import "content/public/common/background_sync.mojom";
8 import "content/public/common/permission_status.mojom";
9 import "content/public/common/service_worker_event_status.mojom";
11 enum BackgroundSyncError {
20 interface BackgroundSyncService {
21 Register(SyncRegistration options, int64 service_worker_registration_id)
22 => (BackgroundSyncError err, SyncRegistration options);
23 GetRegistration(BackgroundSyncPeriodicity periodicity, string tag,
24 int64 service_worker_registration_id)
25 => (BackgroundSyncError err, SyncRegistration? registration);
26 GetRegistrations(BackgroundSyncPeriodicity periodicity,
27 int64 service_worker_registration_id)
28 => (BackgroundSyncError err, array<SyncRegistration> registrations);
29 Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag,
30 int64 service_worker_registration_id) => (BackgroundSyncError err);
31 GetPermissionStatus(BackgroundSyncPeriodicity periodicity,
32 int64 service_worker_registration_id)
33 => (BackgroundSyncError err, PermissionStatus status);
36 interface BackgroundSyncServiceClient {
37 Sync(SyncRegistration registration)
38 => (ServiceWorkerEventStatus status);