diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 14:36:33 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 14:36:33 +0000 |
commit | a0c7153edf226726a86619119c68f5e660b3930e (patch) | |
tree | 97ea32cf90057ed1c75c45e3c3f6718f12e67a6b /webkit/glue/webmenuitem.h | |
parent | 33db7e323b9d6d1bd8cda94bc3fe5da1727c485a (diff) | |
download | chromium_src-a0c7153edf226726a86619119c68f5e660b3930e.zip chromium_src-a0c7153edf226726a86619119c68f5e660b3930e.tar.gz chromium_src-a0c7153edf226726a86619119c68f5e660b3930e.tar.bz2 |
Chromium: support custom WebCore context menu items in Chromium port (downstream).
Review URL: http://codereview.chromium.org/465123
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34154 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmenuitem.h')
-rw-r--r-- | webkit/glue/webmenuitem.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/webkit/glue/webmenuitem.h b/webkit/glue/webmenuitem.h index ab267bb..4b0fdc3 100644 --- a/webkit/glue/webmenuitem.h +++ b/webkit/glue/webmenuitem.h @@ -6,27 +6,33 @@ #define WEBMENUITEM_H_ #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h" +#include "third_party/WebKit/WebKit/chromium/public/WebMenuItemInfo.h" -// Container for information about entries in an HTML select popup menu. +// Container for information about entries in an HTML select popup menu and +// custom entries of the context menu. struct WebMenuItem { enum Type { - OPTION = WebKit::WebPopupMenuInfo::Item::Option, - GROUP = WebKit::WebPopupMenuInfo::Item::Group, - SEPARATOR = WebKit::WebPopupMenuInfo::Item::Separator + OPTION = WebKit::WebMenuItemInfo::Option, + CHECKABLE_OPTION = WebKit::WebMenuItemInfo::CheckableOption, + GROUP = WebKit::WebMenuItemInfo::Group, + SEPARATOR = WebKit::WebMenuItemInfo::Separator }; string16 label; Type type; + unsigned action; bool enabled; + bool checked; - WebMenuItem() : type(OPTION), enabled(false) { + WebMenuItem() : type(OPTION), action(0), enabled(false), checked(false) { } - WebMenuItem(const WebKit::WebPopupMenuInfo::Item& item) + WebMenuItem(const WebKit::WebMenuItemInfo& item) : label(item.label), type(static_cast<Type>(item.type)), - enabled(item.enabled) { + action(item.action), + enabled(item.enabled), + checked(item.checked) { } }; |