| 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* createContextAndFetcher(DocumentLoader* loader, | 52 static ResourceFetcher* createContextAndFetcher(DocumentLoader* loader, |
| 54 Document* document) { | 53 Document* document) { |
| 55 return ResourceFetcher::create(new FrameFetchContext(loader, document)); | 54 return ResourceFetcher::create(new FrameFetchContext(loader, document)); |
| 56 } | 55 } |
| 57 | 56 |
| 58 static void provideDocumentToContext(FetchContext& context, | 57 static void provideDocumentToContext(FetchContext& context, |
| 59 Document* document) { | 58 Document* document) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 bool isInternalRequest) override; | 105 bool isInternalRequest) override; |
| 107 | 106 |
| 108 bool shouldLoadNewResource(Resource::Type) const override; | 107 bool shouldLoadNewResource(Resource::Type) const override; |
| 109 void willStartLoadingResource(unsigned long identifier, | 108 void willStartLoadingResource(unsigned long identifier, |
| 110 ResourceRequest&, | 109 ResourceRequest&, |
| 111 Resource::Type) override; | 110 Resource::Type) override; |
| 112 void didLoadResource(Resource*) override; | 111 void didLoadResource(Resource*) override; |
| 113 | 112 |
| 114 void addResourceTiming(const ResourceTimingInfo&) override; | 113 void addResourceTiming(const ResourceTimingInfo&) override; |
| 115 bool allowImage(bool imagesEnabled, const KURL&) const override; | 114 bool allowImage(bool imagesEnabled, const KURL&) const override; |
| 116 bool canRequest(Resource::Type, | 115 ResourceRequestBlockedReason canRequest( |
| 117 const ResourceRequest&, | 116 Resource::Type, |
| 118 const KURL&, | 117 const ResourceRequest&, |
| 119 const ResourceLoaderOptions&, | 118 const KURL&, |
| 120 bool forPreload, | 119 const ResourceLoaderOptions&, |
| 121 FetchRequest::OriginRestriction) const override; | 120 bool forPreload, |
| 122 bool allowResponse(Resource::Type, | 121 FetchRequest::OriginRestriction) const override; |
| 123 const ResourceRequest&, | 122 ResourceRequestBlockedReason allowResponse( |
| 124 const KURL&, | 123 Resource::Type, |
| 125 const ResourceLoaderOptions&) const override; | 124 const ResourceRequest&, |
| 125 const KURL&, |
| 126 const ResourceLoaderOptions&) const override; |
| 126 | 127 |
| 127 bool isControlledByServiceWorker() const override; | 128 bool isControlledByServiceWorker() const override; |
| 128 int64_t serviceWorkerID() const override; | 129 int64_t serviceWorkerID() const override; |
| 129 | 130 |
| 130 bool isMainFrame() const override; | 131 bool isMainFrame() const override; |
| 131 bool defersLoading() const override; | 132 bool defersLoading() const override; |
| 132 bool isLoadComplete() const override; | 133 bool isLoadComplete() const override; |
| 133 bool pageDismissalEventBeingDispatched() const override; | 134 bool pageDismissalEventBeingDispatched() const override; |
| 134 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; | 135 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; |
| 135 void sendImagePing(const KURL&) override; | 136 void sendImagePing(const KURL&) override; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // FIXME: Oilpan: Ideally this should just be a traced Member but that will | 182 // FIXME: Oilpan: Ideally this should just be a traced Member but that will |
| 182 // currently leak because ComputedStyle and its data are not on the heap. | 183 // currently leak because ComputedStyle and its data are not on the heap. |
| 183 // See crbug.com/383860 for details. | 184 // See crbug.com/383860 for details. |
| 184 WeakMember<Document> m_document; | 185 WeakMember<Document> m_document; |
| 185 Member<DocumentLoader> m_documentLoader; | 186 Member<DocumentLoader> m_documentLoader; |
| 186 }; | 187 }; |
| 187 | 188 |
| 188 } // namespace blink | 189 } // namespace blink |
| 189 | 190 |
| 190 #endif | 191 #endif |
| OLD | NEW |