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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 struct WebPaymentAppResponse; | 47 struct WebPaymentAppResponse; |
48 struct WebServiceWorkerClientQueryOptions; | 48 struct WebServiceWorkerClientQueryOptions; |
49 class WebServiceWorkerContextProxy; | 49 class WebServiceWorkerContextProxy; |
50 class WebServiceWorkerNetworkProvider; | 50 class WebServiceWorkerNetworkProvider; |
51 class WebServiceWorkerProvider; | 51 class WebServiceWorkerProvider; |
52 class WebServiceWorkerResponse; | 52 class WebServiceWorkerResponse; |
53 class WebString; | 53 class WebString; |
54 class WebWorkerFetchContext; | |
54 | 55 |
55 // This interface is implemented by the client. It is supposed to be created | 56 // This interface is implemented by the client. It is supposed to be created |
56 // on the main thread and then passed on to the worker thread by a newly | 57 // on the main thread and then passed on to the worker thread by a newly |
57 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class | 58 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class |
58 // are called on the worker thread. | 59 // are called on the worker thread. |
59 class WebServiceWorkerContextClient { | 60 class WebServiceWorkerContextClient { |
60 public: | 61 public: |
61 virtual ~WebServiceWorkerContextClient() {} | 62 virtual ~WebServiceWorkerContextClient() {} |
62 | 63 |
63 // ServiceWorker specific method. Called when script accesses the | 64 // ServiceWorker specific method. Called when script accesses the |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 WebServiceWorkerEventResult result, | 226 WebServiceWorkerEventResult result, |
226 double event_dispatch_time) {} | 227 double event_dispatch_time) {} |
227 | 228 |
228 // Ownership of the returned object is transferred to the caller. | 229 // Ownership of the returned object is transferred to the caller. |
229 // This is called on the main thread. | 230 // This is called on the main thread. |
230 virtual WebServiceWorkerNetworkProvider* | 231 virtual WebServiceWorkerNetworkProvider* |
231 CreateServiceWorkerNetworkProvider() { | 232 CreateServiceWorkerNetworkProvider() { |
232 return nullptr; | 233 return nullptr; |
233 } | 234 } |
234 | 235 |
236 virtual blink::WebWorkerFetchContext* CreateServiceWorkerFetchContext() { | |
kinuko
2017/04/18 08:35:37
nit: please add a method comment here too
horo
2017/04/18 12:53:35
Done.
| |
237 return nullptr; | |
238 } | |
239 | |
235 // Ownership of the returned object is transferred to the caller. | 240 // Ownership of the returned object is transferred to the caller. |
236 // This is called on the main thread. | 241 // This is called on the main thread. |
237 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() { | 242 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() { |
238 return nullptr; | 243 return nullptr; |
239 } | 244 } |
240 | 245 |
241 // Ownership of the passed callbacks is transferred to the callee, callee | 246 // Ownership of the passed callbacks is transferred to the callee, callee |
242 // should delete the callbacks after calling either onSuccess or onError. | 247 // should delete the callbacks after calling either onSuccess or onError. |
243 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are | 248 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are |
244 // passed to the WebServiceWorkerClientCallbacks implementation. | 249 // passed to the WebServiceWorkerClientCallbacks implementation. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
300 // Called when the worker wants to register subscopes to handle via foreign | 305 // Called when the worker wants to register subscopes to handle via foreign |
301 // fetch. Will only be called while an install event is in progress. | 306 // fetch. Will only be called while an install event is in progress. |
302 virtual void RegisterForeignFetchScopes( | 307 virtual void RegisterForeignFetchScopes( |
303 const WebVector<WebURL>& sub_scopes, | 308 const WebVector<WebURL>& sub_scopes, |
304 const WebVector<WebSecurityOrigin>& origins) = 0; | 309 const WebVector<WebSecurityOrigin>& origins) = 0; |
305 }; | 310 }; |
306 | 311 |
307 } // namespace blink | 312 } // namespace blink |
308 | 313 |
309 #endif // WebServiceWorkerContextClient_h | 314 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |