Chromium Code Reviews| Index: Source/core/loader/DocumentLoader.h |
| diff --git a/Source/core/loader/DocumentLoader.h b/Source/core/loader/DocumentLoader.h |
| index 612588b36fa93e5242623a02562d8a2f47154d8e..27c39a17a791f1708f423cf5488dc22532fcd78f 100644 |
| --- a/Source/core/loader/DocumentLoader.h |
| +++ b/Source/core/loader/DocumentLoader.h |
| @@ -94,9 +94,7 @@ namespace blink { |
| void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSource); |
| void stopLoading(); |
| - bool isCommitted() const { return m_committed; } |
| bool isLoading() const; |
| - bool isLoadingMainResource() const { return m_loadingMainResource; } |
| const ResourceResponse& response() const { return m_response; } |
| const ResourceError& mainDocumentError() const { return m_mainDocumentError; } |
| bool isClientRedirect() const { return m_isClientRedirect; } |
| @@ -104,6 +102,8 @@ namespace blink { |
| bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryItem; } |
| void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_replacesCurrentHistoryItem = replacesCurrentHistoryItem; } |
| + bool isCommittedButEmpty() const { return m_state == Committed; } |
|
dcheng
2015/07/13 20:53:56
Does this imply that mainReceivedError/finishedLoa
Nate Chapin
2015/07/13 21:13:28
The most common case would be that this is called
|
| + |
| bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSecurityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPolicy = NavigationPolicyCurrentTab); |
| NavigationType navigationType() const { return m_navigationType; } |
| void setNavigationType(NavigationType navigationType) { m_navigationType = navigationType; } |
| @@ -161,7 +161,6 @@ namespace blink { |
| void commitIfReady(); |
| void commitData(const char* bytes, size_t length); |
| - void clearMainResourceLoader(); |
| ResourceLoader* mainResourceLoader() const; |
| void clearMainResourceHandle(); |
| @@ -208,7 +207,6 @@ namespace blink { |
| ResourceError m_mainDocumentError; |
| - bool m_committed; |
| bool m_isClientRedirect; |
| bool m_replacesCurrentHistoryItem; |
| @@ -216,7 +214,6 @@ namespace blink { |
| RefPtrWillBeMember<MHTMLArchive> m_archive; |
| - bool m_loadingMainResource; |
| DocumentLoadTiming m_documentLoadTiming; |
| double m_timeOfLastDataReceived; |
| @@ -226,6 +223,15 @@ namespace blink { |
| RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; |
| ClientHintsPreferences m_clientHintsPreferences; |
| InitialScrollState m_initialScrollState; |
| + |
| + enum State { |
| + NotStarted, |
| + Provisional, |
| + Committed, |
| + DataReceived, |
| + MainResourceDone |
| + }; |
| + State m_state; |
| }; |
| DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |