Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Unified Diff: Source/core/html/forms/PopupMenuClient.h

Issue 1267113002: PopupMenuImpl should get menu items via PopupMenuClient. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/layout/LayoutMenuList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/PopupMenuClient.h
diff --git a/Source/core/html/forms/PopupMenuClient.h b/Source/core/html/forms/PopupMenuClient.h
index a071789468ab51ebd7ff59df9c2db022f7bbf58f..1f7875b0bf5faa4d23e9ddc41aed6dbc5849499f 100644
--- a/Source/core/html/forms/PopupMenuClient.h
+++ b/Source/core/html/forms/PopupMenuClient.h
@@ -33,6 +33,7 @@ namespace blink {
class Element;
class ComputedStyle;
+// TODO(tkent): Remove this interface. crbug.com/515013.
class CORE_EXPORT PopupMenuClient {
public:
virtual ~PopupMenuClient() { }
@@ -40,7 +41,8 @@ public:
virtual void selectionChanged(unsigned listIndex, bool fireEvents = true) = 0;
virtual void selectionCleared() = 0;
- // TODO(tkent): Introduce itemElement(), and remove itemFoo() functions.
+ virtual Element& itemElement(unsigned listIndex) const = 0;
+ // TODO(tkent): Remove itemFoo() functions. Use itemElement() instead.
virtual String itemText(unsigned listIndex) const = 0;
virtual String itemToolTip(unsigned listIndex) const = 0;
virtual String itemAccessibilityText(unsigned listIndex) const = 0;
@@ -62,7 +64,6 @@ public:
virtual Element& ownerElement() const = 0;
// computedStyleForItem() returns nullptr only if the owner Document is not
// active. So, It returns a valid object when we open a popup.
- virtual const ComputedStyle* computedStyleForItem(Element&) const = 0;
virtual const ComputedStyle* computedStyleForItem(unsigned listIndex) const = 0;
virtual void listBoxSelectItem(int /*listIndex*/, bool /*allowMultiplySelections*/, bool /*shift*/, bool /*fireOnChangeNow*/ = true) { ASSERT_NOT_REACHED(); }
« no previous file with comments | « no previous file | Source/core/layout/LayoutMenuList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698