| 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 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * @param {!SDK.Target} target | 44 * @param {!SDK.Target} target |
| 45 * @return {?Layers.LayerTreeModel} | 45 * @return {?Layers.LayerTreeModel} |
| 46 */ | 46 */ |
| 47 static fromTarget(target) { | 47 static fromTarget(target) { |
| 48 if (!target.hasDOMCapability()) | 48 if (!target.hasDOMCapability()) |
| 49 return null; | 49 return null; |
| 50 | 50 |
| 51 var model = /** @type {?Layers.LayerTreeModel} */ (target.model(Layers.Layer
TreeModel)); | 51 var model = target.model(Layers.LayerTreeModel); |
| 52 if (!model) | 52 if (!model) |
| 53 model = new Layers.LayerTreeModel(target); | 53 model = new Layers.LayerTreeModel(target); |
| 54 return model; | 54 return model; |
| 55 } | 55 } |
| 56 | 56 |
| 57 disable() { | 57 disable() { |
| 58 if (!this._enabled) | 58 if (!this._enabled) |
| 59 return; | 59 return; |
| 60 this._enabled = false; | 60 this._enabled = false; |
| 61 this.target().layerTreeAgent().disable(); | 61 this.target().layerTreeAgent().disable(); |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 560 |
| 561 /** | 561 /** |
| 562 * @override | 562 * @override |
| 563 * @param {!Protocol.LayerTree.LayerId} layerId | 563 * @param {!Protocol.LayerTree.LayerId} layerId |
| 564 * @param {!Protocol.DOM.Rect} clipRect | 564 * @param {!Protocol.DOM.Rect} clipRect |
| 565 */ | 565 */ |
| 566 layerPainted(layerId, clipRect) { | 566 layerPainted(layerId, clipRect) { |
| 567 this._layerTreeModel._layerPainted(layerId, clipRect); | 567 this._layerTreeModel._layerPainted(layerId, clipRect); |
| 568 } | 568 } |
| 569 }; | 569 }; |
| OLD | NEW |