OLD | NEW |
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 virtual ~InspectorDOMAgent(); | 105 virtual ~InspectorDOMAgent(); |
106 | 106 |
107 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 107 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
108 virtual void clearFrontend() OVERRIDE; | 108 virtual void clearFrontend() OVERRIDE; |
109 virtual void restore() OVERRIDE; | 109 virtual void restore() OVERRIDE; |
110 | 110 |
111 Vector<Document*> documents(); | 111 Vector<Document*> documents(); |
112 void reset(); | 112 void reset(); |
113 | 113 |
114 // Methods called from the frontend for DOM nodes inspection. | 114 // Methods called from the frontend for DOM nodes inspection. |
| 115 virtual void enable(ErrorString*) OVERRIDE; |
| 116 virtual void disable(ErrorString*) OVERRIDE; |
115 virtual void querySelector(ErrorString*, int nodeId, const String& selectors
, int* elementId) OVERRIDE; | 117 virtual void querySelector(ErrorString*, int nodeId, const String& selectors
, int* elementId) OVERRIDE; |
116 virtual void querySelectorAll(ErrorString*, int nodeId, const String& select
ors, RefPtr<TypeBuilder::Array<int> >& result) OVERRIDE; | 118 virtual void querySelectorAll(ErrorString*, int nodeId, const String& select
ors, RefPtr<TypeBuilder::Array<int> >& result) OVERRIDE; |
117 virtual void getDocument(ErrorString*, RefPtr<TypeBuilder::DOM::Node>& root)
OVERRIDE; | 119 virtual void getDocument(ErrorString*, RefPtr<TypeBuilder::DOM::Node>& root)
OVERRIDE; |
118 virtual void requestChildNodes(ErrorString*, int nodeId, const int* depth) O
VERRIDE; | 120 virtual void requestChildNodes(ErrorString*, int nodeId, const int* depth) O
VERRIDE; |
119 virtual void setAttributeValue(ErrorString*, int elementId, const String& na
me, const String& value) OVERRIDE; | 121 virtual void setAttributeValue(ErrorString*, int elementId, const String& na
me, const String& value) OVERRIDE; |
120 virtual void setAttributesAsText(ErrorString*, int elementId, const String&
text, const String* name) OVERRIDE; | 122 virtual void setAttributesAsText(ErrorString*, int elementId, const String&
text, const String* name) OVERRIDE; |
121 virtual void removeAttribute(ErrorString*, int elementId, const String& name
) OVERRIDE; | 123 virtual void removeAttribute(ErrorString*, int elementId, const String& name
) OVERRIDE; |
122 virtual void removeNode(ErrorString*, int nodeId) OVERRIDE; | 124 virtual void removeNode(ErrorString*, int nodeId) OVERRIDE; |
123 virtual void setNodeName(ErrorString*, int nodeId, const String& name, int*
newId) OVERRIDE; | 125 virtual void setNodeName(ErrorString*, int nodeId, const String& name, int*
newId) OVERRIDE; |
124 virtual void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML)
OVERRIDE; | 126 virtual void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML)
OVERRIDE; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 200 |
199 Node* assertNode(ErrorString*, int nodeId); | 201 Node* assertNode(ErrorString*, int nodeId); |
200 Element* assertElement(ErrorString*, int nodeId); | 202 Element* assertElement(ErrorString*, int nodeId); |
201 Document* assertDocument(ErrorString*, int nodeId); | 203 Document* assertDocument(ErrorString*, int nodeId); |
202 | 204 |
203 private: | 205 private: |
204 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; | 206 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; |
205 | 207 |
206 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver
lay*); | 208 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver
lay*); |
207 | 209 |
| 210 bool enabled() const; |
208 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf
ig); | 211 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf
ig); |
209 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*,
JSONObject* highlightInspectorObject); | 212 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*,
JSONObject* highlightInspectorObject); |
210 | 213 |
211 // Node-related methods. | 214 // Node-related methods. |
212 typedef HashMap<RefPtr<Node>, int> NodeToIdMap; | 215 typedef HashMap<RefPtr<Node>, int> NodeToIdMap; |
213 int bind(Node*, NodeToIdMap*); | 216 int bind(Node*, NodeToIdMap*); |
214 void unbind(Node*, NodeToIdMap*); | 217 void unbind(Node*, NodeToIdMap*); |
215 | 218 |
216 Node* assertEditableNode(ErrorString*, int nodeId); | 219 Node* assertEditableNode(ErrorString*, int nodeId); |
217 Element* assertEditableElement(ErrorString*, int nodeId); | 220 Element* assertEditableElement(ErrorString*, int nodeId); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; | 265 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; |
263 OwnPtr<InspectorHistory> m_history; | 266 OwnPtr<InspectorHistory> m_history; |
264 OwnPtr<DOMEditor> m_domEditor; | 267 OwnPtr<DOMEditor> m_domEditor; |
265 bool m_suppressAttributeModifiedEvent; | 268 bool m_suppressAttributeModifiedEvent; |
266 }; | 269 }; |
267 | 270 |
268 | 271 |
269 } // namespace WebCore | 272 } // namespace WebCore |
270 | 273 |
271 #endif // !defined(InspectorDOMAgent_h) | 274 #endif // !defined(InspectorDOMAgent_h) |
OLD | NEW |