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

Unified Diff: Source/platform/ContextMenuItem.h

Issue 802233004: Implement icon attribute for menuitem (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: LayoutTest rebase Created 5 years, 11 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 | « Source/core/page/CustomContextMenuProvider.cpp ('k') | Source/platform/ContextMenuItem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/ContextMenuItem.h
diff --git a/Source/platform/ContextMenuItem.h b/Source/platform/ContextMenuItem.h
index 7ca5fc42c5d55df3f6ae8b4d5827d65702738811..391042f95bacae09e2b6e1508914a7d8df40562d 100644
--- a/Source/platform/ContextMenuItem.h
+++ b/Source/platform/ContextMenuItem.h
@@ -51,8 +51,8 @@ enum ContextMenuItemType {
class PLATFORM_EXPORT ContextMenuItem {
WTF_MAKE_FAST_ALLOCATED;
public:
- ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String&, ContextMenu* subMenu = 0);
- ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String&, bool enabled, bool checked);
+ ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String& title, const String& icon, ContextMenu* subMenu = 0);
+ ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String& title, const String& icon, bool enabled, bool checked);
~ContextMenuItem();
@@ -75,12 +75,16 @@ public:
void setTitle(const String& title) { m_title = title; }
const String& title() const { return m_title; }
+ void setIcon(const String& icon) { m_icon = icon; }
+ const String& icon() const { return m_icon; }
+
const Vector<ContextMenuItem>& subMenuItems() const { return m_subMenuItems; }
private:
ContextMenuItemType m_type;
ContextMenuAction m_action;
String m_title;
+ String m_icon;
bool m_enabled;
bool m_checked;
Vector<ContextMenuItem> m_subMenuItems;
« no previous file with comments | « Source/core/page/CustomContextMenuProvider.cpp ('k') | Source/platform/ContextMenuItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698