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

Side by Side Diff: third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Issue 1851293002: Remove BLINK_ASSERT() and BLINK_ASSERT_NOT_REACHED() macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check the |callbacks| for nullptr and use explicit delete. Created 4 years, 8 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 | « third_party/WebKit/public/web/WebSpeechRecognizer.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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return nullptr; } 148 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return nullptr; }
149 149
150 // Ownership of the returned object is transferred to the caller. 150 // Ownership of the returned object is transferred to the caller.
151 // This is called on the main thread. 151 // This is called on the main thread.
152 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { return nul lptr; } 152 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { return nul lptr; }
153 153
154 // Ownership of the passed callbacks is transferred to the callee, callee 154 // Ownership of the passed callbacks is transferred to the callee, callee
155 // should delete the callbacks after calling either onSuccess or onError. 155 // should delete the callbacks after calling either onSuccess or onError.
156 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are 156 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are
157 // passed to the WebServiceWorkerClientCallbacks implementation. 157 // passed to the WebServiceWorkerClientCallbacks implementation.
158 virtual void getClient(const WebString&, WebServiceWorkerClientCallbacks* ca llbacks) { BLINK_ASSERT_NOT_REACHED(); } 158 virtual void getClient(const WebString&, WebServiceWorkerClientCallbacks*) = 0;
159 159
160 // Ownership of the passed callbacks is transferred to the callee, callee 160 // Ownership of the passed callbacks is transferred to the callee, callee
161 // should delete the callbacks after calling either onSuccess or onError. 161 // should delete the callbacks after calling either onSuccess or onError.
162 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are 162 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are
163 // passed to the WebServiceWorkerClientsCallbacks implementation. 163 // passed to the WebServiceWorkerClientsCallbacks implementation.
164 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic eWorkerClientsCallbacks* callbacks) { BLINK_ASSERT_NOT_REACHED(); } 164 virtual void getClients(const WebServiceWorkerClientQueryOptions&, WebServic eWorkerClientsCallbacks*) = 0;
165 165
166 // Ownership of the passed callbacks is transferred to the callee, callee 166 // Ownership of the passed callbacks is transferred to the callee, callee
167 // should delete the callbacks after calling either onSuccess or onError. 167 // should delete the callbacks after calling either onSuccess or onError.
168 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are 168 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are
169 // passed to the WebServiceWorkerClientsCallbacks implementation. 169 // passed to the WebServiceWorkerClientsCallbacks implementation.
170 virtual void openWindow(const WebURL& url, WebServiceWorkerClientCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 170 virtual void openWindow(const WebURL&, WebServiceWorkerClientCallbacks*) = 0 ;
171 171
172 // A suggestion to cache this metadata in association with this URL. 172 // A suggestion to cache this metadata in association with this URL.
173 virtual void setCachedMetadata(const WebURL& url, const char* data, size_t s ize) { } 173 virtual void setCachedMetadata(const WebURL& url, const char* data, size_t s ize) { }
174 174
175 // A suggestion to clear the cached metadata in association with this URL. 175 // A suggestion to clear the cached metadata in association with this URL.
176 virtual void clearCachedMetadata(const WebURL& url) { } 176 virtual void clearCachedMetadata(const WebURL& url) { }
177 177
178 // Callee receives ownership of the passed vector. 178 // Callee receives ownership of the passed vector.
179 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 179 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
180 virtual void postMessageToClient(const WebString& uuid, const WebString&, We bMessagePortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } 180 virtual void postMessageToClient(const WebString& uuid, const WebString&, We bMessagePortChannelArray*) = 0;
181 181
182 // Callee receives ownership of the passed vector. 182 // Callee receives ownership of the passed vector.
183 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 183 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
184 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC HED(); } 184 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) = 0;
185 185
186 // Ownership of the passed callbacks is transferred to the callee, callee 186 // Ownership of the passed callbacks is transferred to the callee, callee
187 // should delete the callbacks after run. 187 // should delete the callbacks after run.
188 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); } 188 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) = 0;
189 189
190 // Ownership of the passed callbacks is transferred to the callee, callee 190 // Ownership of the passed callbacks is transferred to the callee, callee
191 // should delete the callbacks after run. 191 // should delete the callbacks after run.
192 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } 192 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) = 0;
193 193
194 // Ownership of the passed callbacks is transferred to the callee, callee 194 // Ownership of the passed callbacks is transferred to the callee, callee
195 // should delete the callback after calling either onSuccess or onError. 195 // should delete the callback after calling either onSuccess or onError.
196 virtual void focus(const WebString& uuid, WebServiceWorkerClientCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 196 virtual void focus(const WebString& uuid, WebServiceWorkerClientCallbacks*) = 0;
197 197
198 // Ownership of the passed callbacks is transferred to the callee, callee 198 // Ownership of the passed callbacks is transferred to the callee, callee
199 // should delete the callbacks after calling either onSuccess or onError. 199 // should delete the callbacks after calling either onSuccess or onError.
200 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are 200 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are
201 // passed to the WebServiceWorkerClientsCallbacks implementation. 201 // passed to the WebServiceWorkerClientsCallbacks implementation.
202 virtual void navigate(const WebString& uuid, const WebURL&, WebServiceWorker ClientCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 202 virtual void navigate(const WebString& uuid, const WebURL&, WebServiceWorker ClientCallbacks*) = 0;
203 203
204 // Called when the worker wants to register subscopes to handle via foreign 204 // Called when the worker wants to register subscopes to handle via foreign
205 // fetch. Will only be called while an install event is in progress. 205 // fetch. Will only be called while an install event is in progress.
206 virtual void registerForeignFetchScopes(const WebVector<WebURL>& subScopes, const WebVector<WebSecurityOrigin>& origins) { BLINK_ASSERT_NOT_REACHED(); } 206 virtual void registerForeignFetchScopes(const WebVector<WebURL>& subScopes, const WebVector<WebSecurityOrigin>& origins) = 0;
207 }; 207 };
208 208
209 } // namespace blink 209 } // namespace blink
210 210
211 #endif // WebServiceWorkerContextClient_h 211 #endif // WebServiceWorkerContextClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebSpeechRecognizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698