| 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 DevTools' implementation of the InspectorController API. | 6 * @fileoverview DevTools' implementation of the InspectorController API. |
| 7 */ | 7 */ |
| 8 goog.require('devtools.InspectorController'); | 8 goog.require('devtools.InspectorController'); |
| 9 | 9 |
| 10 goog.provide('devtools.InspectorControllerImpl'); | 10 goog.provide('devtools.InspectorControllerImpl'); |
| 11 | 11 |
| 12 devtools.InspectorControllerImpl = function() { | 12 devtools.InspectorControllerImpl = function() { |
| 13 devtools.InspectorController.call(this); | 13 devtools.InspectorController.call(this); |
| 14 this.frame_element_id_ = 1; | 14 this.frame_element_id_ = 1; |
| 15 | |
| 16 this.window_ = { | |
| 17 get document() { | |
| 18 return devtools.tools.getDomAgent().getDocument(); | |
| 19 }, | |
| 20 get Node() { | |
| 21 return devtools.DomNode; | |
| 22 }, | |
| 23 get Element() { | |
| 24 return devtools.DomNode; | |
| 25 }, | |
| 26 /** | |
| 27 * See usages in ScopeChainSidebarPane.js where it's called as | |
| 28 * constructor. | |
| 29 */ | |
| 30 Object : function() { | |
| 31 } | |
| 32 }; | |
| 33 }; | 15 }; |
| 34 goog.inherits(devtools.InspectorControllerImpl, | 16 goog.inherits(devtools.InspectorControllerImpl, |
| 35 devtools.InspectorController); | 17 devtools.InspectorController); |
| 36 | 18 |
| 37 | 19 |
| 38 /** | 20 /** |
| 39 * {@inheritDoc}. | 21 * {@inheritDoc}. |
| 40 */ | 22 */ |
| 41 devtools.InspectorControllerImpl.prototype.hiddenPanels = function() { | 23 devtools.InspectorControllerImpl.prototype.hiddenPanels = function() { |
| 42 return "profiles,databases"; | 24 return "profiles,databases"; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 devtools.InspectorControllerImpl.prototype.highlightDOMNode = | 66 devtools.InspectorControllerImpl.prototype.highlightDOMNode = |
| 85 function(hoveredNode) { | 67 function(hoveredNode) { |
| 86 RemoteToolsAgent.HighlightDOMNode(hoveredNode.id_); | 68 RemoteToolsAgent.HighlightDOMNode(hoveredNode.id_); |
| 87 }; | 69 }; |
| 88 | 70 |
| 89 | 71 |
| 90 /** | 72 /** |
| 91 * {@inheritDoc}. | 73 * {@inheritDoc}. |
| 92 */ | 74 */ |
| 93 devtools.InspectorControllerImpl.prototype.inspectedWindow = function() { | 75 devtools.InspectorControllerImpl.prototype.inspectedWindow = function() { |
| 94 return this.window_; | 76 return devtools.tools.getDomAgent().getWindow(); |
| 95 }; | 77 }; |
| 96 | 78 |
| 97 | 79 |
| 98 /** | 80 /** |
| 99 * @override | 81 * @override |
| 100 */ | 82 */ |
| 101 devtools.InspectorControllerImpl.prototype.debuggerEnabled = function() { | 83 devtools.InspectorControllerImpl.prototype.debuggerEnabled = function() { |
| 102 return true; | 84 return true; |
| 103 }; | 85 }; |
| 104 | 86 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 }; | 124 }; |
| 143 | 125 |
| 144 | 126 |
| 145 devtools.InspectorControllerImpl.prototype.stepOverStatementInDebugger = | 127 devtools.InspectorControllerImpl.prototype.stepOverStatementInDebugger = |
| 146 function() { | 128 function() { |
| 147 devtools.tools.getDebuggerAgent().stepOverStatement(); | 129 devtools.tools.getDebuggerAgent().stepOverStatement(); |
| 148 }; | 130 }; |
| 149 | 131 |
| 150 | 132 |
| 151 var InspectorController = new devtools.InspectorControllerImpl(); | 133 var InspectorController = new devtools.InspectorControllerImpl(); |
| OLD | NEW |