summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit_view_win.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-11 18:06:54 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-11 18:06:54 +0000
commit031cf3177e536f6f708fbe6328252f63a3a16c4e (patch)
tree631d0efdd3d3ac744c25b8cbb8cd32e11a818934 /chrome/browser/autocomplete/autocomplete_edit_view_win.h
parent3a13312bf873947f06d5f71b55aa92246a43f66f (diff)
downloadchromium_src-031cf3177e536f6f708fbe6328252f63a3a16c4e.zip
chromium_src-031cf3177e536f6f708fbe6328252f63a3a16c4e.tar.gz
chromium_src-031cf3177e536f6f708fbe6328252f63a3a16c4e.tar.bz2
Adds support for the location bar to show suggested text. There are
still a couple of rough edges, but this is a good start. BUG=54833 TEST=none Review URL: http://codereview.chromium.org/3333027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_win.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
index 25fb45f..a993d80 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
@@ -74,6 +74,18 @@ class AutocompleteEditViewWin
views::View* parent_view() const { return parent_view_; }
+ // Returns the width in pixels needed to display the current text. The
+ // returned value includes margins.
+ int TextWidth();
+
+ // Returns the width in pixels needed to display the text from one character
+ // before the caret to the end of the string. See comments in
+ // LocationBarView::Layout as to why this uses -1.
+ int WidthOfTextAfterCursor();
+
+ // Returns the font.
+ gfx::Font GetFont();
+
// Implement the AutocompleteEditView interface.
virtual AutocompleteEditModel* model() { return model_.get(); }
virtual const AutocompleteEditModel* model() const { return model_.get(); }
@@ -386,6 +398,12 @@ class AutocompleteEditViewWin
void SelectAllIfNecessary(MouseButton button, const CPoint& point);
void TrackMousePosition(MouseButton button, const CPoint& point);
+ // Returns the sum of the left and right margins.
+ int GetHorizontalMargin();
+
+ // Returns the width in pixels needed to display |text|.
+ int WidthNeededToDisplay(const std::wstring& text);
+
scoped_ptr<AutocompleteEditModel> model_;
scoped_ptr<AutocompletePopupView> popup_view_;