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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/WebWorkerFetchContext.h
diff --git a/third_party/WebKit/public/platform/WebWorkerFetchContext.h b/third_party/WebKit/public/platform/WebWorkerFetchContext.h
new file mode 100644
index 0000000000000000000000000000000000000000..87da8d726e98e3b49a4659e203c1b7f3e12824f1
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebWorkerFetchContext.h
@@ -0,0 +1,45 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebWorkerFetchContext_h
+#define WebWorkerFetchContext_h
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace blink {
+
+class WebURL;
+class WebURLLoader;
+class WebURLRequest;
+
+class WebWorkerFetchContext {
+ public:
+ virtual ~WebWorkerFetchContext() {}
+ virtual WebURLLoader* createURLLoader() = 0;
+ virtual bool IsControlledByServiceWorker() const { return false; }
+ virtual int64_t serviceWorkerID() const { return -1; }
+ virtual void willSendRequest(WebURLRequest&) {}
+ virtual void didRunContentWithCertificateErrors(const WebURL& url) {}
+ virtual void didDisplayContentWithCertificateErrors(const WebURL& url) {}
+};
+
+class WebWorkerFetchContextInfo {
+ public:
+ virtual ~WebWorkerFetchContextInfo() {}
+ virtual std::unique_ptr<WebWorkerFetchContext> CreateContext(
+ base::SingleThreadTaskRunner*) = 0;
+ virtual void setAppCacheHostID(int) {}
+ virtual void setParentFrameID(int) {}
+ virtual void setServiceWorkerProviderID(int) {}
+ virtual void setIsSecureContext(bool) {}
+ virtual void setIsControlledByServiceWorker(bool) {}
+ // only for main thread
+ virtual void willSendRequest(WebURLRequest&) {}
+};
+
+} // namespace blink
+
+#endif // WebWorkerFetchContext_h

Powered by Google App Engine
This is Rietveld 408576698