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

Side by Side Diff: ios/chrome/browser/suggestions/ios_image_decoder_impl.mm

Issue 2526773002: Move iOS ImageFetcher to ios/web/public (Closed)
Patch Set: Rename to image data fetcher Created 4 years 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 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 #include "ios/chrome/browser/suggestions/ios_image_decoder_impl.h" 5 #include "ios/chrome/browser/suggestions/ios_image_decoder_impl.h"
6 6
7 #include <UIKit/UIKit.h> 7 #include <UIKit/UIKit.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "ios/chrome/browser/webp_transcode/webp_decoder.h" 14 #include "ios/web/public/image_fetcher/webp_decoder.h"
Eugene But (OOO till 7-30) 2016/12/01 16:52:01 s/include/import
gambard 2016/12/02 08:06:12 Done.
15 #include "ios/web/public/web_thread.h" 15 #include "ios/web/public/web_thread.h"
16 #include "ui/gfx/image/image.h" 16 #include "ui/gfx/image/image.h"
17 17
18 namespace { 18 namespace {
19 19
20 class WebpDecoderDelegate : public webp_transcode::WebpDecoder::Delegate { 20 class WebpDecoderDelegate : public webp_transcode::WebpDecoder::Delegate {
21 public: 21 public:
22 WebpDecoderDelegate() = default; 22 WebpDecoderDelegate() = default;
23 23
24 NSData* data() const { return decoded_image_; } 24 NSData* data() const { return decoded_image_; }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 gfx::Image empty_image; 156 gfx::Image empty_image;
157 callback.Run(empty_image); 157 callback.Run(empty_image);
158 } 158 }
159 159
160 std::unique_ptr<image_fetcher::ImageDecoder> CreateIOSImageDecoder( 160 std::unique_ptr<image_fetcher::ImageDecoder> CreateIOSImageDecoder(
161 scoped_refptr<base::TaskRunner> task_runner) { 161 scoped_refptr<base::TaskRunner> task_runner) {
162 return base::MakeUnique<IOSImageDecoderImpl>(std::move(task_runner)); 162 return base::MakeUnique<IOSImageDecoderImpl>(std::move(task_runner));
163 } 163 }
164 164
165 } // namespace suggestions 165 } // namespace suggestions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698