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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class PlatformGestureEvent; 67 class PlatformGestureEvent;
68 class PlatformMouseEvent; 68 class PlatformMouseEvent;
69 class PlatformTouchEvent; 69 class PlatformTouchEvent;
70 class InspectorRevalidateDOMTask; 70 class InspectorRevalidateDOMTask;
71 class ShadowRoot; 71 class ShadowRoot;
72 72
73 struct InspectorHighlightConfig; 73 struct InspectorHighlightConfig;
74 74
75 typedef String ErrorString; 75 typedef String ErrorString;
76 76
77
78 struct EventListenerInfo {
79 EventListenerInfo(EventTarget* eventTarget, const AtomicString& eventType, c onst EventListenerVector& eventListenerVector)
80 : eventTarget(eventTarget)
81 , eventType(eventType)
82 , eventListenerVector(eventListenerVector)
83 {
84 }
85
86 EventTarget* eventTarget;
87 const AtomicString eventType;
88 const EventListenerVector eventListenerVector;
89 };
90
91 class InspectorDOMAgent final : public InspectorBaseAgent<InspectorDOMAgent, Ins pectorFrontend::DOM>, public InspectorBackendDispatcher::DOMCommandHandler { 77 class InspectorDOMAgent final : public InspectorBaseAgent<InspectorDOMAgent, Ins pectorFrontend::DOM>, public InspectorBackendDispatcher::DOMCommandHandler {
92 WTF_MAKE_NONCOPYABLE(InspectorDOMAgent); 78 WTF_MAKE_NONCOPYABLE(InspectorDOMAgent);
93 public: 79 public:
94 struct DOMListener : public WillBeGarbageCollectedMixin { 80 struct DOMListener : public WillBeGarbageCollectedMixin {
95 virtual ~DOMListener() 81 virtual ~DOMListener()
96 { 82 {
97 } 83 }
98 virtual void didRemoveDocument(Document*) = 0; 84 virtual void didRemoveDocument(Document*) = 0;
99 virtual void didRemoveDOMNode(Node*) = 0; 85 virtual void didRemoveDOMNode(Node*) = 0;
100 virtual void didModifyDOMAttr(Element*) = 0; 86 virtual void didModifyDOMAttr(Element*) = 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) override; 138 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) override;
153 virtual void undo(ErrorString*) override; 139 virtual void undo(ErrorString*) override;
154 virtual void redo(ErrorString*) override; 140 virtual void redo(ErrorString*) override;
155 virtual void markUndoableState(ErrorString*) override; 141 virtual void markUndoableState(ErrorString*) override;
156 virtual void focus(ErrorString*, int nodeId) override; 142 virtual void focus(ErrorString*, int nodeId) override;
157 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) override; 143 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) override;
158 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) override; 144 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) override;
159 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) ove rride; 145 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) ove rride;
160 virtual void getRelayoutBoundary(ErrorString*, int nodeId, int* relayoutBoun daryNodeId) override; 146 virtual void getRelayoutBoundary(ErrorString*, int nodeId, int* relayoutBoun daryNodeId) override;
161 virtual void getHighlightObjectForTest(ErrorString*, int nodeId, RefPtr<JSON Object>&) override; 147 virtual void getHighlightObjectForTest(ErrorString*, int nodeId, RefPtr<JSON Object>&) override;
162 static void getEventListeners(EventTarget*, Vector<EventListenerInfo>& liste nersArray, bool includeAncestors);
163 148
164 class Listener : public WillBeGarbageCollectedMixin { 149 class Listener : public WillBeGarbageCollectedMixin {
165 public: 150 public:
166 virtual ~Listener() { } 151 virtual ~Listener() { }
167 virtual void domAgentWasEnabled() = 0; 152 virtual void domAgentWasEnabled() = 0;
168 virtual void domAgentWasDisabled() = 0; 153 virtual void domAgentWasDisabled() = 0;
169 }; 154 };
170 void setListener(Listener* listener) { m_listener = listener; } 155 void setListener(Listener* listener) { m_listener = listener; }
171 156
172 bool enabled() const; 157 bool enabled() const;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 OwnPtrWillBeMember<DOMEditor> m_domEditor; 270 OwnPtrWillBeMember<DOMEditor> m_domEditor;
286 bool m_suppressAttributeModifiedEvent; 271 bool m_suppressAttributeModifiedEvent;
287 RawPtrWillBeMember<Listener> m_listener; 272 RawPtrWillBeMember<Listener> m_listener;
288 int m_backendNodeIdToInspect; 273 int m_backendNodeIdToInspect;
289 }; 274 };
290 275
291 276
292 } // namespace blink 277 } // namespace blink
293 278
294 #endif // !defined(InspectorDOMAgent_h) 279 #endif // !defined(InspectorDOMAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptHost.cpp ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698