Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom |
| diff --git a/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom b/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dfa98ff7b359bcf31f79776743076b5347fbe2f8 |
| --- /dev/null |
| +++ b/third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2017 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 blink.mojom; |
| + |
| +enum BackgroundFetchError { |
| + NONE, |
| + 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!
|
| +}; |
| + |
| +struct IconDefinition { |
| + string src; |
| + string sizes; |
| + string type; |
| +}; |
| + |
| +struct BackgroundFetchRegistration { |
| + string tag; |
| + array<IconDefinition> icons; |
| + int64 total_download_size = 0; |
| + string title = ""; |
| +}; |
| + |
| +interface BackgroundFetchService { |
| + // 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.
|
| + |
| + // Updates the user interface for the Background Fetch identified by the |
| + // |service_worker_registration_id| and the |tag|. |
| + UpdateUI(int64 service_worker_registration_id, string tag, string title) |
| + => (BackgroundFetchError error); |
| + |
| + // Aborts the Background Fetch registration identified by the |
| + // |service_worker_registration_id| and the |tag|. |
| + Abort(int64 service_worker_registration_id, string tag); |
| + |
| + // Gets the Background Fetch registration identified by the |
| + // |service_worker_registration_id| and the |tag|. |
| + GetRegistration(int64 service_worker_registration_id, string tag) |
| + => (BackgroundFetchError error, |
| + BackgroundFetchRegistration? registration); |
| + |
| + // Gets the sequence of tags for active Background Fetch registrations given |
| + // the |service_worker_registration_id|. |
| + GetTags(int64 service_worker_registration_id) |
| + => (BackgroundFetchError error, |
| + array<string> tags); |
| +}; |