| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 * @private | 103 * @private |
| 104 */ | 104 */ |
| 105 devtools.ToolsAgent.prototype.updateFocusedNode_ = function(nodeId) { | 105 devtools.ToolsAgent.prototype.updateFocusedNode_ = function(nodeId) { |
| 106 var node = this.domAgent_.getNodeForId(nodeId); | 106 var node = this.domAgent_.getNodeForId(nodeId); |
| 107 WebInspector.updateFocusedNode(node); | 107 WebInspector.updateFocusedNode(node); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 | 110 |
| 111 /** | 111 /** |
| 112 * @param {string} url Url frame navigated to. | 112 * @param {string} url Url frame navigated to. |
| 113 * @param {bool} topLevel True iff top level navigation occurred. | |
| 114 * @see tools_agent.h | 113 * @see tools_agent.h |
| 115 * @private | 114 * @private |
| 116 */ | 115 */ |
| 117 devtools.ToolsAgent.prototype.frameNavigate_ = function(url, topLevel) { | 116 devtools.ToolsAgent.prototype.frameNavigate_ = function(url) { |
| 118 if (topLevel) { | 117 this.reset(); |
| 119 this.reset(); | 118 // Do not reset Profiles panel. |
| 120 // Do not reset Profiles panel. | 119 var profiles = null; |
| 121 var profiles = null; | 120 if ('profiles' in WebInspector.panels) { |
| 122 if ('profiles' in WebInspector.panels) { | 121 profiles = WebInspector.panels['profiles']; |
| 123 profiles = WebInspector.panels['profiles']; | 122 delete WebInspector.panels['profiles']; |
| 124 delete WebInspector.panels['profiles']; | 123 } |
| 125 } | 124 WebInspector.reset(); |
| 126 WebInspector.reset(); | 125 if (profiles != null) { |
| 127 if (profiles != null) { | 126 WebInspector.panels['profiles'] = profiles; |
| 128 WebInspector.panels['profiles'] = profiles; | |
| 129 } | |
| 130 } | 127 } |
| 131 }; | 128 }; |
| 132 | 129 |
| 133 | 130 |
| 134 /** | 131 /** |
| 135 * @param {Object} message Message object to add. | 132 * @param {Object} message Message object to add. |
| 136 * @see tools_agent.h | 133 * @see tools_agent.h |
| 137 * @private | 134 * @private |
| 138 */ | 135 */ |
| 139 devtools.ToolsAgent.prototype.addMessageToConsole_ = function(message) { | 136 devtools.ToolsAgent.prototype.addMessageToConsole_ = function(message) { |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 } | 1030 } |
| 1034 }; | 1031 }; |
| 1035 } else { | 1032 } else { |
| 1036 var wrapper = {}; | 1033 var wrapper = {}; |
| 1037 wrapper.id_ = object.___devtools_id; | 1034 wrapper.id_ = object.___devtools_id; |
| 1038 wrapper.protoDepth_ = -1; | 1035 wrapper.protoDepth_ = -1; |
| 1039 section = new WebInspector.SidebarObjectPropertiesSection(wrapper, null); | 1036 section = new WebInspector.SidebarObjectPropertiesSection(wrapper, null); |
| 1040 } | 1037 } |
| 1041 elem.appendChild(section.element); | 1038 elem.appendChild(section.element); |
| 1042 }; | 1039 }; |
| OLD | NEW |