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

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

Issue 2786893002: [ios] Dispatcher for tab_strip and tab_grid. (Closed)
Patch Set: Update showcase. 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/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
diff --git a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
index 587c55281cf833b0902cf611b0fd904c60e77482..c2f7ec40497816ad920be0ddff5c7af98b4a536a 100644
--- a/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
+++ b/ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
@@ -5,12 +5,10 @@
#import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.h"
#include "base/mac/foundation_util.h"
-#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_collection_view_layout.h"
#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_overlay_view.h"
#import "ios/clean/chrome/browser/ui/actions/settings_actions.h"
#import "ios/clean/chrome/browser/ui/actions/tab_grid_actions.h"
#import "ios/clean/chrome/browser/ui/commands/settings_commands.h"
-#import "ios/clean/chrome/browser/ui/commands/tab_commands.h"
#import "ios/clean/chrome/browser/ui/commands/tab_grid_commands.h"
#import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_data_source.h"
#import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_tab_cell.h"
@@ -29,8 +27,7 @@
@end
@implementation TabGridViewController
-@synthesize settingsCommandHandler = _settingsCommandHandler;
-@synthesize tabGridCommandHandler = _tabGridCommandHandler;
+@synthesize dispatcher = _dispatcher;
@synthesize noTabsOverlay = _noTabsOverlay;
@synthesize toolbar = _toolbar;
@synthesize floatingNewTabButton = _floatingNewTabButton;
@@ -41,6 +38,14 @@
return [[TabGridCollectionViewLayout alloc] init];
}
+- (void)showTabAtIndex:(int)index {
+ [self.dispatcher showTabGridTabAtIndex:index];
+}
+
+- (void)closeTabAtIndex:(int)index {
+ [self.dispatcher closeTabGridTabAtIndex:index];
+}
+
#pragma mark - View lifecyle
- (void)viewDidLoad {
@@ -82,17 +87,17 @@
#pragma mark - SettingsActions
- (void)showSettings:(id)sender {
- [self.settingsCommandHandler showSettings];
+ [self.dispatcher showSettings];
}
#pragma mark - TabGridActions
- (void)showTabGrid:(id)sender {
- [self.tabGridCommandHandler showTabGrid];
+ [self.dispatcher showTabGrid];
}
- (void)createNewTab:(id)sender {
- [self.tabCommandHandler createAndShowNewTab];
+ [self.dispatcher createAndShowNewTabInTabGrid];
}
#pragma mark - ZoomTransitionDelegate methods
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.h ('k') | ios/clean/chrome/browser/ui/tab_strip/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698