| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 super.willHide(); | 93 super.willHide(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 /** | 96 /** |
| 97 * @override | 97 * @override |
| 98 * @param {!SDK.Target} target | 98 * @param {!SDK.Target} target |
| 99 */ | 99 */ |
| 100 targetAdded(target) { | 100 targetAdded(target) { |
| 101 if (this._model) | 101 if (this._model) |
| 102 return; | 102 return; |
| 103 this._model = Layers.LayerTreeModel.fromTarget(target); | 103 this._model = target.model(Layers.LayerTreeModel); |
| 104 if (!this._model) | 104 if (!this._model) |
| 105 return; | 105 return; |
| 106 this._model.addEventListener(Layers.LayerTreeModel.Events.LayerTreeChanged,
this._onLayerTreeUpdated, this); | 106 this._model.addEventListener(Layers.LayerTreeModel.Events.LayerTreeChanged,
this._onLayerTreeUpdated, this); |
| 107 this._model.addEventListener(Layers.LayerTreeModel.Events.LayerPainted, this
._onLayerPainted, this); | 107 this._model.addEventListener(Layers.LayerTreeModel.Events.LayerPainted, this
._onLayerPainted, this); |
| 108 if (this.isShowing()) | 108 if (this.isShowing()) |
| 109 this._model.enable(); | 109 this._model.enable(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * @override | 113 * @override |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 */ | 189 */ |
| 190 _onScaleChanged(event) { | 190 _onScaleChanged(event) { |
| 191 this._paintProfilerView.setScale(/** @type {number} */ (event.data)); | 191 this._paintProfilerView.setScale(/** @type {number} */ (event.data)); |
| 192 } | 192 } |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 Layers.LayersPanel.DetailsViewTabs = { | 195 Layers.LayersPanel.DetailsViewTabs = { |
| 196 Details: 'details', | 196 Details: 'details', |
| 197 Profiler: 'profiler' | 197 Profiler: 'profiler' |
| 198 }; | 198 }; |
| OLD | NEW |