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

Unified Diff: ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm

Issue 2967083002: [ios] TabCollectionTabCell to use SnapshotCache. (Closed)
Patch Set: Clean up Created 3 years, 5 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
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm
diff --git a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm
index dba8b4c393b556e5971ccab980846878d4e6b657..9b413be4cb2a283fa4de8c5ddd996ebf5646499d 100644
--- a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm
+++ b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_view_controller.mm
@@ -118,7 +118,8 @@
[cell setSessionType:TabSwitcherSessionType::REGULAR_SESSION];
DCHECK_LE(indexPath.item, INT_MAX);
int index = static_cast<int>(indexPath.item);
- cell.item = self.items[index];
+ // PLACEHOLDER: SnapshotCache will be passed into the cell.
+ [cell configureCell:self.items[index] snapshotCache:nil];
return cell;
}
@@ -133,7 +134,7 @@
#pragma mark - SessionCellDelegate
- (TabSwitcherCache*)tabSwitcherCache {
- // PLACEHOLDER: return image cache.
+ // PLACEHOLDER: SnapshotCache will be passed into the cell.
return nil;
}
@@ -186,13 +187,15 @@
}
- (void)replaceItemAtIndex:(int)index withItem:(TabCollectionItem*)item {
+ DCHECK(item);
DCHECK_GE(index, 0);
DCHECK_LT(static_cast<NSUInteger>(index), self.items.count);
self.items[index] = item;
TabCollectionTabCell* cell = base::mac::ObjCCastStrict<TabCollectionTabCell>(
[self.tabs cellForItemAtIndexPath:[NSIndexPath indexPathForItem:index
inSection:0]]);
- cell.item = self.items[index];
+ // PLACEHOLDER: SnapshotCache will be passed into the cell.
+ [cell configureCell:self.items[index] snapshotCache:nil];
}
- (void)populateItems:(NSArray<TabCollectionItem*>*)items
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698