Chromium Code Reviews| 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..fe002e94cb855a5299fa0d65be7ca0c365223b52 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; |
| + Settings* GetSettings() const; |
| + SubresourceFilter* GetSubresourceFilter() const; |
| + SecurityContext* GetParentSecurityContext() const; |
| + bool ShouldBlockRequestByInspector(const ResourceRequest&) const; |
| + void DispatchDidBlockRequest(const ResourceRequest&, |
| + const FetchInitiatorInfo&, |
| + ResourceRequestBlockedReason) const; |
| + void ReportLocalLoadFailed(const KURL&) const; |
| + bool ShouldBypassMainWorldCSP() const; |
| + bool IsSVGImageChromeClient() const; |
| + void CountUsage(UseCounter::Feature) const; |
| + void CountDeprecation(UseCounter::Feature) const; |
| + bool ShouldBlockFetchByMixedContentCheck( |
| + const ResourceRequest&, |
| + const KURL&, |
| + SecurityViolationReportingPolicy) const; |
| + |
| // 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>); |
| + explicit WorkerFetchContext(WorkerGlobalScope&, |
|
kinuko
2017/05/12 08:41:45
no need of explicit
horo
2017/05/12 09:06:02
Done.
|
| + 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 |