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 24 matching lines...) Expand all Loading... |
35 #include "public/platform/WebMessagePortChannel.h" | 35 #include "public/platform/WebMessagePortChannel.h" |
36 #include "public/platform/WebServiceWorkerClientsClaimCallbacks.h" | 36 #include "public/platform/WebServiceWorkerClientsClaimCallbacks.h" |
37 #include "public/platform/WebServiceWorkerClientsInfo.h" | 37 #include "public/platform/WebServiceWorkerClientsInfo.h" |
38 #include "public/platform/WebServiceWorkerEventResult.h" | 38 #include "public/platform/WebServiceWorkerEventResult.h" |
39 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" | 39 #include "public/platform/WebServiceWorkerSkipWaitingCallbacks.h" |
40 #include "public/platform/WebURL.h" | 40 #include "public/platform/WebURL.h" |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 struct WebCrossOriginServiceWorkerClient; | 44 struct WebCrossOriginServiceWorkerClient; |
| 45 struct WebServiceWorkerClientQueryOptions; |
45 class WebDataSource; | 46 class WebDataSource; |
46 class WebServiceWorkerCacheStorage; | 47 class WebServiceWorkerCacheStorage; |
47 class WebServiceWorkerContextProxy; | 48 class WebServiceWorkerContextProxy; |
48 class WebServiceWorkerNetworkProvider; | 49 class WebServiceWorkerNetworkProvider; |
49 class WebServiceWorkerProvider; | 50 class WebServiceWorkerProvider; |
50 class WebServiceWorkerResponse; | 51 class WebServiceWorkerResponse; |
51 class WebString; | 52 class WebString; |
52 | 53 |
53 // This interface is implemented by the client. It is supposed to be created | 54 // This interface is implemented by the client. It is supposed to be created |
54 // on the main thread and then passed on to the worker thread by a newly | 55 // on the main thread and then passed on to the worker thread by a newly |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 virtual void didHandleCrossOriginConnectEvent(int connectEventID, bool accep
tConnect) { } | 147 virtual void didHandleCrossOriginConnectEvent(int connectEventID, bool accep
tConnect) { } |
147 | 148 |
148 // Ownership of the returned object is transferred to the caller. | 149 // Ownership of the returned object is transferred to the caller. |
149 // This is called on the main thread. | 150 // This is called on the main thread. |
150 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(
WebDataSource*) { return nullptr; } | 151 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(
WebDataSource*) { return nullptr; } |
151 | 152 |
152 // Ownership of the returned object is transferred to the caller. | 153 // Ownership of the returned object is transferred to the caller. |
153 // This is called on the main thread. | 154 // This is called on the main thread. |
154 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { return nul
lptr; } | 155 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { return nul
lptr; } |
155 | 156 |
| 157 // FIXME: Deprecate this version once the other getClients is implemented |
| 158 // in the embedder. |
| 159 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } |
| 160 |
156 // Ownership of the passed callbacks is transferred to the callee, callee | 161 // Ownership of the passed callbacks is transferred to the callee, callee |
157 // should delete the callbacks after calling either onSuccess or onError. | 162 // should delete the callbacks after calling either onSuccess or onError. |
158 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are | 163 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are |
159 // passed to the WebServiceWorkerClientsCallbacks implementation. | 164 // passed to the WebServiceWorkerClientsCallbacks implementation. |
160 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } | 165 // FIXME: Remove the default implementation once this is implemented |
| 166 // in the embedder. |
| 167 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic
eWorkerClientsCallbacks* callbacks) { getClients(callbacks); } |
161 | 168 |
162 // Ownership of the passed callbacks is transferred to the callee, callee | 169 // Ownership of the passed callbacks is transferred to the callee, callee |
163 // should delete the callbacks after calling either onSuccess or onError. | 170 // should delete the callbacks after calling either onSuccess or onError. |
164 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are | 171 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are |
165 // passed to the WebServiceWorkerClientsCallbacks implementation. | 172 // passed to the WebServiceWorkerClientsCallbacks implementation. |
166 virtual void openWindow(const WebURL& url, WebServiceWorkerClientCallbacks*)
{ BLINK_ASSERT_NOT_REACHED(); } | 173 virtual void openWindow(const WebURL& url, WebServiceWorkerClientCallbacks*)
{ BLINK_ASSERT_NOT_REACHED(); } |
167 | 174 |
168 // A suggestion to cache this metadata in association with this URL. | 175 // A suggestion to cache this metadata in association with this URL. |
169 virtual void setCachedMetadata(const WebURL& url, const char* data, size_t s
ize) { } | 176 virtual void setCachedMetadata(const WebURL& url, const char* data, size_t s
ize) { } |
170 | 177 |
(...skipping 17 matching lines...) Expand all Loading... |
188 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } | 195 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } |
189 | 196 |
190 // Ownership of the passed callbacks is transferred to the callee, callee | 197 // Ownership of the passed callbacks is transferred to the callee, callee |
191 // should delete the callback after calling either onSuccess or onError. | 198 // should delete the callback after calling either onSuccess or onError. |
192 virtual void focus(int cliendID, WebServiceWorkerClientCallbacks*) { BLINK_A
SSERT_NOT_REACHED(); } | 199 virtual void focus(int cliendID, WebServiceWorkerClientCallbacks*) { BLINK_A
SSERT_NOT_REACHED(); } |
193 }; | 200 }; |
194 | 201 |
195 } // namespace blink | 202 } // namespace blink |
196 | 203 |
197 #endif // WebServiceWorkerContextClient_h | 204 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |