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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static void provideDocumentToContext(FetchContext& context, | 65 static void provideDocumentToContext(FetchContext& context, |
66 Document* document) { | 66 Document* document) { |
67 DCHECK(document); | 67 DCHECK(document); |
68 CHECK(context.isLiveContext()); | 68 CHECK(context.isLiveContext()); |
69 static_cast<FrameFetchContext&>(context).m_document = document; | 69 static_cast<FrameFetchContext&>(context).m_document = document; |
70 } | 70 } |
71 | 71 |
72 ~FrameFetchContext(); | 72 ~FrameFetchContext(); |
73 | 73 |
74 bool isLiveContext() { return true; } | 74 bool isLiveContext() { return true; } |
| 75 WebURLLoader* createURLLoader() override; |
75 | 76 |
76 void addAdditionalRequestHeaders(ResourceRequest&, | 77 void addAdditionalRequestHeaders(ResourceRequest&, |
77 FetchResourceType) override; | 78 FetchResourceType) override; |
78 WebCachePolicy resourceRequestCachePolicy( | 79 WebCachePolicy resourceRequestCachePolicy( |
79 ResourceRequest&, | 80 ResourceRequest&, |
80 Resource::Type, | 81 Resource::Type, |
81 FetchRequest::DeferOption) const override; | 82 FetchRequest::DeferOption) const override; |
82 void dispatchDidChangeResourcePriority(unsigned long identifier, | 83 void dispatchDidChangeResourcePriority(unsigned long identifier, |
83 ResourceLoadPriority, | 84 ResourceLoadPriority, |
84 int intraPriorityValue) override; | 85 int intraPriorityValue) override; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 FetchRequest::OriginRestriction) const override; | 133 FetchRequest::OriginRestriction) const override; |
133 ResourceRequestBlockedReason allowResponse( | 134 ResourceRequestBlockedReason allowResponse( |
134 Resource::Type, | 135 Resource::Type, |
135 const ResourceRequest&, | 136 const ResourceRequest&, |
136 const KURL&, | 137 const KURL&, |
137 const ResourceLoaderOptions&) const override; | 138 const ResourceLoaderOptions&) const override; |
138 | 139 |
139 bool isControlledByServiceWorker() const override; | 140 bool isControlledByServiceWorker() const override; |
140 int64_t serviceWorkerID() const override; | 141 int64_t serviceWorkerID() const override; |
141 | 142 |
| 143 int applicationCacheHostID() const override; |
| 144 |
142 bool isMainFrame() const override; | 145 bool isMainFrame() const override; |
143 bool defersLoading() const override; | 146 bool defersLoading() const override; |
144 bool isLoadComplete() const override; | 147 bool isLoadComplete() const override; |
145 bool pageDismissalEventBeingDispatched() const override; | 148 bool pageDismissalEventBeingDispatched() const override; |
146 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; | 149 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; |
147 void sendImagePing(const KURL&) override; | 150 void sendImagePing(const KURL&) override; |
148 void addConsoleMessage(const String&, | 151 void addConsoleMessage(const String&, |
149 LogMessageType = LogErrorMessage) const override; | 152 LogMessageType = LogErrorMessage) const override; |
150 SecurityOrigin* getSecurityOrigin() const override; | 153 SecurityOrigin* getSecurityOrigin() const override; |
151 | 154 |
152 void populateResourceRequest(Resource::Type, | 155 void populateResourceRequest(Resource::Type, |
153 const ClientHintsPreferences&, | 156 const ClientHintsPreferences&, |
154 const FetchRequest::ResourceWidth&, | 157 const FetchRequest::ResourceWidth&, |
155 ResourceRequest&) override; | 158 ResourceRequest&) override; |
156 void setFirstPartyCookieAndRequestorOrigin(ResourceRequest&) override; | 159 void setFirstPartyCookieAndRequestorOrigin(ResourceRequest&) override; |
157 | 160 |
158 // Exposed for testing. | 161 // Exposed for testing. |
159 void modifyRequestForCSP(ResourceRequest&); | 162 void modifyRequestForCSP(ResourceRequest&); |
160 void addClientHintsIfNecessary(const ClientHintsPreferences&, | 163 void addClientHintsIfNecessary(const ClientHintsPreferences&, |
161 const FetchRequest::ResourceWidth&, | 164 const FetchRequest::ResourceWidth&, |
162 ResourceRequest&); | 165 ResourceRequest&); |
163 | 166 |
164 MHTMLArchive* archive() const override; | 167 MHTMLArchive* archive() const override; |
165 | 168 |
166 ResourceLoadPriority modifyPriorityForExperiments( | 169 ResourceLoadPriority modifyPriorityForExperiments( |
167 ResourceLoadPriority) override; | 170 ResourceLoadPriority) override; |
168 | 171 |
| 172 RefPtr<WebTaskRunner> timerTaskRunner() const override; |
169 RefPtr<WebTaskRunner> loadingTaskRunner() const override; | 173 RefPtr<WebTaskRunner> loadingTaskRunner() const override; |
170 | 174 |
171 DECLARE_VIRTUAL_TRACE(); | 175 DECLARE_VIRTUAL_TRACE(); |
172 | 176 |
173 private: | 177 private: |
174 FrameFetchContext(DocumentLoader*, Document*); | 178 FrameFetchContext(DocumentLoader*, Document*); |
175 | 179 |
176 // m_documentLoader is null when loading resources from an HTML import | 180 // m_documentLoader is null when loading resources from an HTML import |
177 // and in such cases we use the document loader of the importing frame. | 181 // and in such cases we use the document loader of the importing frame. |
178 // Convenient accessors below can be used to transparently access the | 182 // Convenient accessors below can be used to transparently access the |
(...skipping 29 matching lines...) Expand all Loading... |
208 // FIXME: Oilpan: Ideally this should just be a traced Member but that will | 212 // FIXME: Oilpan: Ideally this should just be a traced Member but that will |
209 // currently leak because ComputedStyle and its data are not on the heap. | 213 // currently leak because ComputedStyle and its data are not on the heap. |
210 // See crbug.com/383860 for details. | 214 // See crbug.com/383860 for details. |
211 WeakMember<Document> m_document; | 215 WeakMember<Document> m_document; |
212 Member<DocumentLoader> m_documentLoader; | 216 Member<DocumentLoader> m_documentLoader; |
213 }; | 217 }; |
214 | 218 |
215 } // namespace blink | 219 } // namespace blink |
216 | 220 |
217 #endif | 221 #endif |
OLD | NEW |