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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const KURL&, | 53 const KURL&, |
54 SecurityViolationReportingPolicy) const override; | 54 SecurityViolationReportingPolicy) const override; |
55 | 55 |
56 // FetchContext implementation: | 56 // FetchContext implementation: |
57 // TODO(horo): Implement more methods. | 57 // TODO(horo): Implement more methods. |
58 std::unique_ptr<WebURLLoader> CreateURLLoader() override; | 58 std::unique_ptr<WebURLLoader> CreateURLLoader() override; |
59 void PrepareRequest(ResourceRequest&, RedirectType) override; | 59 void PrepareRequest(ResourceRequest&, RedirectType) override; |
60 bool IsControlledByServiceWorker() const override; | 60 bool IsControlledByServiceWorker() const override; |
61 RefPtr<WebTaskRunner> LoadingTaskRunner() const override; | 61 RefPtr<WebTaskRunner> LoadingTaskRunner() const override; |
62 | 62 |
| 63 void AddAdditionalRequestHeaders(ResourceRequest&, |
| 64 FetchResourceType) override; |
| 65 |
63 DECLARE_VIRTUAL_TRACE(); | 66 DECLARE_VIRTUAL_TRACE(); |
64 | 67 |
65 private: | 68 private: |
66 WorkerFetchContext(WorkerGlobalScope&, | 69 WorkerFetchContext(WorkerGlobalScope&, |
67 std::unique_ptr<WebWorkerFetchContext>); | 70 std::unique_ptr<WebWorkerFetchContext>); |
68 | 71 |
69 Member<WorkerGlobalScope> worker_global_scope_; | 72 Member<WorkerGlobalScope> worker_global_scope_; |
70 std::unique_ptr<WebWorkerFetchContext> web_context_; | 73 std::unique_ptr<WebWorkerFetchContext> web_context_; |
71 Member<ResourceFetcher> resource_fetcher_; | 74 Member<ResourceFetcher> resource_fetcher_; |
72 RefPtr<WebTaskRunner> loading_task_runner_; | 75 RefPtr<WebTaskRunner> loading_task_runner_; |
73 }; | 76 }; |
74 | 77 |
75 } // namespace blink | 78 } // namespace blink |
76 | 79 |
77 #endif // WorkerFetchContext_h | 80 #endif // WorkerFetchContext_h |
OLD | NEW |