OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module content; | 5 module content; |
6 | 6 |
7 import "content/public/common/background_sync.mojom"; | 7 import "content/public/common/background_sync.mojom"; |
8 import "content/public/common/permission_status.mojom"; | 8 import "content/public/common/permission_status.mojom"; |
| 9 import "content/public/common/service_worker_event_status.mojom"; |
9 | 10 |
10 enum BackgroundSyncError { | 11 enum BackgroundSyncError { |
11 NONE, | 12 NONE, |
12 STORAGE, | 13 STORAGE, |
13 NOT_FOUND, | 14 NOT_FOUND, |
14 NO_SERVICE_WORKER, | 15 NO_SERVICE_WORKER, |
15 MAX=NO_SERVICE_WORKER | 16 MAX=NO_SERVICE_WORKER |
16 }; | 17 }; |
17 | 18 |
18 interface BackgroundSyncService { | 19 interface BackgroundSyncService { |
19 Register(SyncRegistration options, int64 service_worker_registration_id) | 20 Register(SyncRegistration options, int64 service_worker_registration_id) |
20 => (BackgroundSyncError err, SyncRegistration options); | 21 => (BackgroundSyncError err, SyncRegistration options); |
21 GetRegistration(BackgroundSyncPeriodicity periodicity, string tag, | 22 GetRegistration(BackgroundSyncPeriodicity periodicity, string tag, |
22 int64 service_worker_registration_id) | 23 int64 service_worker_registration_id) |
23 => (BackgroundSyncError err, SyncRegistration? registration); | 24 => (BackgroundSyncError err, SyncRegistration? registration); |
24 GetRegistrations(BackgroundSyncPeriodicity periodicity, | 25 GetRegistrations(BackgroundSyncPeriodicity periodicity, |
25 int64 service_worker_registration_id) | 26 int64 service_worker_registration_id) |
26 => (BackgroundSyncError err, array<SyncRegistration> registrations); | 27 => (BackgroundSyncError err, array<SyncRegistration> registrations); |
27 Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag, | 28 Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag, |
28 int64 service_worker_registration_id) => (BackgroundSyncError err); | 29 int64 service_worker_registration_id) => (BackgroundSyncError err); |
29 GetPermissionStatus(BackgroundSyncPeriodicity periodicity, | 30 GetPermissionStatus(BackgroundSyncPeriodicity periodicity, |
30 int64 service_worker_registration_id) | 31 int64 service_worker_registration_id) |
31 => (BackgroundSyncError err, PermissionStatus status); | 32 => (BackgroundSyncError err, PermissionStatus status); |
32 }; | 33 }; |
33 | 34 |
34 interface BackgoundSyncServiceClient { | 35 interface BackgroundSyncServiceClient { |
35 Sync(SyncRegistration event); | 36 Sync(SyncRegistration event, int32 thread_id) |
| 37 => (ServiceWorkerEventStatus status); |
36 }; | 38 }; |
37 | 39 |
OLD | NEW |