OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 FetchManager_h | 5 #ifndef FetchManager_h |
6 #define FetchManager_h | 6 #define FetchManager_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "modules/serviceworkers/FetchHeaderList.h" |
| 10 #include "modules/serviceworkers/FetchRequestData.h" |
| 11 #include "modules/serviceworkers/FetchResponseData.h" |
| 12 #include "platform/blob/BlobData.h" |
| 13 #include "platform/weborigin/KURL.h" |
9 #include "wtf/HashSet.h" | 14 #include "wtf/HashSet.h" |
10 #include "wtf/OwnPtr.h" | 15 #include "wtf/OwnPtr.h" |
11 | 16 |
12 namespace WebCore { | 17 namespace WebCore { |
13 | 18 |
14 class ExecutionContext; | 19 class ExecutionContext; |
15 class ScriptState; | 20 class ScriptState; |
| 21 struct ResourceLoaderOptions; |
16 class ResourceRequest; | 22 class ResourceRequest; |
| 23 class SecurityOrigin; |
| 24 struct ThreadableLoaderOptions; |
17 | 25 |
18 class FetchManager { | 26 class FetchManager { |
19 public: | 27 public: |
20 FetchManager(ExecutionContext*); | 28 FetchManager(ExecutionContext*); |
21 ~FetchManager(); | 29 ~FetchManager(); |
22 ScriptPromise fetch(ScriptState*, PassOwnPtr<ResourceRequest>); | 30 ScriptPromise fetch(ScriptState*, PassRefPtr<FetchRequestData>); |
23 | 31 |
24 static bool isSimpleMethod(const String&); | 32 static bool isSimpleMethod(const String&); |
25 static bool isForbiddenMethod(const String&); | 33 static bool isForbiddenMethod(const String&); |
| 34 static bool isUsefulMethod(const String&); |
| 35 |
| 36 static bool isSimpleMethod(const String&); |
| 37 static bool isForbiddenMethod(const String&); |
26 static bool isUsefulMethod(const String&); | 38 static bool isUsefulMethod(const String&); |
27 private: | 39 private: |
28 class Loader; | 40 class Loader; |
29 | 41 |
30 // Removes loader from |m_loaders|. | 42 // Removes loader from |m_loaders|. |
31 void onLoaderFinished(Loader*); | 43 void onLoaderFinished(Loader*); |
32 | 44 |
33 ExecutionContext* m_executionContext; | 45 ExecutionContext* m_executionContext; |
34 HashSet<OwnPtr<Loader> > m_loaders; | 46 HashSet<OwnPtr<Loader> > m_loaders; |
35 }; | 47 }; |
36 | 48 |
37 } // namespace WebCore | 49 } // namespace WebCore |
38 | 50 |
39 #endif // FetchManager_h | 51 #endif // FetchManager_h |
OLD | NEW |