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

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

Issue 779133003: [WORK IN PROGRESS] ServiceWorkerClients.openWindow() [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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 | Annotate | Revision Log
« no previous file with comments | « public/platform/WebServiceWorkerOpenWindowCallbacks.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 18 matching lines...) Expand all
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/WebServiceWorkerClientsInfo.h" 37 #include "public/platform/WebServiceWorkerClientsInfo.h"
38 #include "public/platform/WebServiceWorkerEventResult.h" 38 #include "public/platform/WebServiceWorkerEventResult.h"
39 #include "public/platform/WebServiceWorkerOpenWindowCallbacks.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;
47 class WebServiceWorkerContextProxy; 48 class WebServiceWorkerContextProxy;
48 class WebServiceWorkerNetworkProvider; 49 class WebServiceWorkerNetworkProvider;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return 0; } 150 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( WebDataSource*) { return 0; }
150 151
151 // Ownership of the passed callbacks is transferred to the callee, callee 152 // Ownership of the passed callbacks is transferred to the callee, callee
152 // should delete the callbacks after calling either onSuccess or onError. 153 // should delete the callbacks after calling either onSuccess or onError.
153 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are 154 // WebServiceWorkerClientsInfo and WebServiceWorkerError ownerships are
154 // passed to the WebServiceWorkerClientsCallbacks implementation. 155 // passed to the WebServiceWorkerClientsCallbacks implementation.
155 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } 156 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); }
156 157
158 // Ownership of the passed callbacks is transferred to the callee, callee
159 // should delete the callbacks after run.
160 virtual void openWindow(const WebURL& url, WebServiceWorkerOpenWindowCallbac ks*) { BLINK_ASSERT_NOT_REACHED(); }
161
157 // Callee receives ownership of the passed vector. 162 // Callee receives ownership of the passed vector.
158 // 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
159 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } 164 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }
160 165
161 // Callee receives ownership of the passed vector. 166 // Callee receives ownership of the passed vector.
162 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 167 // 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(); } 168 virtual void postMessageToCrossOriginClient(const WebCrossOriginServiceWorke rClient&, const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REAC HED(); }
164 169
165 // Ownership of the passed callbacks is transferred to the callee, callee 170 // Ownership of the passed callbacks is transferred to the callee, callee
166 // should delete the callbacks after run. 171 // should delete the callbacks after run.
167 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); } 172 virtual void skipWaiting(WebServiceWorkerSkipWaitingCallbacks*) { BLINK_ASSE RT_NOT_REACHED(); }
168 173
169 // Ownership of the passed callbacks is transferred to the callee, callee 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
« no previous file with comments | « public/platform/WebServiceWorkerOpenWindowCallbacks.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698