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

Side by Side Diff: third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom

Issue 2762303002: Enable transmitting Fetch Requests over Mojo (Closed)
Patch Set: Enable transmitting Fetch Requests over Mojo 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 blink.mojom; 5 module blink.mojom;
6 6
7 import "third_party/WebKit/public/platform/modules/fetch/request.mojom";
8
7 enum BackgroundFetchError { 9 enum BackgroundFetchError {
8 NONE, 10 NONE,
9 DUPLICATED_TAG, 11 DUPLICATED_TAG,
10 INVALID_TAG 12 INVALID_TAG
11 }; 13 };
12 14
13 // Represents the definition of an icon developers can optionally provide with a 15 // Represents the definition of an icon developers can optionally provide with a
14 // Background Fetch fetch. Analogous to the following structure in the spec: 16 // Background Fetch fetch. Analogous to the following structure in the spec:
15 // https://wicg.github.io/background-fetch/#background-fetch-manager 17 // https://wicg.github.io/background-fetch/#background-fetch-manager
16 struct IconDefinition { 18 struct IconDefinition {
(...skipping 19 matching lines...) Expand all
36 array<IconDefinition> icons; 38 array<IconDefinition> icons;
37 int64 total_download_size; 39 int64 total_download_size;
38 string title; 40 string title;
39 }; 41 };
40 42
41 interface BackgroundFetchService { 43 interface BackgroundFetchService {
42 // Creates a new Background Fetch registration identified by |tag| with the 44 // Creates a new Background Fetch registration identified by |tag| with the
43 // given |options| for the sequence of |requests|. 45 // given |options| for the sequence of |requests|.
44 Fetch(int64 service_worker_registration_id, 46 Fetch(int64 service_worker_registration_id,
45 string tag, 47 string tag,
48 array<FetchAPIRequest> requests,
46 BackgroundFetchOptions options) 49 BackgroundFetchOptions options)
47 => (BackgroundFetchError error, 50 => (BackgroundFetchError error,
48 BackgroundFetchRegistration? registration); 51 BackgroundFetchRegistration? registration);
49 52
50 // Updates the user interface for the Background Fetch identified by the 53 // Updates the user interface for the Background Fetch identified by the
51 // |service_worker_registration_id| and the |tag|. 54 // |service_worker_registration_id| and the |tag|.
52 UpdateUI(int64 service_worker_registration_id, string tag, string title) 55 UpdateUI(int64 service_worker_registration_id, string tag, string title)
53 => (BackgroundFetchError error); 56 => (BackgroundFetchError error);
54 57
55 // Aborts the Background Fetch registration identified by the 58 // Aborts the Background Fetch registration identified by the
56 // |service_worker_registration_id| and the |tag|. 59 // |service_worker_registration_id| and the |tag|.
57 Abort(int64 service_worker_registration_id, string tag) 60 Abort(int64 service_worker_registration_id, string tag)
58 => (BackgroundFetchError error); 61 => (BackgroundFetchError error);
59 62
60 // Gets the Background Fetch registration identified by the 63 // Gets the Background Fetch registration identified by the
61 // |service_worker_registration_id| and the |tag|. 64 // |service_worker_registration_id| and the |tag|.
62 GetRegistration(int64 service_worker_registration_id, string tag) 65 GetRegistration(int64 service_worker_registration_id, string tag)
63 => (BackgroundFetchError error, 66 => (BackgroundFetchError error,
64 BackgroundFetchRegistration? registration); 67 BackgroundFetchRegistration? registration);
65 68
66 // Gets the sequence of tags for active Background Fetch registrations given 69 // Gets the sequence of tags for active Background Fetch registrations given
67 // the |service_worker_registration_id|. 70 // the |service_worker_registration_id|.
68 GetTags(int64 service_worker_registration_id) 71 GetTags(int64 service_worker_registration_id)
69 => (BackgroundFetchError error, 72 => (BackgroundFetchError error,
70 array<string> tags); 73 array<string> tags);
71 }; 74 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698