OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 struct InitialScrollState { | 163 struct InitialScrollState { |
164 DISALLOW_NEW(); | 164 DISALLOW_NEW(); |
165 InitialScrollState() | 165 InitialScrollState() |
166 : wasScrolledByUser(false), didRestoreFromHistory(false) {} | 166 : wasScrolledByUser(false), didRestoreFromHistory(false) {} |
167 | 167 |
168 bool wasScrolledByUser; | 168 bool wasScrolledByUser; |
169 bool didRestoreFromHistory; | 169 bool didRestoreFromHistory; |
170 }; | 170 }; |
171 InitialScrollState& initialScrollState() { return m_initialScrollState; } | 171 InitialScrollState& initialScrollState() { return m_initialScrollState; } |
172 | 172 |
173 void setWasBlockedAfterXFrameOptionsOrCSP() { | 173 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } |
174 m_wasBlockedAfterXFrameOptionsOrCSP = true; | 174 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } |
175 } | |
176 bool wasBlockedAfterXFrameOptionsOrCSP() { | |
177 return m_wasBlockedAfterXFrameOptionsOrCSP; | |
178 } | |
179 | 175 |
180 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, | 176 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, |
181 LinkLoader::MediaPreloadPolicy); | 177 LinkLoader::MediaPreloadPolicy); |
182 | 178 |
183 Resource* startPreload(Resource::Type, FetchRequest&); | 179 Resource* startPreload(Resource::Type, FetchRequest&); |
184 | 180 |
185 DECLARE_VIRTUAL_TRACE(); | 181 DECLARE_VIRTUAL_TRACE(); |
186 | 182 |
187 protected: | 183 protected: |
188 DocumentLoader(LocalFrame*, | 184 DocumentLoader(LocalFrame*, |
(...skipping 19 matching lines...) Expand all Loading... |
208 | 204 |
209 FrameLoader* frameLoader() const; | 205 FrameLoader* frameLoader() const; |
210 | 206 |
211 void commitIfReady(); | 207 void commitIfReady(); |
212 void commitData(const char* bytes, size_t length); | 208 void commitData(const char* bytes, size_t length); |
213 void clearMainResourceHandle(); | 209 void clearMainResourceHandle(); |
214 | 210 |
215 bool maybeCreateArchive(); | 211 bool maybeCreateArchive(); |
216 | 212 |
217 void finishedLoading(double finishTime); | 213 void finishedLoading(double finishTime); |
218 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); | 214 void cancelLoadAfterCSPDenied(const ResourceResponse&); |
219 bool redirectReceived(Resource*, | 215 bool redirectReceived(Resource*, |
220 const ResourceRequest&, | 216 const ResourceRequest&, |
221 const ResourceResponse&) final; | 217 const ResourceResponse&) final; |
222 void responseReceived(Resource*, | 218 void responseReceived(Resource*, |
223 const ResourceResponse&, | 219 const ResourceResponse&, |
224 std::unique_ptr<WebDataConsumerHandle>) final; | 220 std::unique_ptr<WebDataConsumerHandle>) final; |
225 void dataReceived(Resource*, const char* data, size_t length) final; | 221 void dataReceived(Resource*, const char* data, size_t length) final; |
226 void processData(const char* data, size_t length); | 222 void processData(const char* data, size_t length); |
227 void notifyFinished(Resource*) final; | 223 void notifyFinished(Resource*) final; |
228 String debugName() const override { return "DocumentLoader"; } | 224 String debugName() const override { return "DocumentLoader"; } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 DocumentLoadTiming m_documentLoadTiming; | 260 DocumentLoadTiming m_documentLoadTiming; |
265 | 261 |
266 double m_timeOfLastDataReceived; | 262 double m_timeOfLastDataReceived; |
267 | 263 |
268 Member<ApplicationCacheHost> m_applicationCacheHost; | 264 Member<ApplicationCacheHost> m_applicationCacheHost; |
269 | 265 |
270 Member<ContentSecurityPolicy> m_contentSecurityPolicy; | 266 Member<ContentSecurityPolicy> m_contentSecurityPolicy; |
271 ClientHintsPreferences m_clientHintsPreferences; | 267 ClientHintsPreferences m_clientHintsPreferences; |
272 InitialScrollState m_initialScrollState; | 268 InitialScrollState m_initialScrollState; |
273 | 269 |
274 bool m_wasBlockedAfterXFrameOptionsOrCSP; | 270 bool m_wasBlockedAfterCSP; |
275 | 271 |
276 enum State { | 272 enum State { |
277 NotStarted, | 273 NotStarted, |
278 Provisional, | 274 Provisional, |
279 Committed, | 275 Committed, |
280 MainResourceDone, | 276 MainResourceDone, |
281 SentDidFinishLoad | 277 SentDidFinishLoad |
282 }; | 278 }; |
283 State m_state; | 279 State m_state; |
284 | 280 |
285 // Used to protect against reentrancy into dataReceived(). | 281 // Used to protect against reentrancy into dataReceived(). |
286 bool m_inDataReceived; | 282 bool m_inDataReceived; |
287 RefPtr<SharedBuffer> m_dataBuffer; | 283 RefPtr<SharedBuffer> m_dataBuffer; |
288 }; | 284 }; |
289 | 285 |
290 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 286 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
291 | 287 |
292 } // namespace blink | 288 } // namespace blink |
293 | 289 |
294 #endif // DocumentLoader_h | 290 #endif // DocumentLoader_h |
OLD | NEW |