Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom

Issue 2745243002: Implement a Mojo service for Background Fetch (Closed)
Patch Set: Implement a Mojo service for Background Fetch Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9092281d0e4a846e2171735d1dc7850af980e3be
--- /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
+};
+
+struct IconDefinition {
+ string src;
+ string sizes;
+ string type;
+};
+
+struct BackgroundFetchRegistration {
+ string tag;
+ array<IconDefinition> icons;
+ int64 total_download_size = 0;
+ string title = "";
dcheng 2017/03/16 07:14:08 Just curious, but how does default initialization
Peter Beverloo 2017/03/16 16:26:55 I'm not sure, I did the copy-from-prior-art thing.
+};
+
+interface BackgroundFetchService {
+ // TODO(peter): Implement support for the `fetch()` function in Mojo.
+
+ // 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);
+};

Powered by Google App Engine
This is Rietveld 408576698