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

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

Issue 2699223003: [tab_grid] Hack-in new tab FAB action. (Closed)
Patch Set: Address comments. 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/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 8fd156fa5e16cb9866aaf482eb8d8d5618594da0..ce8e600a284e8c6ae3ec015b1fd6c0d4c304887b 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
@@ -114,6 +114,13 @@
_webStates.erase(_webStates.begin() + index);
}
+- (void)createNewTabAtIndexPath:(NSIndexPath*)indexPath {
+ web::WebState::CreateParams webStateCreateParams(self.browserState);
+ std::unique_ptr<web::WebState> webState =
+ web::WebState::Create(webStateCreateParams);
+ _webStates.push_back(std::move(webState));
+}
+
#pragma mark - TabGridCommands
- (void)showTabGrid {

Powered by Google App Engine
This is Rietveld 408576698