Chromium Code Reviews| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 virtual void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Arr ay<String> >& result) OVERRIDE; | 135 virtual void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Arr ay<String> >& result) OVERRIDE; |
| 136 virtual void setInspectModeEnabled(ErrorString*, bool enabled, const bool* i nspectUAShadowDOM, const RefPtr<JSONObject>* highlightConfig) OVERRIDE; | 136 virtual void setInspectModeEnabled(ErrorString*, bool enabled, const bool* i nspectUAShadowDOM, const RefPtr<JSONObject>* highlightConfig) OVERRIDE; |
| 137 virtual void requestNode(ErrorString*, const String& objectId, int* nodeId) OVERRIDE; | 137 virtual void requestNode(ErrorString*, const String& objectId, int* nodeId) OVERRIDE; |
| 138 virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId) OVERRIDE; | 138 virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId) OVERRIDE; |
| 139 virtual void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSON Array>& nodeIds, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; | 139 virtual void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSON Array>& nodeIds, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; |
| 140 virtual void hideHighlight(ErrorString*) OVERRIDE; | 140 virtual void hideHighlight(ErrorString*) OVERRIDE; |
| 141 virtual void highlightRect(ErrorString*, int x, int y, int width, int height , const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERR IDE; | 141 virtual void highlightRect(ErrorString*, int x, int y, int width, int height , const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERR IDE; |
| 142 virtual void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, cons t RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; | 142 virtual void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, cons t RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; |
| 143 virtual void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlight Config, const int* nodeId, const String* objectId) OVERRIDE; | 143 virtual void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlight Config, const int* nodeId, const String* objectId) OVERRIDE; |
| 144 virtual void highlightFrame(ErrorString*, const String& frameId, const RefPt r<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; | 144 virtual void highlightFrame(ErrorString*, const String& frameId, const RefPt r<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; |
| 145 virtual void getAnimationPlayersForNode(ErrorString*, int nodeId, RefPtr<Typ eBuilder::Array<TypeBuilder::DOM::AnimationPlayer> >& animationPlayersArray) OVE RRIDE; | |
| 146 virtual void pauseAnimationPlayer(ErrorString*, const String& id, RefPtr<Typ eBuilder::DOM::AnimationPlayer>&) OVERRIDE; | |
| 147 virtual void playAnimationPlayer(ErrorString*, const String& id, RefPtr<Type Builder::DOM::AnimationPlayer>&) OVERRIDE; | |
| 148 virtual void setAnimationPlayerCurrentTime(ErrorString*, const String& id, d ouble currentTime, RefPtr<TypeBuilder::DOM::AnimationPlayer>&) OVERRIDE; | |
| 149 virtual void getAnimationPlayerState(ErrorString*, const String& id, double* currentTime, bool* isRunning) OVERRIDE; | |
| 145 | 150 |
| 146 virtual void copyTo(ErrorString*, int nodeId, int targetElementId, const int * anchorNodeId, int* newNodeId) OVERRIDE; | 151 virtual void copyTo(ErrorString*, int nodeId, int targetElementId, const int * anchorNodeId, int* newNodeId) OVERRIDE; |
| 147 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) OVERRIDE; | 152 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) OVERRIDE; |
| 148 virtual void undo(ErrorString*) OVERRIDE; | 153 virtual void undo(ErrorString*) OVERRIDE; |
| 149 virtual void redo(ErrorString*) OVERRIDE; | 154 virtual void redo(ErrorString*) OVERRIDE; |
| 150 virtual void markUndoableState(ErrorString*) OVERRIDE; | 155 virtual void markUndoableState(ErrorString*) OVERRIDE; |
| 151 virtual void focus(ErrorString*, int nodeId) OVERRIDE; | 156 virtual void focus(ErrorString*, int nodeId) OVERRIDE; |
| 152 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) OVERRIDE; | 157 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) OVERRIDE; |
| 153 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) OVERRIDE; | 158 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) OVERRIDE; |
| 154 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) OVE RRIDE; | 159 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) OVE RRIDE; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 static Node* innerFirstChild(Node*); | 211 static Node* innerFirstChild(Node*); |
| 207 static Node* innerNextSibling(Node*); | 212 static Node* innerNextSibling(Node*); |
| 208 static Node* innerPreviousSibling(Node*); | 213 static Node* innerPreviousSibling(Node*); |
| 209 static unsigned innerChildNodeCount(Node*); | 214 static unsigned innerChildNodeCount(Node*); |
| 210 static Node* innerParentNode(Node*); | 215 static Node* innerParentNode(Node*); |
| 211 static bool isWhitespace(Node*); | 216 static bool isWhitespace(Node*); |
| 212 | 217 |
| 213 Node* assertNode(ErrorString*, int nodeId); | 218 Node* assertNode(ErrorString*, int nodeId); |
| 214 Element* assertElement(ErrorString*, int nodeId); | 219 Element* assertElement(ErrorString*, int nodeId); |
| 215 Document* assertDocument(ErrorString*, int nodeId); | 220 Document* assertDocument(ErrorString*, int nodeId); |
| 221 AnimationPlayer* assertAnimationPlayer(ErrorString*, String id); | |
|
caseq
2014/10/03 12:43:55
nit: const String& id
samli
2014/10/07 05:25:43
Done.
| |
| 216 | 222 |
| 217 private: | 223 private: |
| 218 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; | 224 enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow }; |
| 219 | 225 |
| 220 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver lay*); | 226 InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOver lay*); |
| 221 | 227 |
| 222 void innerEnable(); | 228 void innerEnable(); |
| 223 void notifyDocumentUpdated(); | 229 void notifyDocumentUpdated(); |
| 224 | 230 |
| 225 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig); | 231 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 239 int pushNodePathToFrontend(Node*); | 245 int pushNodePathToFrontend(Node*); |
| 240 void pushChildNodesToFrontend(int nodeId, int depth = 1); | 246 void pushChildNodesToFrontend(int nodeId, int depth = 1); |
| 241 | 247 |
| 242 void invalidateFrameOwnerElement(LocalFrame*); | 248 void invalidateFrameOwnerElement(LocalFrame*); |
| 243 | 249 |
| 244 PassRefPtr<TypeBuilder::DOM::Node> buildObjectForNode(Node*, int depth, Node ToIdMap*); | 250 PassRefPtr<TypeBuilder::DOM::Node> buildObjectForNode(Node*, int depth, Node ToIdMap*); |
| 245 PassRefPtr<TypeBuilder::Array<String> > buildArrayForElementAttributes(Eleme nt*); | 251 PassRefPtr<TypeBuilder::Array<String> > buildArrayForElementAttributes(Eleme nt*); |
| 246 PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > buildArrayForContain erChildren(Node* container, int depth, NodeToIdMap* nodesMap); | 252 PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > buildArrayForContain erChildren(Node* container, int depth, NodeToIdMap* nodesMap); |
| 247 PassRefPtr<TypeBuilder::DOM::EventListener> buildObjectForEventListener(cons t RegisteredEventListener&, const AtomicString& eventType, Node*, const String* objectGroupId); | 253 PassRefPtr<TypeBuilder::DOM::EventListener> buildObjectForEventListener(cons t RegisteredEventListener&, const AtomicString& eventType, Node*, const String* objectGroupId); |
| 248 PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > buildArrayForPseudoE lements(Element*, NodeToIdMap* nodesMap); | 254 PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > buildArrayForPseudoE lements(Element*, NodeToIdMap* nodesMap); |
| 255 PassRefPtr<TypeBuilder::DOM::AnimationPlayer> buildObjectForAnimationPlayer( AnimationPlayer&); | |
| 256 PassRefPtr<TypeBuilder::DOM::AnimationNode> buildObjectForAnimationNode(Anim ationNode&); | |
| 249 | 257 |
| 250 Node* nodeForPath(const String& path); | 258 Node* nodeForPath(const String& path); |
| 251 | 259 |
| 252 void discardFrontendBindings(); | 260 void discardFrontendBindings(); |
| 253 | 261 |
| 254 void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<JSONObject>* col or, const RefPtr<JSONObject>* outlineColor); | 262 void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<JSONObject>* col or, const RefPtr<JSONObject>* outlineColor); |
| 255 | 263 |
| 256 bool pushDocumentUponHandlelessOperation(ErrorString*); | 264 bool pushDocumentUponHandlelessOperation(ErrorString*); |
| 257 | 265 |
| 258 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 266 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 271 RefPtrWillBeMember<Document> m_document; | 279 RefPtrWillBeMember<Document> m_document; |
| 272 typedef WillBeHeapHashMap<String, WillBeHeapVector<RefPtrWillBeMember<Node> > > SearchResults; | 280 typedef WillBeHeapHashMap<String, WillBeHeapVector<RefPtrWillBeMember<Node> > > SearchResults; |
| 273 SearchResults m_searchResults; | 281 SearchResults m_searchResults; |
| 274 OwnPtrWillBeMember<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; | 282 OwnPtrWillBeMember<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; |
| 275 SearchMode m_searchingForNode; | 283 SearchMode m_searchingForNode; |
| 276 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; | 284 OwnPtr<HighlightConfig> m_inspectModeHighlightConfig; |
| 277 OwnPtrWillBeMember<InspectorHistory> m_history; | 285 OwnPtrWillBeMember<InspectorHistory> m_history; |
| 278 OwnPtrWillBeMember<DOMEditor> m_domEditor; | 286 OwnPtrWillBeMember<DOMEditor> m_domEditor; |
| 279 bool m_suppressAttributeModifiedEvent; | 287 bool m_suppressAttributeModifiedEvent; |
| 280 RawPtrWillBeMember<Listener> m_listener; | 288 RawPtrWillBeMember<Listener> m_listener; |
| 289 WillBeHeapHashMap<String, RefPtrWillBeMember<AnimationPlayer> > m_idToAnimat ionPlayer; | |
|
caseq
2014/10/03 12:43:55
When do we release references to AnimationPlayers?
samli
2014/10/07 05:25:43
For now they are cleared on each new node selectio
| |
| 281 }; | 290 }; |
| 282 | 291 |
| 283 | 292 |
| 284 } // namespace blink | 293 } // namespace blink |
| 285 | 294 |
| 286 #endif // !defined(InspectorDOMAgent_h) | 295 #endif // !defined(InspectorDOMAgent_h) |
| OLD | NEW |