| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 var orig = WebInspector.ConsoleMessage.prototype.setMessageBody; | 403 var orig = WebInspector.ConsoleMessage.prototype.setMessageBody; |
| 404 WebInspector.ConsoleMessage.prototype.setMessageBody = function(args) { | 404 WebInspector.ConsoleMessage.prototype.setMessageBody = function(args) { |
| 405 for (var i = 0; i < args.length; ++i) { | 405 for (var i = 0; i < args.length; ++i) { |
| 406 if (typeof args[i] == "string") { | 406 if (typeof args[i] == "string") { |
| 407 args[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(args[i]); | 407 args[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(args[i]); |
| 408 } | 408 } |
| 409 } | 409 } |
| 410 orig.call(this, args); | 410 orig.call(this, args); |
| 411 }; | 411 }; |
| 412 })(); | 412 })(); |
| 413 |
| 414 // Temporary fix for http://crbug/23260. |
| 415 (function() { |
| 416 var orig = WebInspector.ResourcesPanel.prototype._createResourceView; |
| 417 WebInspector.ResourcesPanel.prototype._createResourceView = function( |
| 418 resource) { |
| 419 if (resource.type == undefined && resource.url) { |
| 420 if (resource.url.search('\.js$') != -1) { |
| 421 resource.type = WebInspector.Resource.Type.Script; |
| 422 } else if (scriptOrResource.url.search('\.html$') != -1) { |
| 423 resource.type = WebInspector.Resource.Type.Document; |
| 424 } |
| 425 } |
| 426 |
| 427 return orig.apply(this, arguments); |
| 428 }; |
| 429 })(); |
| OLD | NEW |