| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "wtf/RefPtr.h" | 51 #include "wtf/RefPtr.h" |
| 52 | 52 |
| 53 namespace blink { | 53 namespace blink { |
| 54 | 54 |
| 55 class ApplicationCacheHost; | 55 class ApplicationCacheHost; |
| 56 class ResourceFetcher; | 56 class ResourceFetcher; |
| 57 class DocumentInit; | 57 class DocumentInit; |
| 58 class LocalFrame; | 58 class LocalFrame; |
| 59 class FrameLoader; | 59 class FrameLoader; |
| 60 class ResourceLoader; | 60 class ResourceLoader; |
| 61 class WebDocumentSubresourceFilter; |
| 61 | 62 |
| 62 class CORE_EXPORT DocumentLoader : public GarbageCollectedFinalized<DocumentLoad
er>, private RawResourceClient { | 63 class CORE_EXPORT DocumentLoader : public GarbageCollectedFinalized<DocumentLoad
er>, private RawResourceClient { |
| 63 public: | 64 public: |
| 64 static DocumentLoader* create(LocalFrame* frame, const ResourceRequest& requ
est, const SubstituteData& data) | 65 static DocumentLoader* create(LocalFrame* frame, const ResourceRequest& requ
est, const SubstituteData& data) |
| 65 { | 66 { |
| 66 return new DocumentLoader(frame, request, data); | 67 return new DocumentLoader(frame, request, data); |
| 67 } | 68 } |
| 68 ~DocumentLoader() override; | 69 ~DocumentLoader() override; |
| 69 | 70 |
| 70 LocalFrame* frame() const { return m_frame; } | 71 LocalFrame* frame() const { return m_frame; } |
| 71 | 72 |
| 72 virtual void detachFromFrame(); | 73 virtual void detachFromFrame(); |
| 73 | 74 |
| 74 unsigned long mainResourceIdentifier() const; | 75 unsigned long mainResourceIdentifier() const; |
| 75 | 76 |
| 76 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, const S
tring& source); | 77 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, const S
tring& source); |
| 77 | 78 |
| 78 const AtomicString& mimeType() const; | 79 const AtomicString& mimeType() const; |
| 79 | 80 |
| 80 const ResourceRequest& originalRequest() const; | 81 const ResourceRequest& originalRequest() const; |
| 81 | 82 |
| 82 const ResourceRequest& request() const; | 83 const ResourceRequest& request() const; |
| 83 | 84 |
| 84 ResourceFetcher* fetcher() const { return m_fetcher.get(); } | 85 ResourceFetcher* fetcher() const { return m_fetcher.get(); } |
| 85 | 86 |
| 87 void setSubresourceFilter(PassOwnPtr<WebDocumentSubresourceFilter>); |
| 88 WebDocumentSubresourceFilter* subresourceFilter() const { return m_subresour
ceFilter.get(); } |
| 89 |
| 86 const SubstituteData& substituteData() const { return m_substituteData; } | 90 const SubstituteData& substituteData() const { return m_substituteData; } |
| 87 | 91 |
| 88 const KURL& url() const; | 92 const KURL& url() const; |
| 89 const KURL& unreachableURL() const; | 93 const KURL& unreachableURL() const; |
| 90 const KURL& urlForHistory() const; | 94 const KURL& urlForHistory() const; |
| 91 | 95 |
| 92 const AtomicString& responseMIMEType() const; | 96 const AtomicString& responseMIMEType() const; |
| 93 | 97 |
| 94 void didChangePerformanceTiming(); | 98 void didChangePerformanceTiming(); |
| 95 void didObserveLoadingBehavior(WebLoadingBehaviorFlag); | 99 void didObserveLoadingBehavior(WebLoadingBehaviorFlag); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 String debugName() const override { return "DocumentLoader"; } | 177 String debugName() const override { return "DocumentLoader"; } |
| 174 | 178 |
| 175 bool maybeLoadEmpty(); | 179 bool maybeLoadEmpty(); |
| 176 | 180 |
| 177 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); | 181 bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); |
| 178 | 182 |
| 179 bool shouldContinueForResponse() const; | 183 bool shouldContinueForResponse() const; |
| 180 | 184 |
| 181 Member<LocalFrame> m_frame; | 185 Member<LocalFrame> m_frame; |
| 182 Member<ResourceFetcher> m_fetcher; | 186 Member<ResourceFetcher> m_fetcher; |
| 187 OwnPtr<WebDocumentSubresourceFilter> m_subresourceFilter; |
| 183 | 188 |
| 184 Member<RawResource> m_mainResource; | 189 Member<RawResource> m_mainResource; |
| 185 | 190 |
| 186 Member<DocumentWriter> m_writer; | 191 Member<DocumentWriter> m_writer; |
| 187 | 192 |
| 188 // A reference to actual request used to create the data source. | 193 // A reference to actual request used to create the data source. |
| 189 // The only part of this request that should change is the url, and | 194 // The only part of this request that should change is the url, and |
| 190 // that only in the case of a same-document navigation. | 195 // that only in the case of a same-document navigation. |
| 191 ResourceRequest m_originalRequest; | 196 ResourceRequest m_originalRequest; |
| 192 | 197 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // Used to protect against reentrancy into dataReceived(). | 234 // Used to protect against reentrancy into dataReceived(). |
| 230 bool m_inDataReceived; | 235 bool m_inDataReceived; |
| 231 RefPtr<SharedBuffer> m_dataBuffer; | 236 RefPtr<SharedBuffer> m_dataBuffer; |
| 232 }; | 237 }; |
| 233 | 238 |
| 234 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 239 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 235 | 240 |
| 236 } // namespace blink | 241 } // namespace blink |
| 237 | 242 |
| 238 #endif // DocumentLoader_h | 243 #endif // DocumentLoader_h |
| OLD | NEW |