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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.h

Issue 145133008: DevTools: Make getEventListeners() of Console API work for window. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 11 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 | Annotate | Revision Log
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "wtf/RefPtr.h" 44 #include "wtf/RefPtr.h"
45 #include "wtf/Vector.h" 45 #include "wtf/Vector.h"
46 #include "wtf/text/AtomicString.h" 46 #include "wtf/text/AtomicString.h"
47 47
48 namespace WebCore { 48 namespace WebCore {
49 49
50 class CharacterData; 50 class CharacterData;
51 class DOMEditor; 51 class DOMEditor;
52 class Document; 52 class Document;
53 class Element; 53 class Element;
54 class EventTarget;
54 class ExceptionState; 55 class ExceptionState;
55 class InspectorFrontend; 56 class InspectorFrontend;
56 class InspectorHistory; 57 class InspectorHistory;
57 class InspectorOverlay; 58 class InspectorOverlay;
58 class InspectorPageAgent; 59 class InspectorPageAgent;
59 class InspectorState; 60 class InspectorState;
60 class InstrumentingAgents; 61 class InstrumentingAgents;
61 class Node; 62 class Node;
62 class PlatformGestureEvent; 63 class PlatformGestureEvent;
63 class PlatformTouchEvent; 64 class PlatformTouchEvent;
64 class RevalidateStyleAttributeTask; 65 class RevalidateStyleAttributeTask;
65 class ShadowRoot; 66 class ShadowRoot;
66 67
67 struct HighlightConfig; 68 struct HighlightConfig;
68 69
69 typedef String ErrorString; 70 typedef String ErrorString;
70 typedef int BackendNodeId; 71 typedef int BackendNodeId;
71 72
72 73
73 struct EventListenerInfo { 74 struct EventListenerInfo {
74 EventListenerInfo(Node* node, const AtomicString& eventType, const EventList enerVector& eventListenerVector) 75 EventListenerInfo(EventTarget* eventTarget, const AtomicString& eventType, c onst EventListenerVector& eventListenerVector)
75 : node(node) 76 : eventTarget(eventTarget)
76 , eventType(eventType) 77 , eventType(eventType)
77 , eventListenerVector(eventListenerVector) 78 , eventListenerVector(eventListenerVector)
78 { 79 {
79 } 80 }
80 81
81 Node* node; 82 EventTarget* eventTarget;
82 const AtomicString eventType; 83 const AtomicString eventType;
83 const EventListenerVector eventListenerVector; 84 const EventListenerVector eventListenerVector;
84 }; 85 };
85 86
86 class InspectorDOMAgent FINAL : public InspectorBaseAgent<InspectorDOMAgent>, pu blic InspectorBackendDispatcher::DOMCommandHandler { 87 class InspectorDOMAgent FINAL : public InspectorBaseAgent<InspectorDOMAgent>, pu blic InspectorBackendDispatcher::DOMCommandHandler {
87 WTF_MAKE_NONCOPYABLE(InspectorDOMAgent); 88 WTF_MAKE_NONCOPYABLE(InspectorDOMAgent);
88 public: 89 public:
89 struct DOMListener { 90 struct DOMListener {
90 virtual ~DOMListener() 91 virtual ~DOMListener()
91 { 92 {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) OVERRIDE; 145 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) OVERRIDE;
145 virtual void undo(ErrorString*) OVERRIDE; 146 virtual void undo(ErrorString*) OVERRIDE;
146 virtual void redo(ErrorString*) OVERRIDE; 147 virtual void redo(ErrorString*) OVERRIDE;
147 virtual void markUndoableState(ErrorString*) OVERRIDE; 148 virtual void markUndoableState(ErrorString*) OVERRIDE;
148 virtual void focus(ErrorString*, int nodeId) OVERRIDE; 149 virtual void focus(ErrorString*, int nodeId) OVERRIDE;
149 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) OVERRIDE; 150 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) OVERRIDE;
150 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) OVERRIDE; 151 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) OVERRIDE;
151 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) OVE RRIDE; 152 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) OVE RRIDE;
152 virtual void getRelayoutBoundary(ErrorString*, int nodeId, int* relayoutBoun daryNodeId) OVERRIDE; 153 virtual void getRelayoutBoundary(ErrorString*, int nodeId, int* relayoutBoun daryNodeId) OVERRIDE;
153 154
154 static void getEventListeners(Node*, Vector<EventListenerInfo>& listenersArr ay, bool includeAncestors); 155 static void getEventListeners(EventTarget*, Vector<EventListenerInfo>& liste nersArray, bool includeAncestors);
155 156
156 // Methods called from the InspectorInstrumentation. 157 // Methods called from the InspectorInstrumentation.
157 void setDocument(Document*); 158 void setDocument(Document*);
158 void releaseDanglingNodes(); 159 void releaseDanglingNodes();
159 160
160 void domContentLoadedEventFired(Frame*); 161 void domContentLoadedEventFired(Frame*);
161 void didCommitLoad(Frame*, DocumentLoader*); 162 void didCommitLoad(Frame*, DocumentLoader*);
162 163
163 void didInsertDOMNode(Node*); 164 void didInsertDOMNode(Node*);
164 void willRemoveDOMNode(Node*); 165 void willRemoveDOMNode(Node*);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; 270 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig;
270 OwnPtr<InspectorHistory> m_history; 271 OwnPtr<InspectorHistory> m_history;
271 OwnPtr<DOMEditor> m_domEditor; 272 OwnPtr<DOMEditor> m_domEditor;
272 bool m_suppressAttributeModifiedEvent; 273 bool m_suppressAttributeModifiedEvent;
273 }; 274 };
274 275
275 276
276 } // namespace WebCore 277 } // namespace WebCore
277 278
278 #endif // !defined(InspectorDOMAgent_h) 279 #endif // !defined(InspectorDOMAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptHost.idl ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698