Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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. | |
| 4 | |
| 5 module blink.mojom; | |
| 6 | |
| 7 enum BackgroundFetchError { | |
| 8 NONE, | |
| 9 DUPLICATED_TAG | |
|
harkness
2017/03/14 11:55:47
Why not add in NOT_YET_IMPLEMENTED now? It would b
Peter Beverloo
2017/03/14 15:17:21
We shouldn't expose any method that's not implemen
harkness
2017/03/14 17:17:29
re: Not yet implemented - ok
re: DUPLICATED_TAG
Peter Beverloo
2017/03/14 17:28:15
Ahh got it. Done!
| |
| 10 }; | |
| 11 | |
| 12 struct IconDefinition { | |
| 13 string src; | |
| 14 string sizes; | |
| 15 string type; | |
| 16 }; | |
| 17 | |
| 18 struct BackgroundFetchRegistration { | |
| 19 string tag; | |
| 20 array<IconDefinition> icons; | |
| 21 int64 total_download_size = 0; | |
| 22 string title = ""; | |
| 23 }; | |
| 24 | |
| 25 interface BackgroundFetchService { | |
| 26 // TODO(peter): Implement suppor for the `fetch()` function in Mojo. | |
|
haraken
2017/03/14 09:13:14
support
Peter Beverloo
2017/03/14 15:17:21
Done.
| |
| 27 | |
| 28 // Updates the user interface for the Background Fetch identified by the | |
| 29 // |service_worker_registration_id| and the |tag|. | |
| 30 UpdateUI(int64 service_worker_registration_id, string tag, string title) | |
| 31 => (BackgroundFetchError error); | |
| 32 | |
| 33 // Aborts the Background Fetch registration identified by the | |
| 34 // |service_worker_registration_id| and the |tag|. | |
| 35 Abort(int64 service_worker_registration_id, string tag); | |
| 36 | |
| 37 // Gets the Background Fetch registration identified by the | |
| 38 // |service_worker_registration_id| and the |tag|. | |
| 39 GetRegistration(int64 service_worker_registration_id, string tag) | |
| 40 => (BackgroundFetchError error, | |
| 41 BackgroundFetchRegistration? registration); | |
| 42 | |
| 43 // Gets the sequence of tags for active Background Fetch registrations given | |
| 44 // the |service_worker_registration_id|. | |
| 45 GetTags(int64 service_worker_registration_id) | |
| 46 => (BackgroundFetchError error, | |
| 47 array<string> tags); | |
| 48 }; | |
| OLD | NEW |