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 | 8 |
| 9 enum BackgroundSyncError { |
| 10 NONE, |
| 11 STORAGE, |
| 12 NOT_FOUND, |
| 13 NO_SERVICE_WORKER, |
| 14 MAX=NO_SERVICE_WORKER |
| 15 }; |
| 16 |
9 interface BackgroundSyncService { | 17 interface BackgroundSyncService { |
10 Register(SyncRegistration options, int64 service_worker_registration_id) | 18 Register(SyncRegistration options, int64 service_worker_registration_id) |
11 => (SyncRegistration options); | 19 => (BackgroundSyncError err, SyncRegistration options); |
12 GetRegistration(BackgroundSyncPeriodicity periodicity, string tag, | 20 GetRegistration(BackgroundSyncPeriodicity periodicity, string tag, |
13 int64 service_worker_registration_id) | 21 int64 service_worker_registration_id) |
14 => (SyncRegistration? registration); | 22 => (BackgroundSyncError err, SyncRegistration? registration); |
15 GetRegistrations(BackgroundSyncPeriodicity periodicity, | 23 GetRegistrations(BackgroundSyncPeriodicity periodicity, |
16 int64 service_worker_registration_id) | 24 int64 service_worker_registration_id) |
17 => (array<SyncRegistration> registrations); | 25 => (BackgroundSyncError err, array<SyncRegistration> registrations); |
18 Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag, | 26 Unregister(BackgroundSyncPeriodicity periodicity, int64 id, string tag, |
19 int64 service_worker_registration_id) => (bool success); | 27 int64 service_worker_registration_id) => (BackgroundSyncError err); |
20 }; | 28 }; |
21 | 29 |
22 interface BackgoundSyncServiceClient { | 30 interface BackgoundSyncServiceClient { |
23 Sync(SyncRegistration event); | 31 Sync(SyncRegistration event); |
24 }; | 32 }; |
25 | 33 |
OLD | NEW |