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

Side by Side Diff: components/image_fetcher/core/image_fetcher_impl.h

Issue 2761303002: Move common ImageFetcher component files to core/ (Closed)
Patch Set: Rebased. Created 3 years, 9 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
OLDNEW
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_CORE_IMAGE_FETCHER_IMPL_H_
6 #define COMPONENTS_IMAGE_FETCHER_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>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "components/image_fetcher/image_data_fetcher.h" 16 #include "components/image_fetcher/core/image_data_fetcher.h"
17 #include "components/image_fetcher/image_decoder.h" 17 #include "components/image_fetcher/core/image_decoder.h"
18 #include "components/image_fetcher/image_fetcher.h" 18 #include "components/image_fetcher/core/image_fetcher.h"
19 #include "ui/gfx/geometry/size.h" 19 #include "ui/gfx/geometry/size.h"
20 #include "url/gurl.h" 20 #include "url/gurl.h"
21 21
22 namespace gfx { 22 namespace gfx {
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 image_fetcher::ImageFetcher {
34 public: 34 public:
35 ImageFetcherImpl( 35 ImageFetcherImpl(std::unique_ptr<ImageDecoder> image_decoder,
36 std::unique_ptr<ImageDecoder> image_decoder, 36 net::URLRequestContextGetter* url_request_context);
37 net::URLRequestContextGetter* url_request_context);
38 ~ImageFetcherImpl() override; 37 ~ImageFetcherImpl() override;
39 38
40 // 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
41 // 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
42 // responsibility to ensure this. 41 // responsibility to ensure this.
43 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; 42 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override;
44 43
45 // Sets a service name against which to track data usage. 44 // Sets a service name against which to track data usage.
46 void SetDataUseServiceName(DataUseServiceName data_use_service_name) override; 45 void SetDataUseServiceName(DataUseServiceName data_use_service_name) override;
47 46
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 97
99 // Map from each image URL to the request information (associated website 98 // Map from each image URL to the request information (associated website
100 // url, fetcher, pending callbacks). 99 // url, fetcher, pending callbacks).
101 ImageRequestMap pending_net_requests_; 100 ImageRequestMap pending_net_requests_;
102 101
103 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); 102 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl);
104 }; 103 };
105 104
106 } // namespace image_fetcher 105 } // namespace image_fetcher
107 106
108 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_FETCHER_IMPL_H_ 107 #endif // COMPONENTS_IMAGE_FETCHER_CORE_IMAGE_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « components/image_fetcher/core/image_fetcher_delegate.h ('k') | components/image_fetcher/core/image_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698