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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 */ | 95 */ |
96 devtools.ToolsAgent.prototype.frameNavigate = function(url, topLevel) { | 96 devtools.ToolsAgent.prototype.frameNavigate = function(url, topLevel) { |
97 if (topLevel) { | 97 if (topLevel) { |
98 this.reset(); | 98 this.reset(); |
99 WebInspector.reset(); | 99 WebInspector.reset(); |
100 } | 100 } |
101 }; | 101 }; |
102 | 102 |
103 | 103 |
104 /** | 104 /** |
105 * @param {string} message Message to add. | 105 * @param {Object} message Message object to add. |
106 * @param {string} source Source url. | |
107 * @param {number} line Line number in source. | |
108 * @see tools_agent.h | 106 * @see tools_agent.h |
109 */ | 107 */ |
110 devtools.ToolsAgent.prototype.addMessageToConsole = function(message, source, | 108 devtools.ToolsAgent.prototype.addMessageToConsole = function(message) { |
111 line) { | |
112 var console = WebInspector.console; | 109 var console = WebInspector.console; |
113 if (console) { | 110 if (console) { |
114 console.addMessage(new WebInspector.ConsoleMessage( | 111 console.addMessage(new WebInspector.ConsoleMessage( |
115 '', undefined, line, source, undefined, 1, message)); | 112 message.source, message.level, message.line, message.sourceId, |
| 113 undefined, 1, message.text)); |
116 } | 114 } |
117 }; | 115 }; |
118 | 116 |
119 | 117 |
120 /** | 118 /** |
121 * Evaluates js expression. | 119 * Evaluates js expression. |
122 * @param {string} expr | 120 * @param {string} expr |
123 */ | 121 */ |
124 devtools.ToolsAgent.prototype.evaluate = function(expr) { | 122 devtools.ToolsAgent.prototype.evaluate = function(expr) { |
125 RemoteToolsAgent.evaluate(expr); | 123 RemoteToolsAgent.evaluate(expr); |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 */ | 551 */ |
554 WebInspector.ScopeChainSidebarPane.TreeElement.prototype.didResolveChildren_ = | 552 WebInspector.ScopeChainSidebarPane.TreeElement.prototype.didResolveChildren_ = |
555 function(object) { | 553 function(object) { |
556 this.removeChildren(); | 554 this.removeChildren(); |
557 | 555 |
558 var constructor = this.treeOutline.section.treeElementConstructor; | 556 var constructor = this.treeOutline.section.treeElementConstructor; |
559 for (var name in object) { | 557 for (var name in object) { |
560 this.appendChild(new constructor(object, name)); | 558 this.appendChild(new constructor(object, name)); |
561 } | 559 } |
562 }; | 560 }; |
OLD | NEW |