| 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
|
|
|