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

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

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 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/WebFrameClient.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 WebWorkerFetchContextInfo;
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
225 WebServiceWorkerEventResult result, 226 WebServiceWorkerEventResult result,
226 double eventDispatchTime) {} 227 double eventDispatchTime) {}
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::WebWorkerFetchContextInfo*
237 createServiceWorkerFetchContextInfo() {
238 return nullptr;
239 }
240
235 // Ownership of the returned object is transferred to the caller. 241 // Ownership of the returned object is transferred to the caller.
236 // This is called on the main thread. 242 // This is called on the main thread.
237 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { 243 virtual WebServiceWorkerProvider* createServiceWorkerProvider() {
238 return nullptr; 244 return nullptr;
239 } 245 }
240 246
241 // Ownership of the passed callbacks is transferred to the callee, callee 247 // Ownership of the passed callbacks is transferred to the callee, callee
242 // should delete the callbacks after calling either onSuccess or onError. 248 // should delete the callbacks after calling either onSuccess or onError.
243 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are 249 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are
244 // passed to the WebServiceWorkerClientCallbacks implementation. 250 // passed to the WebServiceWorkerClientCallbacks implementation.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Called when the worker wants to register subscopes to handle via foreign 306 // 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. 307 // fetch. Will only be called while an install event is in progress.
302 virtual void registerForeignFetchScopes( 308 virtual void registerForeignFetchScopes(
303 const WebVector<WebURL>& subScopes, 309 const WebVector<WebURL>& subScopes,
304 const WebVector<WebSecurityOrigin>& origins) = 0; 310 const WebVector<WebSecurityOrigin>& origins) = 0;
305 }; 311 };
306 312
307 } // namespace blink 313 } // namespace blink
308 314
309 #endif // WebServiceWorkerContextClient_h 315 #endif // WebServiceWorkerContextClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFrameClient.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698