| Index: third_party/WebKit/Source/core/loader/WorkerFetchContext.h
|
| diff --git a/third_party/WebKit/Source/core/loader/WorkerFetchContext.h b/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
|
| index 4a9870669dd5d2d3f19c0519ebd7e701ab7f4fcb..4797358753b5c5595ab817aa9ef102409837e7e9 100644
|
| --- a/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
|
| +++ b/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
|
| @@ -7,15 +7,17 @@
|
|
|
| #include <memory>
|
| #include "core/CoreExport.h"
|
| -#include "platform/loader/fetch/FetchContext.h"
|
| +#include "core/loader/BaseFetchContext.h"
|
| #include "platform/wtf/Forward.h"
|
|
|
| namespace blink {
|
|
|
| -class WorkerClients;
|
| +class ResourceFetcher;
|
| +class WebTaskRunner;
|
| class WebURLLoader;
|
| class WebWorkerFetchContext;
|
| class WorkerGlobalScope;
|
| +class WorkerClients;
|
|
|
| CORE_EXPORT void ProvideWorkerFetchContextToWorker(
|
| WorkerClients*,
|
| @@ -25,21 +27,49 @@ CORE_EXPORT void ProvideWorkerFetchContextToWorker(
|
| // service workers). This class is used only when off-main-thread-fetch is
|
| // enabled, and is still under development.
|
| // TODO(horo): Implement all methods of FetchContext. crbug.com/443374
|
| -class WorkerFetchContext final : public FetchContext {
|
| +class WorkerFetchContext final : public BaseFetchContext {
|
| public:
|
| static WorkerFetchContext* Create(WorkerGlobalScope&);
|
| virtual ~WorkerFetchContext();
|
|
|
| + ResourceFetcher* GetResourceFetcher();
|
| +
|
| + // BaseFetchContext implementation:
|
| + ContentSettingsClient* GetContentSettingsClient() const override;
|
| + Settings* GetSettings() const override;
|
| + SubresourceFilter* GetSubresourceFilter() const override;
|
| + SecurityContext* GetParentSecurityContext() const override;
|
| + bool ShouldBlockRequestByInspector(const ResourceRequest&) const override;
|
| + void DispatchDidBlockRequest(const ResourceRequest&,
|
| + const FetchInitiatorInfo&,
|
| + ResourceRequestBlockedReason) const override;
|
| + void ReportLocalLoadFailed(const KURL&) const override;
|
| + bool ShouldBypassMainWorldCSP() const override;
|
| + bool IsSVGImageChromeClient() const override;
|
| + void CountUsage(UseCounter::Feature) const override;
|
| + void CountDeprecation(UseCounter::Feature) const override;
|
| + bool ShouldBlockFetchByMixedContentCheck(
|
| + const ResourceRequest&,
|
| + const KURL&,
|
| + SecurityViolationReportingPolicy) const override;
|
| +
|
| // FetchContext implementation:
|
| // TODO(horo): Implement more methods.
|
| std::unique_ptr<WebURLLoader> CreateURLLoader() override;
|
| void PrepareRequest(ResourceRequest&, RedirectType) override;
|
| bool IsControlledByServiceWorker() const override;
|
| + RefPtr<WebTaskRunner> LoadingTaskRunner() const override;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
| - explicit WorkerFetchContext(std::unique_ptr<WebWorkerFetchContext>);
|
| + WorkerFetchContext(WorkerGlobalScope&,
|
| + std::unique_ptr<WebWorkerFetchContext>);
|
|
|
| + Member<WorkerGlobalScope> worker_global_scope_;
|
| std::unique_ptr<WebWorkerFetchContext> web_context_;
|
| + Member<ResourceFetcher> resource_fetcher_;
|
| + RefPtr<WebTaskRunner> loading_task_runner_;
|
| };
|
|
|
| } // namespace blink
|
|
|