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

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

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

Powered by Google App Engine
This is Rietveld 408576698