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";
10 enum BackgroundSyncError {
18 interface BackgroundSyncService {
19 Register(SyncRegistration options, int64 service_worker_registration_id)
20 => (BackgroundSyncError err, SyncRegistration options);
21 GetRegistration(BackgroundSyncPeriodicity periodicity, string tag,
22 int64 service_worker_registration_id)
23 => (BackgroundSyncError err, SyncRegistration? registration);
24 GetRegistrations(BackgroundSyncPeriodicity periodicity,
25 int64 service_worker_registration_id)
26 => (BackgroundSyncError err, array<SyncRegistration> registrations);
27 Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag,
28 int64 service_worker_registration_id) => (BackgroundSyncError err);
29 GetPermissionStatus(BackgroundSyncPeriodicity periodicity,
30 int64 service_worker_registration_id)
31 => (BackgroundSyncError err, PermissionStatus status);
34 interface BackgoundSyncServiceClient {
35 Sync(SyncRegistration event);