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_CORE_IMAGE_FETCHER_IMPL_H_ | 5 #ifndef COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_IMPL_H_ |
6 #define COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_IMPL_H_ | 6 #define COMPONENTS_IMAGE_FETCHER_CORE_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 12 matching lines...) Expand all Loading... |
23 class Image; | 23 class Image; |
24 } | 24 } |
25 | 25 |
26 namespace net { | 26 namespace net { |
27 class URLRequestContextGetter; | 27 class URLRequestContextGetter; |
28 } | 28 } |
29 | 29 |
30 namespace image_fetcher { | 30 namespace image_fetcher { |
31 | 31 |
32 // The standard (non-test) implementation of ImageFetcher. | 32 // The standard (non-test) implementation of ImageFetcher. |
33 class ImageFetcherImpl : public image_fetcher::ImageFetcher { | 33 class ImageFetcherImpl : public ImageFetcher { |
34 public: | 34 public: |
35 ImageFetcherImpl(std::unique_ptr<ImageDecoder> image_decoder, | 35 ImageFetcherImpl(std::unique_ptr<ImageDecoder> image_decoder, |
36 net::URLRequestContextGetter* url_request_context); | 36 net::URLRequestContextGetter* url_request_context); |
37 ~ImageFetcherImpl() override; | 37 ~ImageFetcherImpl() override; |
38 | 38 |
39 // Sets the |delegate| of the ImageFetcherImpl. The |delegate| has to be alive | 39 // Sets the |delegate| of the ImageFetcherImpl. The |delegate| has to be alive |
40 // during the lifetime of the ImageFetcherImpl object. It is the caller's | 40 // during the lifetime of the ImageFetcherImpl object. It is the caller's |
41 // responsibility to ensure this. | 41 // responsibility to ensure this. |
42 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; | 42 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; |
43 | 43 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Map from each image URL to the request information (associated website | 101 // Map from each image URL to the request information (associated website |
102 // url, fetcher, pending callbacks). | 102 // url, fetcher, pending callbacks). |
103 ImageRequestMap pending_net_requests_; | 103 ImageRequestMap pending_net_requests_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); | 105 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace image_fetcher | 108 } // namespace image_fetcher |
109 | 109 |
110 #endif // COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_IMPL_H_ | 110 #endif // COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_IMPL_H_ |
OLD | NEW |