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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 const std::string& data)> | 35 const std::string& data)> |
36 Callback; | 36 Callback; |
37 | 37 |
38 // Creates a AssociatedResourceFetcher for the specified resource. Caller | 38 // Creates a AssociatedResourceFetcher for the specified resource. Caller |
39 // takes | 39 // takes |
40 // ownership of the returned object. Deleting the AssociatedResourceFetcher | 40 // ownership of the returned object. Deleting the AssociatedResourceFetcher |
41 // will cancel | 41 // will cancel |
42 // the request, and the callback will never be run. | 42 // the request, and the callback will never be run. |
43 static AssociatedResourceFetcher* Create(const GURL& url); | 43 static AssociatedResourceFetcher* Create(const GURL& url); |
44 | 44 |
45 virtual void SetSkipServiceWorker( | 45 virtual void SetServiceWorkerMode( |
46 blink::WebURLRequest::SkipServiceWorker skip_service_worker) = 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::WebFrame* 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 |