Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/WebKit/Source/core/loader/WorkerFetchContext.h

Issue 2804843005: Implement the infrastructure of creating WorkerFetchContext in worker global scope. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698