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

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

Issue 2600863002: Revert of [ServiceWorker] Mojofy PushEvent of Service Worker. (Closed)
Patch Set: Created 3 years, 11 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 "content/common/url_loader.mojom"; 7 import "content/common/url_loader.mojom";
8 import "mojo/common/string16.mojom"; 8 import "mojo/common/string16.mojom";
9 import "mojo/common/time.mojom"; 9 import "mojo/common/time.mojom";
10 import "third_party/WebKit/public/platform/modules/background_sync/background_sy nc.mojom"; 10 import "third_party/WebKit/public/platform/modules/background_sync/background_sy nc.mojom";
11 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_ event_status.mojom"; 11 import "third_party/WebKit/public/platform/modules/serviceworker/service_worker_ event_status.mojom";
12 import "url/mojo/origin.mojom"; 12 import "url/mojo/origin.mojom";
13 13
14 [Native] 14 [Native]
15 struct PushEventPayload;
16
17 [Native]
18 struct ServiceWorkerFetchRequest; 15 struct ServiceWorkerFetchRequest;
19 16
20 [Native] 17 [Native]
21 struct ExtendableMessageEventSource; 18 struct ExtendableMessageEventSource;
22 19
23 struct FetchEventPreloadHandle { 20 struct FetchEventPreloadHandle {
24 URLLoader url_loader; 21 URLLoader url_loader;
25 URLLoaderClient& url_loader_client_request; 22 URLLoaderClient& url_loader_client_request;
26 }; 23 };
27 24
28 struct ExtendableMessageEvent { 25 struct ExtendableMessageEvent {
29 mojo.common.mojom.String16 message; 26 mojo.common.mojom.String16 message;
30 url.mojom.Origin source_origin; 27 url.mojom.Origin source_origin;
31 array<int32> message_ports; 28 array<int32> message_ports;
32 array<int32> new_routing_ids; 29 array<int32> new_routing_ids;
33 ExtendableMessageEventSource source; 30 ExtendableMessageEventSource source;
34 }; 31 };
35 32
36 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching 33 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching
37 // events. 34 // events.
38 interface ServiceWorkerEventDispatcher { 35 interface ServiceWorkerEventDispatcher {
39 // |fetch_event_id| is used internally when sending the response back to the 36 // |fetch_event_id| is used internally when sending the response back to the
40 // browser process. 37 // browser process.
41 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request, 38 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request,
42 FetchEventPreloadHandle? preload_handle) 39 FetchEventPreloadHandle? preload_handle)
43 => (blink.mojom.ServiceWorkerEventStatus status, 40 => (blink.mojom.ServiceWorkerEventStatus status,
44 mojo.common.mojom.Time dispatch_event_time); 41 mojo.common.mojom.Time dispatch_event_time);
45 DispatchPushEvent(PushEventPayload payload)
46 => (blink.mojom.ServiceWorkerEventStatus status,
47 mojo.common.mojom.Time dispatch_event_time);
48 // Arguments are passed to the event handler as parameters of SyncEvent. 42 // Arguments are passed to the event handler as parameters of SyncEvent.
49 // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event 43 // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event
50 DispatchSyncEvent(string tag, 44 DispatchSyncEvent(string tag,
51 blink.mojom.BackgroundSyncEventLastChance last_chance) 45 blink.mojom.BackgroundSyncEventLastChance last_chance)
52 => (blink.mojom.ServiceWorkerEventStatus status, 46 => (blink.mojom.ServiceWorkerEventStatus status,
53 mojo.common.mojom.Time dispatch_event_time); 47 mojo.common.mojom.Time dispatch_event_time);
54 DispatchExtendableMessageEvent(ExtendableMessageEvent event) 48 DispatchExtendableMessageEvent(ExtendableMessageEvent event)
55 => (blink.mojom.ServiceWorkerEventStatus status, 49 => (blink.mojom.ServiceWorkerEventStatus status,
56 mojo.common.mojom.Time dispatch_event_time); 50 mojo.common.mojom.Time dispatch_event_time);
57 }; 51 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698