Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 13 matching lines...) Expand all Loading... | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef ServiceWorkerGlobalScopeClient_h | 31 #ifndef ServiceWorkerGlobalScopeClient_h |
| 32 #define ServiceWorkerGlobalScopeClient_h | 32 #define ServiceWorkerGlobalScopeClient_h |
| 33 | 33 |
| 34 #include <memory> | |
| 34 #include "core/dom/MessagePort.h" | 35 #include "core/dom/MessagePort.h" |
| 35 #include "core/workers/WorkerClients.h" | 36 #include "core/workers/WorkerClients.h" |
| 36 #include "modules/ModulesExport.h" | 37 #include "modules/ModulesExport.h" |
| 37 #include "public/platform/WebMessagePortChannel.h" | 38 #include "public/platform/WebMessagePortChannel.h" |
| 38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h" |
| 39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" | 40 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" |
| 40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" | 41 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" |
| 41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h" | 42 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h" |
| 43 #include "public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h" | |
| 42 #include "wtf/Forward.h" | 44 #include "wtf/Forward.h" |
| 43 #include "wtf/Noncopyable.h" | 45 #include "wtf/Noncopyable.h" |
| 44 #include <memory> | |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 | 48 |
| 48 struct WebPaymentAppResponse; | 49 struct WebPaymentAppResponse; |
| 49 struct WebServiceWorkerClientQueryOptions; | 50 struct WebServiceWorkerClientQueryOptions; |
| 50 class ExecutionContext; | 51 class ExecutionContext; |
| 51 class WebServiceWorkerResponse; | 52 class WebServiceWorkerResponse; |
| 52 class WebURL; | 53 class WebURL; |
| 53 class WorkerClients; | 54 class WorkerClients; |
| 54 | 55 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 virtual void DidHandleBackgroundFetchFailEvent( | 90 virtual void DidHandleBackgroundFetchFailEvent( |
| 90 int event_id, | 91 int event_id, |
| 91 WebServiceWorkerEventResult, | 92 WebServiceWorkerEventResult, |
| 92 double event_dispatch_time) = 0; | 93 double event_dispatch_time) = 0; |
| 93 virtual void DidHandleBackgroundFetchedEvent(int event_id, | 94 virtual void DidHandleBackgroundFetchedEvent(int event_id, |
| 94 WebServiceWorkerEventResult, | 95 WebServiceWorkerEventResult, |
| 95 double event_dispatch_time) = 0; | 96 double event_dispatch_time) = 0; |
| 96 virtual void DidHandleExtendableMessageEvent(int event_id, | 97 virtual void DidHandleExtendableMessageEvent(int event_id, |
| 97 WebServiceWorkerEventResult, | 98 WebServiceWorkerEventResult, |
| 98 double event_dispatch_time) = 0; | 99 double event_dispatch_time) = 0; |
| 99 // Calling respondToFetchEvent without response means no response was | 100 // Calling RespondToFetchEvent without response means no response was |
| 100 // provided by the service worker in the fetch events, so fallback to native. | 101 // provided by the service worker in the fetch events, so fallback to native. |
| 101 virtual void RespondToFetchEvent(int fetch_event_id, | 102 virtual void RespondToFetchEvent(int fetchEventID, |
|
horo
2017/04/10 09:24:38
Keep the New Blink Style.
Please check other pla
shimazu
2017/04/11 01:32:58
Done.
| |
| 102 double event_dispatch_time) = 0; | 103 double eventDispatchTime) = 0; |
| 103 virtual void RespondToFetchEvent(int fetch_event_id, | 104 virtual void RespondToFetchEventWithResponse(int fetchEventID, |
| 104 const WebServiceWorkerResponse&, | 105 const WebServiceWorkerResponse&, |
| 105 double event_dispatch_time) = 0; | 106 double eventDispatchTime) = 0; |
| 106 virtual void RespondToPaymentRequestEvent(int event_id, | 107 virtual void RespondToFetchEventWithResponseStream( |
| 108 int fetchEventID, | |
| 109 const WebServiceWorkerResponse&, | |
| 110 WebServiceWorkerStreamHandle*, | |
| 111 double eventDispatchTime) = 0; | |
| 112 virtual void RespondToPaymentRequestEvent(int eventID, | |
| 107 const WebPaymentAppResponse&, | 113 const WebPaymentAppResponse&, |
| 108 double event_dispatch_time) = 0; | 114 double event_dispatch_time) = 0; |
| 109 virtual void DidHandleFetchEvent(int fetch_event_id, | 115 virtual void DidHandleFetchEvent(int fetch_event_id, |
| 110 WebServiceWorkerEventResult, | 116 WebServiceWorkerEventResult, |
| 111 double event_dispatch_time) = 0; | 117 double event_dispatch_time) = 0; |
| 112 virtual void DidHandleInstallEvent(int install_event_id, | 118 virtual void DidHandleInstallEvent(int install_event_id, |
| 113 WebServiceWorkerEventResult, | 119 WebServiceWorkerEventResult, |
| 114 double event_dispatch_time) = 0; | 120 double event_dispatch_time) = 0; |
| 115 virtual void DidHandleNotificationClickEvent(int event_id, | 121 virtual void DidHandleNotificationClickEvent(int event_id, |
| 116 WebServiceWorkerEventResult, | 122 WebServiceWorkerEventResult, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 ServiceWorkerGlobalScopeClient() {} | 156 ServiceWorkerGlobalScopeClient() {} |
| 151 }; | 157 }; |
| 152 | 158 |
| 153 MODULES_EXPORT void ProvideServiceWorkerGlobalScopeClientToWorker( | 159 MODULES_EXPORT void ProvideServiceWorkerGlobalScopeClientToWorker( |
| 154 WorkerClients*, | 160 WorkerClients*, |
| 155 ServiceWorkerGlobalScopeClient*); | 161 ServiceWorkerGlobalScopeClient*); |
| 156 | 162 |
| 157 } // namespace blink | 163 } // namespace blink |
| 158 | 164 |
| 159 #endif // ServiceWorkerGlobalScopeClient_h | 165 #endif // ServiceWorkerGlobalScopeClient_h |
| OLD | NEW |