| 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 17 matching lines...) Expand all Loading... |
| 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 /** | 31 /** |
| 32 * @unrestricted | 32 * @unrestricted |
| 33 */ | 33 */ |
| 34 Layers.LayerTreeModel = class extends SDK.SDKModel { | 34 Layers.LayerTreeModel = class extends SDK.SDKModel { |
| 35 constructor(target) { | 35 constructor(target) { |
| 36 super(target); | 36 super(target); |
| 37 target.registerLayerTreeDispatcher(new Layers.LayerTreeDispatcher(this)); | 37 target.registerLayerTreeDispatcher(new Layers.LayerTreeDispatcher(this)); |
| 38 SDK.targetManager.addEventListener(SDK.TargetManager.Events.MainFrameNavigat
ed, this._onMainFrameNavigated, this); | 38 var resourceTreeModel = target.model(SDK.ResourceTreeModel); |
| 39 if (resourceTreeModel) { |
| 40 resourceTreeModel.addEventListener( |
| 41 SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavi
gated, this); |
| 42 } |
| 39 /** @type {?SDK.LayerTreeBase} */ | 43 /** @type {?SDK.LayerTreeBase} */ |
| 40 this._layerTree = null; | 44 this._layerTree = null; |
| 41 } | 45 } |
| 42 | 46 |
| 43 /** | 47 /** |
| 44 * @param {!SDK.Target} target | 48 * @param {!SDK.Target} target |
| 45 * @return {?Layers.LayerTreeModel} | 49 * @return {?Layers.LayerTreeModel} |
| 46 */ | 50 */ |
| 47 static fromTarget(target) { | 51 static fromTarget(target) { |
| 48 return target.model(Layers.LayerTreeModel); | 52 return target.model(Layers.LayerTreeModel); |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 560 |
| 557 /** | 561 /** |
| 558 * @override | 562 * @override |
| 559 * @param {!Protocol.LayerTree.LayerId} layerId | 563 * @param {!Protocol.LayerTree.LayerId} layerId |
| 560 * @param {!Protocol.DOM.Rect} clipRect | 564 * @param {!Protocol.DOM.Rect} clipRect |
| 561 */ | 565 */ |
| 562 layerPainted(layerId, clipRect) { | 566 layerPainted(layerId, clipRect) { |
| 563 this._layerTreeModel._layerPainted(layerId, clipRect); | 567 this._layerTreeModel._layerPainted(layerId, clipRect); |
| 564 } | 568 } |
| 565 }; | 569 }; |
| OLD | NEW |