Introduce MenuItemID to autofill popup
[WebKit-https.git] / Source / WebKit / chromium / src / AutofillPopupMenuClient.h
index 73cc180e00b4ceb5081595b46230a2fc7a3b89ac..588e19bec7353717ced3a1a892fb24b8d20774af 100644 (file)
@@ -106,20 +106,15 @@ public:
                     const WebVector<WebString>& names,
                     const WebVector<WebString>& labels,
                     const WebVector<WebString>& icons,
-                    const WebVector<int>& uniqueIDs,
+                    const WebVector<int>& itemIDs,
                     int separatorIndex);
 
     void setSuggestions(const WebVector<WebString>& names,
                         const WebVector<WebString>& labels,
                         const WebVector<WebString>& icons,
-                        const WebVector<int>& uniqueIDs,
-                        int separatorIndex);
+                        const WebVector<int>& itemIDs);
 
 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;
@@ -133,10 +128,7 @@ private:
     Vector<WTF::String> m_names;
     Vector<WTF::String> m_labels;
     Vector<WTF::String> m_icons;
-    Vector<int> m_uniqueIDs;
-
-    // The index of the separator.  -1 if there is no separator.
-    int m_separatorIndex;
+    Vector<int> m_itemIDs;
 
     // The index of the selected item.  -1 if there is no selected item.
     int m_selectedIndex;
@@ -144,6 +136,9 @@ private:
     RefPtr<WebCore::HTMLInputElement> m_textField;
     OwnPtr<WebCore::PopupMenuStyle> m_regularStyle;
     OwnPtr<WebCore::PopupMenuStyle> m_warningStyle;
+
+    // Use legacy behavior while the chromium side hasn't been updated.
+    bool m_useLegacyBehavior;
 };
 
 } // namespace WebKit