| OLD | NEW |
| 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/content/payment_app.mojom"; | 7 import "components/payments/content/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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 struct ExtendableMessageEvent { | 48 struct ExtendableMessageEvent { |
| 49 mojo.common.mojom.String16 message; | 49 mojo.common.mojom.String16 message; |
| 50 url.mojom.Origin source_origin; | 50 url.mojom.Origin source_origin; |
| 51 array<handle<message_pipe>> message_ports; | 51 array<handle<message_pipe>> message_ports; |
| 52 ExtendableMessageEventSource source; | 52 ExtendableMessageEventSource source; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching | 55 // Renderer-side interface bound to ServiceWorkerContextClient for dispatching |
| 56 // events. | 56 // events. |
| 57 // Those events expecting such response |
| 58 // (blink.mojom.ServiceWorkerEventStatus, mojo.common.mojom.Time) are considered |
| 59 // 'simple events'. ServiceWorkerVersion::CreateSimpleEventCallback can be used |
| 60 // to create the callback for these. |
| 57 interface ServiceWorkerEventDispatcher { | 61 interface ServiceWorkerEventDispatcher { |
| 58 DispatchActivateEvent() | 62 DispatchActivateEvent() |
| 59 => (blink.mojom.ServiceWorkerEventStatus status, | 63 => (blink.mojom.ServiceWorkerEventStatus status, |
| 60 mojo.common.mojom.Time dispatch_event_time); | 64 mojo.common.mojom.Time dispatch_event_time); |
| 61 DispatchBackgroundFetchAbortEvent(string tag) | 65 DispatchBackgroundFetchAbortEvent(string tag) |
| 62 => (blink.mojom.ServiceWorkerEventStatus status, | 66 => (blink.mojom.ServiceWorkerEventStatus status, |
| 63 mojo.common.mojom.Time dispatch_event_time); | 67 mojo.common.mojom.Time dispatch_event_time); |
| 64 DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state) | 68 DispatchBackgroundFetchClickEvent(string tag, BackgroundFetchState state) |
| 65 => (blink.mojom.ServiceWorkerEventStatus status, | 69 => (blink.mojom.ServiceWorkerEventStatus status, |
| 66 mojo.common.mojom.Time dispatch_event_time); | 70 mojo.common.mojom.Time dispatch_event_time); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 DispatchExtendableMessageEvent(ExtendableMessageEvent event) | 107 DispatchExtendableMessageEvent(ExtendableMessageEvent event) |
| 104 => (blink.mojom.ServiceWorkerEventStatus status, | 108 => (blink.mojom.ServiceWorkerEventStatus status, |
| 105 mojo.common.mojom.Time dispatch_event_time); | 109 mojo.common.mojom.Time dispatch_event_time); |
| 106 | 110 |
| 107 // Pings the service worker to check if it is responsive. If the callback is | 111 // Pings the service worker to check if it is responsive. If the callback is |
| 108 // not called within a certain period of time, the browser will terminate the | 112 // not called within a certain period of time, the browser will terminate the |
| 109 // worker. Unlike the other functions in this interface, Ping() does not | 113 // worker. Unlike the other functions in this interface, Ping() does not |
| 110 // dispatch an event. | 114 // dispatch an event. |
| 111 Ping() => (); | 115 Ping() => (); |
| 112 }; | 116 }; |
| OLD | NEW |