| 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 return; | 900 return; |
| 901 } | 901 } |
| 902 devtools.CallFrame.doEvalInCallFrame(callFrame, expression, callback); | 902 devtools.CallFrame.doEvalInCallFrame(callFrame, expression, callback); |
| 903 }; | 903 }; |
| 904 | 904 |
| 905 | 905 |
| 906 (function() { | 906 (function() { |
| 907 var oldShow = WebInspector.ScriptsPanel.prototype.show; | 907 var oldShow = WebInspector.ScriptsPanel.prototype.show; |
| 908 WebInspector.ScriptsPanel.prototype.show = function() { | 908 WebInspector.ScriptsPanel.prototype.show = function() { |
| 909 devtools.tools.getDebuggerAgent().initializeScriptsCache(); | 909 devtools.tools.getDebuggerAgent().initializeScriptsCache(); |
| 910 this.enableToggleButton.addStyleClass('hidden'); |
| 910 oldShow.call(this); | 911 oldShow.call(this); |
| 911 }; | 912 }; |
| 912 })(); | 913 })(); |
| 913 | 914 |
| 914 | 915 |
| 915 // As columns in data grid can't be changed after initialization, | 916 // As columns in data grid can't be changed after initialization, |
| 916 // we need to intercept the constructor and modify columns upon creation. | 917 // we need to intercept the constructor and modify columns upon creation. |
| 917 (function InterceptDataGridForProfiler() { | 918 (function InterceptDataGridForProfiler() { |
| 918 var originalDataGrid = WebInspector.DataGrid; | 919 var originalDataGrid = WebInspector.DataGrid; |
| 919 WebInspector.DataGrid = function(columns) { | 920 WebInspector.DataGrid = function(columns) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 943 Number.secondsToString = oldNumberSecondsToString; | 944 Number.secondsToString = oldNumberSecondsToString; |
| 944 return data; | 945 return data; |
| 945 }); | 946 }); |
| 946 })(); | 947 })(); |
| 947 | 948 |
| 948 | 949 |
| 949 (function InterceptProfilesPanelEvents() { | 950 (function InterceptProfilesPanelEvents() { |
| 950 var oldShow = WebInspector.ProfilesPanel.prototype.show; | 951 var oldShow = WebInspector.ProfilesPanel.prototype.show; |
| 951 WebInspector.ProfilesPanel.prototype.show = function() { | 952 WebInspector.ProfilesPanel.prototype.show = function() { |
| 952 devtools.tools.getDebuggerAgent().initializeProfiling(); | 953 devtools.tools.getDebuggerAgent().initializeProfiling(); |
| 954 this.enableToggleButton.addStyleClass('hidden'); |
| 953 oldShow.call(this); | 955 oldShow.call(this); |
| 954 // Show is called on every show event of a panel, so | 956 // Show is called on every show event of a panel, so |
| 955 // we only need to intercept it once. | 957 // we only need to intercept it once. |
| 956 WebInspector.ProfilesPanel.prototype.show = oldShow; | 958 WebInspector.ProfilesPanel.prototype.show = oldShow; |
| 957 }; | 959 }; |
| 958 })(); | 960 })(); |
| 959 | 961 |
| 960 | 962 |
| 961 /** | 963 /** |
| 962 * @override | 964 * @override |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 } | 1044 } |
| 1043 }; | 1045 }; |
| 1044 } else { | 1046 } else { |
| 1045 var wrapper = {}; | 1047 var wrapper = {}; |
| 1046 wrapper.id_ = object.___devtools_id; | 1048 wrapper.id_ = object.___devtools_id; |
| 1047 wrapper.protoDepth_ = -1; | 1049 wrapper.protoDepth_ = -1; |
| 1048 section = new WebInspector.SidebarObjectPropertiesSection(wrapper, null); | 1050 section = new WebInspector.SidebarObjectPropertiesSection(wrapper, null); |
| 1049 } | 1051 } |
| 1050 elem.appendChild(section.element); | 1052 elem.appendChild(section.element); |
| 1051 }; | 1053 }; |
| OLD | NEW |