| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 public: | 88 public: |
| 89 struct DOMListener { | 89 struct DOMListener { |
| 90 virtual ~DOMListener() | 90 virtual ~DOMListener() |
| 91 { | 91 { |
| 92 } | 92 } |
| 93 virtual void didRemoveDocument(Document*) = 0; | 93 virtual void didRemoveDocument(Document*) = 0; |
| 94 virtual void didRemoveDOMNode(Node*) = 0; | 94 virtual void didRemoveDOMNode(Node*) = 0; |
| 95 virtual void didModifyDOMAttr(Element*) = 0; | 95 virtual void didModifyDOMAttr(Element*) = 0; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 static PassOwnPtr<InspectorDOMAgent> create(InspectorPageAgent* pageAgent, I
njectedScriptManager* injectedScriptManager, InspectorOverlay* overlay) | 98 static PassOwnPtrWillBeRawPtr<InspectorDOMAgent> create(InspectorPageAgent*
pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overl
ay) |
| 99 { | 99 { |
| 100 return adoptPtr(new InspectorDOMAgent(pageAgent, injectedScriptManager,
overlay)); | 100 return adoptPtrWillBeNoop(new InspectorDOMAgent(pageAgent, injectedScrip
tManager, overlay)); |
| 101 } | 101 } |
| 102 | 102 |
| 103 static String toErrorString(ExceptionState&); | 103 static String toErrorString(ExceptionState&); |
| 104 | 104 |
| 105 virtual ~InspectorDOMAgent(); | 105 virtual ~InspectorDOMAgent(); |
| 106 virtual void trace(Visitor*); |
| 106 | 107 |
| 107 virtual void setFrontend(InspectorFrontend*) OVERRIDE; | 108 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
| 108 virtual void clearFrontend() OVERRIDE; | 109 virtual void clearFrontend() OVERRIDE; |
| 109 virtual void restore() OVERRIDE; | 110 virtual void restore() OVERRIDE; |
| 110 | 111 |
| 111 Vector<Document*> documents(); | 112 Vector<Document*> documents(); |
| 112 void reset(); | 113 void reset(); |
| 113 | 114 |
| 114 // Methods called from the frontend for DOM nodes inspection. | 115 // Methods called from the frontend for DOM nodes inspection. |
| 115 virtual void querySelector(ErrorString*, int nodeId, const String& selectors
, int* elementId) OVERRIDE; | 116 virtual void querySelector(ErrorString*, int nodeId, const String& selectors
, int* elementId) OVERRIDE; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > buildArrayForPseudoE
lements(Element*, NodeToIdMap* nodesMap); | 235 PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > buildArrayForPseudoE
lements(Element*, NodeToIdMap* nodesMap); |
| 235 | 236 |
| 236 Node* nodeForPath(const String& path); | 237 Node* nodeForPath(const String& path); |
| 237 | 238 |
| 238 void discardFrontendBindings(); | 239 void discardFrontendBindings(); |
| 239 | 240 |
| 240 void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<JSONObject>* col
or, const RefPtr<JSONObject>* outlineColor); | 241 void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<JSONObject>* col
or, const RefPtr<JSONObject>* outlineColor); |
| 241 | 242 |
| 242 bool pushDocumentUponHandlelessOperation(ErrorString*); | 243 bool pushDocumentUponHandlelessOperation(ErrorString*); |
| 243 | 244 |
| 244 InspectorPageAgent* m_pageAgent; | 245 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 245 InjectedScriptManager* m_injectedScriptManager; | 246 InjectedScriptManager* m_injectedScriptManager; |
| 246 InspectorOverlay* m_overlay; | 247 InspectorOverlay* m_overlay; |
| 247 InspectorFrontend::DOM* m_frontend; | 248 InspectorFrontend::DOM* m_frontend; |
| 248 DOMListener* m_domListener; | 249 DOMListener* m_domListener; |
| 249 NodeToIdMap m_documentNodeToIdMap; | 250 NodeToIdMap m_documentNodeToIdMap; |
| 250 // Owns node mappings for dangling nodes. | 251 // Owns node mappings for dangling nodes. |
| 251 Vector<OwnPtr<NodeToIdMap> > m_danglingNodeToIdMaps; | 252 Vector<OwnPtr<NodeToIdMap> > m_danglingNodeToIdMaps; |
| 252 HashMap<int, Node*> m_idToNode; | 253 HashMap<int, Node*> m_idToNode; |
| 253 HashMap<int, NodeToIdMap*> m_idToNodesMap; | 254 HashMap<int, NodeToIdMap*> m_idToNodesMap; |
| 254 HashSet<int> m_childrenRequested; | 255 HashSet<int> m_childrenRequested; |
| 255 HashMap<int, int> m_cachedChildCount; | 256 HashMap<int, int> m_cachedChildCount; |
| 256 int m_lastNodeId; | 257 int m_lastNodeId; |
| 257 RefPtr<Document> m_document; | 258 RefPtr<Document> m_document; |
| 258 typedef HashMap<String, Vector<RefPtr<Node> > > SearchResults; | 259 typedef HashMap<String, Vector<RefPtr<Node> > > SearchResults; |
| 259 SearchResults m_searchResults; | 260 SearchResults m_searchResults; |
| 260 OwnPtr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; | 261 OwnPtrWillBeMember<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; |
| 261 SearchMode m_searchingForNode; | 262 SearchMode m_searchingForNode; |
| 262 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; | 263 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; |
| 263 OwnPtrWillBePersistent<InspectorHistory> m_history; | 264 OwnPtrWillBeMember<InspectorHistory> m_history; |
| 264 OwnPtrWillBePersistent<DOMEditor> m_domEditor; | 265 OwnPtrWillBeMember<DOMEditor> m_domEditor; |
| 265 bool m_suppressAttributeModifiedEvent; | 266 bool m_suppressAttributeModifiedEvent; |
| 266 }; | 267 }; |
| 267 | 268 |
| 268 | 269 |
| 269 } // namespace WebCore | 270 } // namespace WebCore |
| 270 | 271 |
| 271 #endif // !defined(InspectorDOMAgent_h) | 272 #endif // !defined(InspectorDOMAgent_h) |
| OLD | NEW |