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 16 matching lines...) Expand all Loading... |
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 WebServiceWorkerContextClient_h | 31 #ifndef WebServiceWorkerContextClient_h |
32 #define WebServiceWorkerContextClient_h | 32 #define WebServiceWorkerContextClient_h |
33 | 33 |
34 #include "WebWorkerPermissionClientProxy.h" | 34 #include "WebWorkerPermissionClientProxy.h" |
35 #include "public/platform/WebMessagePortChannel.h" | 35 #include "public/platform/WebMessagePortChannel.h" |
36 #include "public/platform/WebServiceWorkerClientFocusCallback.h" | 36 #include "public/platform/WebServiceWorkerClientFocusCallback.h" |
| 37 #include "public/platform/WebServiceWorkerClientsClaimCallbacks.h" |
37 #include "public/platform/WebServiceWorkerClientsInfo.h" | 38 #include "public/platform/WebServiceWorkerClientsInfo.h" |
38 #include "public/platform/WebServiceWorkerEventResult.h" | 39 #include "public/platform/WebServiceWorkerEventResult.h" |
39 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" | 40 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" |
40 #include "public/platform/WebURL.h" | 41 #include "public/platform/WebURL.h" |
41 | 42 |
42 namespace blink { | 43 namespace blink { |
43 | 44 |
44 struct WebCrossOriginServiceWorkerClient; | 45 struct WebCrossOriginServiceWorkerClient; |
45 class WebDataSource; | 46 class WebDataSource; |
46 class WebServiceWorkerCacheStorage; | 47 class WebServiceWorkerCacheStorage; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 160 |
160 // Callee receives ownership of the passed vector. | 161 // Callee receives ownership of the passed vector. |
161 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175
3 | 162 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175
3 |
162 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke
rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC
HED(); } | 163 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke
rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC
HED(); } |
163 | 164 |
164 // Ownership of the passed callbacks is transferred to the callee, callee | 165 // Ownership of the passed callbacks is transferred to the callee, callee |
165 // should delete the callbacks after run. | 166 // should delete the callbacks after run. |
166 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE
RT_NOT_REACHED(); } | 167 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE
RT_NOT_REACHED(); } |
167 | 168 |
168 // Ownership of the passed callbacks is transferred to the callee, callee | 169 // Ownership of the passed callbacks is transferred to the callee, callee |
| 170 // should delete the callbacks after run. |
| 171 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } |
| 172 |
| 173 // Ownership of the passed callbacks is transferred to the callee, callee |
169 // should delete the callback after calling either onSuccess or onError. | 174 // should delete the callback after calling either onSuccess or onError. |
170 virtual void focus(int clientID, WebServiceWorkerClientFocusCallback* callba
ck) | 175 virtual void focus(int clientID, WebServiceWorkerClientFocusCallback* callba
ck) |
171 { | 176 { |
172 // FIXME: call BLINK_ASSERT_NOT_REACHED() when Chromium implementation | 177 // FIXME: call BLINK_ASSERT_NOT_REACHED() when Chromium implementation |
173 // is present. https://crbug.com/437149 | 178 // is present. https://crbug.com/437149 |
174 bool result = true; | 179 bool result = true; |
175 callback->onSuccess(&result); | 180 callback->onSuccess(&result); |
176 delete callback; | 181 delete callback; |
177 } | 182 } |
178 }; | 183 }; |
179 | 184 |
180 } // namespace blink | 185 } // namespace blink |
181 | 186 |
182 #endif // WebServiceWorkerContextClient_h | 187 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |