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

Side by Side Diff: third_party/WebKit/public/platform/WebWorkerFetchContext.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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WebWorkerFetchContext_h
6 #define WebWorkerFetchContext_h
7
8 namespace base {
9 class SingleThreadTaskRunner;
10 } // namespace base
11
12 namespace blink {
13
14 class WebURL;
15 class WebURLLoader;
16 class WebURLRequest;
17
18 class WebWorkerFetchContext {
19 public:
20 virtual ~WebWorkerFetchContext() {}
21 virtual WebURLLoader* createURLLoader() = 0;
22 virtual bool IsControlledByServiceWorker() const { return false; }
23 virtual int64_t serviceWorkerID() const { return -1; }
24 virtual void willSendRequest(WebURLRequest&) {}
25 virtual void didRunContentWithCertificateErrors(const WebURL& url) {}
26 virtual void didDisplayContentWithCertificateErrors(const WebURL& url) {}
27 };
28
29 class WebWorkerFetchContextInfo {
30 public:
31 virtual ~WebWorkerFetchContextInfo() {}
32 virtual std::unique_ptr<WebWorkerFetchContext> CreateContext(
33 base::SingleThreadTaskRunner*) = 0;
34 virtual void setAppCacheHostID(int) {}
35 virtual void setParentFrameID(int) {}
36 virtual void setServiceWorkerProviderID(int) {}
37 virtual void setIsSecureContext(bool) {}
38 virtual void setIsControlledByServiceWorker(bool) {}
39 // only for main thread
40 virtual void willSendRequest(WebURLRequest&) {}
41 };
42
43 } // namespace blink
44
45 #endif // WebWorkerFetchContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698