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

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

Issue 868463004: ServiceWorker: add ServiceWorkerClients.claim() support (1/3). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: change error type Created 5 years, 11 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
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 16 matching lines...) Expand all
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 161
161 // Callee receives ownership of the passed vector. 162 // Callee receives ownership of the passed vector.
162 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 163 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3
163 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC HED(); } 164 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC HED(); }
164 165
165 // Ownership of the passed callbacks is transferred to the callee, callee 166 // Ownership of the passed callbacks is transferred to the callee, callee
166 // should delete the callbacks after run. 167 // should delete the callbacks after run.
167 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); } 168 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); }
168 169
169 // Ownership of the passed callbacks is transferred to the callee, callee 170 // Ownership of the passed callbacks is transferred to the callee, callee
171 // should delete the callbacks after run.
172 virtual void claim(WebServiceWorkerClientsClaimCallbacks*) { BLINK_ASSERT_NO T_REACHED(); }
173
174 // Ownership of the passed callbacks is transferred to the callee, callee
170 // should delete the callback after calling either onSuccess or onError. 175 // should delete the callback after calling either onSuccess or onError.
171 virtual void focus(int clientID, WebServiceWorkerClientFocusCallback* callba ck) 176 virtual void focus(int clientID, WebServiceWorkerClientFocusCallback* callba ck)
172 { 177 {
173 // FIXME: call BLINK_ASSERT_NOT_REACHED() when Chromium implementation 178 // FIXME: call BLINK_ASSERT_NOT_REACHED() when Chromium implementation
174 // is present. https://crbug.com/437149 179 // is present. https://crbug.com/437149
175 bool result = true; 180 bool result = true;
176 callback->onSuccess(&result); 181 callback->onSuccess(&result);
177 delete callback; 182 delete callback;
178 } 183 }
179 }; 184 };
180 185
181 } // namespace blink 186 } // namespace blink
182 187
183 #endif // WebServiceWorkerContextClient_h 188 #endif // WebServiceWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698