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

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

Issue 2703633005: [tab_grid] Hack-in close tab. (Closed)
Patch Set: 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 51a42f855ef0711a9ffbbc33a8f6eef2e536448f..8fd156fa5e16cb9866aaf482eb8d8d5618594da0 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
@@ -108,6 +108,12 @@
_activeWebStateIndex = index;
}
+- (void)closeTabAtIndexPath:(NSIndexPath*)indexPath {
+ size_t index = static_cast<size_t>(indexPath.item);
+ DCHECK(index < _webStates.size());
+ _webStates.erase(_webStates.begin() + index);
+}
+
#pragma mark - TabGridCommands
- (void)showTabGrid {
« no previous file with comments | « ios/clean/chrome/browser/ui/commands/tab_commands.h ('k') | ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698