diff options
author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKit/chromium/src/AutoFillPopupMenuClient.h | |
parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKit/chromium/src/AutoFillPopupMenuClient.h')
-rw-r--r-- | WebKit/chromium/src/AutoFillPopupMenuClient.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h index a7d6693..289c8d0 100644 --- a/WebKit/chromium/src/AutoFillPopupMenuClient.h +++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h @@ -57,14 +57,21 @@ public: // Returns the suggestion at |listIndex|. virtual WebString getSuggestion(unsigned listIndex) const; + // Returns the label at |listIndex|. + virtual WebString getLabel(unsigned listIndex) const; + // Removes the suggestion at |listIndex| from the list of suggestions. virtual void removeSuggestionAtIndex(unsigned listIndex); + // Returns true if the suggestion at |listIndex| can be removed. + bool canRemoveSuggestionAtIndex(unsigned listIndex); + // WebCore::PopupMenuClient methods: virtual void valueChanged(unsigned listIndex, bool fireEvents = true); virtual void selectionChanged(unsigned, bool); virtual void selectionCleared(); virtual WebCore::String itemText(unsigned listIndex) const; + virtual WebCore::String itemLabel(unsigned listIndex) const; virtual WebCore::String itemToolTip(unsigned lastIndex) const { return WebCore::String(); } virtual WebCore::String itemAccessibilityText(unsigned lastIndex) const { return WebCore::String(); } virtual bool itemIsEnabled(unsigned listIndex) const { return true; } @@ -93,10 +100,12 @@ public: void initialize(WebCore::HTMLInputElement*, const WebVector<WebString>& names, const WebVector<WebString>& labels, + const WebVector<int>& uniqueIDs, int separatorIndex); void setSuggestions(const WebVector<WebString>& names, const WebVector<WebString>& labels, + const WebVector<int>& uniqueIDs, int separatorIndex); // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is @@ -104,6 +113,10 @@ public: void setAutocompleteMode(bool enabled) { m_AutocompleteModeEnabled = enabled; } private: + // Convert the specified index from an index into the visible list (which might + // include a separator entry) to an index to |m_names| and |m_labels|. + // Returns -1 if the given index points to the separator. + int convertListIndexToInternalIndex(unsigned) const; WebViewImpl* getWebView() const; WebCore::HTMLInputElement* getTextField() const { return m_textField.get(); } WebCore::RenderStyle* textFieldStyle() const; @@ -114,6 +127,7 @@ private: // The names and labels that make up the text of the menu items. Vector<WebCore::String> m_names; Vector<WebCore::String> m_labels; + Vector<int> m_uniqueIDs; // The index of the separator. -1 if there is no separator. int m_separatorIndex; |