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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm

Issue 3300004: OS X: Clicking on search keyword autocomplete result should update the omnibox (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_view_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 5adc9297e7d27a0356fbf2b49786ce8700082a05..c53fb4db052cdfe3f4ecdedb2471d82c7d69928d 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -448,6 +448,10 @@ void AutocompletePopupViewMac::UpdatePopupAppearance() {
PositionPopup(rows * cellHeight);
}
+void AutocompletePopupViewMac::SetSelectedLine(size_t line) {
+ model_->SetSelectedLine(line, false);
+}
+
// This is only called by model in SetSelectedLine() after updating
// everything. Popup should already be visible.
void AutocompletePopupViewMac::PaintUpdatesNow() {
@@ -673,7 +677,8 @@ void AutocompletePopupViewMac::OpenURLForRow(int row, bool force_background) {
NSInteger row, column;
if ([self getRow:&row column:&column forPoint:point]) {
DCHECK_EQ(column, 0);
- [self selectCellAtRow:row column:column];
+ DCHECK(popupView_);
+ popupView_->SetSelectedLine(row);
return YES;
}
return NO;
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698