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

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

Issue 2775923002: Add origins to the Background Fetch Mojo calls. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "url/mojo/origin.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 18 matching lines...) Expand all
35 string tag; 37 string tag;
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,
47 url.mojom.Origin origin,
45 string tag, 48 string tag,
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,
56 url.mojom.Origin origin,
57 string tag,
58 string title)
53 => (BackgroundFetchError error); 59 => (BackgroundFetchError error);
54 60
55 // Aborts the Background Fetch registration identified by the 61 // Aborts the Background Fetch registration identified by the
56 // |service_worker_registration_id| and the |tag|. 62 // |service_worker_registration_id| and the |tag|.
57 Abort(int64 service_worker_registration_id, string tag) 63 Abort(int64 service_worker_registration_id,
64 url.mojom.Origin origin,
65 string tag)
58 => (BackgroundFetchError error); 66 => (BackgroundFetchError error);
59 67
60 // Gets the Background Fetch registration identified by the 68 // Gets the Background Fetch registration identified by the
61 // |service_worker_registration_id| and the |tag|. 69 // |service_worker_registration_id| and the |tag|.
62 GetRegistration(int64 service_worker_registration_id, string tag) 70 GetRegistration(int64 service_worker_registration_id,
71 url.mojom.Origin origin,
72 string tag)
63 => (BackgroundFetchError error, 73 => (BackgroundFetchError error,
64 BackgroundFetchRegistration? registration); 74 BackgroundFetchRegistration? registration);
65 75
66 // Gets the sequence of tags for active Background Fetch registrations given 76 // Gets the sequence of tags for active Background Fetch registrations given
67 // the |service_worker_registration_id|. 77 // the |service_worker_registration_id|.
68 GetTags(int64 service_worker_registration_id) 78 GetTags(int64 service_worker_registration_id, url.mojom.Origin origin)
69 => (BackgroundFetchError error, 79 => (BackgroundFetchError error,
70 array<string> tags); 80 array<string> tags);
71 }; 81 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698