diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-11 20:39:08 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-11 20:39:08 +0000 |
commit | 56a7fbca5b93aadbfdfb0ff20a0a95ef5c91255a (patch) | |
tree | cc3993bc0ea1e2addba819d1d72d1af156405213 /chrome/browser/autocomplete/autocomplete_popup_view_mac.h | |
parent | 753abf571c333b695c3dbea83eeca55700ef4e80 (diff) | |
download | chromium_src-56a7fbca5b93aadbfdfb0ff20a0a95ef5c91255a.zip chromium_src-56a7fbca5b93aadbfdfb0ff20a0a95ef5c91255a.tar.gz chromium_src-56a7fbca5b93aadbfdfb0ff20a0a95ef5c91255a.tar.bz2 |
Style the omnibox results for v2.
The style is based on the gtk code (autocomplete_popup_view_gtk.cc), with some local tweaks. I broke this off from the rest of the review so I could experiment with making it nail omnibox-v2, but eventually realized that I don't have enough data for that. This at least makes things look nicer, and I believe it provides all of the function that will be needed (the remainder is precisely defining fonts and colors and possibly minor highlighting variations).
Summary: I want something concrete so that complaints about v2 wrongness can be specific.
Review URL: http://codereview.chromium.org/99312
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_popup_view_mac.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_view_mac.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h index 858e2fe..eb00d23 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h @@ -70,6 +70,18 @@ class AutocompletePopupViewMac : public AutocompletePopupView { // helper object. void AcceptInput(); + // Return the text to show for the match, based on the match's + // contents and description. + static NSMutableAttributedString* MatchText(const AutocompleteMatch& match); + + // Helper for MatchText() to allow sharing code between the contents + // and description cases. Returns NSMutableAttributedString as a + // convenience for MatchText(). + static NSMutableAttributedString* DecorateMatchedString( + const std::wstring &matchString, + const AutocompleteMatch::ACMatchClassifications &classifications, + NSColor* textColor); + private: // Create the popup_ instance if needed. void CreatePopupIfNeeded(); |