OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ | 5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ |
6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ | 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Sets the |delegate| of the ImageFetcherImpl. The |delegate| has to be alive | 40 // Sets the |delegate| of the ImageFetcherImpl. The |delegate| has to be alive |
41 // during the lifetime of the ImageFetcherImpl object. It is the caller's | 41 // during the lifetime of the ImageFetcherImpl object. It is the caller's |
42 // responsibility to ensure this. | 42 // responsibility to ensure this. |
43 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; | 43 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; |
44 | 44 |
45 // Sets a service name against which to track data usage. | 45 // Sets a service name against which to track data usage. |
46 void SetDataUseServiceName(DataUseServiceName data_use_service_name) override; | 46 void SetDataUseServiceName(DataUseServiceName data_use_service_name) override; |
47 | 47 |
48 void SetDesiredImageFrameSize(const gfx::Size& size) override; | 48 void SetDesiredImageFrameSize(const gfx::Size& size) override; |
49 | 49 |
| 50 void DisableCookies() override; |
| 51 |
50 void StartOrQueueNetworkRequest( | 52 void StartOrQueueNetworkRequest( |
51 const std::string& id, | 53 const std::string& id, |
52 const GURL& image_url, | 54 const GURL& image_url, |
53 base::Callback<void(const std::string&, const gfx::Image&)> callback) | 55 base::Callback<void(const std::string&, const gfx::Image&)> callback) |
54 override; | 56 override; |
55 | 57 |
56 ImageDecoder* GetImageDecoder() override; | 58 ImageDecoder* GetImageDecoder() override; |
57 | 59 |
58 private: | 60 private: |
59 using CallbackVector = | 61 using CallbackVector = |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Map from each image URL to the request information (associated website | 103 // Map from each image URL to the request information (associated website |
102 // url, fetcher, pending callbacks). | 104 // url, fetcher, pending callbacks). |
103 ImageRequestMap pending_net_requests_; | 105 ImageRequestMap pending_net_requests_; |
104 | 106 |
105 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); | 107 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); |
106 }; | 108 }; |
107 | 109 |
108 } // namespace image_fetcher | 110 } // namespace image_fetcher |
109 | 111 |
110 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ | 112 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ |
OLD | NEW |