Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WorkerFetchContext_h | |
| 6 #define WorkerFetchContext_h | |
| 7 | |
| 8 #include <memory> | |
| 9 #include "core/CoreExport.h" | |
| 10 #include "core/workers/WorkerClients.h" | |
| 11 #include "platform/loader/fetch/FetchContext.h" | |
| 12 #include "wtf/Forward.h" | |
|
nhiroki
2017/04/14 04:09:24
wtf/Forward.h is deprecated. Can you replace this
horo
2017/04/14 07:22:45
Done.
| |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 class ExecutionContext; | |
| 17 class WorkerClients; | |
| 18 class WebURLLoader; | |
| 19 class WebWorkerFetchContext; | |
| 20 class WebWorkerFetchContextInfo; | |
| 21 | |
| 22 CORE_EXPORT void ProvideWorkerFetchContextInfoToWorker( | |
| 23 WorkerClients*, | |
| 24 std::unique_ptr<WebWorkerFetchContextInfo>); | |
| 25 | |
| 26 class WorkerFetchContext final : public FetchContext { | |
| 27 public: | |
| 28 static WorkerFetchContext* From(ExecutionContext&); | |
| 29 | |
| 30 explicit WorkerFetchContext(std::unique_ptr<WebWorkerFetchContext>); | |
| 31 virtual ~WorkerFetchContext(); | |
| 32 | |
| 33 // FetchContext implementation: | |
| 34 // TODO(horo): Implement more methods. | |
| 35 void PrepareRequest(ResourceRequest&, RedirectType) override; | |
| 36 WebURLLoader* CreateURLLoader() override; | |
| 37 bool IsControlledByServiceWorker() const override; | |
| 38 | |
| 39 private: | |
| 40 std::unique_ptr<WebWorkerFetchContext> context_; | |
| 41 }; | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif // WorkerFetchContext_h | |
| OLD | NEW |