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

Side by Side Diff: content/common/service_worker/service_worker_event_dispatcher.mojom

Issue 2746783002: [ServiceWorker] Mojofy InstallEvent of Service Worker (Closed)
Patch Set: Just delete a useless line Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 content.mojom; 5 module content.mojom;
6 6
7 import "components/payments/mojom/payment_app.mojom"; 7 import "components/payments/mojom/payment_app.mojom";
8 import "content/common/url_loader.mojom"; 8 import "content/common/url_loader.mojom";
9 import "mojo/common/string16.mojom"; 9 import "mojo/common/string16.mojom";
10 import "mojo/common/time.mojom"; 10 import "mojo/common/time.mojom";
11 import "third_party/WebKit/public/platform/modules/background_sync/background_sy nc.mojom"; 11 import "third_party/WebKit/public/platform/modules/background_sync/background_sy nc.mojom";
12 import "third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom "; 12 import "third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom ";
13 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_ event_status.mojom"; 13 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_ event_status.mojom";
14 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_ stream_handle.mojom"; 14 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_ stream_handle.mojom";
15 import "url/mojo/origin.mojom"; 15 import "url/mojo/origin.mojom";
16 import "url/mojo/url.mojom";
16 17
17 [Native] 18 [Native]
18 struct PlatformNotificationData; 19 struct PlatformNotificationData;
19 20
20 [Native] 21 [Native]
21 struct PushEventPayload; 22 struct PushEventPayload;
22 23
23 [Native] 24 [Native]
24 struct ServiceWorkerResponse; 25 struct ServiceWorkerResponse;
25 26
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 OnFallback(mojo.common.mojom.Time dispatch_event_time); 72 OnFallback(mojo.common.mojom.Time dispatch_event_time);
72 }; 73 };
73 74
74 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching 75 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching
75 // events. 76 // events.
76 // Those events expecting such response 77 // Those events expecting such response
77 // (blink.mojom.ServiceWorkerEventStatus, mojo.common.mojom.Time) are considered 78 // (blink.mojom.ServiceWorkerEventStatus, mojo.common.mojom.Time) are considered
78 // 'simple events'. ServiceWorkerVersion::CreateSimpleEventCallback can be used 79 // 'simple events'. ServiceWorkerVersion::CreateSimpleEventCallback can be used
79 // to create the callback for these. 80 // to create the callback for these.
80 interface ServiceWorkerEventDispatcher { 81 interface ServiceWorkerEventDispatcher {
82 DispatchInstallEvent(associated ServiceWorkerInstallEventMethods method)
83 => (blink.mojom.ServiceWorkerEventStatus status,
84 bool has_fetch_handler,
85 mojo.common.mojom.Time dispatch_event_time);
81 DispatchActivateEvent() 86 DispatchActivateEvent()
82 => (blink.mojom.ServiceWorkerEventStatus status, 87 => (blink.mojom.ServiceWorkerEventStatus status,
83 mojo.common.mojom.Time dispatch_event_time); 88 mojo.common.mojom.Time dispatch_event_time);
84 DispatchBackgroundFetchAbortEvent(string tag) 89 DispatchBackgroundFetchAbortEvent(string tag)
85 => (blink.mojom.ServiceWorkerEventStatus status, 90 => (blink.mojom.ServiceWorkerEventStatus status,
86 mojo.common.mojom.Time dispatch_event_time); 91 mojo.common.mojom.Time dispatch_event_time);
87 DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state) 92 DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state)
88 => (blink.mojom.ServiceWorkerEventStatus status, 93 => (blink.mojom.ServiceWorkerEventStatus status,
89 mojo.common.mojom.Time dispatch_event_time); 94 mojo.common.mojom.Time dispatch_event_time);
90 DispatchBackgroundFetchFailEvent(string tag, 95 DispatchBackgroundFetchFailEvent(string tag,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 DispatchExtendableMessageEvent(ExtendableMessageEvent event) 139 DispatchExtendableMessageEvent(ExtendableMessageEvent event)
135 => (blink.mojom.ServiceWorkerEventStatus status, 140 => (blink.mojom.ServiceWorkerEventStatus status,
136 mojo.common.mojom.Time dispatch_event_time); 141 mojo.common.mojom.Time dispatch_event_time);
137 142
138 // Pings the service worker to check if it is responsive. If the callback is 143 // Pings the service worker to check if it is responsive. If the callback is
139 // not called within a certain period of time, the browser will terminate the 144 // not called within a certain period of time, the browser will terminate the
140 // worker. Unlike the other functions in this interface, Ping() does not 145 // worker. Unlike the other functions in this interface, Ping() does not
141 // dispatch an event. 146 // dispatch an event.
142 Ping() => (); 147 Ping() => ();
143 }; 148 };
149
150 // This interface is passed from the browser to the renderer with
151 // DispatchInstallEvent. The ordering between RegisterForeignFetchScopes and the
152 // callback of DispatchInstallEvent should be preserved.
153 interface ServiceWorkerInstallEventMethods {
154 RegisterForeignFetchScopes(array<url.mojom.Url> sub_scopes,
155 array<url.mojom.Origin> origins);
156 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698