Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.h

Issue 2823213002: Implement CanRequest in BaseFetchContext (Closed)
Patch Set: fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 bool ShouldLoadNewResource(Resource::Type) const override; 110 bool ShouldLoadNewResource(Resource::Type) const override;
111 void RecordLoadingActivity(unsigned long identifier, 111 void RecordLoadingActivity(unsigned long identifier,
112 const ResourceRequest&, 112 const ResourceRequest&,
113 Resource::Type, 113 Resource::Type,
114 const AtomicString& fetch_initiator_name) override; 114 const AtomicString& fetch_initiator_name) override;
115 void DidLoadResource(Resource*) override; 115 void DidLoadResource(Resource*) override;
116 116
117 void AddResourceTiming(const ResourceTimingInfo&) override; 117 void AddResourceTiming(const ResourceTimingInfo&) override;
118 bool AllowImage(bool images_enabled, const KURL&) const override; 118 bool AllowImage(bool images_enabled, const KURL&) const override;
119 ResourceRequestBlockedReason CanRequest(
120 Resource::Type,
121 const ResourceRequest&,
122 const KURL&,
123 const ResourceLoaderOptions&,
124 SecurityViolationReportingPolicy,
125 FetchParameters::OriginRestriction) const override;
126 ResourceRequestBlockedReason AllowResponse(
127 Resource::Type,
128 const ResourceRequest&,
129 const KURL&,
130 const ResourceLoaderOptions&) const override;
131 119
132 bool IsControlledByServiceWorker() const override; 120 bool IsControlledByServiceWorker() const override;
133 int64_t ServiceWorkerID() const override; 121 int64_t ServiceWorkerID() const override;
134 122
135 bool IsMainFrame() const override; 123 bool IsMainFrame() const override;
136 bool DefersLoading() const override; 124 bool DefersLoading() const override;
137 bool IsLoadComplete() const override; 125 bool IsLoadComplete() const override;
138 bool PageDismissalEventBeingDispatched() const override; 126 bool PageDismissalEventBeingDispatched() const override;
139 bool UpdateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; 127 bool UpdateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override;
140 void SendImagePing(const KURL&) override; 128 void SendImagePing(const KURL&) override;
(...skipping 26 matching lines...) Expand all
167 155
168 // m_documentLoader is null when loading resources from an HTML import 156 // m_documentLoader is null when loading resources from an HTML import
169 // and in such cases we use the document loader of the importing frame. 157 // and in such cases we use the document loader of the importing frame.
170 // Convenient accessors below can be used to transparently access the 158 // Convenient accessors below can be used to transparently access the
171 // relevant document loader or frame in either cases without null-checks. 159 // relevant document loader or frame in either cases without null-checks.
172 // TODO(kinuko): Remove constness, these return non-const members. 160 // TODO(kinuko): Remove constness, these return non-const members.
173 DocumentLoader* MasterDocumentLoader() const; 161 DocumentLoader* MasterDocumentLoader() const;
174 Document* GetDocument() const; 162 Document* GetDocument() const;
175 LocalFrame* GetFrame() const; 163 LocalFrame* GetFrame() const;
176 LocalFrameClient* GetLocalFrameClient() const; 164 LocalFrameClient* GetLocalFrameClient() const;
177
178 ContentSettingsClient* GetContentSettingsClient() const;
179
180 LocalFrame* FrameOfImportsController() const; 165 LocalFrame* FrameOfImportsController() const;
181 166
182 ResourceRequestBlockedReason CanRequestInternal( 167 // BaseFetchContext overrides:
183 Resource::Type, 168 ContentSettingsClient* GetContentSettingsClient() const override;
169 Settings* GetSettings() const override;
170 SubresourceFilter* GetSubresourceFilter() const override;
171 SecurityContext* GetMainResourceSecurityContext() const override;
172 bool ShouldBlockRequestByInspector(const ResourceRequest&) const override;
173 void DispatchDidBlockRequest(const ResourceRequest&,
174 const FetchInitiatorInfo&,
175 ResourceRequestBlockedReason) const override;
176 void ReportLocalLoadFailed(const KURL&) const override;
177 bool ShouldBypassMainWorldCSP() const override;
178 bool IsSVGImageChromeClient() const override;
179 void CountUsage(UseCounter::Feature) const override;
180 void CountDeprecation(UseCounter::Feature) const override;
181 bool ShouldBlockFetchByMixedContentCheck(
184 const ResourceRequest&, 182 const ResourceRequest&,
185 const KURL&, 183 const KURL&,
186 const ResourceLoaderOptions&, 184 SecurityViolationReportingPolicy) const override;
187 SecurityViolationReportingPolicy,
188 FetchParameters::OriginRestriction,
189 ResourceRequest::RedirectStatus) const;
190 185
191 Member<DocumentLoader> document_loader_; 186 Member<DocumentLoader> document_loader_;
192 }; 187 };
193 188
194 } // namespace blink 189 } // namespace blink
195 190
196 #endif 191 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698