Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm |
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm |
index 69a1b4ee32dd4578503bcc95eef4d7763fa2c325..f49963a13ffcd07ff2b36966419f9139bfc66114 100644 |
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm |
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm |
@@ -653,6 +653,10 @@ bool AutocompleteEditViewMac::IsPopupOpen() const { |
return popup_view_->IsOpen(); |
} |
+void AutocompleteEditViewMac::TryDeletingCurrentItem() { |
+ popup_view_->GetModel()->TryDeletingCurrentItem(); |
+} |
+ |
void AutocompleteEditViewMac::OnControlKeyChanged(bool pressed) { |
model_->OnControlKeyChanged(pressed); |
} |
@@ -782,6 +786,16 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) { |
} |
} |
+ if (cmd == @selector(deleteForward:)) { |
+ const NSUInteger modifiers = [[NSApp currentEvent] modifierFlags]; |
+ if ((modifiers & NSShiftKeyMask) != 0) { |
+ if (edit_view_->IsPopupOpen()) { |
+ edit_view_->TryDeletingCurrentItem(); |
+ return YES; |
+ } |
+ } |
+ } |
+ |
// Capture the state before the operation changes the content. |
// TODO(shess): Determine if this is always redundent WRT the call |
// in -controlTextDidChange:. |