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

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

Issue 397303002: DevTools: [Elements] Implement shortcut-based node cut-copy-pasting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add visual feedback for nodes in the clipboard Created 6 years, 5 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 virtual void setInspectModeEnabled(ErrorString*, bool enabled, const bool* i nspectUAShadowDOM, const RefPtr<JSONObject>* highlightConfig) OVERRIDE; 135 virtual void setInspectModeEnabled(ErrorString*, bool enabled, const bool* i nspectUAShadowDOM, const RefPtr<JSONObject>* highlightConfig) OVERRIDE;
136 virtual void requestNode(ErrorString*, const String& objectId, int* nodeId) OVERRIDE; 136 virtual void requestNode(ErrorString*, const String& objectId, int* nodeId) OVERRIDE;
137 virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId) OVERRIDE; 137 virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId) OVERRIDE;
138 virtual void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSON Array>& nodeIds, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE; 138 virtual void pushNodesByBackendIdsToFrontend(ErrorString*, const RefPtr<JSON Array>& nodeIds, RefPtr<TypeBuilder::Array<int> >&) OVERRIDE;
139 virtual void hideHighlight(ErrorString*) OVERRIDE; 139 virtual void hideHighlight(ErrorString*) OVERRIDE;
140 virtual void highlightRect(ErrorString*, int x, int y, int width, int height , const RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERR IDE; 140 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 highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, cons t RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; 141 virtual void highlightQuad(ErrorString*, const RefPtr<JSONArray>& quad, cons t RefPtr<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE;
142 virtual void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlight Config, const int* nodeId, const String* objectId) OVERRIDE; 142 virtual void highlightNode(ErrorString*, const RefPtr<JSONObject>& highlight Config, const int* nodeId, const String* objectId) OVERRIDE;
143 virtual void highlightFrame(ErrorString*, const String& frameId, const RefPt r<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE; 143 virtual void highlightFrame(ErrorString*, const String& frameId, const RefPt r<JSONObject>* color, const RefPtr<JSONObject>* outlineColor) OVERRIDE;
144 144
145 virtual void copyTo(ErrorString*, int nodeId, int targetElementId, const int * const anchorNodeId, const bool* const deep, int* newNodeId) OVERRIDE;
145 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) OVERRIDE; 146 virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* a nchorNodeId, int* newNodeId) OVERRIDE;
146 virtual void undo(ErrorString*) OVERRIDE; 147 virtual void undo(ErrorString*) OVERRIDE;
147 virtual void redo(ErrorString*) OVERRIDE; 148 virtual void redo(ErrorString*) OVERRIDE;
148 virtual void markUndoableState(ErrorString*) OVERRIDE; 149 virtual void markUndoableState(ErrorString*) OVERRIDE;
149 virtual void focus(ErrorString*, int nodeId) OVERRIDE; 150 virtual void focus(ErrorString*, int nodeId) OVERRIDE;
150 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) OVERRIDE; 151 virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<JSONAr ray>& files) OVERRIDE;
151 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) OVERRIDE; 152 virtual void getBoxModel(ErrorString*, int nodeId, RefPtr<TypeBuilder::DOM:: BoxModel>&) OVERRIDE;
152 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) OVE RRIDE; 153 virtual void getNodeForLocation(ErrorString*, int x, int y, int* nodeId) OVE RRIDE;
153 virtual void getRelayoutBoundary(ErrorString*, int nodeId, int* relayoutBoun daryNodeId) OVERRIDE; 154 virtual void getRelayoutBoundary(ErrorString*, int nodeId, int* relayoutBoun daryNodeId) OVERRIDE;
154 155
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 223
223 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig); 224 void setSearchingForNode(ErrorString*, SearchMode, JSONObject* highlightConf ig);
224 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, JSONObject* highlightInspectorObject); 225 PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, JSONObject* highlightInspectorObject);
225 226
226 // Node-related methods. 227 // Node-related methods.
227 typedef WillBeHeapHashMap<RefPtrWillBeMember<Node>, int> NodeToIdMap; 228 typedef WillBeHeapHashMap<RefPtrWillBeMember<Node>, int> NodeToIdMap;
228 int bind(Node*, NodeToIdMap*); 229 int bind(Node*, NodeToIdMap*);
229 void unbind(Node*, NodeToIdMap*); 230 void unbind(Node*, NodeToIdMap*);
230 231
231 Node* assertEditableNode(ErrorString*, int nodeId); 232 Node* assertEditableNode(ErrorString*, int nodeId);
233 Node* assertEditableChildNode(ErrorString*, Element* parentElement, int node Id);
232 Element* assertEditableElement(ErrorString*, int nodeId); 234 Element* assertEditableElement(ErrorString*, int nodeId);
233 235
234 void inspect(Node*); 236 void inspect(Node*);
235 237
236 int pushNodePathToFrontend(Node*); 238 int pushNodePathToFrontend(Node*);
237 void pushChildNodesToFrontend(int nodeId, int depth = 1); 239 void pushChildNodesToFrontend(int nodeId, int depth = 1);
238 240
239 void invalidateFrameOwnerElement(LocalFrame*); 241 void invalidateFrameOwnerElement(LocalFrame*);
240 242
241 bool hasBreakpoint(Node*, int type); 243 bool hasBreakpoint(Node*, int type);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 OwnPtrWillBePersistent<InspectorHistory> m_history; 280 OwnPtrWillBePersistent<InspectorHistory> m_history;
279 OwnPtrWillBePersistent<DOMEditor> m_domEditor; 281 OwnPtrWillBePersistent<DOMEditor> m_domEditor;
280 bool m_suppressAttributeModifiedEvent; 282 bool m_suppressAttributeModifiedEvent;
281 Listener* m_listener; 283 Listener* m_listener;
282 }; 284 };
283 285
284 286
285 } // namespace WebCore 287 } // namespace WebCore
286 288
287 #endif // !defined(InspectorDOMAgent_h) 289 #endif // !defined(InspectorDOMAgent_h)
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | Source/core/inspector/InspectorDOMAgent.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698