| 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 25 matching lines...) Expand all Loading... |
| 36 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall
backs.h" | 36 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall
backs.h" |
| 37 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 37 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
| 38 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" | 38 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
| 39 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" |
| 40 #include "public/web/WebDevToolsAgentClient.h" | 40 #include "public/web/WebDevToolsAgentClient.h" |
| 41 #include <memory> | 41 #include <memory> |
| 42 #include <v8.h> | 42 #include <v8.h> |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 struct WebPaymentAppResponse; |
| 46 struct WebServiceWorkerClientQueryOptions; | 47 struct WebServiceWorkerClientQueryOptions; |
| 47 class WebDataSource; | 48 class WebDataSource; |
| 48 class WebServiceWorkerContextProxy; | 49 class WebServiceWorkerContextProxy; |
| 49 class WebServiceWorkerNetworkProvider; | 50 class WebServiceWorkerNetworkProvider; |
| 50 class WebServiceWorkerProvider; | 51 class WebServiceWorkerProvider; |
| 51 class WebServiceWorkerResponse; | 52 class WebServiceWorkerResponse; |
| 52 class WebString; | 53 class WebString; |
| 53 | 54 |
| 54 // This interface is implemented by the client. It is supposed to be created | 55 // This interface is implemented by the client. It is supposed to be created |
| 55 // on the main thread and then passed on to the worker thread by a newly | 56 // on the main thread and then passed on to the worker thread by a newly |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // FetchEvent returns a response by the ServiceWorker's script context, and | 142 // FetchEvent returns a response by the ServiceWorker's script context, and |
| 142 // didHandleFetchEvent will be called after the end of FetchEvent's | 143 // didHandleFetchEvent will be called after the end of FetchEvent's |
| 143 // lifecycle. When no response is provided, the browser should fallback to | 144 // lifecycle. When no response is provided, the browser should fallback to |
| 144 // native fetch. EventIDs are the same with the ids passed from | 145 // native fetch. EventIDs are the same with the ids passed from |
| 145 // dispatchFetchEvent respectively. | 146 // dispatchFetchEvent respectively. |
| 146 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { | 147 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { |
| 147 } | 148 } |
| 148 virtual void respondToFetchEvent(int fetchEventID, | 149 virtual void respondToFetchEvent(int fetchEventID, |
| 149 const WebServiceWorkerResponse& response, | 150 const WebServiceWorkerResponse& response, |
| 150 double eventDispatchTime) {} | 151 double eventDispatchTime) {} |
| 152 virtual void respondToPaymentRequestEvent( |
| 153 int eventId, |
| 154 const WebPaymentAppResponse& response, |
| 155 double eventDispatchTime) {} |
| 151 virtual void didHandleFetchEvent(int fetchEventID, | 156 virtual void didHandleFetchEvent(int fetchEventID, |
| 152 WebServiceWorkerEventResult result, | 157 WebServiceWorkerEventResult result, |
| 153 double eventDispatchTime) {} | 158 double eventDispatchTime) {} |
| 154 | 159 |
| 155 // ServiceWorker specific method. Called after InstallEvent (dispatched | 160 // ServiceWorker specific method. Called after InstallEvent (dispatched |
| 156 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's | 161 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's |
| 157 // script context. | 162 // script context. |
| 158 virtual void didHandleInstallEvent(int installEventID, | 163 virtual void didHandleInstallEvent(int installEventID, |
| 159 WebServiceWorkerEventResult result, | 164 WebServiceWorkerEventResult result, |
| 160 double eventDispatchTime) {} | 165 double eventDispatchTime) {} |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // Called when the worker wants to register subscopes to handle via foreign | 276 // Called when the worker wants to register subscopes to handle via foreign |
| 272 // fetch. Will only be called while an install event is in progress. | 277 // fetch. Will only be called while an install event is in progress. |
| 273 virtual void registerForeignFetchScopes( | 278 virtual void registerForeignFetchScopes( |
| 274 const WebVector<WebURL>& subScopes, | 279 const WebVector<WebURL>& subScopes, |
| 275 const WebVector<WebSecurityOrigin>& origins) = 0; | 280 const WebVector<WebSecurityOrigin>& origins) = 0; |
| 276 }; | 281 }; |
| 277 | 282 |
| 278 } // namespace blink | 283 } // namespace blink |
| 279 | 284 |
| 280 #endif // WebServiceWorkerContextClient_h | 285 #endif // WebServiceWorkerContextClient_h |
| OLD | NEW |