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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/FetchContext.h

Issue 2584423002: Loading: move core/fetch to platform/loader/fetch (Closed)
Patch Set: another try Created 3 years, 11 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
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef FetchContext_h 31 #ifndef FetchContext_h
32 #define FetchContext_h 32 #define FetchContext_h
33 33
34 #include "core/CoreExport.h" 34 #include "platform/PlatformExport.h"
35 #include "core/fetch/CachePolicy.h"
36 #include "core/fetch/FetchInitiatorInfo.h"
37 #include "core/fetch/FetchRequest.h"
38 #include "core/fetch/Resource.h"
39 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "platform/loader/fetch/CachePolicy.h"
37 #include "platform/loader/fetch/FetchInitiatorInfo.h"
38 #include "platform/loader/fetch/FetchRequest.h"
39 #include "platform/loader/fetch/Resource.h"
40 #include "platform/network/ResourceLoadPriority.h" 40 #include "platform/network/ResourceLoadPriority.h"
41 #include "platform/network/ResourceRequest.h" 41 #include "platform/network/ResourceRequest.h"
42 #include "wtf/Forward.h" 42 #include "wtf/Forward.h"
43 #include "wtf/Noncopyable.h" 43 #include "wtf/Noncopyable.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class ClientHintsPreferences; 47 class ClientHintsPreferences;
48 class KURL; 48 class KURL;
49 class MHTMLArchive; 49 class MHTMLArchive;
50 class ResourceError; 50 class ResourceError;
51 class ResourceResponse; 51 class ResourceResponse;
52 class ResourceTimingInfo; 52 class ResourceTimingInfo;
53 class WebTaskRunner; 53 class WebTaskRunner;
54 enum class WebCachePolicy; 54 enum class WebCachePolicy;
55 55
56 enum FetchResourceType { FetchMainResource, FetchSubresource }; 56 enum FetchResourceType { FetchMainResource, FetchSubresource };
57 57
58 // The FetchContext is an interface for performing context specific processing 58 // The FetchContext is an interface for performing context specific processing
59 // in response to events in the ResourceFetcher. The ResourceFetcher or its job 59 // in response to events in the ResourceFetcher. The ResourceFetcher or its job
60 // class, ResourceLoader, may call the methods on a FetchContext. 60 // class, ResourceLoader, may call the methods on a FetchContext.
61 // 61 //
62 // Any processing that depends on core/ components outside core/fetch/ should 62 // Any processing that depends on components outside platform/loader/fetch/
63 // be implemented on a subclass of this interface, and then exposed to the 63 // should be implemented on a subclass of this interface, and then exposed to
64 // ResourceFetcher via this interface. 64 // the ResourceFetcher via this interface.
65 class CORE_EXPORT FetchContext 65 class PLATFORM_EXPORT FetchContext
66 : public GarbageCollectedFinalized<FetchContext> { 66 : public GarbageCollectedFinalized<FetchContext> {
67 WTF_MAKE_NONCOPYABLE(FetchContext); 67 WTF_MAKE_NONCOPYABLE(FetchContext);
68 68
69 public: 69 public:
70 enum LogMessageType { LogErrorMessage, LogWarningMessage }; 70 enum LogMessageType { LogErrorMessage, LogWarningMessage };
71 71
72 static FetchContext& nullInstance(); 72 static FetchContext& nullInstance();
73 73
74 virtual ~FetchContext() {} 74 virtual ~FetchContext() {}
75 DEFINE_INLINE_VIRTUAL_TRACE() {} 75 DEFINE_INLINE_VIRTUAL_TRACE() {}
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } 188 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; }
189 189
190 protected: 190 protected:
191 FetchContext() {} 191 FetchContext() {}
192 }; 192 };
193 193
194 } // namespace blink 194 } // namespace blink
195 195
196 #endif 196 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698