| 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 28 matching lines...) Expand all Loading... |
| 39 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.h" |
| 40 #include "platform/network/ResourceRequest.h" | 40 #include "platform/network/ResourceRequest.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class Document; | 44 class Document; |
| 45 class DocumentLoader; | 45 class DocumentLoader; |
| 46 class LocalFrame; | 46 class LocalFrame; |
| 47 class ResourceError; | 47 class ResourceError; |
| 48 class ResourceResponse; | 48 class ResourceResponse; |
| 49 class ResourceRequest; | |
| 50 | 49 |
| 51 class CORE_EXPORT FrameFetchContext final : public FetchContext { | 50 class CORE_EXPORT FrameFetchContext final : public FetchContext { |
| 52 public: | 51 public: |
| 53 static ResourceFetcher* createFetcherFromDocumentLoader( | 52 static ResourceFetcher* createFetcherFromDocumentLoader( |
| 54 DocumentLoader* loader) { | 53 DocumentLoader* loader) { |
| 55 return ResourceFetcher::create(new FrameFetchContext(loader, nullptr)); | 54 return ResourceFetcher::create(new FrameFetchContext(loader, nullptr)); |
| 56 } | 55 } |
| 57 static ResourceFetcher* createFetcherFromDocument(Document* document) { | 56 static ResourceFetcher* createFetcherFromDocument(Document* document) { |
| 58 return ResourceFetcher::create(new FrameFetchContext(nullptr, document)); | 57 return ResourceFetcher::create(new FrameFetchContext(nullptr, document)); |
| 59 } | 58 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 bool isInternalRequest) override; | 108 bool isInternalRequest) override; |
| 110 | 109 |
| 111 bool shouldLoadNewResource(Resource::Type) const override; | 110 bool shouldLoadNewResource(Resource::Type) const override; |
| 112 void willStartLoadingResource(unsigned long identifier, | 111 void willStartLoadingResource(unsigned long identifier, |
| 113 ResourceRequest&, | 112 ResourceRequest&, |
| 114 Resource::Type) override; | 113 Resource::Type) override; |
| 115 void didLoadResource(Resource*) override; | 114 void didLoadResource(Resource*) override; |
| 116 | 115 |
| 117 void addResourceTiming(const ResourceTimingInfo&) override; | 116 void addResourceTiming(const ResourceTimingInfo&) override; |
| 118 bool allowImage(bool imagesEnabled, const KURL&) const override; | 117 bool allowImage(bool imagesEnabled, const KURL&) const override; |
| 119 bool canRequest(Resource::Type, | 118 ResourceRequestBlockedReason canRequest( |
| 120 const ResourceRequest&, | 119 Resource::Type, |
| 121 const KURL&, | 120 const ResourceRequest&, |
| 122 const ResourceLoaderOptions&, | 121 const KURL&, |
| 123 bool forPreload, | 122 const ResourceLoaderOptions&, |
| 124 FetchRequest::OriginRestriction) const override; | 123 bool forPreload, |
| 125 bool allowResponse(Resource::Type, | 124 FetchRequest::OriginRestriction) const override; |
| 126 const ResourceRequest&, | 125 ResourceRequestBlockedReason allowResponse( |
| 127 const KURL&, | 126 Resource::Type, |
| 128 const ResourceLoaderOptions&) const override; | 127 const ResourceRequest&, |
| 128 const KURL&, |
| 129 const ResourceLoaderOptions&) const override; |
| 129 | 130 |
| 130 bool isControlledByServiceWorker() const override; | 131 bool isControlledByServiceWorker() const override; |
| 131 int64_t serviceWorkerID() const override; | 132 int64_t serviceWorkerID() const override; |
| 132 | 133 |
| 133 bool isMainFrame() const override; | 134 bool isMainFrame() const override; |
| 134 bool defersLoading() const override; | 135 bool defersLoading() const override; |
| 135 bool isLoadComplete() const override; | 136 bool isLoadComplete() const override; |
| 136 bool pageDismissalEventBeingDispatched() const override; | 137 bool pageDismissalEventBeingDispatched() const override; |
| 137 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; | 138 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; |
| 138 void sendImagePing(const KURL&) override; | 139 void sendImagePing(const KURL&) override; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // FIXME: Oilpan: Ideally this should just be a traced Member but that will | 186 // FIXME: Oilpan: Ideally this should just be a traced Member but that will |
| 186 // currently leak because ComputedStyle and its data are not on the heap. | 187 // currently leak because ComputedStyle and its data are not on the heap. |
| 187 // See crbug.com/383860 for details. | 188 // See crbug.com/383860 for details. |
| 188 WeakMember<Document> m_document; | 189 WeakMember<Document> m_document; |
| 189 Member<DocumentLoader> m_documentLoader; | 190 Member<DocumentLoader> m_documentLoader; |
| 190 }; | 191 }; |
| 191 | 192 |
| 192 } // namespace blink | 193 } // namespace blink |
| 193 | 194 |
| 194 #endif | 195 #endif |
| OLD | NEW |