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

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm

Issue 2772583005: Pass UIImage instead of gfx::Image in ContentSuggestions (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
index e7d3eda6a3f4b1a9f1b1842eb5acc7b40af62080..4de8d7d377a00655cdf9cf34dfb77ace36346312 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm
@@ -28,7 +28,6 @@
#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestions_section_information.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/image/image.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -352,18 +351,15 @@ SectionIdentifier SectionIdentifierForInfo(
__weak ContentSuggestionsCollectionUpdater* weakSelf = self;
__weak ContentSuggestionsArticleItem* weakArticle = articleItem;
- void (^imageFetchedCallback)(const gfx::Image&) = ^(const gfx::Image& image) {
- if (image.IsEmpty()) {
- return;
- }
+ void (^imageFetchedCallback)(UIImage*) = ^(UIImage* image) {
ContentSuggestionsCollectionUpdater* strongSelf = weakSelf;
ContentSuggestionsArticleItem* strongArticle = weakArticle;
if (!strongSelf || !strongArticle) {
return;
}
- strongArticle.image = image.CopyUIImage();
+ strongArticle.image = image;
[strongSelf.collectionViewController
reconfigureCellsForItems:@[ strongArticle ]
inSectionWithIdentifier:sectionIdentifier];

Powered by Google App Engine
This is Rietveld 408576698