| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 } | 1343 } |
| 1344 var treeOutlineId = treeElement.treeOutline[ObjectUI.ObjectPropertiesSection
ExpandController._treeOutlineId]; | 1344 var treeOutlineId = treeElement.treeOutline[ObjectUI.ObjectPropertiesSection
ExpandController._treeOutlineId]; |
| 1345 result = treeOutlineId + (result ? ':' + result : ''); | 1345 result = treeOutlineId + (result ? ':' + result : ''); |
| 1346 treeElement[ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymb
ol] = result; | 1346 treeElement[ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymb
ol] = result; |
| 1347 return result; | 1347 return result; |
| 1348 } | 1348 } |
| 1349 }; | 1349 }; |
| 1350 | 1350 |
| 1351 ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymbol = Symbol('cac
hedPath'); | 1351 ObjectUI.ObjectPropertiesSectionExpandController._cachedPathSymbol = Symbol('cac
hedPath'); |
| 1352 ObjectUI.ObjectPropertiesSectionExpandController._treeOutlineId = Symbol('treeOu
tlineId'); | 1352 ObjectUI.ObjectPropertiesSectionExpandController._treeOutlineId = Symbol('treeOu
tlineId'); |
| 1353 |
| 1354 /** |
| 1355 * @implements {Common.Renderer} |
| 1356 */ |
| 1357 ObjectUI.ObjectPropertiesSection.Renderer = class { |
| 1358 /** |
| 1359 * @override |
| 1360 * @param {!Object} object |
| 1361 * @param {!Common.Renderer.Options=} options |
| 1362 * @return {!Promise<!Element>} |
| 1363 */ |
| 1364 render(object, options) { |
| 1365 if (!(object instanceof SDK.RemoteObject)) |
| 1366 return Promise.reject(new Error('Can\'t render ' + object)); |
| 1367 options = options || {}; |
| 1368 var title = options.title; |
| 1369 var section = new ObjectUI.ObjectPropertiesSection(object, title); |
| 1370 if (!title) |
| 1371 section.titleLessMode(); |
| 1372 if (options.expanded) |
| 1373 section.expand(); |
| 1374 section.editable = !!options.editable; |
| 1375 return Promise.resolve(section.element); |
| 1376 } |
| 1377 }; |
| OLD | NEW |