diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-18 14:10:49 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-18 13:53:24 +0000 |
commit | 813fbf95af77a531c57a8c497345ad2c61d475b3 (patch) | |
tree | 821b2c8de8365f21b6c9ba17a236fb3006a1d506 /chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h | |
parent | af6588f8d723931a298c995fa97259bb7f7deb55 (diff) |
BASELINE: Update chromium to 44.0.2403.47
Change-Id: Ie056fedba95cf5e5c76b30c4b2c80fca4764aa2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h index f0af67c7de2..4af593ec7c8 100644 --- a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h +++ b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h @@ -30,14 +30,17 @@ #ifndef DocumentLoader_h #define DocumentLoader_h +#include "core/CoreExport.h" +#include "core/fetch/ClientHintsPreferences.h" #include "core/fetch/RawResource.h" #include "core/fetch/ResourceLoaderOptions.h" #include "core/fetch/ResourcePtr.h" +#include "core/fetch/SubstituteData.h" #include "core/frame/csp/ContentSecurityPolicy.h" #include "core/loader/DocumentLoadTiming.h" #include "core/loader/DocumentWriter.h" -#include "core/loader/NavigationAction.h" -#include "core/loader/SubstituteData.h" +#include "core/loader/FrameLoaderTypes.h" +#include "core/loader/NavigationPolicy.h" #include "platform/network/ResourceError.h" #include "platform/network/ResourceRequest.h" #include "platform/network/ResourceResponse.h" @@ -45,21 +48,17 @@ #include "wtf/RefPtr.h" namespace blink { -class WebThreadedDataReceiver; -} - -namespace blink { class ApplicationCacheHost; - class ArchiveResourceCollection; class ResourceFetcher; class DocumentInit; class LocalFrame; class FrameLoader; class MHTMLArchive; class ResourceLoader; + class ThreadedDataReceiver; - class DocumentLoader : public RefCounted<DocumentLoader>, private RawResourceClient { - WTF_MAKE_FAST_ALLOCATED; + class CORE_EXPORT DocumentLoader : public RefCounted<DocumentLoader>, private RawResourceClient { + WTF_MAKE_FAST_ALLOCATED(DocumentLoader); public: static PassRefPtr<DocumentLoader> create(LocalFrame* frame, const ResourceRequest& request, const SubstituteData& data) { @@ -105,19 +104,19 @@ namespace blink { bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryItem; } void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_replacesCurrentHistoryItem = replacesCurrentHistoryItem; } - bool scheduleArchiveLoad(Resource*, const ResourceRequest&); - - bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSecurityPolicyCheck shouldCheckMainWorldContentSecurityPolicy, bool isTransitionNavigation = false); - const NavigationAction& triggeringAction() const { return m_triggeringAction; } - void setTriggeringAction(const NavigationAction& action) { m_triggeringAction = action; } + bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSecurityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPolicy = NavigationPolicyCurrentTab, bool isTransitionNavigation = false); + NavigationType navigationType() const { return m_navigationType; } + void setNavigationType(NavigationType navigationType) { m_navigationType = navigationType; } void setDefersLoading(bool); void startLoadingMainResource(); void cancelMainResourceLoad(const ResourceError&); - void attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceiver>); - DocumentLoadTiming* timing() { return &m_documentLoadTiming; } + void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataReceiver>); + void acceptDataFromThreadedReceiver(const char* data, int dataLength, int encodedDataLength); + DocumentLoadTiming& timing() { return m_documentLoadTiming; } + const DocumentLoadTiming& timing() const { return m_documentLoadTiming; } ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); } @@ -127,13 +126,26 @@ namespace blink { PassRefPtr<ContentSecurityPolicy> releaseContentSecurityPolicy() { return m_contentSecurityPolicy.release(); } + ClientHintsPreferences& clientHintsPreferences() { return m_clientHintsPreferences; } + + struct InitialScrollState { + InitialScrollState() + : didRestoreFromHistory(false) + { + } + + // TODO(skobes): Move FrameView::m_wasScrolledByUser into here. + bool didRestoreFromHistory; + }; + InitialScrollState& initialScrollState() { return m_initialScrollState; } + protected: DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); Vector<KURL> m_redirectChain; private: - static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Document* ownerDocument, const DocumentInit&, const AtomicString& mimeType, const AtomicString& encoding, bool dispatch); + static PassRefPtrWillBeRawPtr<DocumentWriter> createWriterFor(const Document* ownerDocument, const DocumentInit&, const AtomicString& mimeType, const AtomicString& encoding, bool dispatch, ParserSynchronizationPolicy); void ensureWriter(const AtomicString& mimeType, const KURL& overridingURL = KURL()); void endWriting(DocumentWriter*); @@ -143,7 +155,6 @@ namespace blink { void commitIfReady(); void commitData(const char* bytes, size_t length); - void setMainDocumentError(const ResourceError&); void clearMainResourceLoader(); ResourceLoader* mainResourceLoader() const; void clearMainResourceHandle(); @@ -151,7 +162,6 @@ namespace blink { bool maybeCreateArchive(); void prepareSubframeArchiveLoadIfNeeded(); - void addAllArchiveResources(MHTMLArchive*); void willSendRequest(ResourceRequest&, const ResourceResponse&); void finishedLoading(double finishTime); @@ -196,11 +206,8 @@ namespace blink { bool m_isClientRedirect; bool m_replacesCurrentHistoryItem; - // The action that triggered loading - we keep this around for the - // benefit of the various policy handlers. - NavigationAction m_triggeringAction; + NavigationType m_navigationType; - OwnPtrWillBePersistent<ArchiveResourceCollection> m_archiveResourceCollection; RefPtrWillBePersistent<MHTMLArchive> m_archive; bool m_loadingMainResource; @@ -212,6 +219,8 @@ namespace blink { OwnPtrWillBePersistent<ApplicationCacheHost> m_applicationCacheHost; RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; + ClientHintsPreferences m_clientHintsPreferences; + InitialScrollState m_initialScrollState; }; } |