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

Unified Diff: ios/chrome/browser/suggestions/ios_image_decoder_impl.mm

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: comment formatting 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/suggestions/ios_image_decoder_impl.mm
diff --git a/ios/chrome/browser/suggestions/ios_image_decoder_impl.mm b/ios/chrome/browser/suggestions/ios_image_decoder_impl.mm
index 613ffe74139e306d942a98ff436559a83dd5e47a..dfb34c814343c5655d7810ef59212a780f9387b0 100644
--- a/ios/chrome/browser/suggestions/ios_image_decoder_impl.mm
+++ b/ios/chrome/browser/suggestions/ios_image_decoder_impl.mm
@@ -13,6 +13,7 @@
#include "base/memory/weak_ptr.h"
#import "components/image_fetcher/ios/webp_decoder.h"
#include "ios/web/public/web_thread.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -26,8 +27,11 @@ class IOSImageDecoderImpl : public image_fetcher::ImageDecoder {
explicit IOSImageDecoderImpl(scoped_refptr<base::TaskRunner> task_runner);
~IOSImageDecoderImpl() override;
+ // Note, that |desired_image_frame_size| is not supported
+ // (http://crbug/697596).
void DecodeImage(
const std::string& image_data,
+ const gfx::Size& desired_image_frame_size,
const image_fetcher::ImageDecodedCallback& callback) override;
private:
@@ -55,6 +59,7 @@ IOSImageDecoderImpl::~IOSImageDecoderImpl() {}
void IOSImageDecoderImpl::DecodeImage(
const std::string& image_data,
+ const gfx::Size& desired_image_frame_size,
const image_fetcher::ImageDecodedCallback& callback) {
// Convert the |image_data| std::string to an NSData buffer.
// The data is copied as it may have to outlive the caller in
« no previous file with comments | « components/suggestions/image_manager_unittest.cc ('k') | ios/chrome/browser/suggestions/ios_image_decoder_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698