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

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

Issue 22602002: DevTools: add 3D layer view to Layer panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nuked LayerTreeModel.js from inspector.html Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/devtools.gyp ('k') | Source/devtools/front_end/Layers3DView.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 delete this._pendingRequestLayersCallbacks; 102 delete this._pendingRequestLayersCallbacks;
103 } 103 }
104 function onDocumentAvailable() 104 function onDocumentAvailable()
105 { 105 {
106 LayerTreeAgent.getLayers(undefined, onGetLayers.bind(this)) 106 LayerTreeAgent.getLayers(undefined, onGetLayers.bind(this))
107 } 107 }
108 WebInspector.domAgent.requestDocument(onDocumentAvailable.bind(this)); 108 WebInspector.domAgent.requestDocument(onDocumentAvailable.bind(this));
109 }, 109 },
110 110
111 /** 111 /**
112 * @param {string} id
113 * @return {WebInspector.Layer?}
114 */
115 layerById: function(id)
116 {
117 return this._layersById[id];
118 },
119
120 /**
112 * @param{Array.<LayerTreeAgent.Layer>} payload 121 * @param{Array.<LayerTreeAgent.Layer>} payload
113 */ 122 */
114 _repopulate: function(payload) 123 _repopulate: function(payload)
115 { 124 {
116 var oldLayersById = this._layersById; 125 var oldLayersById = this._layersById;
117 this._layersById = {}; 126 this._layersById = {};
118 for (var i = 0; i < payload.length; ++i) { 127 for (var i = 0; i < payload.length; ++i) {
119 var layer = oldLayersById[payload[i].layerId]; 128 var layer = oldLayersById[payload[i].layerId];
120 if (layer) 129 if (layer)
121 layer._reset(payload[i]); 130 layer._reset(payload[i]);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 { 269 {
261 this._layerTreeModel = layerTreeModel; 270 this._layerTreeModel = layerTreeModel;
262 } 271 }
263 272
264 WebInspector.LayerTreeDispatcher.prototype = { 273 WebInspector.LayerTreeDispatcher.prototype = {
265 layerTreeDidChange: function() 274 layerTreeDidChange: function()
266 { 275 {
267 this._layerTreeModel._layerTreeChanged(); 276 this._layerTreeModel._layerTreeChanged();
268 } 277 }
269 } 278 }
OLDNEW
« no previous file with comments | « Source/devtools/devtools.gyp ('k') | Source/devtools/front_end/Layers3DView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698