| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 74         void setFrame(Frame*); | 74         void setFrame(Frame*); | 
| 75         Frame* frame() const { return m_frame; } | 75         Frame* frame() const { return m_frame; } | 
| 76 | 76 | 
| 77         void detachFromFrame(); | 77         void detachFromFrame(); | 
| 78 | 78 | 
| 79         FrameLoader* frameLoader() const; | 79         FrameLoader* frameLoader() const; | 
| 80 | 80 | 
| 81         unsigned long mainResourceIdentifier() const; | 81         unsigned long mainResourceIdentifier() const; | 
| 82 | 82 | 
| 83         void replaceDocument(const String& source, Document*); | 83         void replaceDocument(const String& source, Document*); | 
| 84         DocumentWriter* beginWriting(const String& mimeType, const String& encod
     ing, const KURL& = KURL()); | 84         DocumentWriter* beginWriting(const AtomicString& mimeType, const AtomicS
     tring& encoding, const KURL& = KURL()); | 
| 85         void endWriting(DocumentWriter*); | 85         void endWriting(DocumentWriter*); | 
| 86 | 86 | 
| 87         String mimeType() const; | 87         const AtomicString& mimeType() const; | 
| 88 | 88 | 
| 89         void setUserChosenEncoding(const String& charset); | 89         void setUserChosenEncoding(const String& charset); | 
| 90 | 90 | 
| 91         const ResourceRequest& originalRequest() const; | 91         const ResourceRequest& originalRequest() const; | 
| 92         const ResourceRequest& originalRequestCopy() const; | 92         const ResourceRequest& originalRequestCopy() const; | 
| 93 | 93 | 
| 94         const ResourceRequest& request() const; | 94         const ResourceRequest& request() const; | 
| 95         ResourceRequest& request(); | 95         ResourceRequest& request(); | 
| 96 | 96 | 
| 97         ResourceFetcher* fetcher() const { return m_fetcher.get(); } | 97         ResourceFetcher* fetcher() const { return m_fetcher.get(); } | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 112         void setCommitted(bool committed) { m_committed = committed; } | 112         void setCommitted(bool committed) { m_committed = committed; } | 
| 113         bool isCommitted() const { return m_committed; } | 113         bool isCommitted() const { return m_committed; } | 
| 114         bool isLoading() const; | 114         bool isLoading() const; | 
| 115         const ResourceResponse& response() const { return m_response; } | 115         const ResourceResponse& response() const { return m_response; } | 
| 116         const ResourceError& mainDocumentError() const { return m_mainDocumentEr
     ror; } | 116         const ResourceError& mainDocumentError() const { return m_mainDocumentEr
     ror; } | 
| 117         bool isClientRedirect() const { return m_isClientRedirect; } | 117         bool isClientRedirect() const { return m_isClientRedirect; } | 
| 118         void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = i
     sClientRedirect; } | 118         void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = i
     sClientRedirect; } | 
| 119         bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistor
     yItem; } | 119         bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistor
     yItem; } | 
| 120         void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_
     replacesCurrentHistoryItem = replacesCurrentHistoryItem; } | 120         void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_
     replacesCurrentHistoryItem = replacesCurrentHistoryItem; } | 
| 121         bool isLoadingInAPISense() const; | 121         bool isLoadingInAPISense() const; | 
| 122         const String& overrideEncoding() const { return m_overrideEncoding; } | 122         const AtomicString& overrideEncoding() const { return m_overrideEncoding
     ; } | 
| 123 | 123 | 
| 124         bool scheduleArchiveLoad(Resource*, const ResourceRequest&); | 124         bool scheduleArchiveLoad(Resource*, const ResourceRequest&); | 
| 125         void cancelPendingSubstituteLoad(ResourceLoader*); | 125         void cancelPendingSubstituteLoad(ResourceLoader*); | 
| 126 | 126 | 
| 127         enum PolicyCheckLoadType { | 127         enum PolicyCheckLoadType { | 
| 128             PolicyCheckStandard, | 128             PolicyCheckStandard, | 
| 129             PolicyCheckFragment | 129             PolicyCheckFragment | 
| 130         }; | 130         }; | 
| 131         bool shouldContinueForNavigationPolicy(const ResourceRequest&, PolicyChe
     ckLoadType); | 131         bool shouldContinueForNavigationPolicy(const ResourceRequest&, PolicyChe
     ckLoadType); | 
| 132         const NavigationAction& triggeringAction() const { return m_triggeringAc
     tion; } | 132         const NavigationAction& triggeringAction() const { return m_triggeringAc
     tion; } | 
| 133         void setTriggeringAction(const NavigationAction& action) { m_triggeringA
     ction = action; } | 133         void setTriggeringAction(const NavigationAction& action) { m_triggeringA
     ction = action; } | 
| 134 | 134 | 
| 135         void setOverrideEncoding(const String& encoding) { m_overrideEncoding = 
     encoding; } | 135         void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncod
     ing = encoding; } | 
