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

Side by Side Diff: Source/devtools/front_end/LayersPanel.js

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 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
« no previous file with comments | « Source/devtools/front_end/Layers3DView.js ('k') | Source/devtools/front_end/Main.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 /** 139 /**
140 * @param {?WebInspector.Layer} layer 140 * @param {?WebInspector.Layer} layer
141 */ 141 */
142 _selectLayer: function(layer) 142 _selectLayer: function(layer)
143 { 143 {
144 if (this._currentlySelectedLayer === layer) 144 if (this._currentlySelectedLayer === layer)
145 return; 145 return;
146 this._currentlySelectedLayer = layer; 146 this._currentlySelectedLayer = layer;
147 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); 147 var nodeId = layer && layer.nodeIdForSelfOrAncestor();
148 if (nodeId) 148 if (nodeId)
149 WebInspector.domAgent.highlightDOMNodeForTwoSeconds(nodeId); 149 WebInspector.domModel.highlightDOMNodeForTwoSeconds(nodeId);
150 else 150 else
151 WebInspector.domAgent.hideDOMNodeHighlight(); 151 WebInspector.domModel.hideDOMNodeHighlight();
152 this._layerTree.selectLayer(layer); 152 this._layerTree.selectLayer(layer);
153 this._layers3DView.selectLayer(layer); 153 this._layers3DView.selectLayer(layer);
154 this._layerDetailsView.setLayer(layer); 154 this._layerDetailsView.setLayer(layer);
155 }, 155 },
156 156
157 /** 157 /**
158 * @param {?WebInspector.Layer} layer 158 * @param {?WebInspector.Layer} layer
159 */ 159 */
160 _hoverLayer: function(layer) 160 _hoverLayer: function(layer)
161 { 161 {
162 if (this._currentlyHoveredLayer === layer) 162 if (this._currentlyHoveredLayer === layer)
163 return; 163 return;
164 this._currentlyHoveredLayer = layer; 164 this._currentlyHoveredLayer = layer;
165 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); 165 var nodeId = layer && layer.nodeIdForSelfOrAncestor();
166 if (nodeId) 166 if (nodeId)
167 WebInspector.domAgent.highlightDOMNode(nodeId); 167 WebInspector.domModel.highlightDOMNode(nodeId);
168 else 168 else
169 WebInspector.domAgent.hideDOMNodeHighlight(); 169 WebInspector.domModel.hideDOMNodeHighlight();
170 this._layerTree.hoverLayer(layer); 170 this._layerTree.hoverLayer(layer);
171 this._layers3DView.hoverLayer(layer); 171 this._layers3DView.hoverLayer(layer);
172 }, 172 },
173 173
174 __proto__: WebInspector.PanelWithSidebarTree.prototype 174 __proto__: WebInspector.PanelWithSidebarTree.prototype
175 } 175 }
176 176
177 /** 177 /**
178 * @constructor 178 * @constructor
179 * @implements {WebInspector.Revealer} 179 * @implements {WebInspector.Revealer}
180 */ 180 */
181 WebInspector.LayersPanel.LayerTreeRevealer = function() 181 WebInspector.LayersPanel.LayerTreeRevealer = function()
182 { 182 {
183 } 183 }
184 184
185 WebInspector.LayersPanel.LayerTreeRevealer.prototype = { 185 WebInspector.LayersPanel.LayerTreeRevealer.prototype = {
186 /** 186 /**
187 * @param {!Object} layerTree 187 * @param {!Object} layerTree
188 */ 188 */
189 reveal: function(layerTree) 189 reveal: function(layerTree)
190 { 190 {
191 if (layerTree instanceof WebInspector.LayerTreeSnapshot) 191 if (layerTree instanceof WebInspector.LayerTreeSnapshot)
192 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView .showPanel("layers"))._showSnapshot(layerTree); 192 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView .showPanel("layers"))._showSnapshot(layerTree);
193 } 193 }
194 } 194 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Layers3DView.js ('k') | Source/devtools/front_end/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698