OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 /** | 5 /** |
6 * @fileoverview Tools is a main class that wires all components of the | 6 * @fileoverview Tools is a main class that wires all components of the |
7 * DevTools frontend together. It is also responsible for overriding existing | 7 * DevTools frontend together. It is also responsible for overriding existing |
8 * WebInspector functionality while it is getting upstreamed into WebCore. | 8 * WebInspector functionality while it is getting upstreamed into WebCore. |
9 */ | 9 */ |
10 goog.provide('devtools.Tools'); | 10 goog.provide('devtools.Tools'); |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 function() { | 542 function() { |
543 var obj = this.parentObject[this.propertyName].value; | 543 var obj = this.parentObject[this.propertyName].value; |
544 devtools.tools.getDebuggerAgent().resolveChildren(obj, | 544 devtools.tools.getDebuggerAgent().resolveChildren(obj, |
545 goog.bind(this.didResolveChildren_, this)); | 545 goog.bind(this.didResolveChildren_, this)); |
546 }; | 546 }; |
547 | 547 |
548 | 548 |
549 /** | 549 /** |
550 * Callback function used with the resolveChildren. | 550 * Callback function used with the resolveChildren. |
551 */ | 551 */ |
552 WebInspector.ScopeChainSidebarPane.TreeElement.prototype.didResolveChildren_ = | 552 WebInspector.ScopeChainSidebarPane.TreeElement.prototype.didResolveChildren_ = |
553 function(object) { | 553 function(object) { |
554 this.removeChildren(); | 554 this.removeChildren(); |
555 | 555 |
556 var constructor = this.treeOutline.section.treeElementConstructor; | 556 var constructor = this.treeOutline.section.treeElementConstructor; |
557 for (var name in object) { | 557 for (var name in object) { |
558 this.appendChild(new constructor(object, name)); | 558 this.appendChild(new constructor(object, name)); |
559 } | 559 } |
560 }; | 560 }; |
| 561 |
| 562 |
| 563 /** |
| 564 * @override |
| 565 */ |
| 566 WebInspector.StylePropertyTreeElement.prototype.toggleEnabled = |
| 567 function(event) { |
| 568 var disabled = !event.target.checked; |
| 569 var self = this; |
| 570 devtools.tools.getDomAgent().toggleNodeStyleAsync(this.style, !disabled, |
| 571 this.name, |
| 572 function() { |
| 573 WebInspector.panels.elements.updateStyles(true); |
| 574 }); |
| 575 }; |
OLD | NEW |