Chromium Code Reviews| 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 /** | |
| 1356 * @implements {Common.RemoteObjectRenderer} | |
| 1357 */ | |
| 1358 ObjectUI.ObjectPropertiesSection.Renderer = class { | |
| 1359 /** | |
| 1360 * @override | |
| 1361 * @param {!Object} object | |
| 1362 * @param {!Common.RemoteObjectRenderer.Options=} options | |
| 1363 * @return {?Element} | |
| 1364 */ | |
| 1365 render(object, options) { | |
| 1366 if (!(object instanceof SDK.RemoteObject)) | |
| 1367 return null; | |
| 1368 options = options || {}; | |
| 1369 var title = options.title; | |
| 1370 var section = new ObjectUI.ObjectPropertiesSection(object, title); | |
| 1371 if (!title) | |
| 1372 section.titleLessMode(); | |
| 1373 if (options.expand) | |
| 1374 section.expand(); | |
| 1375 section.editable = options.editable; | |
|
dgozman
2017/02/25 01:27:29
!!options.editable
chenwilliam
2017/04/07 20:59:27
Done.
| |
| 1376 return section.element; | |
| 1377 } | |
| 1378 }; | |
| OLD | NEW |