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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #ifndef DocumentLoader_h | 30 #ifndef DocumentLoader_h |
31 #define DocumentLoader_h | 31 #define DocumentLoader_h |
32 | 32 |
33 #include "core/fetch/RawResource.h" | 33 #include "core/fetch/RawResource.h" |
34 #include "core/fetch/ResourceLoaderOptions.h" | 34 #include "core/fetch/ResourceLoaderOptions.h" |
35 #include "core/fetch/ResourcePtr.h" | 35 #include "core/fetch/ResourcePtr.h" |
36 #include "core/frame/csp/ContentSecurityPolicy.h" | 36 #include "core/frame/csp/ContentSecurityPolicy.h" |
37 #include "core/loader/DocumentLoadTiming.h" | 37 #include "core/loader/DocumentLoadTiming.h" |
38 #include "core/loader/DocumentWriter.h" | 38 #include "core/loader/DocumentWriter.h" |
39 #include "core/loader/NavigationAction.h" | 39 #include "core/loader/FrameLoaderTypes.h" |
| 40 #include "core/loader/NavigationPolicy.h" |
40 #include "core/loader/SubstituteData.h" | 41 #include "core/loader/SubstituteData.h" |
41 #include "platform/network/ResourceError.h" | 42 #include "platform/network/ResourceError.h" |
42 #include "platform/network/ResourceRequest.h" | 43 #include "platform/network/ResourceRequest.h" |
43 #include "platform/network/ResourceResponse.h" | 44 #include "platform/network/ResourceResponse.h" |
44 #include "wtf/HashSet.h" | 45 #include "wtf/HashSet.h" |
45 #include "wtf/RefPtr.h" | 46 #include "wtf/RefPtr.h" |
46 | 47 |
47 namespace blink { | 48 namespace blink { |
48 class WebThreadedDataReceiver; | 49 class WebThreadedDataReceiver; |
49 } | 50 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 bool isLoadingMainResource() const { return m_loadingMainResource; } | 101 bool isLoadingMainResource() const { return m_loadingMainResource; } |
101 const ResourceResponse& response() const { return m_response; } | 102 const ResourceResponse& response() const { return m_response; } |
102 const ResourceError& mainDocumentError() const { return m_mainDocumentEr
ror; } | 103 const ResourceError& mainDocumentError() const { return m_mainDocumentEr
ror; } |
103 bool isClientRedirect() const { return m_isClientRedirect; } | 104 bool isClientRedirect() const { return m_isClientRedirect; } |
104 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = i
sClientRedirect; } | 105 void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = i
sClientRedirect; } |
105 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistor
yItem; } | 106 bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistor
yItem; } |
106 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_
replacesCurrentHistoryItem = replacesCurrentHistoryItem; } | 107 void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_
replacesCurrentHistoryItem = replacesCurrentHistoryItem; } |
107 | 108 |
108 bool scheduleArchiveLoad(Resource*, const ResourceRequest&); | 109 bool scheduleArchiveLoad(Resource*, const ResourceRequest&); |
109 | 110 |
110 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSe
curityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, bool isTransi
tionNavigation = false); | 111 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSe
curityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPol
icy = NavigationPolicyCurrentTab, bool isTransitionNavigation = false); |
111 const NavigationAction& triggeringAction() const { return m_triggeringAc
tion; } | 112 NavigationType navigationType() const { return m_navigationType; } |
112 void setTriggeringAction(const NavigationAction& action) { m_triggeringA
ction = action; } | 113 void setNavigationType(NavigationType navigationType) { m_navigationType
= navigationType; } |
113 | 114 |
114 void setDefersLoading(bool); | 115 void setDefersLoading(bool); |
115 | 116 |
116 void startLoadingMainResource(); | 117 void startLoadingMainResource(); |
117 void cancelMainResourceLoad(const ResourceError&); | 118 void cancelMainResourceLoad(const ResourceError&); |
118 | 119 |
119 void attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceive
r>); | 120 void attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceive
r>); |
120 DocumentLoadTiming* timing() { return &m_documentLoadTiming; } | 121 DocumentLoadTiming* timing() { return &m_documentLoadTiming; } |
121 | 122 |
122 ApplicationCacheHost* applicationCacheHost() const { return m_applicatio
nCacheHost.get(); } | 123 ApplicationCacheHost* applicationCacheHost() const { return m_applicatio
nCacheHost.get(); } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 ResourceRequest m_request; | 190 ResourceRequest m_request; |
190 | 191 |
191 ResourceResponse m_response; | 192 ResourceResponse m_response; |
192 | 193 |
193 ResourceError m_mainDocumentError; | 194 ResourceError m_mainDocumentError; |
194 | 195 |
195 bool m_committed; | 196 bool m_committed; |
196 bool m_isClientRedirect; | 197 bool m_isClientRedirect; |
197 bool m_replacesCurrentHistoryItem; | 198 bool m_replacesCurrentHistoryItem; |
198 | 199 |
199 // The action that triggered loading - we keep this around for the | 200 NavigationType m_navigationType; |
200 // benefit of the various policy handlers. | |
201 NavigationAction m_triggeringAction; | |
202 | 201 |
203 OwnPtrWillBePersistent<ArchiveResourceCollection> m_archiveResourceColle
ction; | 202 OwnPtrWillBePersistent<ArchiveResourceCollection> m_archiveResourceColle
ction; |
204 RefPtrWillBePersistent<MHTMLArchive> m_archive; | 203 RefPtrWillBePersistent<MHTMLArchive> m_archive; |
205 | 204 |
206 bool m_loadingMainResource; | 205 bool m_loadingMainResource; |
207 DocumentLoadTiming m_documentLoadTiming; | 206 DocumentLoadTiming m_documentLoadTiming; |
208 | 207 |
209 double m_timeOfLastDataReceived; | 208 double m_timeOfLastDataReceived; |
210 | 209 |
211 friend class ApplicationCacheHost; // for substitute resource delivery | 210 friend class ApplicationCacheHost; // for substitute resource delivery |
212 OwnPtrWillBePersistent<ApplicationCacheHost> m_applicationCacheHost; | 211 OwnPtrWillBePersistent<ApplicationCacheHost> m_applicationCacheHost; |
213 | 212 |
214 RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; | 213 RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; |
215 }; | 214 }; |
216 } | 215 } |
217 | 216 |
218 #endif // DocumentLoader_h | 217 #endif // DocumentLoader_h |
OLD | NEW |