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

Unified Diff: ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm

Issue 2971113002: [ios] Plumb SnapshotCache into tab grid. (Closed)
Patch Set: Address comments. 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_grid/BUILD.gn ('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_grid/tab_grid_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
index 104978959777a314246cb43c5cda533d5725bd58..26e1b55489651fb4110c8296d530a1c57c685898 100644
--- a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
@@ -9,6 +9,7 @@
#include "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
+#import "ios/chrome/browser/snapshots/snapshot_cache_factory.h"
#import "ios/chrome/browser/web_state_list/web_state_list.h"
#import "ios/clean/chrome/browser/ui/commands/context_menu_commands.h"
#import "ios/clean/chrome/browser/ui/commands/settings_commands.h"
@@ -43,6 +44,7 @@
@property(nonatomic, weak) TabCoordinator* activeTabCoordinator;
@property(nonatomic, readonly) WebStateList& webStateList;
@property(nonatomic, strong) TabGridMediator* mediator;
+@property(nonatomic, readonly) SnapshotCache* snapshotCache;
@end
@implementation TabGridCoordinator
@@ -58,6 +60,11 @@
return self.browser->web_state_list();
}
+- (SnapshotCache*)snapshotCache {
+ return SnapshotCacheFactory::GetForBrowserState(
+ self.browser->browser_state());
+}
+
#pragma mark - BrowserCoordinator
- (void)start {
@@ -71,6 +78,7 @@
self.viewController = [[TabGridViewController alloc] init];
self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher());
+ self.viewController.snapshotCache = self.snapshotCache;
self.mediator.consumer = self.viewController;
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_grid/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698