Index: Source/core/loader/FrameLoader.h |
diff --git a/Source/core/loader/FrameLoader.h b/Source/core/loader/FrameLoader.h |
index 1cabfeb76d65cfc24a2fda9f914fd112d90a5c9c..aa371a1bea17a56e8766949d05b0c291bf4e79b5 100644 |
--- a/Source/core/loader/FrameLoader.h |
+++ b/Source/core/loader/FrameLoader.h |
@@ -66,21 +66,27 @@ class CORE_EXPORT FrameLoader final { |
WTF_MAKE_NONCOPYABLE(FrameLoader); |
DISALLOW_ALLOCATION(); |
public: |
- static ResourceRequest requestFromHistoryItem(HistoryItem*, ResourceRequestCachePolicy); |
+ static ResourceRequest resourceRequestFromHistoryItem(HistoryItem*, ResourceRequestCachePolicy); |
+ static FrameLoadRequest frameRequestForReload( |
+ const ResourceRequest&, ClientRedirectPolicy = NotClientRedirect); |
FrameLoader(LocalFrame*); |
~FrameLoader(); |
void init(); |
+ ResourceRequest resourceRequestForReload(const LocalFrame&, FrameLoadType, |
Nate Chapin
2015/06/02 17:19:35
No need to take the LocalFrame& now, we can just u
clamy
2015/06/03 14:39:14
Done.
|
+ const KURL& overrideURL = KURL(), ClientRedirectPolicy = NotClientRedirect); |
+ |
ProgressTracker& progress() const { return *m_progressTracker; } |
- // These functions start a load. All eventually call into startLoad() or loadInSameDocument(). |
- void load(const FrameLoadRequest&); // The entry point for non-reload, non-history loads. |
- void reload(ReloadPolicy, const KURL& overrideURL = KURL(), ClientRedirectPolicy = NotClientRedirect); |
- void loadHistoryItem(HistoryItem*, FrameLoadType = FrameLoadTypeBackForward, |
- HistoryLoadType = HistoryDifferentDocumentLoad, |
- ResourceRequestCachePolicy = UseProtocolCachePolicy); // The entry point for all back/forward loads |
+ // Starts a load. It will eventually call startLoad() or |
+ // loadInSameDocument(). For history navigations or reloads, an appropriate |
+ // FrameLoadType should be given. Otherwise, FrameLoadTypeStandard should be |
+ // used (and the final FrameLoadType will be computed). For history |
+ // navigations, a history item and a HistoryLoadType should also be provided. |
+ void load(const FrameLoadRequest&, FrameLoadType = FrameLoadTypeStandard, |
+ HistoryItem* = nullptr, HistoryLoadType = HistoryDifferentDocumentLoad); |
static void reportLocalLoadFailed(LocalFrame*, const String& url); |
@@ -224,25 +230,29 @@ private: |
struct DeferredHistoryLoad { |
DISALLOW_ALLOCATION(); |
public: |
- DeferredHistoryLoad(HistoryItem* item, HistoryLoadType type, ResourceRequestCachePolicy cachePolicy) |
- : m_item(item) |
- , m_type(type) |
- , m_cachePolicy(cachePolicy) |
+ DeferredHistoryLoad(ResourceRequest request, HistoryItem* item, FrameLoadType loadType, |
+ HistoryLoadType historyLoadType) |
+ : m_request(request) |
+ , m_item(item) |
+ , m_loadType(loadType) |
+ , m_historyLoadType(historyLoadType) |
+ , m_isValid(true) |
{ |
} |
- DeferredHistoryLoad() { } |
- |
- bool isValid() { return m_item; } |
+ DeferredHistoryLoad() : m_isValid(false) { } |
DEFINE_INLINE_TRACE() |
{ |
- visitor->trace(m_item); |
dcheng
2015/06/02 18:42:02
Why was this removed? This probably breaks Oilpan.
clamy
2015/06/03 14:39:14
Done.
|
} |
+ bool isValid() { return m_isValid; } |
+ |
+ ResourceRequest m_request; |
RefPtrWillBeMember<HistoryItem> m_item; |
- HistoryLoadType m_type; |
- ResourceRequestCachePolicy m_cachePolicy; |
+ FrameLoadType m_loadType; |
+ HistoryLoadType m_historyLoadType; |
+ bool m_isValid; |
dcheng
2015/06/02 18:42:02
Rather than having a m_isValid member, I'd rather
clamy
2015/06/03 14:39:14
Done.
|
}; |
DeferredHistoryLoad m_deferredHistoryLoad; |