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 20 matching lines...) Expand all Loading... |
31 #ifndef ServiceWorkerGlobalScopeClient_h | 31 #ifndef ServiceWorkerGlobalScopeClient_h |
32 #define ServiceWorkerGlobalScopeClient_h | 32 #define ServiceWorkerGlobalScopeClient_h |
33 | 33 |
34 #include "core/dom/MessagePort.h" | 34 #include "core/dom/MessagePort.h" |
35 #include "core/workers/WorkerClients.h" | 35 #include "core/workers/WorkerClients.h" |
36 #include "modules/ModulesExport.h" | 36 #include "modules/ModulesExport.h" |
37 #include "public/platform/WebMessagePortChannel.h" | 37 #include "public/platform/WebMessagePortChannel.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/WebServiceWorkerPreloadResponseC
allbacks.h" |
41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" | 42 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb
acks.h" |
42 #include "wtf/Forward.h" | 43 #include "wtf/Forward.h" |
43 #include "wtf/Noncopyable.h" | 44 #include "wtf/Noncopyable.h" |
44 #include <memory> | 45 #include <memory> |
45 | 46 |
46 namespace blink { | 47 namespace blink { |
47 | 48 |
48 struct WebCrossOriginServiceWorkerClient; | 49 struct WebCrossOriginServiceWorkerClient; |
49 struct WebServiceWorkerClientQueryOptions; | 50 struct WebServiceWorkerClientQueryOptions; |
50 class ExecutionContext; | 51 class ExecutionContext; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) = 0; | 118 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) = 0; |
118 virtual void focus(const WebString& clientUUID, | 119 virtual void focus(const WebString& clientUUID, |
119 WebServiceWorkerClientCallbacks*) = 0; | 120 WebServiceWorkerClientCallbacks*) = 0; |
120 virtual void navigate(const WebString& clientUUID, | 121 virtual void navigate(const WebString& clientUUID, |
121 const WebURL&, | 122 const WebURL&, |
122 WebServiceWorkerClientCallbacks*) = 0; | 123 WebServiceWorkerClientCallbacks*) = 0; |
123 virtual void registerForeignFetchScopes( | 124 virtual void registerForeignFetchScopes( |
124 const WebVector<WebURL>& subScopes, | 125 const WebVector<WebURL>& subScopes, |
125 const WebVector<WebSecurityOrigin>&) = 0; | 126 const WebVector<WebSecurityOrigin>&) = 0; |
126 | 127 |
| 128 // Registers the callback used to settle the FetchEvent.navigationPreload |
| 129 // promise. |
| 130 virtual void registerPreloadResponseCallback( |
| 131 int eventID, |
| 132 std::unique_ptr<WebServiceWorkerPreloadResponseCallbacks>) = 0; |
| 133 |
127 static const char* supplementName(); | 134 static const char* supplementName(); |
128 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); | 135 static ServiceWorkerGlobalScopeClient* from(ExecutionContext*); |
129 | 136 |
130 protected: | 137 protected: |
131 ServiceWorkerGlobalScopeClient() {} | 138 ServiceWorkerGlobalScopeClient() {} |
132 }; | 139 }; |
133 | 140 |
134 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker( | 141 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker( |
135 WorkerClients*, | 142 WorkerClients*, |
136 ServiceWorkerGlobalScopeClient*); | 143 ServiceWorkerGlobalScopeClient*); |
137 | 144 |
138 } // namespace blink | 145 } // namespace blink |
139 | 146 |
140 #endif // ServiceWorkerGlobalScopeClient_h | 147 #endif // ServiceWorkerGlobalScopeClient_h |
OLD | NEW |