OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 importScript("LayerTreeModel.js"); | 31 importScript("LayerTreeModel.js"); |
32 importScript("LayerTree.js"); | 32 importScript("LayerTree.js"); |
| 33 importScript("Layers3DView.js"); |
33 | 34 |
34 /** | 35 /** |
35 * @constructor | 36 * @constructor |
36 * @extends {WebInspector.Panel} | 37 * @extends {WebInspector.Panel} |
37 */ | 38 */ |
38 WebInspector.LayersPanel = function() | 39 WebInspector.LayersPanel = function() |
39 { | 40 { |
40 WebInspector.Panel.call(this, "layers"); | 41 WebInspector.Panel.call(this, "layers"); |
41 this.registerRequiredCSS("layersPanel.css"); | 42 this.registerRequiredCSS("layersPanel.css"); |
42 | 43 |
43 const initialLayerTreeSidebarWidth = 225; | 44 const initialLayerTreeSidebarWidth = 225; |
44 const minimumMainWidthPercent = 0.5; | 45 const minimumMainWidthPercent = 0.5; |
45 this.createSidebarViewWithTree(); | 46 this.createSidebarViewWithTree(); |
46 this.sidebarElement.addStyleClass("outline-disclosure"); | 47 this.sidebarElement.addStyleClass("outline-disclosure"); |
47 this.sidebarTreeElement.removeStyleClass("sidebar-tree"); | 48 this.sidebarTreeElement.removeStyleClass("sidebar-tree"); |
48 this._model = new WebInspector.LayerTreeModel(); | 49 this._model = new WebInspector.LayerTreeModel(); |
49 this._layerTree = new WebInspector.LayerTree(this._model, this.sidebarTree); | 50 this._layerTree = new WebInspector.LayerTree(this._model, this.sidebarTree); |
50 this._layerDetailsSplitView = new WebInspector.SplitView(false, "layerDetail
sSplitView"); | 51 this._layerDetailsSplitView = new WebInspector.SplitView(false, "layerDetail
sSplitView"); |
51 this._layerDetailsSplitView.show(this.splitView.mainElement); | 52 this._layerDetailsSplitView.show(this.splitView.mainElement); |
| 53 this._layers3DView = new WebInspector.Layers3DView(this._model); |
| 54 this._layers3DView.show(this._layerDetailsSplitView.mainElement); |
52 this._model.requestLayers(); | 55 this._model.requestLayers(); |
53 } | 56 } |
54 | 57 |
55 WebInspector.LayersPanel.prototype = { | 58 WebInspector.LayersPanel.prototype = { |
56 wasShown: function() | 59 wasShown: function() |
57 { | 60 { |
58 WebInspector.Panel.prototype.wasShown.call(this); | 61 WebInspector.Panel.prototype.wasShown.call(this); |
59 this._layerTree.setVisible(true); | 62 this._layerTree.setVisible(true); |
60 this.sidebarTreeElement.focus(); | 63 this.sidebarTreeElement.focus(); |
61 }, | 64 }, |
62 | 65 |
63 willHide: function() | 66 willHide: function() |
64 { | 67 { |
65 this._layerTree.setVisible(false); | 68 this._layerTree.setVisible(false); |
66 WebInspector.Panel.prototype.willHide.call(this); | 69 WebInspector.Panel.prototype.willHide.call(this); |
67 }, | 70 }, |
68 | 71 |
69 __proto__: WebInspector.Panel.prototype | 72 __proto__: WebInspector.Panel.prototype |
70 } | 73 } |
OLD | NEW |