| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 ObjectUI.CustomPreviewSection = class { | 7 ObjectUI.CustomPreviewSection = class { |
| 8 /** | 8 /** |
| 9 * @param {!SDK.RemoteObject} object | 9 * @param {!SDK.RemoteObject} object |
| 10 */ | 10 */ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return element; | 83 return element; |
| 84 } | 84 } |
| 85 | 85 |
| 86 /** | 86 /** |
| 87 * @param {!Array.<*>} objectTag | 87 * @param {!Array.<*>} objectTag |
| 88 * @return {!Node} | 88 * @return {!Node} |
| 89 */ | 89 */ |
| 90 _layoutObjectTag(objectTag) { | 90 _layoutObjectTag(objectTag) { |
| 91 objectTag.shift(); | 91 objectTag.shift(); |
| 92 var attributes = objectTag.shift(); | 92 var attributes = objectTag.shift(); |
| 93 var remoteObject = this._object.target().runtimeModel.createRemoteObject( | 93 var remoteObject = this._object.runtimeModel().createRemoteObject( |
| 94 /** @type {!Protocol.Runtime.RemoteObject} */ (attributes)); | 94 /** @type {!Protocol.Runtime.RemoteObject} */ (attributes)); |
| 95 if (remoteObject.customPreview()) | 95 if (remoteObject.customPreview()) |
| 96 return (new ObjectUI.CustomPreviewSection(remoteObject)).element(); | 96 return (new ObjectUI.CustomPreviewSection(remoteObject)).element(); |
| 97 | 97 |
| 98 var sectionElement = ObjectUI.ObjectPropertiesSection.defaultObjectPresentat
ion(remoteObject); | 98 var sectionElement = ObjectUI.ObjectPropertiesSection.defaultObjectPresentat
ion(remoteObject); |
| 99 sectionElement.classList.toggle('custom-expandable-section-standard-section'
, remoteObject.hasChildren); | 99 sectionElement.classList.toggle('custom-expandable-section-standard-section'
, remoteObject.hasChildren); |
| 100 return sectionElement; | 100 return sectionElement; |
| 101 } | 101 } |
| 102 | 102 |
| 103 /** | 103 /** |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 _disassemble() { | 234 _disassemble() { |
| 235 this.element.shadowRoot.textContent = ''; | 235 this.element.shadowRoot.textContent = ''; |
| 236 this._customPreviewSection = null; | 236 this._customPreviewSection = null; |
| 237 this.element.shadowRoot.appendChild(ObjectUI.ObjectPropertiesSection.default
ObjectPresentation(this._object)); | 237 this.element.shadowRoot.appendChild(ObjectUI.ObjectPropertiesSection.default
ObjectPresentation(this._object)); |
| 238 } | 238 } |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 ObjectUI.CustomPreviewSection._tagsWhiteList = new Set(['span', 'div', 'ol', 'li
', 'table', 'tr', 'td']); | 241 ObjectUI.CustomPreviewSection._tagsWhiteList = new Set(['span', 'div', 'ol', 'li
', 'table', 'tr', 'td']); |
| OLD | NEW |