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

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

Issue 2699633006: Move WebpDecoder from ios/web to components/image_fetcher (Closed)
Patch Set: Separate header Created 3 years, 10 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
« no previous file with comments | « ios/chrome/browser/suggestions/BUILD.gn ('k') | ios/chrome/browser/ui/omnibox/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #import "base/mac/bind_objc_block.h" 10 #import "base/mac/bind_objc_block.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 #import "ios/web/public/image_fetcher/webp_decoder.h" 14 #import "components/image_fetcher/ios/webp_decoder.h"
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 #if !defined(__has_feature) || !__has_feature(objc_arc) 18 #if !defined(__has_feature) || !__has_feature(objc_arc)
19 #error "This file requires ARC support." 19 #error "This file requires ARC support."
20 #endif 20 #endif
21 21
22 namespace suggestions { 22 namespace suggestions {
23 23
24 class IOSImageDecoderImpl : public image_fetcher::ImageDecoder { 24 class IOSImageDecoderImpl : public image_fetcher::ImageDecoder {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 gfx::Image empty_image; 95 gfx::Image empty_image;
96 callback.Run(empty_image); 96 callback.Run(empty_image);
97 } 97 }
98 98
99 std::unique_ptr<image_fetcher::ImageDecoder> CreateIOSImageDecoder( 99 std::unique_ptr<image_fetcher::ImageDecoder> CreateIOSImageDecoder(
100 scoped_refptr<base::TaskRunner> task_runner) { 100 scoped_refptr<base::TaskRunner> task_runner) {
101 return base::MakeUnique<IOSImageDecoderImpl>(std::move(task_runner)); 101 return base::MakeUnique<IOSImageDecoderImpl>(std::move(task_runner));
102 } 102 }
103 103
104 } // namespace suggestions 104 } // namespace suggestions
OLDNEW
« no previous file with comments | « ios/chrome/browser/suggestions/BUILD.gn ('k') | ios/chrome/browser/ui/omnibox/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698