| 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 |
| 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 support for the `fetch()` function in Mojo. |
| 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 |