OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 WebInspector.ExtensionWatchSidebarPane.prototype = { | 90 WebInspector.ExtensionWatchSidebarPane.prototype = { |
91 setObject: function(object, title) | 91 setObject: function(object, title) |
92 { | 92 { |
93 this._setObject(WebInspector.RemoteObject.fromLocalObject(object), title
); | 93 this._setObject(WebInspector.RemoteObject.fromLocalObject(object), title
); |
94 }, | 94 }, |
95 | 95 |
96 setExpression: function(expression, title) | 96 setExpression: function(expression, title) |
97 { | 97 { |
98 InspectorBackend.evaluate(expression, "extension-watch", this._onEvaluat
e.bind(this, title)); | 98 InspectorBackend.evaluate(expression, "extension-watch", false, this._on
Evaluate.bind(this, title)); |
99 }, | 99 }, |
100 | 100 |
101 _onEvaluate: function(title, result) | 101 _onEvaluate: function(title, result) |
102 { | 102 { |
103 this._setObject(WebInspector.RemoteObject.fromPayload(result), title); | 103 this._setObject(WebInspector.RemoteObject.fromPayload(result), title); |
104 }, | 104 }, |
105 | 105 |
106 _setObject: function(object, title) | 106 _setObject: function(object, title) |
107 { | 107 { |
108 this.bodyElement.removeChildren(); | 108 this.bodyElement.removeChildren(); |
109 var section = new WebInspector.ObjectPropertiesSection(object, title, nu
ll, true); | 109 var section = new WebInspector.ObjectPropertiesSection(object, title, nu
ll, true); |
110 if (!title) | 110 if (!title) |
111 section.headerElement.addStyleClass("hidden"); | 111 section.headerElement.addStyleClass("hidden"); |
112 section.expanded = true; | 112 section.expanded = true; |
113 this.bodyElement.appendChild(section.element); | 113 this.bodyElement.appendChild(section.element); |
114 WebInspector.extensionServer.notifyExtensionWatchSidebarUpdated(this._id
); | 114 WebInspector.extensionServer.notifyExtensionWatchSidebarUpdated(this._id
); |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 WebInspector.ExtensionWatchSidebarPane.prototype.__proto__ = WebInspector.Sideba
rPane.prototype; | 118 WebInspector.ExtensionWatchSidebarPane.prototype.__proto__ = WebInspector.Sideba
rPane.prototype; |
OLD | NEW |