This change the native omnibox to look and behave a bit more like the HTML Instant Extended one.
The popup positioning logic now has to be done at a bit of a higher level since it needs to know the window width as well as just the omnibox width. I added a new function in LocationBar::Delegate to get this that's implemented by the toolbar view (the lowest-level UI component that knows about the window width as well as the omnibox width).
More information must now be passed to the popup, so I added a new OmniboxViewDelegate that's implemented by the LocationBar to give the popup its context. This cleaned up some dependencies where the popup had to know about the location bar and did things silly things like this:
location_bar_->GetWidget()->GetNativeView()
[email protected]
Review URL: https://codereview.chromium.org/15745031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204715 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index f1d7ea1..5ec3760 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -166,15 +166,15 @@
// looks odd if both the first and last s are highlighted.
if (input_position != 0) {
match.contents_class.push_back(
- ACMatchClassification(0, ACMatchClassification::NONE));
+ ACMatchClassification(0, ACMatchClassification::MATCH));
}
match.contents_class.push_back(
- ACMatchClassification(input_position, ACMatchClassification::DIM));
+ ACMatchClassification(input_position, ACMatchClassification::NONE));
size_t next_fragment_position = input_position + input_text.length();
if (next_fragment_position < query_string.length()) {
match.contents_class.push_back(
ACMatchClassification(next_fragment_position,
- ACMatchClassification::NONE));
+ ACMatchClassification::MATCH));
}
}
} else {