1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// 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.
module content;
import "content/public/common/background_sync.mojom";
import "content/public/common/permission_status.mojom";
import "content/public/common/service_worker_event_status.mojom";
enum BackgroundSyncError {
NONE,
STORAGE,
NOT_FOUND,
NO_SERVICE_WORKER,
NOT_ALLOWED,
MAX=NOT_ALLOWED
};
interface BackgroundSyncService {
Register(SyncRegistration options, int64 service_worker_registration_id)
=> (BackgroundSyncError err, SyncRegistration options);
GetRegistration(BackgroundSyncPeriodicity periodicity, string tag,
int64 service_worker_registration_id)
=> (BackgroundSyncError err, SyncRegistration? registration);
GetRegistrations(BackgroundSyncPeriodicity periodicity,
int64 service_worker_registration_id)
=> (BackgroundSyncError err, array<SyncRegistration> registrations);
Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag,
int64 service_worker_registration_id) => (BackgroundSyncError err);
GetPermissionStatus(BackgroundSyncPeriodicity periodicity,
int64 service_worker_registration_id)
=> (BackgroundSyncError err, PermissionStatus status);
};
interface BackgroundSyncServiceClient {
Sync(SyncRegistration registration)
=> (ServiceWorkerEventStatus status);
};
|