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

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

Issue 2816403002: test all
Patch Set: fix sharedworker 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
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 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
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 // Creates a WebWorkerFetchContext for a service worker. Ownership of the
237 // returned object is transferred to the caller. This is called on the main
238 // thread. This is used only when off-main-thread-fetch is enabled.
239 virtual blink::WebWorkerFetchContext* CreateServiceWorkerFetchContext() {
240 return nullptr;
241 }
242
235 // Ownership of the returned object is transferred to the caller. 243 // Ownership of the returned object is transferred to the caller.
236 // This is called on the main thread. 244 // This is called on the main thread.
237 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() { 245 virtual WebServiceWorkerProvider* CreateServiceWorkerProvider() {
238 return nullptr; 246 return nullptr;
239 } 247 }
240 248
241 // Ownership of the passed callbacks is transferred to the callee, callee 249 // Ownership of the passed callbacks is transferred to the callee, callee
242 // should delete the callbacks after calling either onSuccess or onError. 250 // should delete the callbacks after calling either onSuccess or onError.
243 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are 251 // WebServiceWorkerClientInfo and WebServiceWorkerError ownerships are
244 // passed to the WebServiceWorkerClientCallbacks implementation. 252 // 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 308 // 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. 309 // fetch. Will only be called while an install event is in progress.
302 virtual void RegisterForeignFetchScopes( 310 virtual void RegisterForeignFetchScopes(
303 const WebVector<WebURL>& sub_scopes, 311 const WebVector<WebURL>& sub_scopes,
304 const WebVector<WebSecurityOrigin>& origins) = 0; 312 const WebVector<WebSecurityOrigin>& origins) = 0;
305 }; 313 };
306 314
307 } // namespace blink 315 } // namespace blink
308 316
309 #endif // WebServiceWorkerContextClient_h 317 #endif // WebServiceWorkerContextClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebSharedWorkerClient.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698