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

Unified Diff: Source/core/html/HTMLMenuElement.h

Issue 243403006: Implement contextmenu attribute with basic support of <menu> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
Index: Source/core/html/HTMLMenuElement.h
diff --git a/Source/core/html/HTMLMenuElement.h b/Source/core/html/HTMLMenuElement.h
index 07350e282252796156e4210a88b80d0c22e20cd1..adfc363af39517b3cd792acdbba84233a371eaf1 100644
--- a/Source/core/html/HTMLMenuElement.h
+++ b/Source/core/html/HTMLMenuElement.h
@@ -23,16 +23,31 @@
#ifndef HTMLMenuElement_h
#define HTMLMenuElement_h
+#include "core/html/CustomContextMenuProvider.h"
#include "core/html/HTMLElement.h"
+#include "core/page/ContextMenuProvider.h"
+#include "platform/ContextMenu.h"
+#include "platform/ContextMenuItem.h"
namespace WebCore {
+class HTMLMenuElement;
+class CustomContextMenuProvider;
+
class HTMLMenuElement FINAL : public HTMLElement {
public:
static PassRefPtrWillBeRawPtr<HTMLMenuElement> create(Document&);
+ virtual void defaultEventHandler(Event*) OVERRIDE;
+
+ CustomContextMenuProvider* menuProvider() { return m_menuProvider.get(); }
+ CustomContextMenuProvider& ensureMenuProvider();
+ void populateContextMenuItems(HTMLMenuElement*, ContextMenu&);
+ HTMLElement* menuItemAt(unsigned menuId);
private:
explicit HTMLMenuElement(Document&);
+ RefPtr<CustomContextMenuProvider> m_menuProvider;
+ Vector<HTMLElement*> m_menuItems;
};
} //namespace

Powered by Google App Engine
This is Rietveld 408576698