| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 struct InitialScrollState { | 161 struct InitialScrollState { |
| 162 DISALLOW_NEW(); | 162 DISALLOW_NEW(); |
| 163 InitialScrollState() | 163 InitialScrollState() |
| 164 : wasScrolledByUser(false), didRestoreFromHistory(false) {} | 164 : wasScrolledByUser(false), didRestoreFromHistory(false) {} |
| 165 | 165 |
| 166 bool wasScrolledByUser; | 166 bool wasScrolledByUser; |
| 167 bool didRestoreFromHistory; | 167 bool didRestoreFromHistory; |
| 168 }; | 168 }; |
| 169 InitialScrollState& initialScrollState() { return m_initialScrollState; } | 169 InitialScrollState& initialScrollState() { return m_initialScrollState; } |
| 170 | 170 |
| 171 void setWasBlockedAfterXFrameOptionsOrCSP() { | 171 void setWasBlockedAfterCSP() { m_wasBlockedAfterCSP = true; } |
| 172 m_wasBlockedAfterXFrameOptionsOrCSP = true; | 172 bool wasBlockedAfterCSP() { return m_wasBlockedAfterCSP; } |
| 173 } | |
| 174 bool wasBlockedAfterXFrameOptionsOrCSP() { | |
| 175 return m_wasBlockedAfterXFrameOptionsOrCSP; | |
| 176 } | |
| 177 | 173 |
| 178 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, | 174 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, |
| 179 LinkLoader::MediaPreloadPolicy); | 175 LinkLoader::MediaPreloadPolicy); |
| 180 | 176 |
| 181 Resource* startPreload(Resource::Type, FetchRequest&); | 177 Resource* startPreload(Resource::Type, FetchRequest&); |
| 182 | 178 |
| 183 DECLARE_VIRTUAL_TRACE(); | 179 DECLARE_VIRTUAL_TRACE(); |
| 184 | 180 |
| 185 protected: | 181 protected: |
| 186 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); | 182 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 203 | 199 |
| 204 FrameLoader* frameLoader() const; | 200 FrameLoader* frameLoader() const; |
| 205 | 201 |
| 206 void commitIfReady(); | 202 void commitIfReady(); |
| 207 void commitData(const char* bytes, size_t length); | 203 void commitData(const char* bytes, size_t length); |
| 208 void clearMainResourceHandle(); | 204 void clearMainResourceHandle(); |
| 209 | 205 |
| 210 bool maybeCreateArchive(); | 206 bool maybeCreateArchive(); |
| 211 | 207 |
| 212 void finishedLoading(double finishTime); | 208 void finishedLoading(double finishTime); |
| 213 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); | 209 void cancelLoadAfterCSPDenied(const ResourceResponse&); |
| 214 bool redirectReceived(Resource*, | 210 bool redirectReceived(Resource*, |
| 215 const ResourceRequest&, | 211 const ResourceRequest&, |
| 216 const ResourceResponse&) final; | 212 const ResourceResponse&) final; |
| 217 void responseReceived(Resource*, | 213 void responseReceived(Resource*, |
| 218 const ResourceResponse&, | 214 const ResourceResponse&, |
| 219 std::unique_ptr<WebDataConsumerHandle>) final; | 215 std::unique_ptr<WebDataConsumerHandle>) final; |
| 220 void dataReceived(Resource*, const char* data, size_t length) final; | 216 void dataReceived(Resource*, const char* data, size_t length) final; |
| 221 void processData(const char* data, size_t length); | 217 void processData(const char* data, size_t length); |
| 222 void notifyFinished(Resource*) final; | 218 void notifyFinished(Resource*) final; |
| 223 String debugName() const override { return "DocumentLoader"; } | 219 String debugName() const override { return "DocumentLoader"; } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 DocumentLoadTiming m_documentLoadTiming; | 255 DocumentLoadTiming m_documentLoadTiming; |
| 260 | 256 |
| 261 double m_timeOfLastDataReceived; | 257 double m_timeOfLastDataReceived; |
| 262 | 258 |
| 263 Member<ApplicationCacheHost> m_applicationCacheHost; | 259 Member<ApplicationCacheHost> m_applicationCacheHost; |
| 264 | 260 |
| 265 Member<ContentSecurityPolicy> m_contentSecurityPolicy; | 261 Member<ContentSecurityPolicy> m_contentSecurityPolicy; |
| 266 ClientHintsPreferences m_clientHintsPreferences; | 262 ClientHintsPreferences m_clientHintsPreferences; |
| 267 InitialScrollState m_initialScrollState; | 263 InitialScrollState m_initialScrollState; |
| 268 | 264 |
| 269 bool m_wasBlockedAfterXFrameOptionsOrCSP; | 265 bool m_wasBlockedAfterCSP; |
| 270 | 266 |
| 271 enum State { | 267 enum State { |
| 272 NotStarted, | 268 NotStarted, |
| 273 Provisional, | 269 Provisional, |
| 274 Committed, | 270 Committed, |
| 275 MainResourceDone, | 271 MainResourceDone, |
| 276 SentDidFinishLoad | 272 SentDidFinishLoad |
| 277 }; | 273 }; |
| 278 State m_state; | 274 State m_state; |
| 279 | 275 |
| 280 // Used to protect against reentrancy into dataReceived(). | 276 // Used to protect against reentrancy into dataReceived(). |
| 281 bool m_inDataReceived; | 277 bool m_inDataReceived; |
| 282 RefPtr<SharedBuffer> m_dataBuffer; | 278 RefPtr<SharedBuffer> m_dataBuffer; |
| 283 }; | 279 }; |
| 284 | 280 |
| 285 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 281 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 286 | 282 |
| 287 } // namespace blink | 283 } // namespace blink |
| 288 | 284 |
| 289 #endif // DocumentLoader_h | 285 #endif // DocumentLoader_h |
| OLD | NEW |