OLD | NEW |
---|---|
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 23 matching lines...) Expand all Loading... | |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "core/fetch/CachePolicy.h" | 35 #include "core/fetch/CachePolicy.h" |
36 #include "core/fetch/FetchInitiatorInfo.h" | 36 #include "core/fetch/FetchInitiatorInfo.h" |
37 #include "core/fetch/FetchRequest.h" | 37 #include "core/fetch/FetchRequest.h" |
38 #include "core/fetch/Resource.h" | 38 #include "core/fetch/Resource.h" |
39 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.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/Noncopyable.h" | 42 #include "wtf/Noncopyable.h" |
43 | 43 |
44 namespace wtf { | |
45 | |
46 class AtomicString; | |
47 | |
48 } // namespace wtf | |
49 | |
44 namespace blink { | 50 namespace blink { |
45 | 51 |
46 class KURL; | 52 class KURL; |
47 class MHTMLArchive; | 53 class MHTMLArchive; |
48 class ResourceError; | 54 class ResourceError; |
49 class ResourceResponse; | 55 class ResourceResponse; |
50 class ResourceTimingInfo; | 56 class ResourceTimingInfo; |
51 class WebTaskRunner; | 57 class WebTaskRunner; |
52 enum class WebCachePolicy; | 58 enum class WebCachePolicy; |
53 | 59 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 virtual void dispatchDidFail(unsigned long identifier, | 123 virtual void dispatchDidFail(unsigned long identifier, |
118 const ResourceError&, | 124 const ResourceError&, |
119 int64_t encodedDataLength, | 125 int64_t encodedDataLength, |
120 bool isInternalRequest); | 126 bool isInternalRequest); |
121 | 127 |
122 virtual bool shouldLoadNewResource(Resource::Type) const { return false; } | 128 virtual bool shouldLoadNewResource(Resource::Type) const { return false; } |
123 // Called when a resource load is first requested, which may not be when the | 129 // Called when a resource load is first requested, which may not be when the |
124 // load actually begins. | 130 // load actually begins. |
125 virtual void willStartLoadingResource(unsigned long identifier, | 131 virtual void willStartLoadingResource(unsigned long identifier, |
126 ResourceRequest&, | 132 ResourceRequest&, |
127 Resource::Type); | 133 Resource::Type, |
134 const AtomicString& fetchInitiatorName, | |
135 bool forPreload); | |
yhirano
2016/12/19 11:44:47
Please pass an enum instead of boolean.
Takashi Toyoshima
2016/12/19 12:58:54
I feel the enum is better to be defined in FetchRe
| |
128 virtual void didLoadResource(Resource*); | 136 virtual void didLoadResource(Resource*); |
129 | 137 |
130 virtual void addResourceTiming(const ResourceTimingInfo&); | 138 virtual void addResourceTiming(const ResourceTimingInfo&); |
131 virtual bool allowImage(bool, const KURL&) const { return false; } | 139 virtual bool allowImage(bool, const KURL&) const { return false; } |
132 virtual ResourceRequestBlockedReason canRequest( | 140 virtual ResourceRequestBlockedReason canRequest( |
133 Resource::Type, | 141 Resource::Type, |
134 const ResourceRequest&, | 142 const ResourceRequest&, |
135 const KURL&, | 143 const KURL&, |
136 const ResourceLoaderOptions&, | 144 const ResourceLoaderOptions&, |
137 bool forPreload, | 145 bool forPreload, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 | 182 |
175 virtual WebTaskRunner* loadingTaskRunner() const { return nullptr; } | 183 virtual WebTaskRunner* loadingTaskRunner() const { return nullptr; } |
176 | 184 |
177 protected: | 185 protected: |
178 FetchContext() {} | 186 FetchContext() {} |
179 }; | 187 }; |
180 | 188 |
181 } // namespace blink | 189 } // namespace blink |
182 | 190 |
183 #endif | 191 #endif |
OLD | NEW |