| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 struct ViewportDescriptionWrapper; | 63 struct ViewportDescriptionWrapper; |
| 64 | 64 |
| 65 class CORE_EXPORT DocumentLoader | 65 class CORE_EXPORT DocumentLoader |
| 66 : public GarbageCollectedFinalized<DocumentLoader>, | 66 : public GarbageCollectedFinalized<DocumentLoader>, |
| 67 private RawResourceClient { | 67 private RawResourceClient { |
| 68 USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader); | 68 USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader); |
| 69 | 69 |
| 70 public: | 70 public: |
| 71 static DocumentLoader* create(LocalFrame* frame, | 71 static DocumentLoader* create(LocalFrame* frame, |
| 72 const ResourceRequest& request, | 72 const ResourceRequest& request, |
| 73 const SubstituteData& data) { | 73 const SubstituteData& data, |
| 74 return new DocumentLoader(frame, request, data); | 74 bool clientRedirect) { |
| 75 return new DocumentLoader(frame, request, data, clientRedirect); |
| 75 } | 76 } |
| 76 ~DocumentLoader() override; | 77 ~DocumentLoader() override; |
| 77 | 78 |
| 78 LocalFrame* frame() const { return m_frame; } | 79 LocalFrame* frame() const { return m_frame; } |
| 79 | 80 |
| 80 virtual void detachFromFrame(); | 81 virtual void detachFromFrame(); |
| 81 | 82 |
| 82 unsigned long mainResourceIdentifier() const; | 83 unsigned long mainResourceIdentifier() const; |
| 83 | 84 |
| 84 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, | 85 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 177 } |
| 177 | 178 |
| 178 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, | 179 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, |
| 179 LinkLoader::MediaPreloadPolicy); | 180 LinkLoader::MediaPreloadPolicy); |
| 180 | 181 |
| 181 Resource* startPreload(Resource::Type, FetchRequest&); | 182 Resource* startPreload(Resource::Type, FetchRequest&); |
| 182 | 183 |
| 183 DECLARE_VIRTUAL_TRACE(); | 184 DECLARE_VIRTUAL_TRACE(); |
| 184 | 185 |
| 185 protected: | 186 protected: |
| 186 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); | 187 DocumentLoader(LocalFrame*, |
| 188 const ResourceRequest&, |
| 189 const SubstituteData&, |
| 190 bool clientRedirect); |
| 187 | 191 |
| 188 void didRedirect(const KURL& oldURL, const KURL& newURL); | 192 void didRedirect(const KURL& oldURL, const KURL& newURL); |
| 189 | 193 |
| 190 Vector<KURL> m_redirectChain; | 194 Vector<KURL> m_redirectChain; |
| 191 | 195 |
| 192 private: | 196 private: |
| 193 static DocumentWriter* createWriterFor(const DocumentInit&, | 197 static DocumentWriter* createWriterFor(const DocumentInit&, |
| 194 const AtomicString& mimeType, | 198 const AtomicString& mimeType, |
| 195 const AtomicString& encoding, | 199 const AtomicString& encoding, |
| 196 bool dispatchWindowObjectAvailable, | 200 bool dispatchWindowObjectAvailable, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // Used to protect against reentrancy into dataReceived(). | 284 // Used to protect against reentrancy into dataReceived(). |
| 281 bool m_inDataReceived; | 285 bool m_inDataReceived; |
| 282 RefPtr<SharedBuffer> m_dataBuffer; | 286 RefPtr<SharedBuffer> m_dataBuffer; |
| 283 }; | 287 }; |
| 284 | 288 |
| 285 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 289 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 286 | 290 |
| 287 } // namespace blink | 291 } // namespace blink |
| 288 | 292 |
| 289 #endif // DocumentLoader_h | 293 #endif // DocumentLoader_h |
| OLD | NEW |