summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.h2
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm9
2 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
index 9cb2af7..4a69413 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
@@ -72,7 +72,7 @@ class AutocompletePopupViewMac : public AutocompletePopupView {
const std::wstring& ResultContentsAt(size_t i);
bool ResultStarredAt(size_t i);
const std::wstring& ResultDescriptionAt(size_t i);
- void AcceptInput(WindowOpenDisposition disposition, bool for_drop);
+ void AcceptInput();
private:
// Create the popup_ instance if needed.
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index f1dbc8e..4a6a85f 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -181,9 +181,10 @@ const std::wstring& AutocompletePopupViewMac::ResultDescriptionAt(size_t i) {
return model_->result().match_at(i).description;
}
-void AutocompletePopupViewMac::AcceptInput(
- WindowOpenDisposition disposition, bool for_drop) {
- edit_view_->AcceptInput(disposition, for_drop);
+void AutocompletePopupViewMac::AcceptInput() {
+ NSTableView* table = [popup_ contentView];
+ model_->SetSelectedLine([table selectedRow], false);
+ edit_view_->AcceptInput(CURRENT_TAB, false);
}
@implementation AutocompleteTableTarget
@@ -249,7 +250,7 @@ objectValueForTableColumn:(NSTableColumn*)aTableColumn
- (void)select:sender {
DCHECK(popup_view_);
- popup_view_->AcceptInput(CURRENT_TAB, false);
+ popup_view_->AcceptInput();
}
@end