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

Unified Diff: Source/core/page/ContextMenuController.h

Issue 243403006: Implement contextmenu attribute with basic support of <menu> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed review comments 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/page/ContextMenuController.h
diff --git a/Source/core/page/ContextMenuController.h b/Source/core/page/ContextMenuController.h
index 6ba0a9217f9accfec9f2602d31ee260bfeb828f9..6c766a2dc8e2aa1520ac1383e537791bcd037ff2 100644
--- a/Source/core/page/ContextMenuController.h
+++ b/Source/core/page/ContextMenuController.h
@@ -40,6 +40,8 @@ namespace blink {
class ContextMenuProvider;
class Document;
class Event;
+ class HTMLElement;
+ class HTMLMenuElement;
class LocalFrame;
class Page;
@@ -57,6 +59,8 @@ namespace blink {
void handleContextMenuEvent(Event*);
void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>);
void showContextMenuAtPoint(LocalFrame*, float x, float y, PassRefPtr<ContextMenuProvider>);
+ HTMLElement* menuItemAt(unsigned menuId);
+ HTMLElement* subjectElement() { return m_subject.get(); }
void contextMenuItemSelected(const ContextMenuItem*);
@@ -67,11 +71,14 @@ namespace blink {
PassOwnPtr<ContextMenu> createContextMenu(Event*);
PassOwnPtr<ContextMenu> createContextMenu(LocalFrame*, const LayoutPoint&);
+ void populateContextMenuItems(const HTMLMenuElement&, ContextMenu&);
void showContextMenu(Event*);
ContextMenuClient* m_client;
OwnPtr<ContextMenu> m_contextMenu;
RefPtr<ContextMenuProvider> m_menuProvider;
+ RefPtr<HTMLElement> m_subject;
tkent 2014/07/31 06:07:56 Someone needs to clear m_subject and m_menuItems a
pals 2014/08/01 10:03:08 Done. Clearing at CustomContextMenuProvider::conte
+ Vector<HTMLElement*> m_menuItems;
HitTestResult m_hitTestResult;
};

Powered by Google App Engine
This is Rietveld 408576698