| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WorkerFetchContext_h | 5 #ifndef WorkerFetchContext_h |
| 6 #define WorkerFetchContext_h | 6 #define WorkerFetchContext_h |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/loader/BaseFetchContext.h" | 10 #include "core/loader/BaseFetchContext.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 Settings* GetSettings() const override; | 40 Settings* GetSettings() const override; |
| 41 SubresourceFilter* GetSubresourceFilter() const override; | 41 SubresourceFilter* GetSubresourceFilter() const override; |
| 42 SecurityContext* GetParentSecurityContext() const override; | 42 SecurityContext* GetParentSecurityContext() const override; |
| 43 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override; | 43 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override; |
| 44 void DispatchDidBlockRequest(const ResourceRequest&, | 44 void DispatchDidBlockRequest(const ResourceRequest&, |
| 45 const FetchInitiatorInfo&, | 45 const FetchInitiatorInfo&, |
| 46 ResourceRequestBlockedReason) const override; | 46 ResourceRequestBlockedReason) const override; |
| 47 void ReportLocalLoadFailed(const KURL&) const override; | 47 void ReportLocalLoadFailed(const KURL&) const override; |
| 48 bool ShouldBypassMainWorldCSP() const override; | 48 bool ShouldBypassMainWorldCSP() const override; |
| 49 bool IsSVGImageChromeClient() const override; | 49 bool IsSVGImageChromeClient() const override; |
| 50 // TODO(lunalu): Deprecate UseCounter::Feature by WebFeature in |
| 51 // CountDeprecation() and CountUsage(). |
| 50 void CountUsage(UseCounter::Feature) const override; | 52 void CountUsage(UseCounter::Feature) const override; |
| 53 void CountUsage(WebFeature feature) const override { |
| 54 return CountUsage(static_cast<UseCounter::Feature>(feature)); |
| 55 } |
| 51 void CountDeprecation(UseCounter::Feature) const override; | 56 void CountDeprecation(UseCounter::Feature) const override; |
| 57 void CountDeprecation(WebFeature feature) const override { |
| 58 return CountDeprecation(static_cast<UseCounter::Feature>(feature)); |
| 59 } |
| 52 bool ShouldBlockFetchByMixedContentCheck( | 60 bool ShouldBlockFetchByMixedContentCheck( |
| 53 const ResourceRequest&, | 61 const ResourceRequest&, |
| 54 const KURL&, | 62 const KURL&, |
| 55 SecurityViolationReportingPolicy) const override; | 63 SecurityViolationReportingPolicy) const override; |
| 56 | 64 |
| 57 // FetchContext implementation: | 65 // FetchContext implementation: |
| 58 // TODO(horo): Implement more methods. | 66 // TODO(horo): Implement more methods. |
| 59 std::unique_ptr<WebURLLoader> CreateURLLoader() override; | 67 std::unique_ptr<WebURLLoader> CreateURLLoader() override; |
| 60 void PrepareRequest(ResourceRequest&, RedirectType) override; | 68 void PrepareRequest(ResourceRequest&, RedirectType) override; |
| 61 bool IsControlledByServiceWorker() const override; | 69 bool IsControlledByServiceWorker() const override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 81 | 89 |
| 82 Member<WorkerGlobalScope> worker_global_scope_; | 90 Member<WorkerGlobalScope> worker_global_scope_; |
| 83 std::unique_ptr<WebWorkerFetchContext> web_context_; | 91 std::unique_ptr<WebWorkerFetchContext> web_context_; |
| 84 Member<ResourceFetcher> resource_fetcher_; | 92 Member<ResourceFetcher> resource_fetcher_; |
| 85 RefPtr<WebTaskRunner> loading_task_runner_; | 93 RefPtr<WebTaskRunner> loading_task_runner_; |
| 86 }; | 94 }; |
| 87 | 95 |
| 88 } // namespace blink | 96 } // namespace blink |
| 89 | 97 |
| 90 #endif // WorkerFetchContext_h | 98 #endif // WorkerFetchContext_h |
| OLD | NEW |