summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 19:33:39 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-05 19:33:39 +0000
commit0ccc17a9164d917a2ea16610d38189c63a816f4f (patch)
tree6d44925f201757aa9b25e24d139667813d0d5aa5 /chrome/browser/autocomplete/autocomplete_popup_view_mac.h
parent2584f41e80ac96ccd58293acd9187169054e8bee (diff)
downloadchromium_src-0ccc17a9164d917a2ea16610d38189c63a816f4f.zip
chromium_src-0ccc17a9164d917a2ea16610d38189c63a816f4f.tar.gz
chromium_src-0ccc17a9164d917a2ea16610d38189c63a816f4f.tar.bz2
Convert autocomplete to use a custom matrix and button cell.
On the user-visible side this change enables mouse hover (the item under the mouse is highlighted), and lays out the text omnibox v2 style. Only hover really needed the control change, but I have another change queued up to style the popup text. It uses different colors and shades, and really looked horrible with the NSTableView highlighting. [Which is why this part of the CL is coming first.] TEST=Omnibox popup works and shows highlighting under the mouse in addition to the keyboard-selected item. Review URL: http://codereview.chromium.org/99310 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15321 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.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
index 6639c0f..858e2fe 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.h
@@ -19,7 +19,7 @@
class AutocompletePopupModel;
class AutocompleteEditModel;
class AutocompleteEditViewMac;
-@class AutocompleteTableTarget;
+@class AutocompleteMatrixTarget;
class Profile;
// Implements AutocompletePopupView using a raw NSWindow containing an
@@ -57,7 +57,7 @@ class AutocompletePopupViewMac : public AutocompletePopupView {
}
virtual void UpdatePopupAppearance();
virtual void OnHoverEnabledOrDisabled(bool disabled) { NOTIMPLEMENTED(); }
-
+
// This is only called by model in SetSelectedLine() after updating
// everything. Popup should already be visible.
virtual void PaintUpdatesNow();
@@ -65,12 +65,9 @@ class AutocompletePopupViewMac : public AutocompletePopupView {
// Returns the popup's model.
virtual AutocompletePopupModel* GetModel();
- // Helpers which forward to model_, otherwise our Objective-C helper
- // object would need model_ to be public:.
- size_t ResultRowCount();
- const std::wstring& ResultContentsAt(size_t i);
- bool ResultStarredAt(size_t i);
- const std::wstring& ResultDescriptionAt(size_t i);
+ // Updates model_'s sense of selected line from the UI before
+ // calling edit_view_'s AcceptInput(). Used by internal Objective-C
+ // helper object.
void AcceptInput();
private:
@@ -82,7 +79,7 @@ class AutocompletePopupViewMac : public AutocompletePopupView {
NSTextField* field_; // owned by tab controller
- scoped_nsobject<AutocompleteTableTarget> table_target_;
+ scoped_nsobject<AutocompleteMatrixTarget> matrix_target_;
// TODO(shess): Before checkin review implementation to make sure
// that popup_'s object hierarchy doesn't keep references to
// destructed objects.