OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ASSOCIATED_RESOURCE_FETCHER_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_ASSOCIATED_RESOURCE_FETCHER_H_ |
6 #define CONTENT_PUBLIC_RENDERER_ASSOCIATED_RESOURCE_FETCHER_H_ | 6 #define CONTENT_PUBLIC_RENDERER_ASSOCIATED_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/WebCachePolicy.h" | 12 #include "third_party/WebKit/public/platform/WebCachePolicy.h" |
13 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 13 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
14 | 14 |
15 class GURL; | 15 class GURL; |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 class WebFrame; | 18 class WebLocalFrame; |
19 class WebURLResponse; | 19 class WebURLResponse; |
20 struct WebAssociatedURLLoaderOptions; | 20 struct WebAssociatedURLLoaderOptions; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 // Interface to download resources asynchronously. | 25 // Interface to download resources asynchronously. |
26 class CONTENT_EXPORT AssociatedResourceFetcher { | 26 class CONTENT_EXPORT AssociatedResourceFetcher { |
27 public: | 27 public: |
28 virtual ~AssociatedResourceFetcher() {} | 28 virtual ~AssociatedResourceFetcher() {} |
(...skipping 17 matching lines...) Expand all Loading... |
46 blink::WebURLRequest::ServiceWorkerMode service_worker_mode) = 0; | 46 blink::WebURLRequest::ServiceWorkerMode service_worker_mode) = 0; |
47 virtual void SetCachePolicy(blink::WebCachePolicy policy) = 0; | 47 virtual void SetCachePolicy(blink::WebCachePolicy policy) = 0; |
48 | 48 |
49 // Associate the corresponding WebURLLoaderOptions to the loader. Must be | 49 // Associate the corresponding WebURLLoaderOptions to the loader. Must be |
50 // called before Start. Used if the LoaderType is FRAME_ASSOCIATED_LOADER. | 50 // called before Start. Used if the LoaderType is FRAME_ASSOCIATED_LOADER. |
51 virtual void SetLoaderOptions( | 51 virtual void SetLoaderOptions( |
52 const blink::WebAssociatedURLLoaderOptions& options) = 0; | 52 const blink::WebAssociatedURLLoaderOptions& options) = 0; |
53 | 53 |
54 // Starts the request using the specified frame. Calls |callback| when | 54 // Starts the request using the specified frame. Calls |callback| when |
55 // done. | 55 // done. |
56 virtual void Start(blink::WebFrame* frame, | 56 virtual void Start(blink::WebLocalFrame* frame, |
57 blink::WebURLRequest::RequestContext request_context, | 57 blink::WebURLRequest::RequestContext request_context, |
58 blink::WebURLRequest::FrameType frame_type, | 58 blink::WebURLRequest::FrameType frame_type, |
59 const Callback& callback) = 0; | 59 const Callback& callback) = 0; |
60 | 60 |
61 // Manually cancel the request. | 61 // Manually cancel the request. |
62 virtual void Cancel() = 0; | 62 virtual void Cancel() = 0; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
66 | 66 |
67 #endif // CONTENT_PUBLIC_RENDERER_ASSOCIATED_RESOURCE_FETCHER_H_ | 67 #endif // CONTENT_PUBLIC_RENDERER_ASSOCIATED_RESOURCE_FETCHER_H_ |
OLD | NEW |