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

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: Move to oilpan Created 6 years, 5 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 ed04da6b92bba914ef7dc025eb5099fb140ab24a..997bc71a648d64ccbb10ad992eb3003b66fe17b0 100644
--- a/Source/core/html/HTMLMenuElement.h
+++ b/Source/core/html/HTMLMenuElement.h
@@ -23,18 +23,36 @@
#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 blink {
+class HTMLMenuElement;
tkent 2014/07/25 04:42:38 This is unnecessary.
pals 2014/07/30 09:47:44 Done.
+
class HTMLMenuElement FINAL : public HTMLElement {
public:
DECLARE_NODE_FACTORY(HTMLMenuElement);
+ virtual void defaultEventHandler(Event*) OVERRIDE;
+
+ CustomContextMenuProvider* menuProvider() { return m_menuProvider.get(); }
+ CustomContextMenuProvider& ensureMenuProvider();
+ void populateContextMenuItems(const HTMLMenuElement&, ContextMenu&);
+ HTMLMenuItemElement* menuItemAt(unsigned menuId);
+ HTMLElement* subjectElement() { return m_subject.get(); }
+
private:
explicit HTMLMenuElement(Document&);
+
+ RefPtrWillBeMember<CustomContextMenuProvider> m_menuProvider;
tkent 2014/07/25 04:42:38 HTMLMenuElement should not keep CustomContextMenuP
pals 2014/07/30 09:47:44 Done.
+ RefPtrWillBeMember<HTMLElement> m_subject;
tkent 2014/07/25 04:42:38 This member is not referred.
pals 2014/07/30 09:47:44 This is referred in ContextMenuController.cpp.
+ Vector<HTMLMenuItemElement*> m_menuItems;
tkent 2014/07/25 04:42:38 should be WillBeHeapVector<RawPtrWillBeMember<HTML
pals 2014/07/30 09:47:44 Moved this code to ContextMenuController.cpp.
};
-} //namespace
+} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698