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

Unified Diff: Source/core/inspector/EventListenerInfo.h

Issue 1042853004: [DevTools] Event Listeners Sidebar shows window listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Extracted eventListenersTreeOutline.css Created 5 years, 8 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/EventListenerInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/EventListenerInfo.h
diff --git a/Source/core/inspector/EventListenerInfo.h b/Source/core/inspector/EventListenerInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..8fcd76fd5b1e9d0c7618f2dd98cebbbba9201bf0
--- /dev/null
+++ b/Source/core/inspector/EventListenerInfo.h
@@ -0,0 +1,60 @@
+// Copyright 2015 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 EventListenerInfo_h
+#define EventListenerInfo_h
+
+#include "core/InspectorTypeBuilder.h"
+#include "core/events/EventListenerMap.h"
+#include "core/events/RegisteredEventListener.h"
+#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
+
+namespace blink {
+
+class EventTarget;
+class ExecutionContext;
+class InjectedScriptManager;
+
+struct EventListenerInfo {
+ EventListenerInfo(EventTarget* eventTarget, const AtomicString& eventType, const EventListenerVector& eventListenerVector)
+ : eventTarget(eventTarget)
+ , eventType(eventType)
+ , eventListenerVector(eventListenerVector)
+ {
+ }
+
+ EventTarget* eventTarget;
+ const AtomicString eventType;
+ const EventListenerVector eventListenerVector;
+
+ static void getEventListeners(EventTarget*, Vector<EventListenerInfo>& listenersArray, bool includeAncestors);
+};
+
+class RegisteredEventListenerIterator {
+ WTF_MAKE_NONCOPYABLE(RegisteredEventListenerIterator);
+public:
+ RegisteredEventListenerIterator(Vector<EventListenerInfo>& listenersArray)
+ : m_listenersArray(listenersArray)
+ , m_infoIndex(0)
+ , m_listenerIndex(0)
+ , m_isUseCapturePass(true)
+ {
+ }
+
+ const RegisteredEventListener* nextRegisteredEventListener();
+ const EventListenerInfo& currentEventListenerInfo();
+
+private:
+ Vector<EventListenerInfo>& m_listenersArray;
+ unsigned m_infoIndex;
+ unsigned m_listenerIndex;
+ bool m_isUseCapturePass;
+};
+
+PassRefPtr<TypeBuilder::Runtime::RemoteObject> getEventHandlerObject(ExecutionContext*, EventListener*, InjectedScriptManager*, const String* objectGroupId);
+
+} // namespace blink
+
+#endif // EventListenerInfo_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/EventListenerInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698