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

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

Issue 224843014: DevTools: support importing layer tree from trace snapshots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased, removed redundant transform handling code Created 6 years, 8 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) 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 }, 94 },
95 95
96 /** 96 /**
97 * @param {!WebInspector.LayerTreeSnapshot} snapshot 97 * @param {!WebInspector.LayerTreeSnapshot} snapshot
98 */ 98 */
99 _showSnapshot: function(snapshot) 99 _showSnapshot: function(snapshot)
100 { 100 {
101 this._model.setSnapshot(snapshot); 101 this._model.setSnapshot(snapshot);
102 }, 102 },
103 103
104 /**
105 * @param {!WebInspector.TracingLayerSnapshot} snapshot
106 */
107 _showTracingSnapshot: function(snapshot)
108 {
109 this._model.setTracingSnapshot(snapshot);
110 },
111
104 _onLayerTreeUpdated: function() 112 _onLayerTreeUpdated: function()
105 { 113 {
106 if (this._currentlySelectedLayer && !this._model.layerById(this._current lySelectedLayer.id())) 114 if (this._currentlySelectedLayer && !this._model.layerById(this._current lySelectedLayer.id()))
107 this._selectLayer(null); 115 this._selectLayer(null);
108 if (this._currentlyHoveredLayer && !this._model.layerById(this._currentl yHoveredLayer.id())) 116 if (this._currentlyHoveredLayer && !this._model.layerById(this._currentl yHoveredLayer.id()))
109 this._hoverLayer(null); 117 this._hoverLayer(null);
110 }, 118 },
111 119
112 /** 120 /**
113 * @param {!WebInspector.Event} event 121 * @param {!WebInspector.Event} event
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 /** 186 /**
179 * @constructor 187 * @constructor
180 * @implements {WebInspector.Revealer} 188 * @implements {WebInspector.Revealer}
181 */ 189 */
182 WebInspector.LayersPanel.LayerTreeRevealer = function() 190 WebInspector.LayersPanel.LayerTreeRevealer = function()
183 { 191 {
184 } 192 }
185 193
186 WebInspector.LayersPanel.LayerTreeRevealer.prototype = { 194 WebInspector.LayersPanel.LayerTreeRevealer.prototype = {
187 /** 195 /**
188 * @param {!Object} layerTree 196 * @param {!Object} snapshotData
189 */ 197 */
190 reveal: function(layerTree) 198 reveal: function(snapshotData)
191 { 199 {
192 if (layerTree instanceof WebInspector.LayerTreeSnapshot) 200 if (snapshotData instanceof WebInspector.LayerTreeSnapshot)
193 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView .showPanel("layers"))._showSnapshot(layerTree); 201 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView .showPanel("layers"))._showSnapshot(snapshotData);
202 else if (snapshotData instanceof WebInspector.TracingLayerSnapshot)
203 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView .showPanel("layers"))._showTracingSnapshot(snapshotData);
194 } 204 }
195 } 205 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/LayerTreeModel.js ('k') | Source/devtools/front_end/TimelineTracingView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698