OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "public/platform/WebURL.h" | 37 #include "public/platform/WebURL.h" |
38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall
backs.h" | 38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall
backs.h" |
39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" | 40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" | 41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" |
42 #include "public/web/WebDevToolsAgentClient.h" | 42 #include "public/web/WebDevToolsAgentClient.h" |
43 #include "v8/include/v8.h" | 43 #include "v8/include/v8.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
| 47 struct WebPaymentAppResponse; |
47 struct WebServiceWorkerClientQueryOptions; | 48 struct WebServiceWorkerClientQueryOptions; |
48 class WebDataSource; | 49 class WebDataSource; |
49 class WebServiceWorkerContextProxy; | 50 class WebServiceWorkerContextProxy; |
50 class WebServiceWorkerNetworkProvider; | 51 class WebServiceWorkerNetworkProvider; |
51 class WebServiceWorkerProvider; | 52 class WebServiceWorkerProvider; |
52 class WebServiceWorkerResponse; | 53 class WebServiceWorkerResponse; |
53 class WebString; | 54 class WebString; |
54 | 55 |
55 // This interface is implemented by the client. It is supposed to be created | 56 // This interface is implemented by the client. It is supposed to be created |
56 // on the main thread and then passed on to the worker thread by a newly | 57 // on the main thread and then passed on to the worker thread by a newly |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // FetchEvent returns a response by the ServiceWorker's script context, and | 147 // FetchEvent returns a response by the ServiceWorker's script context, and |
147 // didHandleFetchEvent will be called after the end of FetchEvent's | 148 // didHandleFetchEvent will be called after the end of FetchEvent's |
148 // lifecycle. When no response is provided, the browser should fallback to | 149 // lifecycle. When no response is provided, the browser should fallback to |
149 // native fetch. EventIDs are the same with the ids passed from | 150 // native fetch. EventIDs are the same with the ids passed from |
150 // dispatchFetchEvent respectively. | 151 // dispatchFetchEvent respectively. |
151 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { | 152 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { |
152 } | 153 } |
153 virtual void respondToFetchEvent(int fetchEventID, | 154 virtual void respondToFetchEvent(int fetchEventID, |
154 const WebServiceWorkerResponse& response, | 155 const WebServiceWorkerResponse& response, |
155 double eventDispatchTime) {} | 156 double eventDispatchTime) {} |
| 157 virtual void respondToPaymentRequestEvent( |
| 158 int eventId, |
| 159 const WebPaymentAppResponse& response, |
| 160 double eventDispatchTime) {} |
156 virtual void didHandleFetchEvent(int fetchEventID, | 161 virtual void didHandleFetchEvent(int fetchEventID, |
157 WebServiceWorkerEventResult result, | 162 WebServiceWorkerEventResult result, |
158 double eventDispatchTime) {} | 163 double eventDispatchTime) {} |
159 | 164 |
160 // ServiceWorker specific method. Called after InstallEvent (dispatched | 165 // ServiceWorker specific method. Called after InstallEvent (dispatched |
161 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's | 166 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's |
162 // script context. | 167 // script context. |
163 virtual void didHandleInstallEvent(int installEventID, | 168 virtual void didHandleInstallEvent(int installEventID, |
164 WebServiceWorkerEventResult result, | 169 WebServiceWorkerEventResult result, |
165 double eventDispatchTime) {} | 170 double eventDispatchTime) {} |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 // Called when the worker wants to register subscopes to handle via foreign | 281 // Called when the worker wants to register subscopes to handle via foreign |
277 // fetch. Will only be called while an install event is in progress. | 282 // fetch. Will only be called while an install event is in progress. |
278 virtual void registerForeignFetchScopes( | 283 virtual void registerForeignFetchScopes( |
279 const WebVector<WebURL>& subScopes, | 284 const WebVector<WebURL>& subScopes, |
280 const WebVector<WebSecurityOrigin>& origins) = 0; | 285 const WebVector<WebSecurityOrigin>& origins) = 0; |
281 }; | 286 }; |
282 | 287 |
283 } // namespace blink | 288 } // namespace blink |
284 | 289 |
285 #endif // WebServiceWorkerContextClient_h | 290 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |