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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this)); 1105 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this));
1106 1106
1107 this._inspectModeEnabled = false; 1107 this._inspectModeEnabled = false;
1108 1108
1109 this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._ agent); 1109 this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._ agent);
1110 this._highlighter = this._defaultHighlighter; 1110 this._highlighter = this._defaultHighlighter;
1111 1111
1112 this._agent.enable(); 1112 this._agent.enable();
1113 } 1113 }
1114 1114
1115 /** @enum {string} */
1115 WebInspector.DOMModel.Events = { 1116 WebInspector.DOMModel.Events = {
1116 AttrModified: "AttrModified", 1117 AttrModified: "AttrModified",
1117 AttrRemoved: "AttrRemoved", 1118 AttrRemoved: "AttrRemoved",
1118 CharacterDataModified: "CharacterDataModified", 1119 CharacterDataModified: "CharacterDataModified",
1119 DOMMutated: "DOMMutated", 1120 DOMMutated: "DOMMutated",
1120 NodeInserted: "NodeInserted", 1121 NodeInserted: "NodeInserted",
1121 NodeInspected: "NodeInspected", 1122 NodeInspected: "NodeInspected",
1122 NodeHighlightedInOverlay: "NodeHighlightedInOverlay", 1123 NodeHighlightedInOverlay: "NodeHighlightedInOverlay",
1123 NodeRemoved: "NodeRemoved", 1124 NodeRemoved: "NodeRemoved",
1124 DocumentUpdated: "DocumentUpdated", 1125 DocumentUpdated: "DocumentUpdated",
1125 ChildNodeCountUpdated: "ChildNodeCountUpdated", 1126 ChildNodeCountUpdated: "ChildNodeCountUpdated",
1126 UndoRedoRequested: "UndoRedoRequested", 1127 UndoRedoRequested: "UndoRedoRequested",
1127 UndoRedoCompleted: "UndoRedoCompleted", 1128 UndoRedoCompleted: "UndoRedoCompleted",
1128 DistributedNodesChanged: "DistributedNodesChanged", 1129 DistributedNodesChanged: "DistributedNodesChanged",
1129 ModelSuspended: "ModelSuspended", 1130 ModelSuspended: "ModelSuspended",
1130 InspectModeWillBeToggled: "InspectModeWillBeToggled", 1131 InspectModeWillBeToggled: "InspectModeWillBeToggled",
1131 MarkersChanged: "MarkersChanged" 1132 MarkersChanged: "MarkersChanged"
1132 } 1133 }
1133 1134
1134
1135 /** 1135 /**
1136 * @param {!WebInspector.RemoteObject} object 1136 * @param {!WebInspector.RemoteObject} object
1137 */ 1137 */
1138 WebInspector.DOMModel.highlightObjectAsDOMNode = function(object) 1138 WebInspector.DOMModel.highlightObjectAsDOMNode = function(object)
1139 { 1139 {
1140 var domModel = WebInspector.DOMModel.fromTarget(object.target()); 1140 var domModel = WebInspector.DOMModel.fromTarget(object.target());
1141 if (domModel) 1141 if (domModel)
1142 domModel.highlightDOMNode(undefined, undefined, undefined, object.object Id); 1142 domModel.highlightDOMNode(undefined, undefined, undefined, object.object Id);
1143 } 1143 }
1144 1144
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 } 2280 }
2281 2281
2282 /** 2282 /**
2283 * @param {!WebInspector.Target} target 2283 * @param {!WebInspector.Target} target
2284 * @return {?WebInspector.DOMModel} 2284 * @return {?WebInspector.DOMModel}
2285 */ 2285 */
2286 WebInspector.DOMModel.fromTarget = function(target) 2286 WebInspector.DOMModel.fromTarget = function(target)
2287 { 2287 {
2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); 2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel));
2289 } 2289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698