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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 undefined, 1, message.text)); | 144 undefined, 1, message.text)); |
145 } | 145 } |
146 }; | 146 }; |
147 | 147 |
148 | 148 |
149 /** | 149 /** |
150 * @param {string} message Serialized call to be dispatched on WebInspector. | 150 * @param {string} message Serialized call to be dispatched on WebInspector. |
151 * @private | 151 * @private |
152 */ | 152 */ |
153 devtools.ToolsAgent.prototype.dispatchOnClient_ = function(message) { | 153 devtools.ToolsAgent.prototype.dispatchOnClient_ = function(message) { |
154 var messageObj = JSON.parse(message); | 154 WebInspector.dispatch.apply(WebInspector, JSON.parse(message)); |
155 // Filter out messages we don't need here. | |
156 var method = messageObj[0]; | |
157 if (method == 'inspectedWindowCleared' || | |
158 method == 'reset' || | |
159 method == 'setAttachedWindow') { | |
160 return; | |
161 } | |
162 WebInspector.dispatch.apply(WebInspector, messageObj); | |
163 }; | 155 }; |
164 | 156 |
165 | 157 |
166 /** | 158 /** |
167 * Evaluates js expression. | 159 * Evaluates js expression. |
168 * @param {string} expr | 160 * @param {string} expr |
169 */ | 161 */ |
170 devtools.ToolsAgent.prototype.evaluate = function(expr) { | 162 devtools.ToolsAgent.prototype.evaluate = function(expr) { |
171 RemoteToolsAgent.evaluate(expr); | 163 RemoteToolsAgent.evaluate(expr); |
172 }; | 164 }; |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 } | 1033 } |
1042 }; | 1034 }; |
1043 } else { | 1035 } else { |
1044 var wrapper = {}; | 1036 var wrapper = {}; |
1045 wrapper.id_ = object.___devtools_id; | 1037 wrapper.id_ = object.___devtools_id; |
1046 wrapper.protoDepth_ = -1; | 1038 wrapper.protoDepth_ = -1; |
1047 section = new WebInspector.SidebarObjectPropertiesSection(wrapper, null); | 1039 section = new WebInspector.SidebarObjectPropertiesSection(wrapper, null); |
1048 } | 1040 } |
1049 elem.appendChild(section.element); | 1041 elem.appendChild(section.element); |
1050 }; | 1042 }; |
OLD | NEW |