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

Unified Diff: content/public/renderer/resource_fetcher.h

Issue 532773002: Implement ManifestFetcher, helper to fetch Web Manifests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/fetchers/image_resource_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/resource_fetcher.h
diff --git a/content/public/renderer/resource_fetcher.h b/content/public/renderer/resource_fetcher.h
index 4cb568977687dc97df63242150b103b1714e9310..5c010f999653a390f4c9d689c71a648afe8c6e37 100644
--- a/content/public/renderer/resource_fetcher.h
+++ b/content/public/renderer/resource_fetcher.h
@@ -27,6 +27,11 @@ namespace content {
// Interface to download resources asynchronously.
class CONTENT_EXPORT ResourceFetcher {
public:
+ enum LoaderType {
+ PLATFORM_LOADER, // uses Platform::createURLLoader
+ FRAME_ASSOCIATED_LOADER, // uses WebFrame::createAssociatedURLLoader
+ };
+
virtual ~ResourceFetcher() {}
// This will be called asynchronously after the URL has been fetched,
@@ -53,11 +58,15 @@ class CONTENT_EXPORT ResourceFetcher {
virtual void Start(blink::WebFrame* frame,
blink::WebURLRequest::RequestContext request_context,
blink::WebURLRequest::FrameType frame_type,
+ LoaderType loader_type,
const Callback& callback) = 0;
// Sets how long to wait for the server to reply. By default, there is no
// timeout. Must be called after a request is started.
virtual void SetTimeout(const base::TimeDelta& timeout) = 0;
+
+ // Manually cancel the request.
+ virtual void Cancel() = 0;
};
} // namespace content
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/fetchers/image_resource_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698