OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "ios/chrome/browser/ui/key_commands_provider.h" | 5 #import "ios/chrome/browser/ui/key_commands_provider.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
9 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 9 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 10 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 IDS_IOS_TOOLS_MENU_CLOSE_TAB) | 122 IDS_IOS_TOOLS_MENU_CLOSE_TAB) |
123 action:^{ | 123 action:^{ |
124 [weakDispatcher closeCurrentTab]; | 124 [weakDispatcher closeCurrentTab]; |
125 }], | 125 }], |
126 [UIKeyCommand | 126 [UIKeyCommand |
127 cr_keyCommandWithInput:@"d" | 127 cr_keyCommandWithInput:@"d" |
128 modifierFlags:UIKeyModifierCommand | 128 modifierFlags:UIKeyModifierCommand |
129 title:l10n_util::GetNSStringWithFixup( | 129 title:l10n_util::GetNSStringWithFixup( |
130 IDS_IOS_KEYBOARD_BOOKMARK_THIS_PAGE) | 130 IDS_IOS_KEYBOARD_BOOKMARK_THIS_PAGE) |
131 action:^{ | 131 action:^{ |
132 execute(IDC_BOOKMARK_PAGE); | 132 [weakDispatcher bookmarkPage]; |
133 }], | 133 }], |
134 [UIKeyCommand cr_keyCommandWithInput:@"f" | 134 [UIKeyCommand cr_keyCommandWithInput:@"f" |
135 modifierFlags:UIKeyModifierCommand | 135 modifierFlags:UIKeyModifierCommand |
136 title:l10n_util::GetNSStringWithFixup( | 136 title:l10n_util::GetNSStringWithFixup( |
137 IDS_IOS_TOOLS_MENU_FIND_IN_PAGE) | 137 IDS_IOS_TOOLS_MENU_FIND_IN_PAGE) |
138 action:^{ | 138 action:^{ |
139 execute(IDC_FIND); | 139 execute(IDC_FIND); |
140 }], | 140 }], |
141 [UIKeyCommand cr_keyCommandWithInput:@"g" | 141 [UIKeyCommand cr_keyCommandWithInput:@"g" |
142 modifierFlags:UIKeyModifierCommand | 142 modifierFlags:UIKeyModifierCommand |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 action:^{ | 323 action:^{ |
324 [weakConsumer focusNextTab]; | 324 [weakConsumer focusNextTab]; |
325 }], | 325 }], |
326 ]]; | 326 ]]; |
327 } | 327 } |
328 | 328 |
329 return keyCommands; | 329 return keyCommands; |
330 } | 330 } |
331 | 331 |
332 @end | 332 @end |
OLD | NEW |