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

Side by Side Diff: content/public/renderer/resource_fetcher.h

Issue 2869663002: ResourceFetcher::Start should be given a WebLocalFrame (Closed)
Patch Set: fix Created 3 years, 7 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
« no previous file with comments | « no previous file | content/renderer/fetchers/resource_fetcher_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_RENDERER_RESOURCE_FETCHER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RESOURCE_FETCHER_H_
6 #define CONTENT_PUBLIC_RENDERER_RESOURCE_FETCHER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RESOURCE_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "third_party/WebKit/public/platform/WebURLRequest.h" 12 #include "third_party/WebKit/public/platform/WebURLRequest.h"
13 13
14 class GURL; 14 class GURL;
15 15
16 namespace base { 16 namespace base {
17 class TimeDelta; 17 class TimeDelta;
18 } 18 }
19 19
20 namespace blink { 20 namespace blink {
21 class WebFrame; 21 class WebLocalFrame;
22 class WebURLResponse; 22 class WebURLResponse;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 26
27 // Interface to download resources asynchronously. 27 // Interface to download resources asynchronously.
28 class CONTENT_EXPORT ResourceFetcher { 28 class CONTENT_EXPORT ResourceFetcher {
29 public: 29 public:
30 virtual ~ResourceFetcher() {} 30 virtual ~ResourceFetcher() {}
31 31
(...skipping 12 matching lines...) Expand all
44 // Set the corresponding parameters of the request. Must be called before 44 // Set the corresponding parameters of the request. Must be called before
45 // Start. By default, requests are GETs with no body and respect the default 45 // Start. By default, requests are GETs with no body and respect the default
46 // cache policy. 46 // cache policy.
47 virtual void SetMethod(const std::string& method) = 0; 47 virtual void SetMethod(const std::string& method) = 0;
48 virtual void SetBody(const std::string& body) = 0; 48 virtual void SetBody(const std::string& body) = 0;
49 virtual void SetHeader(const std::string& header, 49 virtual void SetHeader(const std::string& header,
50 const std::string& value) = 0; 50 const std::string& value) = 0;
51 51
52 // Starts the request using the specified frame. Calls |callback| when 52 // Starts the request using the specified frame. Calls |callback| when
53 // done. 53 // done.
54 virtual void Start(blink::WebFrame* frame, 54 virtual void Start(blink::WebLocalFrame* frame,
55 blink::WebURLRequest::RequestContext request_context, 55 blink::WebURLRequest::RequestContext request_context,
56 const Callback& callback) = 0; 56 const Callback& callback) = 0;
57 57
58 // Sets how long to wait for the server to reply. By default, there is no 58 // Sets how long to wait for the server to reply. By default, there is no
59 // timeout. Must be called after a request is started. 59 // timeout. Must be called after a request is started.
60 virtual void SetTimeout(const base::TimeDelta& timeout) = 0; 60 virtual void SetTimeout(const base::TimeDelta& timeout) = 0;
61 61
62 // Manually cancel the request. 62 // Manually cancel the request.
63 virtual void Cancel() = 0; 63 virtual void Cancel() = 0;
64 }; 64 };
65 65
66 } // namespace content 66 } // namespace content
67 67
68 #endif // CONTENT_PUBLIC_RENDERER_RESOURCE_FETCHER_H_ 68 #endif // CONTENT_PUBLIC_RENDERER_RESOURCE_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/fetchers/resource_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698