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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Eliminate unnecessary PostTask Created 3 years, 10 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/payment_app.mojom"; 7 import "components/payments/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";
(...skipping 11 matching lines...) Expand all
22 struct ExtendableMessageEventSource; 22 struct ExtendableMessageEventSource;
23 23
24 struct FetchEventPreloadHandle { 24 struct FetchEventPreloadHandle {
25 URLLoader url_loader; 25 URLLoader url_loader;
26 URLLoaderClient& url_loader_client_request; 26 URLLoaderClient& url_loader_client_request;
27 }; 27 };
28 28
29 struct ExtendableMessageEvent { 29 struct ExtendableMessageEvent {
30 mojo.common.mojom.String16 message; 30 mojo.common.mojom.String16 message;
31 url.mojom.Origin source_origin; 31 url.mojom.Origin source_origin;
32 array<int32> message_ports; 32 array<handle<message_pipe>> message_ports;
33 array<int32> new_routing_ids;
34 ExtendableMessageEventSource source; 33 ExtendableMessageEventSource source;
35 }; 34 };
36 35
37 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching 36 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching
38 // events. 37 // events.
39 interface ServiceWorkerEventDispatcher { 38 interface ServiceWorkerEventDispatcher {
40 // |fetch_event_id| is used internally when sending the response back to the 39 // |fetch_event_id| is used internally when sending the response back to the
41 // browser process. 40 // browser process.
42 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request, 41 DispatchFetchEvent(int32 fetch_event_id, ServiceWorkerFetchRequest request,
43 FetchEventPreloadHandle? preload_handle) 42 FetchEventPreloadHandle? preload_handle)
44 => (blink.mojom.ServiceWorkerEventStatus status, 43 => (blink.mojom.ServiceWorkerEventStatus status,
45 mojo.common.mojom.Time dispatch_event_time); 44 mojo.common.mojom.Time dispatch_event_time);
46 DispatchPushEvent(PushEventPayload payload) 45 DispatchPushEvent(PushEventPayload payload)
47 => (blink.mojom.ServiceWorkerEventStatus status, 46 => (blink.mojom.ServiceWorkerEventStatus status,
48 mojo.common.mojom.Time dispatch_event_time); 47 mojo.common.mojom.Time dispatch_event_time);
49 // Arguments are passed to the event handler as parameters of SyncEvent. 48 // Arguments are passed to the event handler as parameters of SyncEvent.
50 // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event 49 // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event
51 DispatchSyncEvent(string tag, 50 DispatchSyncEvent(string tag,
52 blink.mojom.BackgroundSyncEventLastChance last_chance) 51 blink.mojom.BackgroundSyncEventLastChance last_chance)
53 => (blink.mojom.ServiceWorkerEventStatus status, 52 => (blink.mojom.ServiceWorkerEventStatus status,
54 mojo.common.mojom.Time dispatch_event_time); 53 mojo.common.mojom.Time dispatch_event_time);
55 DispatchPaymentRequestEvent(payments.mojom.PaymentAppRequest app_request) 54 DispatchPaymentRequestEvent(payments.mojom.PaymentAppRequest app_request)
56 => (blink.mojom.ServiceWorkerEventStatus status, 55 => (blink.mojom.ServiceWorkerEventStatus status,
57 mojo.common.mojom.Time dispatch_event_time); 56 mojo.common.mojom.Time dispatch_event_time);
58 DispatchExtendableMessageEvent(ExtendableMessageEvent event) 57 DispatchExtendableMessageEvent(ExtendableMessageEvent event)
59 => (blink.mojom.ServiceWorkerEventStatus status, 58 => (blink.mojom.ServiceWorkerEventStatus status,
60 mojo.common.mojom.Time dispatch_event_time); 59 mojo.common.mojom.Time dispatch_event_time);
61 }; 60 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698