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

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 runtime enabled checks 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 4df4c6d101c958c73ef67b628344d6158ab3c0e9..2fbcef80ec56543221e27b5dcfe36593f2b9b994 100644
--- a/Source/core/html/HTMLMenuElement.h
+++ b/Source/core/html/HTMLMenuElement.h
@@ -23,16 +23,34 @@
#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;
Inactive 2014/07/16 20:07:26 You already include this.
pals 2014/07/17 15:35:47 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(HTMLMenuElement*, ContextMenu&);
+ HTMLElement* menuItemAt(unsigned menuId);
+ HTMLElement * subjectElement() { return m_subject.get(); }
Inactive 2014/07/16 20:07:26 nit: space before star
pals 2014/07/17 15:35:47 Done.
+
private:
explicit HTMLMenuElement(Document&);
+ RefPtr<CustomContextMenuProvider> m_menuProvider;
Inactive 2014/07/16 20:07:26 nit: I would add a blink line to separate the clas
pals 2014/07/17 15:35:47 Done.
+ RefPtr<HTMLElement> m_subject;
+ Vector<HTMLElement*> m_menuItems;
};
} //namespace

Powered by Google App Engine
This is Rietveld 408576698