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

Unified Diff: Source/core/html/HTMLMenuElementEventListener.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/HTMLMenuElementEventListener.h
diff --git a/Source/core/html/HTMLMenuElementEventListener.h b/Source/core/html/HTMLMenuElementEventListener.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e4c525795b5fc983bb6816cf875d946e5d1f560
--- /dev/null
+++ b/Source/core/html/HTMLMenuElementEventListener.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HTMLMenuElementEventListener_h
+#define HTMLMenuElementEventListener_h
+
+#include "core/events/EventListener.h"
+#include "core/html/HTMLMenuElement.h"
+
+namespace WebCore {
+
+class RelatedEvent;
+
+class HTMLMenuElementEventListener FINAL : public EventListener {
esprehn 2014/06/06 22:30:42 Lets not do this. I see IndexedDB does it, but we
pals 2014/06/10 10:42:39 Done. Removed.
+public:
+ static PassRefPtr<HTMLMenuElementEventListener> create(HTMLMenuElement* menu) { return adoptRef(new HTMLMenuElementEventListener(menu)); }
+
+ virtual bool operator==(const EventListener& other);
+
+private:
+ explicit HTMLMenuElementEventListener(HTMLMenuElement* menu)
+ : EventListener(NativeEventListenerType)
+ , m_menu(menu)
+ {
+ }
+
+ virtual void handleEvent(ExecutionContext*, Event*);
+
+ RefPtr<HTMLMenuElement> m_menu;
+};
+
+const HTMLMenuElementEventListener* toHTMLMenuElementEventListener(const EventListener*);
+
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698