Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: public/web/WebServiceWorkerContextClient.h

Issue 990583002: Use UUID for ServiceWorker Client identifier (1/3, blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « public/platform/WebServiceWorkerClientsInfo.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 virtual void didHandleCrossOriginConnectEvent(int connectEventID, bool accep tConnect) { } 147 virtual void didHandleCrossOriginConnectEvent(int connectEventID, bool accep tConnect) { }
148 148
149 // Ownership of the returned object is transferred to the caller. 149 // Ownership of the returned object is transferred to the caller.
150 // This is called on the main thread. 150 // This is called on the main thread.
151 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return nullptr; } 151 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return nullptr; }
152 152
153 // Ownership of the returned object is transferred to the caller. 153 // Ownership of the returned object is transferred to the caller.
154 // This is called on the main thread. 154 // This is called on the main thread.
155 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { return nul lptr; } 155 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { return nul lptr; }
156 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
161 // Ownership of the passed callbacks is transferred to the callee, callee 157 // Ownership of the passed callbacks is transferred to the callee, callee
162 // should delete the callbacks after calling either onSuccess or onError. 158 // should delete the callbacks after calling either onSuccess or onError.
163 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are 159 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are
164 // passed to the WebServiceWorkerClientsCallbacks implementation. 160 // passed to the WebServiceWorkerClientsCallbacks implementation.
165 // FIXME: Remove the default implementation once this is implemented 161 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic eWorkerClientsCallbacks* callbacks) { BLINK_ASSERT_NOT_REACHED(); }
166 // in the embedder.
167 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic eWorkerClientsCallbacks* callbacks) { getClients(callbacks); }
168 162
169 // Ownership of the passed callbacks is transferred to the callee, callee 163 // Ownership of the passed callbacks is transferred to the callee, callee
170 // should delete the callbacks after calling either onSuccess or onError. 164 // should delete the callbacks after calling either onSuccess or onError.
171 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are 165 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are
172 // passed to the WebServiceWorkerClientsCallbacks implementation. 166 // passed to the WebServiceWorkerClientsCallbacks implementation.
173 virtual void openWindow(const WebURL& url, WebServiceWorkerClientCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 167 virtual void openWindow(const WebURL& url, WebServiceWorkerClientCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
174 168
175 // A suggestion to cache this metadata in association with this URL. 169 // A suggestion to cache this metadata in association with this URL.
176 virtual void setCachedMetadata(const WebURL& url, const char* data, size_t s ize) { } 170 virtual void setCachedMetadata(const WebURL& url, const char* data, size_t s ize) { }
177 171
178 // A suggestion to clear the cached metadata in association with this URL. 172 // A suggestion to clear the cached metadata in association with this URL.
179 virtual void clearCachedMetadata(const WebURL& url) { } 173 virtual void clearCachedMetadata(const WebURL& url) { }
180 174
181 // Callee receives ownership of the passed vector. 175 // Callee receives ownership of the passed vector.
182 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 176 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
177 // FIXME: Deprecate the one that takes integer clientID once we switch to uu id.
183 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } 178 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }
179 virtual void postMessageToClient(const WebString& uuid, const WebString&, We bMessagePortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }
184 180
185 // Callee receives ownership of the passed vector. 181 // Callee receives ownership of the passed vector.
186 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 182 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
187 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC HED(); } 183 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC HED(); }
188 184
189 // Ownership of the passed callbacks is transferred to the callee, callee 185 // Ownership of the passed callbacks is transferred to the callee, callee
190 // should delete the callbacks after run. 186 // should delete the callbacks after run.
191 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); } 187 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); }
192 188
193 // Ownership of the passed callbacks is transferred to the callee, callee 189 // Ownership of the passed callbacks is transferred to the callee, callee
194 // should delete the callbacks after run. 190 // should delete the callbacks after run.
195 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } 191 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO T_REACHED(); }
196 192
197 // Ownership of the passed callbacks is transferred to the callee, callee 193 // Ownership of the passed callbacks is transferred to the callee, callee
198 // should delete the callback after calling either onSuccess or onError. 194 // should delete the callback after calling either onSuccess or onError.
195 // FIXME: Deprecate the one that takes integer clientID once we switch to uu id.
199 virtual void focus(int cliendID, WebServiceWorkerClientCallbacks*) { BLINK_A SSERT_NOT_REACHED(); } 196 virtual void focus(int cliendID, WebServiceWorkerClientCallbacks*) { BLINK_A SSERT_NOT_REACHED(); }
197 virtual void focus(const WebString& uuid, WebServiceWorkerClientCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
200 }; 198 };
201 199
202 } // namespace blink 200 } // namespace blink
203 201
204 #endif // WebServiceWorkerContextClient_h 202 #endif // WebServiceWorkerContextClient_h
OLDNEW
« no previous file with comments | « public/platform/WebServiceWorkerClientsInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698