| 136 | 136 | 
| 137         void setDefersLoading(bool); | 137         void setDefersLoading(bool); | 
| 138 | 138 | 
| 139         void startLoadingMainResource(); | 139         void startLoadingMainResource(); | 
| 140         void cancelMainResourceLoad(const ResourceError&); | 140         void cancelMainResourceLoad(const ResourceError&); | 
| 141 | 141 | 
| 142         bool isLoadingMainResource() const { return m_loadingMainResource; } | 142         bool isLoadingMainResource() const { return m_loadingMainResource; } | 
| 143 | 143 | 
| 144         void stopLoadingSubresources(); | 144         void stopLoadingSubresources(); | 
| 145 | 145 | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 158         void clearRedirectChain(); | 158         void clearRedirectChain(); | 
| 159         void appendRedirect(const KURL&); | 159         void appendRedirect(const KURL&); | 
| 160 | 160 | 
| 161     protected: | 161     protected: | 
| 162         DocumentLoader(const ResourceRequest&, const SubstituteData&); | 162         DocumentLoader(const ResourceRequest&, const SubstituteData&); | 
| 163 | 163 | 
| 164         bool m_deferMainResourceDataLoad; | 164         bool m_deferMainResourceDataLoad; | 
| 165         Vector<KURL> m_redirectChain; | 165         Vector<KURL> m_redirectChain; | 
| 166 | 166 | 
| 167     private: | 167     private: | 
| 168         static PassRefPtr<DocumentWriter> createWriterFor(Frame*, const Document
     * ownerDocument, const KURL&, const String& mimeType, const String& encoding, bo
     ol userChosen, bool dispatch); | 168         static PassRefPtr<DocumentWriter> createWriterFor(Frame*, const Document
     * ownerDocument, const KURL&, const AtomicString& mimeType, const AtomicString& 
     encoding, bool userChosen, bool dispatch); | 
| 169 | 169 | 
| 170         void ensureWriter(); | 170         void ensureWriter(); | 
| 171         void ensureWriter(const String& mimeType, const KURL& overridingURL = KU
     RL()); | 171         void ensureWriter(const AtomicString& mimeType, const KURL& overridingUR
     L = KURL()); | 
| 172 | 172 | 
| 173         Document* document() const; | 173         Document* document() const; | 
| 174 | 174 | 
| 175         void setRequest(const ResourceRequest&); | 175         void setRequest(const ResourceRequest&); | 
| 176 | 176 | 
| 177         void commitIfReady(); | 177         void commitIfReady(); | 
| 178         void commitData(const char* bytes, size_t length); | 178         void commitData(const char* bytes, size_t length); | 
| 179         void setMainDocumentError(const ResourceError&); | 179         void setMainDocumentError(const ResourceError&); | 
| 180         void clearMainResourceLoader(); | 180         void clearMainResourceLoader(); | 
| 181         ResourceLoader* mainResourceLoader() const; | 181         ResourceLoader* mainResourceLoader() const; | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 233         ResourceRequest m_request; | 233         ResourceRequest m_request; | 
| 234 | 234 | 
| 235         ResourceResponse m_response; | 235         ResourceResponse m_response; | 
| 236 | 236 | 
| 237         ResourceError m_mainDocumentError; | 237         ResourceError m_mainDocumentError; | 
| 238 | 238 | 
| 239         bool m_committed; | 239         bool m_committed; | 
| 240         bool m_isClientRedirect; | 240         bool m_isClientRedirect; | 
| 241         bool m_replacesCurrentHistoryItem; | 241         bool m_replacesCurrentHistoryItem; | 
| 242 | 242 | 
| 243         String m_overrideEncoding; | 243         AtomicString m_overrideEncoding; | 
| 244 | 244 | 
| 245         // The action that triggered loading - we keep this around for the | 245         // The action that triggered loading - we keep this around for the | 
| 246         // benefit of the various policy handlers. | 246         // benefit of the various policy handlers. | 
| 247         NavigationAction m_triggeringAction; | 247         NavigationAction m_triggeringAction; | 
| 248 | 248 | 
| 249         OwnPtr<ArchiveResourceCollection> m_archiveResourceCollection; | 249         OwnPtr<ArchiveResourceCollection> m_archiveResourceCollection; | 
| 250         RefPtr<MHTMLArchive> m_archive; | 250         RefPtr<MHTMLArchive> m_archive; | 
| 251 | 251 | 
| 252         bool m_loadingMainResource; | 252         bool m_loadingMainResource; | 
| 253         DocumentLoadTiming m_documentLoadTiming; | 253         DocumentLoadTiming m_documentLoadTiming; | 
| 254 | 254 | 
| 255         double m_timeOfLastDataReceived; | 255         double m_timeOfLastDataReceived; | 
| 256         unsigned long m_identifierForLoadWithoutResourceLoader; | 256         unsigned long m_identifierForLoadWithoutResourceLoader; | 
| 257 | 257 | 
| 258         DocumentLoaderTimer m_dataLoadTimer; | 258         DocumentLoaderTimer m_dataLoadTimer; | 
| 259 | 259 | 
| 260         friend class ApplicationCacheHost;  // for substitute resource delivery | 260         friend class ApplicationCacheHost;  // for substitute resource delivery | 
| 261         OwnPtr<ApplicationCacheHost> m_applicationCacheHost; | 261         OwnPtr<ApplicationCacheHost> m_applicationCacheHost; | 
| 262     }; | 262     }; | 
| 263 } | 263 } | 
| 264 | 264 | 
| 265 #endif // DocumentLoader_h | 265 #endif // DocumentLoader_h | 
| OLD | NEW | 
|---|