Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FrameFetchContext_h | 31 #ifndef FrameFetchContext_h |
| 32 #define FrameFetchContext_h | 32 #define FrameFetchContext_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/fetch/FetchContext.h" | 35 #include "core/fetch/FetchContext.h" |
| 36 #include "core/fetch/FetchRequest.h" | |
| 36 #include "core/fetch/ResourceFetcher.h" | 37 #include "core/fetch/ResourceFetcher.h" |
| 37 #include "core/frame/csp/ContentSecurityPolicy.h" | 38 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 38 #include "core/loader/LinkLoader.h" | 39 #include "core/loader/LinkLoader.h" |
| 39 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
| 40 #include "platform/network/ResourceRequest.h" | 41 #include "platform/network/ResourceRequest.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 45 class ClientHintsPreferences; | |
| 44 class Document; | 46 class Document; |
| 45 class DocumentLoader; | 47 class DocumentLoader; |
| 46 class LocalFrame; | 48 class LocalFrame; |
| 47 class ResourceError; | 49 class ResourceError; |
| 48 class ResourceResponse; | 50 class ResourceResponse; |
| 49 | 51 |
| 50 class CORE_EXPORT FrameFetchContext final : public FetchContext { | 52 class CORE_EXPORT FrameFetchContext final : public FetchContext { |
| 51 public: | 53 public: |
| 52 static ResourceFetcher* createFetcherFromDocumentLoader( | 54 static ResourceFetcher* createFetcherFromDocumentLoader( |
| 53 DocumentLoader* loader) { | 55 DocumentLoader* loader) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 | 137 |
| 136 bool isMainFrame() const override; | 138 bool isMainFrame() const override; |
| 137 bool defersLoading() const override; | 139 bool defersLoading() const override; |
| 138 bool isLoadComplete() const override; | 140 bool isLoadComplete() const override; |
| 139 bool pageDismissalEventBeingDispatched() const override; | 141 bool pageDismissalEventBeingDispatched() const override; |
| 140 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; | 142 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; |
| 141 void sendImagePing(const KURL&) override; | 143 void sendImagePing(const KURL&) override; |
| 142 void addConsoleMessage(const String&, | 144 void addConsoleMessage(const String&, |
| 143 LogMessageType = LogErrorMessage) const override; | 145 LogMessageType = LogErrorMessage) const override; |
| 144 SecurityOrigin* getSecurityOrigin() const override; | 146 SecurityOrigin* getSecurityOrigin() const override; |
| 145 void modifyRequestForCSP(ResourceRequest&) override; | 147 |
| 146 void addClientHintsIfNecessary(FetchRequest&) override; | 148 void setFirstPartyCookieAndRequestorOrigin(ResourceRequest&) override; |
| 147 void addCSPHeaderIfNecessary(Resource::Type, FetchRequest&) override; | 149 void populateResourceRequest(Resource::Type, |
| 148 void populateRequestData(ResourceRequest&) override; | 150 const ClientHintsPreferences&, |
| 151 const FetchRequest::ResourceWidth&, | |
| 152 ResourceRequest&) override; | |
| 153 | |
| 154 // Exposed for testing. | |
|
yhirano
2016/12/26 08:56:45
Can you add ForTesting suffix for each function?
tyoshino (SeeGerritForStatus)
2017/01/10 09:36:28
They're exposed only for testing, but also used in
| |
| 155 void modifyRequestForCSP(ResourceRequest&); | |
| 156 void addClientHintsIfNecessary(const ClientHintsPreferences&, | |
| 157 const FetchRequest::ResourceWidth&, | |
| 158 ResourceRequest&); | |
| 159 void addCSPHeaderIfNecessary(Resource::Type, ResourceRequest&); | |
| 149 | 160 |
| 150 MHTMLArchive* archive() const override; | 161 MHTMLArchive* archive() const override; |
| 151 | 162 |
| 152 ResourceLoadPriority modifyPriorityForExperiments( | 163 ResourceLoadPriority modifyPriorityForExperiments( |
| 153 ResourceLoadPriority) override; | 164 ResourceLoadPriority) override; |
| 154 | 165 |
| 155 void countClientHintsDPR() override; | 166 void countClientHintsDPR() override; |
| 156 void countClientHintsResourceWidth() override; | 167 void countClientHintsResourceWidth() override; |
| 157 void countClientHintsViewportWidth() override; | 168 void countClientHintsViewportWidth() override; |
| 158 | 169 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 188 // FIXME: Oilpan: Ideally this should just be a traced Member but that will | 199 // FIXME: Oilpan: Ideally this should just be a traced Member but that will |
| 189 // currently leak because ComputedStyle and its data are not on the heap. | 200 // currently leak because ComputedStyle and its data are not on the heap. |
| 190 // See crbug.com/383860 for details. | 201 // See crbug.com/383860 for details. |
| 191 WeakMember<Document> m_document; | 202 WeakMember<Document> m_document; |
| 192 Member<DocumentLoader> m_documentLoader; | 203 Member<DocumentLoader> m_documentLoader; |
| 193 }; | 204 }; |
| 194 | 205 |
| 195 } // namespace blink | 206 } // namespace blink |
| 196 | 207 |
| 197 #endif | 208 #endif |
| OLD | NEW |