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

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: Added unit tests Created 6 years, 7 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..5aac4378ef32c6cc225c498584e1074adcba8255 100644
--- a/Source/core/html/HTMLMenuElement.h
+++ b/Source/core/html/HTMLMenuElement.h
@@ -23,16 +23,30 @@
#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&);
+ void buildCustomProvider();
esprehn 2014/06/06 22:30:42 This method doesn't exist.
pals 2014/06/10 10:42:39 Done. Removed.
+ CustomContextMenuProvider* customProvider() { return m_menuProvider.get(); }
+ CustomContextMenuProvider& ensureCustomProvider();
+ void populateContextMenuItems(HTMLMenuElement*, ContextMenu&);
+ HTMLElement* selectedMenuItem(unsigned menuId);
esprehn 2014/06/06 22:30:42 I'm not sure I understand the purpose of this.
pals 2014/06/10 10:42:39 I am calling this method from Source/core/html/Cu
private:
explicit HTMLMenuElement(Document&);
+ RefPtr<CustomContextMenuProvider> m_menuProvider;
+ Vector<HTMLElement*> m_menuItems;
};
} //namespace

Powered by Google App Engine
This is Rietveld 408576698