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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const SubstituteData& substituteData() const { return m_substituteData; } | 86 const SubstituteData& substituteData() const { return m_substituteData; } |
87 | 87 |
88 const KURL& url() const; | 88 const KURL& url() const; |
89 const KURL& unreachableURL() const; | 89 const KURL& unreachableURL() const; |
90 const KURL& urlForHistory() const; | 90 const KURL& urlForHistory() const; |
91 | 91 |
92 const AtomicString& responseMIMEType() const; | 92 const AtomicString& responseMIMEType() const; |
93 | 93 |
94 void didChangePerformanceTiming(); | 94 void didChangePerformanceTiming(); |
95 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour
ce); | 95 void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSour
ce); |
96 void stopLoading(); | |
97 bool isLoading() const; | |
98 const ResourceResponse& response() const { return m_response; } | 96 const ResourceResponse& response() const { return m_response; } |
99 bool isClientRedirect() const { return m_isClientRedirect; } | 97 bool isClientRedirect() const { return m_isClientRedirect; } |
100 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isCli
entRedirect; } | 98 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isCli
entRedirect; } |
101 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryIte
m; } | 99 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryIte
m; } |
102 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_repl
acesCurrentHistoryItem = replacesCurrentHistoryItem; } | 100 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_repl
acesCurrentHistoryItem = replacesCurrentHistoryItem; } |
103 | 101 |
104 bool isCommittedButEmpty() const { return m_state == Committed; } | 102 bool isCommittedButEmpty() const { return m_state == Committed; } |
105 | 103 |
106 void setSentDidFinishLoad() { m_state = SentDidFinishLoad; } | 104 void setSentDidFinishLoad() { m_state = SentDidFinishLoad; } |
107 bool sentDidFinishLoad() const { return m_state == SentDidFinishLoad; } | 105 bool sentDidFinishLoad() const { return m_state == SentDidFinishLoad; } |
108 | 106 |
109 NavigationType getNavigationType() const { return m_navigationType; } | 107 NavigationType getNavigationType() const { return m_navigationType; } |
110 void setNavigationType(NavigationType navigationType) { m_navigationType = n
avigationType; } | 108 void setNavigationType(NavigationType navigationType) { m_navigationType = n
avigationType; } |
111 | 109 |
112 void startLoadingMainResource(); | 110 void startLoadingMainResource(); |
113 void cancelMainResourceLoad(const ResourceError&); | |
114 | 111 |
115 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataReceiver>
); | 112 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataReceiver>
); |
116 void acceptDataFromThreadedReceiver(const char* data, int dataLength, int en
codedDataLength); | 113 void acceptDataFromThreadedReceiver(const char* data, int dataLength, int en
codedDataLength); |
117 DocumentLoadTiming& timing() { return m_documentLoadTiming; } | 114 DocumentLoadTiming& timing() { return m_documentLoadTiming; } |
118 const DocumentLoadTiming& timing() const { return m_documentLoadTiming; } | 115 const DocumentLoadTiming& timing() const { return m_documentLoadTiming; } |
119 | 116 |
120 ApplicationCacheHost* applicationCacheHost() const { return m_applicationCac
heHost.get(); } | 117 ApplicationCacheHost* applicationCacheHost() const { return m_applicationCac
heHost.get(); } |
121 | 118 |
122 void clearRedirectChain(); | 119 void clearRedirectChain(); |
123 void appendRedirect(const KURL&); | 120 void appendRedirect(const KURL&); |
(...skipping 26 matching lines...) Expand all Loading... |
150 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); | 147 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); |
151 | 148 |
152 Vector<KURL> m_redirectChain; | 149 Vector<KURL> m_redirectChain; |
153 | 150 |
154 private: | 151 private: |
155 static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Document
Init&, const AtomicString& mimeType, const AtomicString& encoding, bool dispatch
, ParserSynchronizationPolicy); | 152 static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Document
Init&, const AtomicString& mimeType, const AtomicString& encoding, bool dispatch
, ParserSynchronizationPolicy); |
156 | 153 |
157 void ensureWriter(const AtomicString& mimeType, const KURL& overridingURL =
KURL()); | 154 void ensureWriter(const AtomicString& mimeType, const KURL& overridingURL =
KURL()); |
158 void endWriting(DocumentWriter*); | 155 void endWriting(DocumentWriter*); |
159 | 156 |
160 Document* document() const; | |
161 FrameLoader* frameLoader() const; | 157 FrameLoader* frameLoader() const; |
162 | 158 |
163 void commitIfReady(); | 159 void commitIfReady(); |
164 void commitData(const char* bytes, size_t length); | 160 void commitData(const char* bytes, size_t length); |
165 ResourceLoader* mainResourceLoader() const; | 161 ResourceLoader* mainResourceLoader() const; |
166 void clearMainResourceHandle(); | 162 void clearMainResourceHandle(); |
167 | 163 |
168 bool maybeCreateArchive(); | 164 bool maybeCreateArchive(); |
169 | 165 |
170 void finishedLoading(double finishTime); | 166 void finishedLoading(double finishTime); |
171 void mainReceivedError(const ResourceError&); | |
172 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); | 167 void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); |
173 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
final; | 168 void redirectReceived(Resource*, ResourceRequest&, const ResourceResponse&)
final; |
174 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) final; | 169 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebData
ConsumerHandle>) final; |
175 void dataReceived(Resource*, const char* data, size_t length) final; | 170 void dataReceived(Resource*, const char* data, size_t length) final; |
176 void processData(const char* data, size_t length); | 171 void processData(const char* data, size_t length); |
177 void notifyFinished(Resource*) final; | 172 void notifyFinished(Resource*) final; |
178 String debugName() const override { return "DocumentLoader"; } | 173 String debugName() const override { return "DocumentLoader"; } |
179 | 174 |
180 bool maybeLoadEmpty(); | 175 bool maybeLoadEmpty(); |
181 | 176 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // Used to protect against reentrancy into dataReceived(). | 229 // Used to protect against reentrancy into dataReceived(). |
235 bool m_inDataReceived; | 230 bool m_inDataReceived; |
236 RefPtr<SharedBuffer> m_dataBuffer; | 231 RefPtr<SharedBuffer> m_dataBuffer; |
237 }; | 232 }; |
238 | 233 |
239 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 234 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
240 | 235 |
241 } // namespace blink | 236 } // namespace blink |
242 | 237 |
243 #endif // DocumentLoader_h | 238 #endif // DocumentLoader_h |
OLD | NEW |