| 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 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 |
| 56 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class | 57 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // FetchEvent returns a response by the ServiceWorker's script context, and | 146 // FetchEvent returns a response by the ServiceWorker's script context, and |
| 146 // didHandleFetchEvent will be called after the end of FetchEvent's | 147 // didHandleFetchEvent will be called after the end of FetchEvent's |
| 147 // lifecycle. When no response is provided, the browser should fallback to | 148 // lifecycle. When no response is provided, the browser should fallback to |
| 148 // native fetch. EventIDs are the same with the ids passed from | 149 // native fetch. EventIDs are the same with the ids passed from |
| 149 // dispatchFetchEvent respectively. | 150 // dispatchFetchEvent respectively. |
| 150 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { | 151 virtual void respondToFetchEvent(int fetchEventID, double eventDispatchTime) { |
| 151 } | 152 } |
| 152 virtual void respondToFetchEvent(int fetchEventID, | 153 virtual void respondToFetchEvent(int fetchEventID, |
| 153 const WebServiceWorkerResponse& response, | 154 const WebServiceWorkerResponse& response, |
| 154 double eventDispatchTime) {} | 155 double eventDispatchTime) {} |
| 156 virtual void respondToPaymentRequestEvent( |
| 157 int eventId, |
| 158 const WebPaymentAppResponse& response, |
| 159 double eventDispatchTime) {} |
| 155 virtual void didHandleFetchEvent(int fetchEventID, | 160 virtual void didHandleFetchEvent(int fetchEventID, |
| 156 WebServiceWorkerEventResult result, | 161 WebServiceWorkerEventResult result, |
| 157 double eventDispatchTime) {} | 162 double eventDispatchTime) {} |
| 158 | 163 |
| 159 // ServiceWorker specific method. Called after InstallEvent (dispatched | 164 // ServiceWorker specific method. Called after InstallEvent (dispatched |
| 160 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's | 165 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's |
| 161 // script context. | 166 // script context. |
| 162 virtual void didHandleInstallEvent(int installEventID, | 167 virtual void didHandleInstallEvent(int installEventID, |
| 163 WebServiceWorkerEventResult result, | 168 WebServiceWorkerEventResult result, |
| 164 double eventDispatchTime) {} | 169 double eventDispatchTime) {} |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // Called when the worker wants to register subscopes to handle via foreign | 280 // Called when the worker wants to register subscopes to handle via foreign |
| 276 // fetch. Will only be called while an install event is in progress. | 281 // fetch. Will only be called while an install event is in progress. |
| 277 virtual void registerForeignFetchScopes( | 282 virtual void registerForeignFetchScopes( |
| 278 const WebVector<WebURL>& subScopes, | 283 const WebVector<WebURL>& subScopes, |
| 279 const WebVector<WebSecurityOrigin>& origins) = 0; | 284 const WebVector<WebSecurityOrigin>& origins) = 0; |
| 280 }; | 285 }; |
| 281 | 286 |
| 282 } // namespace blink | 287 } // namespace blink |
| 283 | 288 |
| 284 #endif // WebServiceWorkerContextClient_h | 289 #endif // WebServiceWorkerContextClient_h |
| OLD | NEW |