Index: third_party/WebKit/Source/core/loader/DocumentLoader.h |
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.h b/third_party/WebKit/Source/core/loader/DocumentLoader.h |
index 62dc9b638f562b1a63c0b3efcb325bcdc58ba40b..7ca05b5c69ee03cd94896deb54df230f87994005 100644 |
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.h |
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.h |
@@ -62,10 +62,12 @@ class ApplicationCacheHost; |
class SubresourceFilter; |
class ResourceFetcher; |
class DocumentInit; |
+class HistoryItem; |
class LocalFrame; |
class LocalFrameClient; |
class FrameLoader; |
class ResourceTimingInfo; |
+class SerializedScriptValue; |
class WebServiceWorkerNetworkProvider; |
struct ViewportDescriptionWrapper; |
@@ -120,7 +122,11 @@ class CORE_EXPORT DocumentLoader |
void didChangePerformanceTiming(); |
void didObserveLoadingBehavior(WebLoadingBehaviorFlag); |
void updateForSameDocumentNavigation(const KURL&, |
- SameDocumentNavigationSource); |
+ SameDocumentNavigationSource, |
+ PassRefPtr<SerializedScriptValue>, |
+ HistoryScrollRestorationType, |
+ FrameLoadType, |
+ Document*); |
const ResourceResponse& response() const { return m_response; } |
bool isClientRedirect() const { return m_isClientRedirect; } |
void setIsClientRedirect(bool isClientRedirect) { |
@@ -143,6 +149,10 @@ class CORE_EXPORT DocumentLoader |
// is actually handled in the renderer. |
bool didStart() const { return m_state != NotStarted; } |
+ void markAsCommitted() { |
+ DCHECK_LT(m_state, Committed); |
+ m_state = Committed; |
+ } |
void setSentDidFinishLoad() { m_state = SentDidFinishLoad; } |
bool sentDidFinishLoad() const { return m_state == SentDidFinishLoad; } |
@@ -154,6 +164,9 @@ class CORE_EXPORT DocumentLoader |
m_navigationType = navigationType; |
} |
+ void setItemForHistoryNavigation(HistoryItem* item) { m_historyItem = item; } |
+ HistoryItem* historyItem() const { return m_historyItem; } |
+ |
void startLoadingMainResource(); |
DocumentLoadTiming& timing() { return m_documentLoadTiming; } |
@@ -201,6 +214,8 @@ class CORE_EXPORT DocumentLoader |
std::unique_ptr<SourceLocation> copySourceLocation() const; |
void setSourceLocation(std::unique_ptr<SourceLocation>); |
+ void loadFailed(const ResourceError&); |
+ |
DECLARE_VIRTUAL_TRACE(); |
protected: |
@@ -235,7 +250,6 @@ class CORE_EXPORT DocumentLoader |
FrameLoader& frameLoader() const; |
LocalFrameClient& localFrameClient() const; |
- void commitIfReady(); |
void commitData(const char* bytes, size_t length); |
void clearMainResourceHandle(); |
@@ -244,6 +258,11 @@ class CORE_EXPORT DocumentLoader |
void finishedLoading(double finishTime); |
void cancelLoadAfterCSPDenied(const ResourceResponse&); |
+ enum class HistoryNavigationType { DifferentDocument, Fragment, HistoryApi }; |
+ void setHistoryItemStateForCommit(HistoryItem* oldItem, |
+ FrameLoadType, |
+ HistoryNavigationType); |
+ |
// RawResourceClient implementation |
bool redirectReceived(Resource*, |
const ResourceRequest&, |
@@ -269,6 +288,7 @@ class CORE_EXPORT DocumentLoader |
Member<ResourceFetcher> m_fetcher; |
Member<RawResource> m_mainResource; |
+ Member<HistoryItem> m_historyItem; |
Member<DocumentWriter> m_writer; |