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

Unified Diff: ios/chrome/browser/ui/key_commands_provider.mm

Issue 2970553002: [ios] Remove IDC_CLOSE_TAB
Patch Set: Add comment for chrome_test_util.h" 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
Index: ios/chrome/browser/ui/key_commands_provider.mm
diff --git a/ios/chrome/browser/ui/key_commands_provider.mm b/ios/chrome/browser/ui/key_commands_provider.mm
index 72c99b7b024c6cb77ee312e1ad97661a1bbb6f00..6473ddce21a4ef1ed26d65e2c8a4643c56f9f972 100644
--- a/ios/chrome/browser/ui/key_commands_provider.mm
+++ b/ios/chrome/browser/ui/key_commands_provider.mm
@@ -20,8 +20,10 @@
@implementation KeyCommandsProvider
- (NSArray*)keyCommandsForConsumer:(id<KeyCommandsPlumbing>)consumer
+ browserCommandDispatcher:(id<BrowserCommands>)dispatcher
editingText:(BOOL)editingText {
__weak id<KeyCommandsPlumbing> weakConsumer = consumer;
+ __weak id<BrowserCommands> weakDispatcher = dispatcher;
// Block to execute a command from the |tag|.
void (^execute)(NSInteger) = ^(NSInteger tag) {
@@ -105,7 +107,7 @@
title:l10n_util::GetNSStringWithFixup(
IDS_IOS_TOOLS_MENU_CLOSE_TAB)
action:^{
- execute(IDC_CLOSE_TAB);
+ [weakDispatcher closeCurrentTab];
}],
[UIKeyCommand
cr_keyCommandWithInput:@"d"
« no previous file with comments | « ios/chrome/browser/ui/key_commands_provider.h ('k') | ios/chrome/browser/ui/key_commands_provider_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698