Changeset 51528 in webkit
- Timestamp:
- Dec 1, 2009 12:07:16 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 added
- 2 deleted
- 49 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51527 r51528 1 2009-11-27 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Split InspectorBackend into three parts: backend, 6 injected script host and frontend host. 7 8 https://bugs.webkit.org/show_bug.cgi?id=31888 9 10 * DerivedSources.make: 11 * GNUmakefile.am: 12 * WebCore.gypi: 13 * WebCore.pro: 14 * WebCore.vcproj/WebCore.vcproj: 15 * WebCore.xcodeproj/project.pbxproj: 16 * WebCoreSources.bkl: 17 * bindings/js/JSBindingsAllInOne.cpp: 18 * bindings/js/JSInspectorBackendCustom.cpp: Removed. 19 * bindings/js/JSInspectorFrontendHostCustom.cpp: Added. 20 (WebCore::JSInspectorFrontendHost::search): 21 (WebCore::JSInspectorFrontendHost::setting): 22 (WebCore::JSInspectorFrontendHost::setSetting): 23 * bindings/js/ScriptObject.cpp: 24 (WebCore::ScriptGlobalObject::set): 25 * bindings/js/ScriptObject.h: 26 * bindings/v8/DOMObjectsInclude.h: 27 * bindings/v8/DerivedSourcesAllInOne.cpp: 28 * bindings/v8/ScriptObject.cpp: 29 (WebCore::ScriptGlobalObject::set): 30 * bindings/v8/ScriptObject.h: 31 * bindings/v8/V8Index.cpp: 32 * bindings/v8/V8Index.h: 33 * bindings/v8/custom/V8CustomBinding.h: 34 * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: Added. 35 (WebCore::CALLBACK_FUNC_DECL): 36 * bindings/v8/custom/V8InspectorBackendCustom.cpp: Removed. 37 * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: Added. 38 (WebCore::CALLBACK_FUNC_DECL): 39 * inspector/InjectedScriptHost.cpp: Added. 40 (WebCore::InjectedScriptHost::InjectedScriptHost): 41 (WebCore::InjectedScriptHost::~InjectedScriptHost): 42 (WebCore::InjectedScriptHost::copyText): 43 (WebCore::InjectedScriptHost::nodeForId): 44 (WebCore::InjectedScriptHost::wrapObject): 45 (WebCore::InjectedScriptHost::unwrapObject): 46 (WebCore::InjectedScriptHost::pushNodePathToFrontend): 47 (WebCore::InjectedScriptHost::addNodesToSearchResult): 48 (WebCore::InjectedScriptHost::currentCallFrame): 49 (WebCore::InjectedScriptHost::databaseForId): 50 (WebCore::InjectedScriptHost::selectDatabase): 51 (WebCore::InjectedScriptHost::selectDOMStorage): 52 (WebCore::InjectedScriptHost::reportDidDispatchOnInjectedScript): 53 (WebCore::InjectedScriptHost::inspectorDOMAgent): 54 (WebCore::InjectedScriptHost::inspectorFrontend): 55 * inspector/InjectedScriptHost.h: Added. 56 (WebCore::InjectedScriptHost::create): 57 (WebCore::InjectedScriptHost::inspectorController): 58 (WebCore::InjectedScriptHost::disconnectController): 59 * inspector/InjectedScriptHost.idl: Added. 60 * inspector/InspectorBackend.cpp: 61 (WebCore::InspectorBackend::InspectorBackend): 62 (WebCore::InspectorBackend::storeLastActivePanel): 63 (WebCore::InspectorBackend::toggleNodeSearch): 64 (WebCore::InspectorBackend::resourceTrackingEnabled): 65 (WebCore::InspectorBackend::debuggerEnabled): 66 (WebCore::InspectorBackend::enableDebugger): 67 (WebCore::InspectorBackend::disableDebugger): 68 (WebCore::InspectorBackend::addBreakpoint): 69 (WebCore::InspectorBackend::updateBreakpoint): 70 (WebCore::InspectorBackend::removeBreakpoint): 71 (WebCore::InspectorBackend::pauseInDebugger): 72 (WebCore::InspectorBackend::resumeDebugger): 73 (WebCore::InspectorBackend::stepOverStatementInDebugger): 74 (WebCore::InspectorBackend::stepIntoStatementInDebugger): 75 (WebCore::InspectorBackend::stepOutOfFunctionInDebugger): 76 (WebCore::InspectorBackend::pauseOnExceptions): 77 (WebCore::InspectorBackend::setPauseOnExceptions): 78 (WebCore::InspectorBackend::profilerEnabled): 79 (WebCore::InspectorBackend::enableProfiler): 80 (WebCore::InspectorBackend::disableProfiler): 81 (WebCore::InspectorBackend::startProfiling): 82 (WebCore::InspectorBackend::stopProfiling): 83 (WebCore::InspectorBackend::getProfileHeaders): 84 (WebCore::InspectorBackend::getProfile): 85 (WebCore::InspectorBackend::currentCallFrame): 86 (WebCore::InspectorBackend::highlightDOMNode): 87 (WebCore::InspectorBackend::hideDOMNodeHighlight): 88 (WebCore::InspectorBackend::getCookies): 89 (WebCore::InspectorBackend::deleteCookie): 90 (WebCore::InspectorBackend::didEvaluateForTestInFrontend): 91 (WebCore::InspectorBackend::nodeForId): 92 * inspector/InspectorBackend.h: 93 (WebCore::InspectorBackend::create): 94 * inspector/InspectorBackend.idl: 95 * inspector/InspectorController.cpp: 96 (WebCore::InspectorController::InspectorController): 97 (WebCore::InspectorController::~InspectorController): 98 (WebCore::InspectorController::inspectedPageDestroyed): 99 (WebCore::InspectorController::windowScriptObjectAvailable): 100 * inspector/InspectorController.h: 101 (WebCore::InspectorController::inspectorFrontendHost): 102 (WebCore::InspectorController::injectedScriptHost): 103 * inspector/InspectorFrontendHost.cpp: Added. 104 (WebCore::InspectorFrontendHost::InspectorFrontendHost): 105 (WebCore::InspectorFrontendHost::~InspectorFrontendHost): 106 (WebCore::InspectorFrontendHost::loaded): 107 (WebCore::InspectorFrontendHost::attach): 108 (WebCore::InspectorFrontendHost::detach): 109 (WebCore::InspectorFrontendHost::closeWindow): 110 (WebCore::InspectorFrontendHost::windowUnloading): 111 (WebCore::InspectorFrontendHost::setAttachedWindowHeight): 112 (WebCore::InspectorFrontendHost::moveWindowBy): 113 (WebCore::InspectorFrontendHost::localizedStringsURL): 114 (WebCore::InspectorFrontendHost::hiddenPanels): 115 (WebCore::InspectorFrontendHost::platform): 116 (WebCore::InspectorFrontendHost::port): 117 (WebCore::InspectorFrontendHost::addResourceSourceToFrame): 118 (WebCore::InspectorFrontendHost::addSourceToFrame): 119 * inspector/InspectorFrontendHost.h: Added. 120 (WebCore::InspectorFrontendHost::create): 121 (WebCore::InspectorFrontendHost::inspectorController): 122 (WebCore::InspectorFrontendHost::disconnectController): 123 * inspector/InspectorFrontendHost.idl: Added. 124 * inspector/front-end/Breakpoint.js: 125 (WebInspector.Breakpoint.prototype.set condition): 126 * inspector/front-end/BreakpointsSidebarPane.js: 127 (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): 128 (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint): 129 (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): 130 * inspector/front-end/ConsoleView.js: 131 (WebInspector.ConsoleView.prototype.clearMessages): 132 * inspector/front-end/CookieItemsView.js: 133 (WebInspector.CookieItemsView.prototype._deleteCookieCallback): 134 * inspector/front-end/DOMAgent.js: 135 (WebInspector.DOMAgent.prototype.getChildNodesAsync): 136 (WebInspector.DOMAgent.prototype.setAttributeAsync): 137 (WebInspector.DOMAgent.prototype.removeAttributeAsync): 138 (WebInspector.DOMAgent.prototype.setTextNodeValueAsync): 139 (WebInspector.Cookies.getCookiesAsync): 140 (WebInspector.EventListeners.getEventListenersForNodeAsync): 141 * inspector/front-end/DOMStorage.js: 142 (WebInspector.DOMStorage.prototype.getEntries): 143 (WebInspector.DOMStorage.prototype.setItem): 144 (WebInspector.DOMStorage.prototype.removeItem): 145 * inspector/front-end/Database.js: 146 (WebInspector.Database.prototype.getTableNames): 147 * inspector/front-end/ElementsPanel.js: 148 (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged): 149 (WebInspector.ElementsPanel.prototype.hide): 150 (WebInspector.ElementsPanel.prototype.reset): 151 (WebInspector.ElementsPanel.prototype.handleCopyEvent): 152 (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked): 153 * inspector/front-end/ElementsTreeOutline.js: 154 (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode.restoreHighlightToHoveredNode): 155 (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode): 156 (): 157 * inspector/front-end/EventListenersSidebarPane.js: 158 (WebInspector.EventListenersSidebarPane.prototype): 159 * inspector/front-end/InjectedScript.js: 160 (InjectedScript._evaluateAndWrap): 161 (InjectedScript.performSearch.addNodesToResults): 162 (InjectedScript.getCallFrames): 163 (InjectedScript._callFrameForId): 164 (InjectedScript._clearConsoleMessages): 165 (InjectedScript._inspectObject): 166 (InjectedScript._copy): 167 (InjectedScript._ensureCommandLineAPIInstalled): 168 (InjectedScript._window): 169 (InjectedScript._nodeForId): 170 (InjectedScript._objectForId): 171 (InjectedScript.pushNodeToFrontend): 172 (InjectedScript.executeSql): 173 (InjectedScript.executeSql.errorCallback): 174 (InjectedScript.executeSql.queryTransaction): 175 * inspector/front-end/InjectedScriptAccess.js: 176 (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName): 177 (InjectedScriptAccess._installHandler): 178 * inspector/front-end/InspectorBackendStub.js: Added. 179 (.WebInspector.InspectorBackendStub): 180 (.WebInspector.InspectorBackendStub.prototype.wrapCallback): 181 (.WebInspector.InspectorBackendStub.prototype.platform): 182 (.WebInspector.InspectorBackendStub.prototype.port): 183 (.WebInspector.InspectorBackendStub.prototype.closeWindow): 184 (.WebInspector.InspectorBackendStub.prototype.attach): 185 (.WebInspector.InspectorBackendStub.prototype.detach): 186 (.WebInspector.InspectorBackendStub.prototype.storeLastActivePanel): 187 (.WebInspector.InspectorBackendStub.prototype.clearMessages): 188 (.WebInspector.InspectorBackendStub.prototype.searchingForNode): 189 (.WebInspector.InspectorBackendStub.prototype.search): 190 (.WebInspector.InspectorBackendStub.prototype.toggleNodeSearch): 191 (.WebInspector.InspectorBackendStub.prototype.setAttachedWindowHeight): 192 (.WebInspector.InspectorBackendStub.prototype.moveByUnrestricted): 193 (.WebInspector.InspectorBackendStub.prototype.addResourceSourceToFrame): 194 (.WebInspector.InspectorBackendStub.prototype.addSourceToFrame): 195 (.WebInspector.InspectorBackendStub.prototype.getResourceDocumentNode): 196 (.WebInspector.InspectorBackendStub.prototype.highlightDOMNode): 197 (.WebInspector.InspectorBackendStub.prototype.hideDOMNodeHighlight): 198 (.WebInspector.InspectorBackendStub.prototype.inspectedWindow): 199 (.WebInspector.InspectorBackendStub.prototype.loaded): 200 (.WebInspector.InspectorBackendStub.prototype.localizedStringsURL): 201 (.WebInspector.InspectorBackendStub.prototype.windowUnloading): 202 (.WebInspector.InspectorBackendStub.prototype.hiddenPanels): 203 (.WebInspector.InspectorBackendStub.prototype.debuggerEnabled): 204 (.WebInspector.InspectorBackendStub.prototype.enableResourceTracking): 205 (.WebInspector.InspectorBackendStub.prototype.disableResourceTracking): 206 (.WebInspector.InspectorBackendStub.prototype.resourceTrackingEnabled): 207 (.WebInspector.InspectorBackendStub.prototype.enableDebugger): 208 (.WebInspector.InspectorBackendStub.prototype.disableDebugger): 209 (.WebInspector.InspectorBackendStub.prototype.addBreakpoint): 210 (.WebInspector.InspectorBackendStub.prototype.removeBreakpoint): 211 (.WebInspector.InspectorBackendStub.prototype.updateBreakpoint): 212 (.WebInspector.InspectorBackendStub.prototype.pauseInDebugger): 213 (.WebInspector.InspectorBackendStub.prototype.pauseOnExceptions): 214 (.WebInspector.InspectorBackendStub.prototype.setPauseOnExceptions): 215 (.WebInspector.InspectorBackendStub.prototype.resumeDebugger): 216 (.WebInspector.InspectorBackendStub.prototype.profilerEnabled): 217 (.WebInspector.InspectorBackendStub.prototype.enableProfiler): 218 (.WebInspector.InspectorBackendStub.prototype.disableProfiler): 219 (.WebInspector.InspectorBackendStub.prototype.startProfiling): 220 (.WebInspector.InspectorBackendStub.prototype.stopProfiling): 221 (.WebInspector.InspectorBackendStub.prototype.getProfileHeaders): 222 (.WebInspector.InspectorBackendStub.prototype.getProfile): 223 (.WebInspector.InspectorBackendStub.prototype.takeHeapSnapshot): 224 (.WebInspector.InspectorBackendStub.prototype.databaseTableNames): 225 (.WebInspector.InspectorBackendStub.prototype.stepIntoStatementInDebugger): 226 (.WebInspector.InspectorBackendStub.prototype.stepOutOfFunctionInDebugger): 227 (.WebInspector.InspectorBackendStub.prototype.stepOverStatementInDebugger): 228 (.WebInspector.InspectorBackendStub.prototype.setSetting): 229 (.WebInspector.InspectorBackendStub.prototype.dispatchOnInjectedScript): 230 (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup): 231 (.WebInspector.InspectorBackendStub.prototype.setting): 232 * inspector/front-end/InspectorControllerStub.js: 233 * inspector/front-end/InspectorFrontendHostStub.js: Added. 234 (.WebInspector.InspectorFrontendHostStub): 235 (.WebInspector.InspectorFrontendHostStub.prototype.platform): 236 (.WebInspector.InspectorFrontendHostStub.prototype.port): 237 (.WebInspector.InspectorFrontendHostStub.prototype.closeWindow): 238 (.WebInspector.InspectorFrontendHostStub.prototype.attach): 239 (.WebInspector.InspectorFrontendHostStub.prototype.detach): 240 (.WebInspector.InspectorFrontendHostStub.prototype.search): 241 (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowHeight): 242 (.WebInspector.InspectorFrontendHostStub.prototype.moveWindowBy): 243 (.WebInspector.InspectorFrontendHostStub.prototype.addResourceSourceToFrame): 244 (.WebInspector.InspectorFrontendHostStub.prototype.addSourceToFrame): 245 (.WebInspector.InspectorFrontendHostStub.prototype.loaded): 246 (.WebInspector.InspectorFrontendHostStub.prototype.localizedStringsURL): 247 (.WebInspector.InspectorFrontendHostStub.prototype.hiddenPanels): 248 (.WebInspector.InspectorFrontendHostStub.prototype.setSetting): 249 (.WebInspector.InspectorFrontendHostStub.prototype.setting): 250 * inspector/front-end/ProfileView.js: 251 (WebInspector.CPUProfileView): 252 (WebInspector.CPUProfileType.prototype.buttonClicked): 253 * inspector/front-end/ProfilesPanel.js: 254 (WebInspector.ProfilesPanel.prototype._updateInterface): 255 (WebInspector.ProfilesPanel.prototype._enableProfiling): 256 (WebInspector.ProfilesPanel.prototype._toggleProfiling): 257 * inspector/front-end/ResourcesPanel.js: 258 (WebInspector.ResourcesPanel.prototype.reset): 259 (WebInspector.ResourcesPanel.prototype._toggleLargerResources): 260 (WebInspector.ResourcesPanel.prototype._enableResourceTracking): 261 (WebInspector.ResourcesPanel.prototype._toggleResourceTracking): 262 * inspector/front-end/ScriptView.js: 263 (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): 264 * inspector/front-end/ScriptsPanel.js: 265 (WebInspector.ScriptsPanel.prototype.show): 266 (WebInspector.ScriptsPanel.prototype.addScript): 267 (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown): 268 (WebInspector.ScriptsPanel.prototype.reset): 269 (WebInspector.ScriptsPanel.prototype.canShowResource): 270 (WebInspector.ScriptsPanel.prototype._showScriptOrResource): 271 (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): 272 (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton): 273 (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): 274 (WebInspector.ScriptsPanel.prototype._enableDebugging): 275 (WebInspector.ScriptsPanel.prototype._toggleDebugging): 276 (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions): 277 (WebInspector.ScriptsPanel.prototype._togglePause): 278 (WebInspector.ScriptsPanel.prototype._stepOverClicked): 279 (WebInspector.ScriptsPanel.prototype._stepIntoClicked): 280 (WebInspector.ScriptsPanel.prototype._stepOutClicked): 281 * inspector/front-end/SourceView.js: 282 (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): 283 (WebInspector.SourceView.prototype.performSearch.findSearchMatches): 284 (WebInspector.SourceView.prototype.performSearch): 285 * inspector/front-end/StylesSidebarPane.js: 286 (WebInspector.StylesSidebarPane.prototype._changeColorFormat): 287 * inspector/front-end/TestController.js: 288 (WebInspector.TestController.prototype.notifyDone): 289 * inspector/front-end/TimelinePanel.js: 290 (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked): 291 * inspector/front-end/WatchExpressionsSidebarPane.js: 292 (WebInspector.WatchExpressionsSection.prototype.update): 293 (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions): 294 (WebInspector.WatchExpressionsSection.prototype.saveExpressions): 295 * inspector/front-end/WebKit.qrc: 296 * inspector/front-end/inspector.html: 297 * inspector/front-end/inspector.js: 298 (WebInspector.pendingDispatches.0.get platform): 299 (WebInspector.get port): 300 (WebInspector.set currentPanel): 301 (WebInspector._createPanels): 302 (WebInspector._loadPreferences): 303 (WebInspector.set attached): 304 (WebInspector._updateHoverHighlight): 305 (WebInspector.loaded): 306 (windowLoaded): 307 (WebInspector.windowUnload): 308 (WebInspector.close): 309 (WebInspector.toolbarDrag): 310 (WebInspector.UIString): 311 1 312 2009-11-30 Shinichiro Hamaji <hamaji@chromium.org> 2 313 -
trunk/WebCore/DerivedSources.make
r51519 r51528 201 201 History \ 202 202 ImageData \ 203 InjectedScriptHost \ 203 204 InspectorBackend \ 205 InspectorFrontendHost \ 204 206 KeyboardEvent \ 205 207 Location \ -
trunk/WebCore/GNUmakefile.am
r51486 r51528 247 247 WebCore/html/VoidCallback.idl \ 248 248 WebCore/inspector/JavaScriptCallFrame.idl \ 249 WebCore/inspector/InjectedScriptHost.idl \ 249 250 WebCore/inspector/InspectorBackend.idl \ 251 WebCore/inspector/InspectorFrontendHost.idl \ 250 252 WebCore/notifications/Notification.idl \ 251 253 WebCore/notifications/NotificationCenter.idl \ … … 399 401 WebCore/bindings/js/JSImageConstructor.h \ 400 402 WebCore/bindings/js/JSImageDataCustom.cpp \ 401 WebCore/bindings/js/JSInspectorBackendCustom.cpp \ 403 WebCore/bindings/js/JSInjectedScriptHostCustom.cpp \ 404 WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp \ 402 405 WebCore/bindings/js/JSInspectedObjectWrapper.cpp \ 403 406 WebCore/bindings/js/JSInspectedObjectWrapper.h \ … … 1170 1173 WebCore/inspector/ConsoleMessage.cpp \ 1171 1174 WebCore/inspector/ConsoleMessage.h \ 1175 WebCore/inspector/InjectedScriptHost.cpp \ 1176 WebCore/inspector/InjectedScriptHost.h \ 1172 1177 WebCore/inspector/InspectorBackend.cpp \ 1173 1178 WebCore/inspector/InspectorBackend.h \ … … 1183 1188 WebCore/inspector/InspectorFrontend.cpp \ 1184 1189 WebCore/inspector/InspectorFrontend.h \ 1190 WebCore/inspector/InspectorFrontendHost.cpp \ 1191 WebCore/inspector/InspectorFrontendHost.h \ 1185 1192 WebCore/inspector/InspectorResource.cpp \ 1186 1193 WebCore/inspector/InspectorResource.h \ -
trunk/WebCore/WebCore.gypi
r51348 r51528 180 180 'html/ValidityState.idl', 181 181 'html/VoidCallback.idl', 182 'inspector/InjectedScriptHost.idl', 182 183 'inspector/InspectorBackend.idl', 184 'inspector/InspectorFrontendHost.idl', 183 185 'inspector/JavaScriptCallFrame.idl', 184 186 'loader/appcache/DOMApplicationCache.idl', … … 523 525 'bindings/js/JSInspectorCallbackWrapper.cpp', 524 526 'bindings/js/JSInspectorCallbackWrapper.h', 525 'bindings/js/JSInspectorBackendCustom.cpp', 527 'bindings/js/JSInjectedScriptHostCustom.cpp', 528 'bindings/js/JSInspectorFrontendHostCustom.cpp', 526 529 'bindings/js/JSJavaScriptCallFrameCustom.cpp', 527 530 'bindings/js/JSLazyEventListener.cpp', … … 699 702 'bindings/v8/custom/V8HTMLSelectElementCustom.cpp', 700 703 'bindings/v8/custom/V8HTMLSelectElementCustom.h', 701 'bindings/v8/custom/V8InspectorBackendCustom.cpp', 704 'bindings/v8/custom/V8InjectedScriptHostCustom.cpp', 705 'bindings/v8/custom/V8InspectorFrontendHostCustom.cpp', 702 706 'bindings/v8/custom/V8LocationCustom.cpp', 703 707 'bindings/v8/custom/V8MessageChannelConstructor.cpp', … … 1521 1525 'inspector/ConsoleMessage.cpp', 1522 1526 'inspector/ConsoleMessage.h', 1527 'inspector/InjectedScriptHost.cpp', 1528 'inspector/InjectedScriptHost.h', 1523 1529 'inspector/InspectorBackend.cpp', 1524 1530 'inspector/InspectorBackend.h', … … 1533 1539 'inspector/InspectorFrontend.cpp', 1534 1540 'inspector/InspectorFrontend.h', 1541 'inspector/InspectorFrontendHost.cpp', 1542 'inspector/InspectorFrontendHost.h', 1535 1543 'inspector/InspectorResource.cpp', 1536 1544 'inspector/InspectorResource.h', … … 3635 3643 'inspector/front-end/FontView.js', 3636 3644 'inspector/front-end/ImageView.js', 3637 'inspector/front-end/InspectorControllerStub.js', 3645 'inspector/front-end/InspectorBackendStub.js', 3646 'inspector/front-end/InspectorFrontendHostStub.js', 3638 3647 'inspector/front-end/InjectedScript.js', 3639 3648 'inspector/front-end/InjectedScriptAccess.js', -
trunk/WebCore/WebCore.pro
r51414 r51528 467 467 html/ValidityState.idl \ 468 468 html/VoidCallback.idl \ 469 inspector/InjectedScriptHost.idl \ 469 470 inspector/InspectorBackend.idl \ 471 inspector/InspectorFrontendHost.idl \ 470 472 inspector/JavaScriptCallFrame.idl \ 471 473 loader/appcache/DOMApplicationCache.idl \ … … 720 722 bindings/js/JSImageConstructor.cpp \ 721 723 bindings/js/JSImageDataCustom.cpp \ 724 bindings/js/JSInjectedScriptHostCustom.cpp \ 722 725 bindings/js/JSInspectedObjectWrapper.cpp \ 723 bindings/js/JSInspector BackendCustom.cpp \726 bindings/js/JSInspectorFrontendHostCustom.cpp \ 724 727 bindings/js/JSInspectorCallbackWrapper.cpp \ 725 728 bindings/js/JSLocationCustom.cpp \ … … 1076 1079 html/ValidityState.cpp \ 1077 1080 inspector/ConsoleMessage.cpp \ 1081 inspector/InjectedScriptHost.cpp \ 1078 1082 inspector/InspectorBackend.cpp \ 1079 1083 inspector/InspectorController.cpp \ … … 1082 1086 inspector/InspectorDOMStorageResource.cpp \ 1083 1087 inspector/InspectorFrontend.cpp \ 1088 inspector/InspectorFrontendHost.cpp \ 1084 1089 inspector/InspectorResource.cpp \ 1085 1090 inspector/InspectorTimelineAgent.cpp \ … … 1758 1763 html/ValidityState.h \ 1759 1764 inspector/ConsoleMessage.h \ 1765 inspector/InjectedScriptHost.h \ 1760 1766 inspector/InspectorBackend.h \ 1761 1767 inspector/InspectorController.h \ … … 1763 1769 inspector/InspectorDOMStorageResource.h \ 1764 1770 inspector/InspectorFrontend.h \ 1771 inspector/InspectorFrontendHost.h \ 1765 1772 inspector/InspectorResource.h \ 1766 1773 inspector/InspectorTimelineAgent.h \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r51377 r51528 7732 7732 </File> 7733 7733 <File 7734 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInjectedScriptHost.cpp" 7735 > 7736 <FileConfiguration 7737 Name="Debug|Win32" 7738 ExcludedFromBuild="true" 7739 > 7740 <Tool 7741 Name="VCCLCompilerTool" 7742 /> 7743 </FileConfiguration> 7744 <FileConfiguration 7745 Name="Release|Win32" 7746 ExcludedFromBuild="true" 7747 > 7748 <Tool 7749 Name="VCCLCompilerTool" 7750 /> 7751 </FileConfiguration> 7752 <FileConfiguration 7753 Name="Debug_Internal|Win32" 7754 ExcludedFromBuild="true" 7755 > 7756 <Tool 7757 Name="VCCLCompilerTool" 7758 /> 7759 </FileConfiguration> 7760 <FileConfiguration 7761 Name="Debug_Cairo|Win32" 7762 ExcludedFromBuild="true" 7763 > 7764 <Tool 7765 Name="VCCLCompilerTool" 7766 /> 7767 </FileConfiguration> 7768 <FileConfiguration 7769 Name="Release_Cairo|Win32" 7770 ExcludedFromBuild="true" 7771 > 7772 <Tool 7773 Name="VCCLCompilerTool" 7774 /> 7775 </FileConfiguration> 7776 <FileConfiguration 7777 Name="Debug_All|Win32" 7778 ExcludedFromBuild="true" 7779 > 7780 <Tool 7781 Name="VCCLCompilerTool" 7782 /> 7783 </FileConfiguration> 7784 </File> 7785 <File 7786 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInjectedScriptHost.h" 7787 > 7788 </File> 7789 <File 7734 7790 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorBackend.cpp" 7735 7791 > … … 7784 7840 </File> 7785 7841 <File 7786 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorBackend. cpp"7787 > 7788 </File> 7789 <File 7790 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspector Backend.cpp"7842 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorBackend.h" 7843 > 7844 </File> 7845 <File 7846 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorFrontendHost.cpp" 7791 7847 > 7792 7848 <FileConfiguration … … 7840 7896 </File> 7841 7897 <File 7842 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspector Backend.h"7898 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSInspectorFrontendHost.h" 7843 7899 > 7844 7900 </File> … … 37299 37355 </File> 37300 37356 <File 37301 RelativePath="..\bindings\js\JSInspectorBackendCustom.cpp" 37357 RelativePath="..\bindings\js\JSInjectedScriptHostCustom.cpp" 37358 > 37359 <FileConfiguration 37360 Name="Debug|Win32" 37361 ExcludedFromBuild="true" 37362 > 37363 <Tool 37364 Name="VCCLCompilerTool" 37365 /> 37366 </FileConfiguration> 37367 <FileConfiguration 37368 Name="Release|Win32" 37369 ExcludedFromBuild="true" 37370 > 37371 <Tool 37372 Name="VCCLCompilerTool" 37373 /> 37374 </FileConfiguration> 37375 <FileConfiguration 37376 Name="Debug_Internal|Win32" 37377 ExcludedFromBuild="true" 37378 > 37379 <Tool 37380 Name="VCCLCompilerTool" 37381 /> 37382 </FileConfiguration> 37383 <FileConfiguration 37384 Name="Debug_Cairo|Win32" 37385 ExcludedFromBuild="true" 37386 > 37387 <Tool 37388 Name="VCCLCompilerTool" 37389 /> 37390 </FileConfiguration> 37391 <FileConfiguration 37392 Name="Release_Cairo|Win32" 37393 ExcludedFromBuild="true" 37394 > 37395 <Tool 37396 Name="VCCLCompilerTool" 37397 /> 37398 </FileConfiguration> 37399 <FileConfiguration 37400 Name="Debug_All|Win32" 37401 ExcludedFromBuild="true" 37402 > 37403 <Tool 37404 Name="VCCLCompilerTool" 37405 /> 37406 </FileConfiguration> 37407 </File> 37408 <File 37409 RelativePath="..\bindings\js\JSInspectorFrontendHostCustom.cpp" 37302 37410 > 37303 37411 <FileConfiguration … … 42320 42428 </File> 42321 42429 <File 42430 RelativePath="..\inspector\InjectedScriptHost.cpp" 42431 > 42432 </File> 42433 <File 42434 RelativePath="..\inspector\InjectedScriptHost.h" 42435 > 42436 <File 42322 42437 RelativePath="..\inspector\InspectorBackend.cpp" 42323 42438 > … … 42369 42484 <File 42370 42485 RelativePath="..\inspector\InspectorFrontend.h" 42486 > 42487 </File> 42488 <File 42489 RelativePath="..\inspector\InspectorFrontendHost.cpp" 42490 > 42491 </File> 42492 <File 42493 RelativePath="..\inspector\InspectorFrontendHost.h" 42371 42494 > 42372 42495 </File> -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r51476 r51528 1230 1230 79F2F5A11091939A000D87CB /* CompositionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 79F2F59E1091939A000D87CB /* CompositionEvent.cpp */; }; 1231 1231 79F2F5A21091939A000D87CB /* CompositionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 79F2F59F1091939A000D87CB /* CompositionEvent.h */; }; 1232 7A0E76D510BF050700A0276E /* JSInjectedScriptHostCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E76D410BF050700A0276E /* JSInjectedScriptHostCustom.cpp */; }; 1233 7A0E76DA10BF059800A0276E /* JSInjectedScriptHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E76D810BF059800A0276E /* JSInjectedScriptHost.cpp */; }; 1234 7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E76D910BF059800A0276E /* JSInjectedScriptHost.h */; }; 1235 7A0E76F910BF08ED00A0276E /* InjectedScriptHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E76F610BF08ED00A0276E /* InjectedScriptHost.cpp */; }; 1236 7A0E76FA10BF08ED00A0276E /* InjectedScriptHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E76F710BF08ED00A0276E /* InjectedScriptHost.h */; }; 1237 7A0E76FB10BF08ED00A0276E /* InjectedScriptHost.idl in Resources */ = {isa = PBXBuildFile; fileRef = 7A0E76F810BF08ED00A0276E /* InjectedScriptHost.idl */; }; 1238 7A0E770E10C00A8800A0276E /* InspectorFrontendHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E770B10C00A8800A0276E /* InspectorFrontendHost.cpp */; }; 1239 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */; }; 1240 7A0E771010C00A8800A0276E /* InspectorFrontendHost.idl in Resources */ = {isa = PBXBuildFile; fileRef = 7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */; }; 1241 7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */; }; 1242 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */; }; 1232 1243 7A1E88F5101CC384000C4DF5 /* ScriptArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A1E88F3101CC384000C4DF5 /* ScriptArray.cpp */; }; 1233 1244 7A1E88F6101CC384000C4DF5 /* ScriptArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A1E88F4101CC384000C4DF5 /* ScriptArray.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1238 1249 7A74ECBA101839A600BF939E /* InspectorBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */; }; 1239 1250 7A74ECBB101839A600BF939E /* InspectorBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A74ECB9101839A600BF939E /* InspectorBackend.h */; }; 1240 7A74ECBD101839DA00BF939E /* JSInspector BackendCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorBackendCustom.cpp */; };1251 7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */; }; 1241 1252 7AED3E050FBB1EAA00D2B03C /* InspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */; }; 1242 1253 7AED3E060FBB1EAA00D2B03C /* InspectorFrontend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */; }; … … 6551 6562 79F2F59F1091939A000D87CB /* CompositionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompositionEvent.h; sourceTree = "<group>"; }; 6552 6563 79F2F5A01091939A000D87CB /* CompositionEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CompositionEvent.idl; sourceTree = "<group>"; }; 6564 7A0E76D410BF050700A0276E /* JSInjectedScriptHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInjectedScriptHostCustom.cpp; sourceTree = "<group>"; }; 6565 7A0E76D810BF059800A0276E /* JSInjectedScriptHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSInjectedScriptHost.cpp; sourceTree = "<group>"; }; 6566 7A0E76D910BF059800A0276E /* JSInjectedScriptHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSInjectedScriptHost.h; sourceTree = "<group>"; }; 6567 7A0E76F610BF08ED00A0276E /* InjectedScriptHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedScriptHost.cpp; sourceTree = "<group>"; }; 6568 7A0E76F710BF08ED00A0276E /* InjectedScriptHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptHost.h; sourceTree = "<group>"; }; 6569 7A0E76F810BF08ED00A0276E /* InjectedScriptHost.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = InjectedScriptHost.idl; sourceTree = "<group>"; }; 6570 7A0E770B10C00A8800A0276E /* InspectorFrontendHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontendHost.cpp; sourceTree = "<group>"; }; 6571 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendHost.h; sourceTree = "<group>"; }; 6572 7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = InspectorFrontendHost.idl; sourceTree = "<group>"; }; 6573 7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSInspectorFrontendHost.cpp; sourceTree = "<group>"; }; 6574 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSInspectorFrontendHost.h; sourceTree = "<group>"; }; 6553 6575 7A1E88F3101CC384000C4DF5 /* ScriptArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptArray.cpp; sourceTree = "<group>"; }; 6554 6576 7A1E88F4101CC384000C4DF5 /* ScriptArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptArray.h; sourceTree = "<group>"; }; … … 6560 6582 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackend.cpp; sourceTree = "<group>"; }; 6561 6583 7A74ECB9101839A600BF939E /* InspectorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBackend.h; sourceTree = "<group>"; }; 6562 7A74ECBC101839DA00BF939E /* JSInspector BackendCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorBackendCustom.cpp; sourceTree = "<group>"; };6584 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorFrontendHostCustom.cpp; sourceTree = "<group>"; }; 6563 6585 7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontend.cpp; sourceTree = "<group>"; }; 6564 6586 7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontend.h; sourceTree = "<group>"; }; … … 10421 10443 isa = PBXGroup; 10422 10444 children = ( 10445 7A0E76D810BF059800A0276E /* JSInjectedScriptHost.cpp */, 10446 7A0E76D910BF059800A0276E /* JSInjectedScriptHost.h */, 10423 10447 41F060CB0F5EEB2B00A07EAC /* JSInspectorBackend.cpp */, 10424 10448 41F060CC0F5EEB2B00A07EAC /* JSInspectorBackend.h */, 10449 7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */, 10450 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */, 10425 10451 1C5FAECF0DCFD90100D58F78 /* JSJavaScriptCallFrame.cpp */, 10426 10452 1C5FAED00DCFD90100D58F78 /* JSJavaScriptCallFrame.h */, … … 10435 10461 41F0618D0F5F069800A07EAC /* ConsoleMessage.cpp */, 10436 10462 41F0618C0F5F069800A07EAC /* ConsoleMessage.h */, 10463 7A0E76F610BF08ED00A0276E /* InjectedScriptHost.cpp */, 10464 7A0E76F710BF08ED00A0276E /* InjectedScriptHost.h */, 10465 7A0E76F810BF08ED00A0276E /* InjectedScriptHost.idl */, 10437 10466 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */, 10438 10467 7A74ECB9101839A600BF939E /* InspectorBackend.h */, … … 10449 10478 7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */, 10450 10479 7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */, 10480 7A0E770B10C00A8800A0276E /* InspectorFrontendHost.cpp */, 10481 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */, 10482 7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */, 10451 10483 41F062000F5F0B6600A07EAC /* InspectorResource.cpp */, 10452 10484 41F061FF0F5F0B6600A07EAC /* InspectorResource.h */, … … 14531 14563 AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */, 14532 14564 A7D0318D0E93540300E24ACD /* JSImageDataCustom.cpp */, 14533 7A74ECBC101839DA00BF939E /* JSInspectorBackendCustom.cpp */, 14565 7A0E76D410BF050700A0276E /* JSInjectedScriptHostCustom.cpp */, 14566 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */, 14534 14567 1C5FAEE60DCFDA6800D58F78 /* JSJavaScriptCallFrameCustom.cpp */, 14535 14568 BCE1C43F0D9830F4003B02F2 /* JSLocationCustom.cpp */, … … 18180 18213 AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */, 18181 18214 6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */, 18215 7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */, 18216 7A0E76FA10BF08ED00A0276E /* InjectedScriptHost.h in Headers */, 18217 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */, 18218 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */, 18182 18219 ); 18183 18220 runOnlyForDeploymentPostprocessing = 0; … … 18283 18320 18C5FCA710A3991F0048438D /* WebKitSharedScript.idl in Resources */, 18284 18321 18C5FCB910A3C6F20048438D /* SharedScriptContext.idl in Resources */, 18322 7A0E76FB10BF08ED00A0276E /* InjectedScriptHost.idl in Resources */, 18323 7A0E771010C00A8800A0276E /* InspectorFrontendHost.idl in Resources */, 18285 18324 ); 18286 18325 runOnlyForDeploymentPostprocessing = 0; … … 19380 19419 C091588A0DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp in Sources */, 19381 19420 41F060CD0F5EEB2B00A07EAC /* JSInspectorBackend.cpp in Sources */, 19382 7A74ECBD101839DA00BF939E /* JSInspector BackendCustom.cpp in Sources */,19421 7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */, 19383 19422 C091588C0DB4209200E55AF4 /* JSInspectorCallbackWrapper.cpp in Sources */, 19384 19423 1C5FAED10DCFD90100D58F78 /* JSJavaScriptCallFrame.cpp in Sources */, … … 20330 20369 E1B4CD2510B322E200BFFD7E /* CredentialStorageMac.mm in Sources */, 20331 20370 6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */, 20371 7A0E76D510BF050700A0276E /* JSInjectedScriptHostCustom.cpp in Sources */, 20372 7A0E76DA10BF059800A0276E /* JSInjectedScriptHost.cpp in Sources */, 20373 7A0E76F910BF08ED00A0276E /* InjectedScriptHost.cpp in Sources */, 20374 7A0E770E10C00A8800A0276E /* InspectorFrontendHost.cpp in Sources */, 20375 7A0E771E10C00DB100A0276E /* JSInspectorFrontendHost.cpp in Sources */, 20332 20376 ); 20333 20377 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/WebCoreSources.bkl
r51063 r51528 112 112 bindings/js/JSImageConstructor.cpp 113 113 bindings/js/JSImageDataCustom.cpp 114 bindings/js/JSInjectedScriptHostCustom.cpp 114 115 bindings/js/JSInspectedObjectWrapper.cpp 115 bindings/js/JSInspector BackendCustom.cpp116 bindings/js/JSInspectorFrontendHostCustom.cpp 116 117 bindings/js/JSInspectorCallbackWrapper.cpp 117 118 bindings/js/JSJavaScriptCallFrameCustom.cpp … … 367 368 DerivedSources/WebCore/JSHistory.cpp 368 369 DerivedSources/WebCore/JSImageData.cpp 370 DerivedSources/WebCore/JSInjectedScriptHost.cpp 369 371 DerivedSources/WebCore/JSInspectorBackend.cpp 372 DerivedSources/WebCore/JSInspectorFrontendHost.cpp 370 373 DerivedSources/WebCore/JSJavaScriptCallFrame.cpp 371 374 DerivedSources/WebCore/JSKeyboardEvent.cpp … … 683 686 <set append="1" var="WEBCORE_SOURCES_INSPECTOR"> 684 687 inspector/ConsoleMessage.cpp 688 inspector/InjectedScriptHost.cpp 685 689 inspector/InspectorBackend.cpp 690 inspector/InspectorFrontendHost.cpp 686 691 inspector/InspectorDatabaseResource.cpp 687 692 inspector/InspectorDOMAgent.cpp -
trunk/WebCore/bindings/js/JSBindingsAllInOne.cpp
r50261 r51528 86 86 #include "JSImageConstructor.cpp" 87 87 #include "JSImageDataCustom.cpp" 88 #include "JSInjectedScriptHostCustom.cpp" 88 89 #include "JSInspectedObjectWrapper.cpp" 89 #include "JSInspector BackendCustom.cpp"90 #include "JSInspectorFrontendHostCustom.cpp" 90 91 #include "JSJavaScriptCallFrameCustom.cpp" 91 92 #include "JSLazyEventListener.cpp" -
trunk/WebCore/bindings/js/ScriptObject.cpp
r51439 r51528 37 37 38 38 #if ENABLE(INSPECTOR) 39 #include "JSInjectedScriptHost.h" 39 40 #include "JSInspectorBackend.h" 41 #include "JSInspectorFrontendHost.h" 40 42 #endif 41 43 … … 160 162 return handleException(scriptState); 161 163 } 164 165 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value) 166 { 167 JSLock lock(SilenceAssertionsOnly); 168 JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject()); 169 globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value)); 170 return handleException(scriptState); 171 } 172 173 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value) 174 { 175 JSLock lock(SilenceAssertionsOnly); 176 JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject()); 177 globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value)); 178 return handleException(scriptState); 179 } 162 180 #endif // ENABLE(INSPECTOR) 163 181 -
trunk/WebCore/bindings/js/ScriptObject.h
r51439 r51528 39 39 40 40 namespace WebCore { 41 class InjectedScriptHost; 41 42 class InspectorBackend; 43 class InspectorFrontendHost; 42 44 43 45 class ScriptObject : public ScriptValue { … … 69 71 #if ENABLE(INSPECTOR) 70 72 static bool set(ScriptState*, const char* name, InspectorBackend*); 73 static bool set(ScriptState*, const char* name, InspectorFrontendHost*); 74 static bool set(ScriptState*, const char* name, InjectedScriptHost*); 71 75 #endif 72 76 static bool get(ScriptState*, const char* name, ScriptObject&); -
trunk/WebCore/bindings/v8/DOMObjectsInclude.h
r50968 r51528 258 258 259 259 #if ENABLE(INSPECTOR) 260 #include "InjectedScriptHost.h" 260 261 #include "InspectorBackend.h" 262 #include "InspectorFrontendHost.h" 261 263 #endif // INSPECTOR 262 264 -
trunk/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
r51125 r51528 388 388 389 389 #if ENABLE(INSPECTOR) 390 #include "bindings/V8InjectedScriptHost.cpp" 390 391 #include "bindings/V8InspectorBackend.cpp" 391 #endif 392 #include "bindings/V8InspectorFrontendHost.cpp" 393 #endif -
trunk/WebCore/bindings/v8/ScriptObject.cpp
r51439 r51528 37 37 #include "Document.h" 38 38 #include "Frame.h" 39 #include "InspectorBackend.h" 40 #include "InspectorFrontendHost.h" 39 41 #include "V8Binding.h" 40 42 #include "V8Proxy.h" … … 146 148 } 147 149 150 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value) 151 { 152 ScriptScope scope(scriptState); 153 scope.global()->Set(v8::String::New(name), V8DOMWrapper::convertToV8Object(V8ClassIndex::INSPECTORFRONTENDHOST, value)); 154 return scope.success(); 155 } 156 157 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value) 158 { 159 ScriptScope scope(scriptState); 160 scope.global()->Set(v8::String::New(name), V8DOMWrapper::convertToV8Object(V8ClassIndex::INJECTEDSCRIPTHOST, value)); 161 return scope.success(); 162 } 163 148 164 bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value) 149 165 { -
trunk/WebCore/bindings/v8/ScriptObject.h
r51439 r51528 37 37 38 38 namespace WebCore { 39 class InjectedScriptHost; 39 40 class InspectorBackend; 41 class InspectorFrontendHost; 40 42 class ScriptState; 41 43 … … 68 70 static bool set(ScriptState*, const char* name, const ScriptObject&); 69 71 static bool set(ScriptState*, const char* name, InspectorBackend*); 72 static bool set(ScriptState*, const char* name, InspectorFrontendHost*); 73 static bool set(ScriptState*, const char* name, InjectedScriptHost*); 70 74 static bool get(ScriptState*, const char* name, ScriptObject&); 71 75 static bool remove(ScriptState*, const char* name); -
trunk/WebCore/bindings/v8/V8Index.cpp
r50968 r51528 434 434 435 435 #if ENABLE(INSPECTOR) 436 #include "V8InjectedScriptHost.h" 436 437 #include "V8InspectorBackend.h" 438 #include "V8InspectorFrontendHost.h" 437 439 #endif 438 440 -
trunk/WebCore/bindings/v8/V8Index.h
r50968 r51528 488 488 #if ENABLE(INSPECTOR) 489 489 #define DOM_OBJECT_INSPECTOR_TYPES(V) \ 490 V(INSPECTORBACKEND, InspectorBackend) 490 V(INSPECTORBACKEND, InspectorBackend) \ 491 V(INSPECTORFRONTENDHOST, InspectorFrontendHost) \ 492 V(INJECTEDSCRIPTHOST, InjectedScriptHost) 491 493 #else 492 494 #define DOM_OBJECT_INSPECTOR_TYPES(V) -
trunk/WebCore/bindings/v8/custom/V8CustomBinding.h
r51416 r51528 478 478 DECLARE_CALLBACK(TreeWalkerPreviousSibling); 479 479 480 DECLARE_CALLBACK(InspectorBackendHighlightDOMNode); 481 DECLARE_CALLBACK(InspectorBackendAddResourceSourceToFrame); 482 DECLARE_CALLBACK(InspectorBackendAddSourceToFrame); 483 DECLARE_CALLBACK(InspectorBackendSearch); 484 DECLARE_CALLBACK(InspectorBackendSetting); 485 DECLARE_CALLBACK(InspectorBackendDatabaseForId); 486 DECLARE_CALLBACK(InspectorBackendInspectedWindow); 487 DECLARE_CALLBACK(InspectorBackendSetSetting); 488 DECLARE_CALLBACK(InspectorBackendCurrentCallFrame); 489 DECLARE_CALLBACK(InspectorBackendDebuggerEnabled); 490 DECLARE_CALLBACK(InspectorBackendPauseOnExceptions); 491 DECLARE_CALLBACK(InspectorBackendProfilerEnabled); 492 DECLARE_CALLBACK(InspectorBackendNodeForId); 493 DECLARE_CALLBACK(InspectorBackendWrapObject); 494 DECLARE_CALLBACK(InspectorBackendUnwrapObject); 495 DECLARE_CALLBACK(InspectorBackendPushNodePathToFrontend); 480 DECLARE_CALLBACK(InjectedScriptHostInspectedWindow); 481 DECLARE_CALLBACK(InjectedScriptHostNodeForId); 482 DECLARE_CALLBACK(InjectedScriptHostWrapObject); 483 DECLARE_CALLBACK(InjectedScriptHostUnwrapObject); 484 DECLARE_CALLBACK(InjectedScriptHostPushNodePathToFrontend); 485 DECLARE_CALLBACK(InjectedScriptHostWrapCallback); 496 486 #if ENABLE(DATABASE) 497 DECLARE_CALLBACK(InspectorBackendSelectDatabase); 487 DECLARE_CALLBACK(InjectedScriptHostSelectDatabase); 488 DECLARE_CALLBACK(InjectedScriptHostDatabaseForId); 498 489 #endif 499 490 #if ENABLE(DOM_STORAGE) 500 DECLARE_CALLBACK(InspectorBackendSelectDOMStorage); 501 #endif 502 DECLARE_CALLBACK(InspectorBackendWrapCallback); 491 DECLARE_CALLBACK(InjectedScriptHostSelectDOMStorage); 492 #endif 493 494 DECLARE_CALLBACK(InspectorFrontendHostSearch); 495 DECLARE_CALLBACK(InspectorFrontendHostSetting); 496 DECLARE_CALLBACK(InspectorFrontendHostSetSetting); 503 497 504 498 DECLARE_CALLBACK(ConsoleProfile); -
trunk/WebCore/inspector/InjectedScriptHost.idl
r51527 r51528 1 1 /* 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 2 4 * Copyright (C) 2009 Google Inc. All rights reserved. 3 5 * … … 29 31 */ 30 32 31 WebInspector.TestController = function(callId) 32 { 33 this._callId = callId; 34 this._waitUntilDone = false; 33 module core { 34 interface [ 35 GenerateConstructor 36 ] InjectedScriptHost { 37 [Custom] DOMWindow inspectedWindow(); 38 [Custom] DOMObject wrapCallback(in DOMObject callback); 39 void copyText(in DOMString text); 40 [Custom] DOMObject nodeForId(in long nodeId); 41 [Custom] long wrapObject(in DOMObject object, in DOMString objectGroup); 42 [Custom] DOMObject unwrapObject(in long objectId); 43 [Custom] int pushNodePathToFrontend(in DOMObject node, in boolean selectInUI); 44 void addNodesToSearchResult(in DOMString nodeIds); 45 46 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 47 [Custom] DOMObject currentCallFrame(); 48 #endif 49 50 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE 51 [Custom] DOMObject databaseForId(in long databaseId); 52 [Custom] void selectDatabase(in DOMObject database); 53 #endif 54 55 #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE 56 [Custom] void selectDOMStorage(in DOMObject storage); 57 #endif 58 59 void reportDidDispatchOnInjectedScript(in long callId, in DOMString result, in boolean isException); 60 }; 35 61 } 36 37 WebInspector.TestController.prototype = {38 waitUntilDone: function()39 {40 this._waitUntilDone = true;41 },42 43 notifyDone: function(result)44 {45 var message = typeof result === "undefined" ? "\"<undefined>\"" : JSON.stringify(result);46 InspectorController.didEvaluateForTestInFrontend(this._callId, message);47 },48 49 runAfterPendingDispatches: function(callback)50 {51 if (WebInspector.pendingDispatches === 0) {52 callback();53 return;54 }55 setTimeout(this.runAfterPendingDispatches.bind(this), 0, callback);56 }57 }58 59 WebInspector.evaluateForTestInFrontend = function(callId, script)60 {61 var controller = new WebInspector.TestController(callId);62 function invokeMethod()63 {64 try {65 var result;66 if (window[script] && typeof window[script] === "function")67 result = window[script].call(WebInspector, controller);68 else69 result = window.eval(script);70 71 if (!controller._waitUntilDone)72 controller.notifyDone(result);73 } catch (e) {74 controller.notifyDone(e.toString());75 }76 }77 controller.runAfterPendingDispatches(invokeMethod);78 } -
trunk/WebCore/inspector/InspectorBackend.cpp
r51439 r51528 69 69 namespace WebCore { 70 70 71 InspectorBackend::InspectorBackend(InspectorController* inspectorController , InspectorClient* client)71 InspectorBackend::InspectorBackend(InspectorController* inspectorController) 72 72 : m_inspectorController(inspectorController) 73 , m_client(client)74 73 { 75 74 } … … 79 78 } 80 79 81 void InspectorBackend::hideDOMNodeHighlight()82 {83 if (m_inspectorController)84 m_inspectorController->hideHighlight();85 }86 87 String InspectorBackend::localizedStringsURL()88 {89 return m_client->localizedStringsURL();90 }91 92 String InspectorBackend::hiddenPanels()93 {94 return m_client->hiddenPanels();95 }96 97 void InspectorBackend::windowUnloading()98 {99 if (m_inspectorController)100 m_inspectorController->close();101 }102 103 bool InspectorBackend::isWindowVisible()104 {105 if (m_inspectorController)106 return m_inspectorController->windowVisible();107 return false;108 }109 110 void InspectorBackend::addResourceSourceToFrame(long identifier, Node* frame)111 {112 if (!m_inspectorController)113 return;114 RefPtr<InspectorResource> resource = m_inspectorController->resources().get(identifier);115 if (resource) {116 String sourceString = resource->sourceString();117 if (!sourceString.isEmpty())118 addSourceToFrame(resource->mimeType(), sourceString, frame);119 }120 }121 122 bool InspectorBackend::addSourceToFrame(const String& mimeType, const String& source, Node* frameNode)123 {124 ASSERT_ARG(frameNode, frameNode);125 126 if (!frameNode)127 return false;128 129 if (!frameNode->attached()) {130 ASSERT_NOT_REACHED();131 return false;132 }133 134 ASSERT(frameNode->isElementNode());135 if (!frameNode->isElementNode())136 return false;137 138 Element* element = static_cast<Element*>(frameNode);139 ASSERT(element->isFrameOwnerElement());140 if (!element->isFrameOwnerElement())141 return false;142 143 HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element);144 ASSERT(frameOwner->contentFrame());145 if (!frameOwner->contentFrame())146 return false;147 148 FrameLoader* loader = frameOwner->contentFrame()->loader();149 150 loader->setResponseMIMEType(mimeType);151 loader->begin();152 loader->write(source);153 loader->end();154 155 return true;156 }157 158 80 void InspectorBackend::clearMessages(bool clearUI) 159 81 { … … 162 84 } 163 85 86 void InspectorBackend::storeLastActivePanel(const String& panelName) 87 { 88 if (m_inspectorController) 89 m_inspectorController->storeLastActivePanel(panelName); 90 } 91 164 92 void InspectorBackend::toggleNodeSearch() 165 93 { 166 94 if (m_inspectorController) 167 95 m_inspectorController->toggleSearchForNodeInPage(); 168 }169 170 void InspectorBackend::attach()171 {172 if (m_inspectorController)173 m_inspectorController->attachWindow();174 }175 176 void InspectorBackend::detach()177 {178 if (m_inspectorController)179 m_inspectorController->detachWindow();180 }181 182 void InspectorBackend::setAttachedWindowHeight(unsigned height)183 {184 if (m_inspectorController)185 m_inspectorController->setAttachedWindowHeight(height);186 }187 188 void InspectorBackend::storeLastActivePanel(const String& panelName)189 {190 if (m_inspectorController)191 m_inspectorController->storeLastActivePanel(panelName);192 96 } 193 97 … … 199 103 } 200 104 201 void InspectorBackend::loaded()202 {203 if (m_inspectorController)204 m_inspectorController->scriptObjectReady();205 }206 207 void InspectorBackend::enableResourceTracking(bool always)208 {209 if (m_inspectorController)210 m_inspectorController->enableResourceTracking(always);211 }212 213 void InspectorBackend::disableResourceTracking(bool always)214 {215 if (m_inspectorController)216 m_inspectorController->disableResourceTracking(always);217 }218 219 105 bool InspectorBackend::resourceTrackingEnabled() const 220 106 { … … 224 110 } 225 111 226 void InspectorBackend::moveWindowBy(float x, float y) const 227 { 228 if (m_inspectorController) 229 m_inspectorController->moveWindowBy(x, y); 230 } 231 232 void InspectorBackend::closeWindow() 233 { 234 if (m_inspectorController) 235 m_inspectorController->closeWindow(); 236 } 237 238 const String& InspectorBackend::platform() const 239 { 240 #if PLATFORM(MAC) 241 #ifdef BUILDING_ON_TIGER 242 DEFINE_STATIC_LOCAL(const String, platform, ("mac-tiger")); 243 #else 244 DEFINE_STATIC_LOCAL(const String, platform, ("mac-leopard")); 245 #endif 246 #elif PLATFORM(WIN_OS) 247 DEFINE_STATIC_LOCAL(const String, platform, ("windows")); 248 #else 249 DEFINE_STATIC_LOCAL(const String, platform, ("unknown")); 250 #endif 251 252 return platform; 253 } 254 255 256 const String& InspectorBackend::port() const 257 { 258 #if PLATFORM(QT) 259 DEFINE_STATIC_LOCAL(const String, port, ("qt")); 260 #elif PLATFORM(GTK) 261 DEFINE_STATIC_LOCAL(const String, port, ("gtk")); 262 #elif PLATFORM(WX) 263 DEFINE_STATIC_LOCAL(const String, port, ("wx")); 264 #else 265 DEFINE_STATIC_LOCAL(const String, port, ("unknown")); 266 #endif 267 268 return port; 112 void InspectorBackend::enableResourceTracking(bool always) 113 { 114 if (m_inspectorController) 115 m_inspectorController->enableResourceTracking(always); 116 } 117 118 void InspectorBackend::disableResourceTracking(bool always) 119 { 120 if (m_inspectorController) 121 m_inspectorController->disableResourceTracking(always); 269 122 } 270 123 … … 282 135 283 136 #if ENABLE(JAVASCRIPT_DEBUGGER) 284 void InspectorBackend::startProfiling() 285 { 286 if (m_inspectorController) 287 m_inspectorController->startUserInitiatedProfiling(); 288 } 289 290 void InspectorBackend::stopProfiling() 291 { 292 if (m_inspectorController) 293 m_inspectorController->stopUserInitiatedProfiling(); 294 } 295 296 void InspectorBackend::enableProfiler(bool always) 297 { 298 if (m_inspectorController) 299 m_inspectorController->enableProfiler(always); 300 } 301 302 void InspectorBackend::disableProfiler(bool always) 303 { 304 if (m_inspectorController) 305 m_inspectorController->disableProfiler(always); 137 bool InspectorBackend::debuggerEnabled() const 138 { 139 if (m_inspectorController) 140 return m_inspectorController->debuggerEnabled(); 141 return false; 142 } 143 144 void InspectorBackend::enableDebugger(bool always) 145 { 146 if (m_inspectorController) 147 m_inspectorController->enableDebuggerFromFrontend(always); 148 } 149 150 void InspectorBackend::disableDebugger(bool always) 151 { 152 if (m_inspectorController) 153 m_inspectorController->disableDebugger(always); 154 } 155 156 void InspectorBackend::addBreakpoint(const String& sourceID, unsigned lineNumber, const String& condition) 157 { 158 intptr_t sourceIDValue = sourceID.toIntPtr(); 159 JavaScriptDebugServer::shared().addBreakpoint(sourceIDValue, lineNumber, condition); 160 } 161 162 void InspectorBackend::updateBreakpoint(const String& sourceID, unsigned lineNumber, const String& condition) 163 { 164 intptr_t sourceIDValue = sourceID.toIntPtr(); 165 JavaScriptDebugServer::shared().updateBreakpoint(sourceIDValue, lineNumber, condition); 166 } 167 168 void InspectorBackend::removeBreakpoint(const String& sourceID, unsigned lineNumber) 169 { 170 intptr_t sourceIDValue = sourceID.toIntPtr(); 171 JavaScriptDebugServer::shared().removeBreakpoint(sourceIDValue, lineNumber); 172 } 173 174 void InspectorBackend::pauseInDebugger() 175 { 176 JavaScriptDebugServer::shared().pauseProgram(); 177 } 178 179 void InspectorBackend::resumeDebugger() 180 { 181 if (m_inspectorController) 182 m_inspectorController->resumeDebugger(); 183 } 184 185 void InspectorBackend::stepOverStatementInDebugger() 186 { 187 JavaScriptDebugServer::shared().stepOverStatement(); 188 } 189 190 void InspectorBackend::stepIntoStatementInDebugger() 191 { 192 JavaScriptDebugServer::shared().stepIntoStatement(); 193 } 194 195 void InspectorBackend::stepOutOfFunctionInDebugger() 196 { 197 JavaScriptDebugServer::shared().stepOutOfFunction(); 198 } 199 200 bool InspectorBackend::pauseOnExceptions() 201 { 202 return JavaScriptDebugServer::shared().pauseOnExceptions(); 203 } 204 205 void InspectorBackend::setPauseOnExceptions(bool pause) 206 { 207 JavaScriptDebugServer::shared().setPauseOnExceptions(pause); 306 208 } 307 209 … … 313 215 } 314 216 217 void InspectorBackend::enableProfiler(bool always) 218 { 219 if (m_inspectorController) 220 m_inspectorController->enableProfiler(always); 221 } 222 223 void InspectorBackend::disableProfiler(bool always) 224 { 225 if (m_inspectorController) 226 m_inspectorController->disableProfiler(always); 227 } 228 229 void InspectorBackend::startProfiling() 230 { 231 if (m_inspectorController) 232 m_inspectorController->startUserInitiatedProfiling(); 233 } 234 235 void InspectorBackend::stopProfiling() 236 { 237 if (m_inspectorController) 238 m_inspectorController->stopUserInitiatedProfiling(); 239 } 240 315 241 void InspectorBackend::getProfileHeaders(long callId) 316 242 { … … 325 251 } 326 252 327 void InspectorBackend::enableDebugger(bool always)328 {329 if (m_inspectorController)330 m_inspectorController->enableDebuggerFromFrontend(always);331 }332 333 void InspectorBackend::disableDebugger(bool always)334 {335 if (m_inspectorController)336 m_inspectorController->disableDebugger(always);337 }338 339 bool InspectorBackend::debuggerEnabled() const340 {341 if (m_inspectorController)342 return m_inspectorController->debuggerEnabled();343 return false;344 }345 346 253 JavaScriptCallFrame* InspectorBackend::currentCallFrame() const 347 254 { 348 255 return JavaScriptDebugServer::shared().currentCallFrame(); 349 256 } 350 351 void InspectorBackend::addBreakpoint(const String& sourceID, unsigned lineNumber, const String& condition)352 {353 intptr_t sourceIDValue = sourceID.toIntPtr();354 JavaScriptDebugServer::shared().addBreakpoint(sourceIDValue, lineNumber, condition);355 }356 357 void InspectorBackend::updateBreakpoint(const String& sourceID, unsigned lineNumber, const String& condition)358 {359 intptr_t sourceIDValue = sourceID.toIntPtr();360 JavaScriptDebugServer::shared().updateBreakpoint(sourceIDValue, lineNumber, condition);361 }362 363 void InspectorBackend::removeBreakpoint(const String& sourceID, unsigned lineNumber)364 {365 intptr_t sourceIDValue = sourceID.toIntPtr();366 JavaScriptDebugServer::shared().removeBreakpoint(sourceIDValue, lineNumber);367 }368 369 bool InspectorBackend::pauseOnExceptions()370 {371 return JavaScriptDebugServer::shared().pauseOnExceptions();372 }373 374 void InspectorBackend::setPauseOnExceptions(bool pause)375 {376 JavaScriptDebugServer::shared().setPauseOnExceptions(pause);377 }378 379 void InspectorBackend::pauseInDebugger()380 {381 JavaScriptDebugServer::shared().pauseProgram();382 }383 384 void InspectorBackend::resumeDebugger()385 {386 if (m_inspectorController)387 m_inspectorController->resumeDebugger();388 }389 390 void InspectorBackend::stepOverStatementInDebugger()391 {392 JavaScriptDebugServer::shared().stepOverStatement();393 }394 395 void InspectorBackend::stepIntoStatementInDebugger()396 {397 JavaScriptDebugServer::shared().stepIntoStatement();398 }399 400 void InspectorBackend::stepOutOfFunctionInDebugger()401 {402 JavaScriptDebugServer::shared().stepOutOfFunction();403 }404 405 257 #endif 406 258 … … 494 346 } 495 347 496 void InspectorBackend::getCookies(long callId, const String& domain) 497 { 498 if (!m_inspectorController) 499 return; 500 m_inspectorController->getCookies(callId, domain); 501 } 502 503 void InspectorBackend::deleteCookie(const String& cookieName, const String& domain) 504 { 505 if (!m_inspectorController) 506 return; 507 m_inspectorController->deleteCookie(cookieName, domain); 508 } 509 510 void InspectorBackend::copyText(const String& text) 511 { 512 Pasteboard::generalPasteboard()->writePlainText(text); 513 } 514 515 void InspectorBackend::highlight(long nodeId) 348 void InspectorBackend::highlightDOMNode(long nodeId) 516 349 { 517 350 if (Node* node = nodeForId(nodeId)) … … 519 352 } 520 353 521 Node* InspectorBackend::nodeForId(long nodeId) 522 { 523 if (InspectorDOMAgent* domAgent = inspectorDOMAgent()) 524 return domAgent->nodeForId(nodeId); 525 return 0; 526 } 527 528 ScriptValue InspectorBackend::wrapObject(const ScriptValue& object, const String& objectGroup) 529 { 530 if (m_inspectorController) 531 return m_inspectorController->wrapObject(object, objectGroup); 532 return ScriptValue(); 533 } 534 535 ScriptValue InspectorBackend::unwrapObject(const String& objectId) 536 { 537 if (m_inspectorController) 538 return m_inspectorController->unwrapObject(objectId); 539 return ScriptValue(); 354 void InspectorBackend::hideDOMNodeHighlight() 355 { 356 if (m_inspectorController) 357 m_inspectorController->hideHighlight(); 358 } 359 360 void InspectorBackend::getCookies(long callId, const String& domain) 361 { 362 if (!m_inspectorController) 363 return; 364 m_inspectorController->getCookies(callId, domain); 365 } 366 367 void InspectorBackend::deleteCookie(const String& cookieName, const String& domain) 368 { 369 if (!m_inspectorController) 370 return; 371 m_inspectorController->deleteCookie(cookieName, domain); 540 372 } 541 373 … … 546 378 } 547 379 548 long InspectorBackend::pushNodePathToFrontend(Node* node, bool selectInUI) 549 { 550 InspectorFrontend* frontend = inspectorFrontend(); 551 InspectorDOMAgent* domAgent = inspectorDOMAgent(); 552 if (!domAgent || !frontend) 553 return 0; 554 long id = domAgent->pushNodePathToFrontend(node); 555 if (selectInUI) 556 frontend->updateFocusedNode(id); 557 return id; 558 } 559 560 void InspectorBackend::addNodesToSearchResult(const String& nodeIds) 561 { 562 if (InspectorFrontend* frontend = inspectorFrontend()) 563 frontend->addNodesToSearchResult(nodeIds); 380 void InspectorBackend::didEvaluateForTestInFrontend(long callId, const String& jsonResult) 381 { 382 if (m_inspectorController) 383 m_inspectorController->didEvaluateForTestInFrontend(callId, jsonResult); 564 384 } 565 385 566 386 #if ENABLE(DATABASE) 567 Database* InspectorBackend::databaseForId(long databaseId)568 {569 if (m_inspectorController)570 return m_inspectorController->databaseForId(databaseId);571 return 0;572 }573 574 void InspectorBackend::selectDatabase(Database* database)575 {576 if (m_inspectorController)577 m_inspectorController->selectDatabase(database);578 }579 580 387 void InspectorBackend::getDatabaseTableNames(long callId, long databaseId) 581 388 { … … 595 402 596 403 #if ENABLE(DOM_STORAGE) 597 void InspectorBackend::selectDOMStorage(Storage* storage)598 {599 if (m_inspectorController)600 m_inspectorController->selectDOMStorage(storage);601 }602 603 404 void InspectorBackend::getDOMStorageEntries(long callId, long storageId) 604 405 { … … 619 420 } 620 421 #endif 621 622 void InspectorBackend::didEvaluateForTestInFrontend(long callId, const String& jsonResult)623 {624 if (m_inspectorController)625 m_inspectorController->didEvaluateForTestInFrontend(callId, jsonResult);626 }627 628 void InspectorBackend::reportDidDispatchOnInjectedScript(long callId, const String& result, bool isException)629 {630 if (InspectorFrontend* frontend = inspectorFrontend())631 frontend->didDispatchOnInjectedScript(callId, result, isException);632 }633 422 634 423 InspectorDOMAgent* InspectorBackend::inspectorDOMAgent() … … 646 435 } 647 436 437 Node* InspectorBackend::nodeForId(long nodeId) 438 { 439 if (InspectorDOMAgent* domAgent = inspectorDOMAgent()) 440 return domAgent->nodeForId(nodeId); 441 return 0; 442 } 443 648 444 } // namespace WebCore 649 445 -
trunk/WebCore/inspector/InspectorBackend.h
r50639 r51528 40 40 class CachedResource; 41 41 class Database; 42 class InspectorClient;43 42 class InspectorDOMAgent; 43 class InspectorFrontend; 44 44 class JavaScriptCallFrame; 45 45 class Node; … … 49 49 { 50 50 public: 51 static PassRefPtr<InspectorBackend> create(InspectorController* inspectorController , InspectorClient* client)51 static PassRefPtr<InspectorBackend> create(InspectorController* inspectorController) 52 52 { 53 return adoptRef(new InspectorBackend(inspectorController , client));53 return adoptRef(new InspectorBackend(inspectorController)); 54 54 } 55 55 … … 57 57 58 58 InspectorController* inspectorController() { return m_inspectorController; } 59 60 59 void disconnectController() { m_inspectorController = 0; } 61 60 62 void hideDOMNodeHighlight();63 64 String localizedStringsURL();65 String hiddenPanels();66 67 void windowUnloading();68 69 bool isWindowVisible();70 71 void addResourceSourceToFrame(long identifier, Node* frame);72 bool addSourceToFrame(const String& mimeType, const String& source, Node* frame);73 74 61 void clearMessages(bool clearUI); 62 void storeLastActivePanel(const String& panelName); 75 63 76 64 void toggleNodeSearch(); 77 78 void attach();79 void detach();80 81 void setAttachedWindowHeight(unsigned height);82 83 void storeLastActivePanel(const String& panelName);84 85 65 bool searchingForNode(); 86 87 void loaded();88 66 89 67 void enableResourceTracking(bool always); … … 91 69 bool resourceTrackingEnabled() const; 92 70 93 void moveWindowBy(float x, float y) const;94 void closeWindow();95 96 const String& platform() const;97 const String& port() const;98 99 71 void startTimelineProfiler(); 100 72 void stopTimelineProfiler(); 101 73 102 74 #if ENABLE(JAVASCRIPT_DEBUGGER) 103 void startProfiling(); 104 void stopProfiling(); 105 106 void enableProfiler(bool always); 107 void disableProfiler(bool always); 108 bool profilerEnabled(); 109 110 void getProfileHeaders(long callId); 111 void getProfile(long callId, unsigned uid); 112 75 bool debuggerEnabled() const; 113 76 void enableDebugger(bool always); 114 77 void disableDebugger(bool always); 115 bool debuggerEnabled() const;116 117 JavaScriptCallFrame* currentCallFrame() const;118 78 119 79 void addBreakpoint(const String& sourceID, unsigned lineNumber, const String& condition); … … 121 81 void removeBreakpoint(const String& sourceID, unsigned lineNumber); 122 82 83 void pauseInDebugger(); 84 void resumeDebugger(); 85 123 86 bool pauseOnExceptions(); 124 87 void setPauseOnExceptions(bool pause); 125 126 void pauseInDebugger();127 void resumeDebugger();128 88 129 89 void stepOverStatementInDebugger(); 130 90 void stepIntoStatementInDebugger(); 131 91 void stepOutOfFunctionInDebugger(); 92 93 bool profilerEnabled(); 94 void enableProfiler(bool always); 95 void disableProfiler(bool always); 96 97 void startProfiling(); 98 void stopProfiling(); 99 100 void getProfileHeaders(long callId); 101 void getProfile(long callId, unsigned uid); 102 103 JavaScriptCallFrame* currentCallFrame() const; 132 104 #endif 133 105 … … 140 112 void copyNode(long nodeId); 141 113 void removeNode(long callId, long nodeId); 114 void highlightDOMNode(long nodeId); 115 void hideDOMNodeHighlight(); 142 116 143 117 void getCookies(long callId, const String& domain); 144 118 void deleteCookie(const String& cookieName, const String& domain); 145 119 146 void copyText(const String& text); 120 // Generic code called from custom implementations. 121 void releaseWrapperObjectGroup(const String& objectGroup); 122 void didEvaluateForTestInFrontend(long callId, const String& jsonResult); 147 123 148 // Generic code called from custom implementations.149 void highlight(long nodeId);150 Node* nodeForId(long nodeId);151 ScriptValue wrapObject(const ScriptValue& object, const String& objectGroup);152 ScriptValue unwrapObject(const String& objectId);153 void releaseWrapperObjectGroup(const String& objectGroup);154 long pushNodePathToFrontend(Node* node, bool selectInUI);155 void addNodesToSearchResult(const String& nodeIds);156 124 #if ENABLE(DATABASE) 157 Database* databaseForId(long databaseId);158 void selectDatabase(Database* database);159 125 void getDatabaseTableNames(long callId, long databaseId); 160 126 #endif 127 161 128 #if ENABLE(DOM_STORAGE) 162 void selectDOMStorage(Storage* storage);163 129 void getDOMStorageEntries(long callId, long storageId); 164 130 void setDOMStorageItem(long callId, long storageId, const String& key, const String& value); 165 131 void removeDOMStorageItem(long callId, long storageId, const String& key); 166 132 #endif 167 void reportDidDispatchOnInjectedScript(long callId, const String& result, bool isException);168 void didEvaluateForTestInFrontend(long callId, const String& jsonResult);169 133 170 134 private: 171 InspectorBackend(InspectorController* inspectorController , InspectorClient* client);135 InspectorBackend(InspectorController* inspectorController); 172 136 InspectorDOMAgent* inspectorDOMAgent(); 173 137 InspectorFrontend* inspectorFrontend(); 138 Node* nodeForId(long nodeId); 174 139 175 140 InspectorController* m_inspectorController; 176 InspectorClient* m_client;177 141 }; 178 142 -
trunk/WebCore/inspector/InspectorBackend.idl
r50639 r51528 35 35 GenerateConstructor 36 36 ] InspectorBackend { 37 void hideDOMNodeHighlight(); 38 [Custom] void highlightDOMNode(in long nodeId); 39 void loaded(); 40 void windowUnloading(); 41 void attach(); 42 void detach(); 37 void clearMessages(in boolean clearUI); 38 void storeLastActivePanel(in DOMString panelName); 43 39 44 void closeWindow();45 void clearMessages(in boolean clearUI);46 40 void toggleNodeSearch(); 47 48 boolean isWindowVisible();49 41 boolean searchingForNode(); 50 42 51 void addResourceSourceToFrame(in long identifier, in Node frame);52 boolean addSourceToFrame(in DOMString mimeType, in DOMString sourceValue, in Node frame);53 [Custom] void search(in Node node, in DOMString query);54 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE55 void getDatabaseTableNames(in long callId, in long databaseId);56 #endif57 58 [Custom] DOMObject setting(in DOMString key);59 [Custom] void setSetting(in DOMString key, in DOMObject value);60 [Custom] DOMWindow inspectedWindow();61 DOMString localizedStringsURL();62 DOMString hiddenPanels();63 DOMString platform();64 DOMString port();65 void startTimelineProfiler();66 void stopTimelineProfiler();67 [ImplementationFunction=moveWindowBy] void moveByUnrestricted(in float x, in float y);68 void setAttachedWindowHeight(in unsigned long height);69 [Custom] DOMObject wrapCallback(in DOMObject callback);70 43 boolean resourceTrackingEnabled(); 71 44 void enableResourceTracking(in boolean always); 72 45 void disableResourceTracking(in boolean always); 73 void storeLastActivePanel(in DOMString panelName); 46 47 void startTimelineProfiler(); 48 void stopTimelineProfiler(); 74 49 75 50 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER … … 88 63 void stepIntoStatementInDebugger(); 89 64 void stepOutOfFunctionInDebugger(); 90 91 [Custom] DOMObject currentCallFrame();92 65 93 66 boolean pauseOnExceptions(); … … 112 85 void copyNode(in long nodeId); 113 86 void removeNode(in long callId, in long nodeId); 87 void highlightDOMNode(in long nodeId); 88 void hideDOMNodeHighlight(); 114 89 115 90 void getCookies(in long callId, in DOMString domain); 116 91 void deleteCookie(in DOMString cookieName, in DOMString domain); 117 92 118 // Called from InjectedScript.119 // TODO: extract into a separate IDL.120 void copyText(in DOMString text);121 [Custom] DOMObject nodeForId(in long nodeId);122 [Custom] long wrapObject(in DOMObject object, in DOMString objectGroup);123 [Custom] DOMObject unwrapObject(in long objectId);124 93 void releaseWrapperObjectGroup(in DOMString objectGroup); 125 [Custom] int pushNodePathToFrontend(in DOMObject node, in boolean selectInUI);126 void addNodesToSearchResult(in DOMString nodeIds); 94 void didEvaluateForTestInFrontend(in long callId, in DOMString jsonResult); 95 127 96 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE 128 [Custom] void selectDatabase(in DOMObject database); 129 [Custom] DOMObject databaseForId(in long databaseId); 97 void getDatabaseTableNames(in long callId, in long databaseId); 130 98 #endif 99 131 100 #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE 132 [Custom] void selectDOMStorage(in DOMObject storage);133 101 void getDOMStorageEntries(in long callId, in long storageId); 134 102 void setDOMStorageItem(in long callId, in long storageId, in DOMString key, in DOMString value); 135 103 void removeDOMStorageItem(in long callId, in long storageId, in DOMString key); 136 104 #endif 137 void reportDidDispatchOnInjectedScript(in long callId, in DOMString result, in boolean isException);138 void didEvaluateForTestInFrontend(in long callId, in DOMString jsonResult);139 105 }; 140 106 } -
trunk/WebCore/inspector/InspectorController.cpp
r51512 r51528 54 54 #include "HitTestResult.h" 55 55 #include "InspectorBackend.h" 56 #include "InjectedScriptHost.h" 56 57 #include "InspectorClient.h" 57 58 #include "InspectorFrontend.h" 59 #include "InspectorFrontendHost.h" 58 60 #include "InspectorDatabaseResource.h" 59 61 #include "InspectorDOMAgent.h" … … 135 137 , m_resourceTrackingEnabled(false) 136 138 , m_resourceTrackingSettingsLoaded(false) 137 , m_inspectorBackend(InspectorBackend::create(this, client)) 139 , m_inspectorBackend(InspectorBackend::create(this)) 140 , m_inspectorFrontendHost(InspectorFrontendHost::create(this, client)) 141 , m_injectedScriptHost(InjectedScriptHost::create(this)) 138 142 , m_lastBoundObjectId(1) 139 143 #if ENABLE(JAVASCRIPT_DEBUGGER) … … 175 179 176 180 m_inspectorBackend->disconnectController(); 181 m_inspectorFrontendHost->disconnectController(); 182 m_injectedScriptHost->disconnectController(); 177 183 } 178 184 … … 181 187 close(); 182 188 183 if (m_scriptState) 184 ScriptGlobalObject::remove(m_scriptState, "InspectorController"); 185 189 if (m_scriptState) { 190 ScriptGlobalObject::remove(m_scriptState, "InspectorBackend"); 191 ScriptGlobalObject::remove(m_scriptState, "InspectorFrontendHost"); 192 ScriptGlobalObject::remove(m_scriptState, "InjectedScriptHost"); 193 } 186 194 ASSERT(m_inspectedPage); 187 195 m_inspectedPage = 0; … … 523 531 m_page->mainFrame()->document()->securityOrigin()->grantUniversalAccess(); 524 532 m_scriptState = scriptStateFromPage(debuggerWorld(), m_page); 525 ScriptGlobalObject::set(m_scriptState, "InspectorController", m_inspectorBackend.get()); 533 ScriptGlobalObject::set(m_scriptState, "InspectorBackend", m_inspectorBackend.get()); 534 ScriptGlobalObject::set(m_scriptState, "InspectorFrontendHost", m_inspectorFrontendHost.get()); 535 ScriptGlobalObject::set(m_scriptState, "InjectedScriptHost", m_injectedScriptHost.get()); 526 536 } 527 537 -
trunk/WebCore/inspector/InspectorController.h
r51440 r51528 63 63 class GraphicsContext; 64 64 class HitTestResult; 65 class InjectedScriptHost; 65 66 class InspectorBackend; 66 67 class InspectorClient; 67 68 class InspectorDOMAgent; 68 69 class InspectorFrontend; 70 class InspectorFrontendHost; 69 71 class InspectorTimelineAgent; 70 72 class JavaScriptCallFrame; … … 167 169 168 170 InspectorBackend* inspectorBackend() { return m_inspectorBackend.get(); } 171 InspectorFrontendHost* inspectorFrontendHost() { return m_inspectorFrontendHost.get(); } 172 InjectedScriptHost* injectedScriptHost() { return m_injectedScriptHost.get(); } 169 173 170 174 void inspectedPageDestroyed(); … … 295 299 private: 296 300 friend class InspectorBackend; 301 friend class InspectorFrontendHost; 302 friend class InjectedScriptHost; 297 303 // Following are used from InspectorBackend and internally. 298 304 void scriptObjectReady(); … … 388 394 bool m_resourceTrackingSettingsLoaded; 389 395 RefPtr<InspectorBackend> m_inspectorBackend; 396 RefPtr<InspectorFrontendHost> m_inspectorFrontendHost; 397 RefPtr<InjectedScriptHost> m_injectedScriptHost; 390 398 HashMap<String, ScriptValue> m_idToWrappedObject; 391 399 ObjectGroupsMap m_objectGroups; -
trunk/WebCore/inspector/InspectorFrontendHost.h
r51527 r51528 1 1 /* 2 * Copyright (C) 2007 , 2008 Apple Inc.All rights reserved.2 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 7 7 * 8 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution. 13 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 14 * its contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 15 * from this software without specific prior written permission. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 27 27 */ 28 28 29 WebInspector.Database = function(id, domain, name, version) 29 #ifndef InspectorFrontendHost_h 30 #define InspectorFrontendHost_h 31 32 #include "Console.h" 33 #include "InspectorController.h" 34 #include "PlatformString.h" 35 36 #include <wtf/RefCounted.h> 37 38 namespace WebCore { 39 40 class InspectorClient; 41 class Node; 42 43 class InspectorFrontendHost : public RefCounted<InspectorFrontendHost> 30 44 { 31 this._id = id; 32 this._domain = domain;33 this._name = name;34 this._version = version;35 }45 public: 46 static PassRefPtr<InspectorFrontendHost> create(InspectorController* inspectorController, InspectorClient* client) 47 { 48 return adoptRef(new InspectorFrontendHost(inspectorController, client)); 49 } 36 50 37 WebInspector.Database.prototype = { 38 get id() 39 { 40 return this._id; 41 }, 51 ~InspectorFrontendHost(); 42 52 43 get name() 44 { 45 return this._name; 46 }, 53 InspectorController* inspectorController() { return m_inspectorController; } 54 void disconnectController() { m_inspectorController = 0; } 47 55 48 set name(x) 49 { 50 this._name = x; 51 }, 56 void loaded(); 57 void attach(); 58 void detach(); 59 void closeWindow(); 60 void windowUnloading(); 52 61 53 get version() 54 { 55 return this._version; 56 }, 62 void setAttachedWindowHeight(unsigned height); 63 void moveWindowBy(float x, float y) const; 57 64 58 set version(x)59 {60 this._version = x;61 },65 String localizedStringsURL(); 66 String hiddenPanels(); 67 const String& platform() const; 68 const String& port() const; 62 69 63 get domain() 64 { 65 return this._domain; 66 }, 70 void addResourceSourceToFrame(long identifier, Node* frame); 71 bool addSourceToFrame(const String& mimeType, const String& source, Node* frame); 67 72 68 set domain(x) 69 { 70 this._domain = x; 71 }, 73 private: 74 InspectorFrontendHost(InspectorController* inspectorController, InspectorClient* client); 72 75 73 get displayDomain() 74 { 75 return WebInspector.Resource.prototype.__lookupGetter__("displayDomain").call(this); 76 }, 76 InspectorController* m_inspectorController; 77 InspectorClient* m_client; 78 }; 77 79 78 getTableNames: function(callback) 79 { 80 function sortingCallback(names) 81 { 82 callback(names.sort()); 83 } 84 var callId = WebInspector.Callback.wrap(sortingCallback); 85 InspectorController.getDatabaseTableNames(callId, this._id); 86 }, 87 88 executeSql: function(query, onSuccess, onError) 89 { 90 function callback(result) 91 { 92 if (!(result instanceof Array)) { 93 onError(result); 94 return; 95 } 96 onSuccess(result); 97 } 98 InjectedScriptAccess.executeSql(this._id, query, callback); 99 } 100 } 80 } // namespace WebCore 101 81 102 WebInspector.didGetDatabaseTableNames = WebInspector.Callback.processCallback; 82 #endif // !defined(InspectorFrontendHost_h) -
trunk/WebCore/inspector/InspectorFrontendHost.idl
r51527 r51528 1 1 /* 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 2 4 * Copyright (C) 2009 Google Inc. All rights reserved. 3 5 * … … 29 31 */ 30 32 31 WebInspector.TestController = function(callId) 32 { 33 this._callId = callId; 34 this._waitUntilDone = false; 33 module core { 34 interface [ 35 GenerateConstructor 36 ] InspectorFrontendHost { 37 void loaded(); 38 void attach(); 39 void detach(); 40 void closeWindow(); 41 void windowUnloading(); 42 43 void setAttachedWindowHeight(in unsigned long height); 44 void moveWindowBy(in float x, in float y); 45 46 DOMString localizedStringsURL(); 47 DOMString hiddenPanels(); 48 DOMString platform(); 49 DOMString port(); 50 51 void addResourceSourceToFrame(in long identifier, in Node frame); 52 boolean addSourceToFrame(in DOMString mimeType, in DOMString sourceValue, in Node frame); 53 54 [Custom] void search(in Node node, in DOMString query); 55 [Custom] DOMObject setting(in DOMString key); 56 [Custom] void setSetting(in DOMString key, in DOMObject value); 57 }; 35 58 } 36 37 WebInspector.TestController.prototype = {38 waitUntilDone: function()39 {40 this._waitUntilDone = true;41 },42 43 notifyDone: function(result)44 {45 var message = typeof result === "undefined" ? "\"<undefined>\"" : JSON.stringify(result);46 InspectorController.didEvaluateForTestInFrontend(this._callId, message);47 },48 49 runAfterPendingDispatches: function(callback)50 {51 if (WebInspector.pendingDispatches === 0) {52 callback();53 return;54 }55 setTimeout(this.runAfterPendingDispatches.bind(this), 0, callback);56 }57 }58 59 WebInspector.evaluateForTestInFrontend = function(callId, script)60 {61 var controller = new WebInspector.TestController(callId);62 function invokeMethod()63 {64 try {65 var result;66 if (window[script] && typeof window[script] === "function")67 result = window[script].call(WebInspector, controller);68 else69 result = window.eval(script);70 71 if (!controller._waitUntilDone)72 controller.notifyDone(result);73 } catch (e) {74 controller.notifyDone(e.toString());75 }76 }77 controller.runAfterPendingDispatches(invokeMethod);78 } -
trunk/WebCore/inspector/front-end/Breakpoint.js
r48392 r51528 90 90 91 91 if (this.enabled) 92 Inspector Controller.updateBreakpoint(this.sourceID, this.line, c);92 InspectorBackend.updateBreakpoint(this.sourceID, this.line, c); 93 93 } 94 94 } -
trunk/WebCore/inspector/front-end/BreakpointsSidebarPane.js
r50881 r51528 59 59 } 60 60 61 if (!Inspector Controller.debuggerEnabled() || !breakpoint.sourceID)61 if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) 62 62 return; 63 63 64 64 if (breakpoint.enabled) 65 Inspector Controller.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition);65 InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); 66 66 }, 67 67 … … 136 136 } 137 137 138 if (!Inspector Controller.debuggerEnabled() || !breakpoint.sourceID)138 if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) 139 139 return; 140 140 141 Inspector Controller.removeBreakpoint(breakpoint.sourceID, breakpoint.line);141 InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line); 142 142 }, 143 143 … … 149 149 checkbox.checked = breakpoint.enabled; 150 150 151 if (!Inspector Controller.debuggerEnabled() || !breakpoint.sourceID)151 if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) 152 152 return; 153 153 154 154 if (breakpoint.enabled) 155 Inspector Controller.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition);155 InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); 156 156 else 157 Inspector Controller.removeBreakpoint(breakpoint.sourceID, breakpoint.line);157 InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line); 158 158 }, 159 159 -
trunk/WebCore/inspector/front-end/ConsoleView.js
r51506 r51528 286 286 { 287 287 if (clearInspectorController) 288 Inspector Controller.clearMessages(false);288 InspectorBackend.clearMessages(false); 289 289 if (WebInspector.panels.resources) 290 290 WebInspector.panels.resources.clearMessages(); -
trunk/WebCore/inspector/front-end/CookieItemsView.js
r50613 r51528 268 268 { 269 269 var cookie = node.cookie; 270 Inspector Controller.deleteCookie(cookie.name, this._cookieDomain);270 InspectorBackend.deleteCookie(cookie.name, this._cookieDomain); 271 271 this.update(); 272 272 }, -
trunk/WebCore/inspector/front-end/DOMAgent.js
r50574 r51528 328 328 } 329 329 var callId = WebInspector.Callback.wrap(mycallback); 330 Inspector Controller.getChildNodes(callId, parent.id);330 InspectorBackend.getChildNodes(callId, parent.id); 331 331 }, 332 332 … … 334 334 { 335 335 var mycallback = this._didApplyDomChange.bind(this, node, callback); 336 Inspector Controller.setAttribute(WebInspector.Callback.wrap(mycallback), node.id, name, value);336 InspectorBackend.setAttribute(WebInspector.Callback.wrap(mycallback), node.id, name, value); 337 337 }, 338 338 … … 340 340 { 341 341 var mycallback = this._didApplyDomChange.bind(this, node, callback); 342 Inspector Controller.removeAttribute(WebInspector.Callback.wrap(mycallback), node.id, name);342 InspectorBackend.removeAttribute(WebInspector.Callback.wrap(mycallback), node.id, name); 343 343 }, 344 344 … … 346 346 { 347 347 var mycallback = this._didApplyDomChange.bind(this, node, callback); 348 Inspector Controller.setTextNodeValue(WebInspector.Callback.wrap(mycallback), node.id, text);348 InspectorBackend.setTextNodeValue(WebInspector.Callback.wrap(mycallback), node.id, text); 349 349 }, 350 350 … … 448 448 } 449 449 var callId = WebInspector.Callback.wrap(mycallback); 450 Inspector Controller.getCookies(callId, cookieDomain);450 InspectorBackend.getCookies(callId, cookieDomain); 451 451 } 452 452 … … 478 478 479 479 var callId = WebInspector.Callback.wrap(callback); 480 Inspector Controller.getEventListenersForNode(callId, node.id);480 InspectorBackend.getEventListenersForNode(callId, node.id); 481 481 } 482 482 -
trunk/WebCore/inspector/front-end/DOMStorage.js
r48659 r51528 58 58 { 59 59 var callId = WebInspector.Callback.wrap(callback); 60 Inspector Controller.getDOMStorageEntries(callId, this._id);60 InspectorBackend.getDOMStorageEntries(callId, this._id); 61 61 }, 62 62 … … 64 64 { 65 65 var callId = WebInspector.Callback.wrap(callback); 66 Inspector Controller.setDOMStorageItem(callId, this._id, key, value);66 InspectorBackend.setDOMStorageItem(callId, this._id, key, value); 67 67 }, 68 68 … … 70 70 { 71 71 var callId = WebInspector.Callback.wrap(callback); 72 Inspector Controller.removeDOMStorageItem(callId, this._id, key);72 InspectorBackend.removeDOMStorageItem(callId, this._id, key); 73 73 } 74 74 } -
trunk/WebCore/inspector/front-end/Database.js
r49234 r51528 83 83 } 84 84 var callId = WebInspector.Callback.wrap(sortingCallback); 85 Inspector Controller.getDatabaseTableNames(callId, this._id);85 InspectorBackend.getDatabaseTableNames(callId, this._id); 86 86 }, 87 87 -
trunk/WebCore/inspector/front-end/ElementsPanel.js
r51250 r51528 59 59 this.panel.updateEventListeners(); 60 60 61 if (Inspector Controller.searchingForNode()) {62 Inspector Controller.toggleNodeSearch();61 if (InspectorBackend.searchingForNode()) { 62 InspectorBackend.toggleNodeSearch(); 63 63 this.panel.nodeSearchButton.toggled = false; 64 64 } … … 151 151 WebInspector.hoveredDOMNode = null; 152 152 153 if (Inspector Controller.searchingForNode()) {154 Inspector Controller.toggleNodeSearch();153 if (InspectorBackend.searchingForNode()) { 154 InspectorBackend.toggleNodeSearch(); 155 155 this.nodeSearchButton.toggled = false; 156 156 } … … 170 170 WebInspector.hoveredDOMNode = null; 171 171 172 if (Inspector Controller.searchingForNode()) {173 Inspector Controller.toggleNodeSearch();172 if (InspectorBackend.searchingForNode()) { 173 InspectorBackend.toggleNodeSearch(); 174 174 this.nodeSearchButton.toggled = false; 175 175 } … … 182 182 var domWindow = WebInspector.domAgent.domWindow; 183 183 if (!domWindow || !domWindow.document || !domWindow.document.firstChild) 184 return;185 186 // If the window isn't visible, return early so the DOM tree isn't built187 // and mutation event listeners are not added.188 if (!InspectorController.isWindowVisible())189 184 return; 190 185 … … 1024 1019 event.clipboardData.clearData(); 1025 1020 event.preventDefault(); 1026 Inspector Controller.copyNode(this.focusedDOMNode.id);1021 InspectorBackend.copyNode(this.focusedDOMNode.id); 1027 1022 }, 1028 1023 … … 1053 1048 _nodeSearchButtonClicked: function(event) 1054 1049 { 1055 Inspector Controller.toggleNodeSearch();1056 1057 this.nodeSearchButton.toggled = Inspector Controller.searchingForNode();1050 InspectorBackend.toggleNodeSearch(); 1051 1052 this.nodeSearchButton.toggled = InspectorBackend.searchingForNode(); 1058 1053 } 1059 1054 } -
trunk/WebCore/inspector/front-end/ElementsTreeOutline.js
r51420 r51528 84 84 85 85 if (x && !this.suppressSelectHighlight) { 86 Inspector Controller.highlightDOMNode(x.id);86 InspectorBackend.highlightDOMNode(x.id); 87 87 88 88 if ("_restorePreviousHighlightNodeTimeout" in this) … … 93 93 var hoveredNode = WebInspector.hoveredDOMNode; 94 94 if (hoveredNode) 95 Inspector Controller.highlightDOMNode(hoveredNode.id);95 InspectorBackend.highlightDOMNode(hoveredNode.id); 96 96 else 97 Inspector Controller.hideDOMNodeHighlight();97 InspectorBackend.hideDOMNodeHighlight(); 98 98 } 99 99 … … 946 946 947 947 var callId = WebInspector.Callback.wrap(removeNodeCallback); 948 Inspector Controller.removeNode(callId, this.representedObject.id);948 InspectorBackend.removeNode(callId, this.representedObject.id); 949 949 } 950 950 } -
trunk/WebCore/inspector/front-end/EventListenersSidebarPane.js
r49962 r51528 109 109 Preferences.eventListenersFilter = selectedOption.value; 110 110 111 Inspector Controller.setSetting("event-listeners-filter", Preferences.eventListenersFilter);111 InspectorFrontendHost.setSetting("event-listeners-filter", Preferences.eventListenersFilter); 112 112 113 113 for (var i = 0; i < this.sections.length; ++i) -
trunk/WebCore/inspector/front-end/InjectedScript.js
r51506 r51528 562 562 var result = {}; 563 563 try { 564 result.value = In spectorController.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression), objectGroup);564 result.value = InjectedScriptHost.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression), objectGroup); 565 565 // Handle error that might have happened while describing result. 566 566 if (result.value.errorText) { … … 647 647 node[searchResultsProperty] = true; 648 648 InjectedScript._searchResults.push(node); 649 var nodeId = In spectorController.pushNodePathToFrontend(node, false);649 var nodeId = InjectedScriptHost.pushNodePathToFrontend(node, false); 650 650 nodeIds.push(nodeId); 651 651 } 652 In spectorController.addNodesToSearchResult(nodeIds.join(","));652 InjectedScriptHost.addNodesToSearchResult(nodeIds.join(",")); 653 653 } 654 654 … … 849 849 InjectedScript.getCallFrames = function() 850 850 { 851 var callFrame = In spectorController.currentCallFrame();851 var callFrame = InjectedScriptHost.currentCallFrame(); 852 852 if (!callFrame) 853 853 return false; … … 872 872 InjectedScript._callFrameForId = function(id) 873 873 { 874 var callFrame = In spectorController.currentCallFrame();874 var callFrame = InjectedScriptHost.currentCallFrame(); 875 875 while (--id >= 0 && callFrame) 876 876 callFrame = callFrame.caller; … … 880 880 InjectedScript._clearConsoleMessages = function() 881 881 { 882 In spectorController.clearMessages(true);882 InjectedScriptHost.clearMessages(true); 883 883 } 884 884 … … 891 891 inspectedWindow.console.log(o); 892 892 if (Object.type(o) === "node") { 893 In spectorController.pushNodePathToFrontend(o, true);893 InjectedScriptHost.pushNodePathToFrontend(o, true); 894 894 } else { 895 895 switch (Object.describe(o)) { 896 896 case "Database": 897 In spectorController.selectDatabase(o);897 InjectedScriptHost.selectDatabase(o); 898 898 break; 899 899 case "Storage": 900 In spectorController.selectDOMStorage(o);900 InjectedScriptHost.selectDOMStorage(o); 901 901 break; 902 902 } … … 907 907 { 908 908 if (Object.type(o) === "node") { 909 var nodeId = In spectorController.pushNodePathToFrontend(o, false);910 In spectorController.copyNode(nodeId);909 var nodeId = InjectedScriptHost.pushNodePathToFrontend(o, false); 910 InjectedScriptHost.copyNode(nodeId); 911 911 } else { 912 In spectorController.copyText(o);912 InjectedScriptHost.copyText(o); 913 913 } 914 914 } … … 987 987 };"); 988 988 989 inspectorCommandLineAPI.clear = In spectorController.wrapCallback(InjectedScript._clearConsoleMessages);990 inspectorCommandLineAPI.inspect = In spectorController.wrapCallback(InjectedScript._inspectObject);991 inspectorCommandLineAPI.copy = In spectorController.wrapCallback(InjectedScript._copy);989 inspectorCommandLineAPI.clear = InjectedScriptHost.wrapCallback(InjectedScript._clearConsoleMessages); 990 inspectorCommandLineAPI.inspect = InjectedScriptHost.wrapCallback(InjectedScript._inspectObject); 991 inspectorCommandLineAPI.copy = InjectedScriptHost.wrapCallback(InjectedScript._copy); 992 992 } 993 993 … … 1013 1013 // TODO: replace with 'return window;' once this script is injected into 1014 1014 // the page's context. 1015 return In spectorController.inspectedWindow();1015 return InjectedScriptHost.inspectedWindow(); 1016 1016 } 1017 1017 … … 1020 1020 if (!nodeId) 1021 1021 return null; 1022 return In spectorController.nodeForId(nodeId);1022 return InjectedScriptHost.nodeForId(nodeId); 1023 1023 } 1024 1024 … … 1032 1032 return InjectedScript._nodeForId(objectId); 1033 1033 } else if (typeof objectId === "string") { 1034 return In spectorController.unwrapObject(objectId);1034 return InjectedScriptHost.unwrapObject(objectId); 1035 1035 } else if (typeof objectId === "object") { 1036 1036 var callFrame = InjectedScript._callFrameForId(objectId.callFrame); … … 1048 1048 if (!object || Object.type(object) !== "node") 1049 1049 return false; 1050 return In spectorController.pushNodePathToFrontend(object, false);1050 return InjectedScriptHost.pushNodePathToFrontend(object, false); 1051 1051 } 1052 1052 … … 1131 1131 } 1132 1132 } 1133 In spectorController.reportDidDispatchOnInjectedScript(callId, JSON.stringify(result), false);1133 InjectedScriptHost.reportDidDispatchOnInjectedScript(callId, JSON.stringify(result), false); 1134 1134 } 1135 1135 1136 1136 function errorCallback(tx, error) 1137 1137 { 1138 In spectorController.reportDidDispatchOnInjectedScript(callId, JSON.stringify(error), false);1138 InjectedScriptHost.reportDidDispatchOnInjectedScript(callId, JSON.stringify(error), false); 1139 1139 } 1140 1140 1141 1141 function queryTransaction(tx) 1142 1142 { 1143 tx.executeSql(query, null, In spectorController.wrapCallback(successCallback), InspectorController.wrapCallback(errorCallback));1144 } 1145 1146 var database = In spectorController.databaseForId(databaseId);1143 tx.executeSql(query, null, InjectedScriptHost.wrapCallback(successCallback), InjectedScriptHost.wrapCallback(errorCallback)); 1144 } 1145 1146 var database = InjectedScriptHost.databaseForId(databaseId); 1147 1147 if (!database) 1148 1148 errorCallback(null, { code : 2 }); // Return as unexpected version. 1149 database.transaction(In spectorController.wrapCallback(queryTransaction), InspectorController.wrapCallback(errorCallback));1149 database.transaction(InjectedScriptHost.wrapCallback(queryTransaction), InjectedScriptHost.wrapCallback(errorCallback)); 1150 1150 return true; 1151 1151 } -
trunk/WebCore/inspector/front-end/InjectedScriptAccess.js
r51453 r51528 48 48 } 49 49 var callId = WebInspector.Callback.wrap(myCallback); 50 Inspector Controller.dispatchOnInjectedScript(callId, methodName, argsString, !!async);50 InspectorBackend.dispatchOnInjectedScript(callId, methodName, argsString, !!async); 51 51 }; 52 52 } -
trunk/WebCore/inspector/front-end/InspectorBackendStub.js
r51527 r51528 29 29 */ 30 30 31 if (!window.Inspector Controller) {32 33 WebInspector.Inspector ControllerStub = function()31 if (!window.InspectorBackend) { 32 33 WebInspector.InspectorBackendStub = function() 34 34 { 35 35 this._searchingForNode = false; 36 this._windowVisible = true;37 36 this._attachedWindowHeight = 0; 38 37 this._debuggerEnabled = true; … … 43 42 } 44 43 45 WebInspector.Inspector ControllerStub.prototype = {44 WebInspector.InspectorBackendStub.prototype = { 46 45 wrapCallback: function(func) 47 46 { 48 47 return func; 49 },50 51 isWindowVisible: function()52 {53 return this._windowVisible;54 48 }, 55 49 … … 292 286 } 293 287 294 window.InspectorController = new WebInspector.InspectorControllerStub();288 InspectorBackend = new WebInspector.InspectorBackendStub(); 295 289 296 290 } -
trunk/WebCore/inspector/front-end/InspectorControllerStub.js
r50528 r51528 1 /*2 * Copyright (C) 2009 Google Inc. All rights reserved.3 *4 * Redistribution and use in source and binary forms, with or without5 * modification, are permitted provided that the following conditions are6 * met:7 *8 * * Redistributions of source code must retain the above copyright9 * notice, this list of conditions and the following disclaimer.10 * * Redistributions in binary form must reproduce the above11 * copyright notice, this list of conditions and the following disclaimer12 * in the documentation and/or other materials provided with the13 * distribution.14 * * Neither the name of Google Inc. nor the names of its15 * contributors may be used to endorse or promote products derived from16 * this software without specific prior written permission.17 *18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.29 */30 31 if (!window.InspectorController) {32 33 WebInspector.InspectorControllerStub = function()34 {35 this._searchingForNode = false;36 this._windowVisible = true;37 this._attachedWindowHeight = 0;38 this._debuggerEnabled = true;39 this._profilerEnabled = true;40 this._resourceTrackingEnabled = false;41 this._timelineEnabled = false;42 this._settings = {};43 }44 45 WebInspector.InspectorControllerStub.prototype = {46 wrapCallback: function(func)47 {48 return func;49 },50 51 isWindowVisible: function()52 {53 return this._windowVisible;54 },55 56 platform: function()57 {58 return "mac-leopard";59 },60 61 port: function()62 {63 return "unknown";64 },65 66 67 closeWindow: function()68 {69 this._windowVisible = false;70 },71 72 attach: function()73 {74 },75 76 detach: function()77 {78 },79 80 storeLastActivePanel: function(panel)81 {82 },83 84 clearMessages: function()85 {86 },87 88 searchingForNode: function()89 {90 return this._searchingForNode;91 },92 93 search: function(sourceRow, query)94 {95 },96 97 toggleNodeSearch: function()98 {99 this._searchingForNode = !this._searchingForNode;100 },101 102 setAttachedWindowHeight: function(height)103 {104 },105 106 moveByUnrestricted: function(x, y)107 {108 },109 110 111 addResourceSourceToFrame: function(identifier, element)112 {113 },114 115 addSourceToFrame: function(mimeType, source, element)116 {117 return false;118 },119 120 getResourceDocumentNode: function(identifier)121 {122 return undefined;123 },124 125 highlightDOMNode: function(node)126 {127 },128 129 hideDOMNodeHighlight: function()130 {131 },132 133 inspectedWindow: function()134 {135 return window;136 },137 138 loaded: function()139 {140 },141 142 localizedStringsURL: function()143 {144 return undefined;145 },146 147 windowUnloading: function()148 {149 return false;150 },151 152 hiddenPanels: function()153 {154 return "";155 },156 157 debuggerEnabled: function()158 {159 return this._debuggerEnabled;160 },161 162 enableResourceTracking: function()163 {164 this._resourceTrackingEnabled = true;165 WebInspector.resourceTrackingWasEnabled();166 },167 168 disableResourceTracking: function()169 {170 this._resourceTrackingEnabled = false;171 WebInspector.resourceTrackingWasDisabled();172 },173 174 resourceTrackingEnabled: function()175 {176 return this._resourceTrackingEnabled;177 },178 179 enableDebugger: function()180 {181 this._debuggerEnabled = true;182 },183 184 disableDebugger: function()185 {186 this._debuggerEnabled = false;187 },188 189 addBreakpoint: function(sourceID, line, condition)190 {191 },192 193 removeBreakpoint: function(sourceID, line)194 {195 },196 197 updateBreakpoint: function(sourceID, line, condition)198 {199 },200 201 pauseInDebugger: function()202 {203 },204 205 pauseOnExceptions: function()206 {207 return false;208 },209 210 setPauseOnExceptions: function(value)211 {212 },213 214 resumeDebugger: function()215 {216 },217 218 profilerEnabled: function()219 {220 return true;221 },222 223 enableProfiler: function()224 {225 this._profilerEnabled = true;226 },227 228 disableProfiler: function()229 {230 this._profilerEnabled = false;231 },232 233 startProfiling: function()234 {235 },236 237 stopProfiling: function()238 {239 },240 241 getProfileHeaders: function(callId)242 {243 WebInspector.didGetProfileHeaders(callId, []);244 },245 246 getProfile: function(callId, uid)247 {248 if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles))249 {250 WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]);251 }252 },253 254 takeHeapSnapshot: function()255 {256 },257 258 databaseTableNames: function(database)259 {260 return [];261 },262 263 stepIntoStatementInDebugger: function()264 {265 },266 267 stepOutOfFunctionInDebugger: function()268 {269 },270 271 stepOverStatementInDebugger: function()272 {273 },274 275 setSetting: function(setting, value)276 {277 this._settings[setting] = value;278 },279 280 dispatchOnInjectedScript: function()281 {282 },283 284 releaseWrapperObjectGroup: function()285 {286 },287 288 setting: function(setting)289 {290 return this._settings[setting];291 }292 }293 294 window.InspectorController = new WebInspector.InspectorControllerStub();295 296 } -
trunk/WebCore/inspector/front-end/InspectorFrontendHostStub.js
r51527 r51528 29 29 */ 30 30 31 WebInspector.TestController = function(callId) 31 if (!window.InspectorFrontendHost) { 32 33 WebInspector.InspectorFrontendHostStub = function() 32 34 { 33 this._ callId = callId;34 this._ waitUntilDone = false;35 this._attachedWindowHeight = 0; 36 this._settings = {}; 35 37 } 36 38 37 WebInspector. TestController.prototype = {38 waitUntilDone: function()39 WebInspector.InspectorFrontendHostStub.prototype = { 40 platform: function() 39 41 { 40 this._waitUntilDone = true;42 return "mac-leopard"; 41 43 }, 42 44 43 notifyDone: function(result)45 port: function() 44 46 { 45 var message = typeof result === "undefined" ? "\"<undefined>\"" : JSON.stringify(result); 46 InspectorController.didEvaluateForTestInFrontend(this._callId, message); 47 return "unknown"; 47 48 }, 48 49 49 runAfterPendingDispatches: function(callback)50 closeWindow: function() 50 51 { 51 if (WebInspector.pendingDispatches === 0) { 52 callback(); 53 return; 54 } 55 setTimeout(this.runAfterPendingDispatches.bind(this), 0, callback); 52 this._windowVisible = false; 53 }, 54 55 attach: function() 56 { 57 }, 58 59 detach: function() 60 { 61 }, 62 63 search: function(sourceRow, query) 64 { 65 }, 66 67 setAttachedWindowHeight: function(height) 68 { 69 }, 70 71 moveWindowBy: function(x, y) 72 { 73 }, 74 75 addResourceSourceToFrame: function(identifier, element) 76 { 77 }, 78 79 addSourceToFrame: function(mimeType, source, element) 80 { 81 return false; 82 }, 83 84 loaded: function() 85 { 86 }, 87 88 localizedStringsURL: function() 89 { 90 return undefined; 91 }, 92 93 hiddenPanels: function() 94 { 95 return ""; 96 }, 97 98 setSetting: function(setting, value) 99 { 100 this._settings[setting] = value; 101 }, 102 103 setting: function(setting) 104 { 105 return this._settings[setting]; 56 106 } 57 107 } 58 108 59 WebInspector.evaluateForTestInFrontend = function(callId, script) 60 { 61 var controller = new WebInspector.TestController(callId); 62 function invokeMethod() 63 { 64 try { 65 var result; 66 if (window[script] && typeof window[script] === "function") 67 result = window[script].call(WebInspector, controller); 68 else 69 result = window.eval(script); 109 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub(); 70 110 71 if (!controller._waitUntilDone)72 controller.notifyDone(result);73 } catch (e) {74 controller.notifyDone(e.toString());75 }76 }77 controller.runAfterPendingDispatches(invokeMethod);78 111 } -
trunk/WebCore/inspector/front-end/ProfileView.js
r50460 r51528 96 96 97 97 var callId = WebInspector.Callback.wrap(profileCallback); 98 Inspector Controller.getProfile(callId, this.profile.uid);98 InspectorBackend.getProfile(callId, this.profile.uid); 99 99 } 100 100 … … 595 595 596 596 if (this._recording) 597 Inspector Controller.startProfiling();597 InspectorBackend.startProfiling(); 598 598 else 599 Inspector Controller.stopProfiling();599 InspectorBackend.stopProfiling(); 600 600 }, 601 601 -
trunk/WebCore/inspector/front-end/ProfilesPanel.js
r50460 r51528 401 401 { 402 402 // FIXME: Replace ProfileType-specific button visibility changes by a single ProfileType-agnostic "combo-button" visibility change. 403 if (Inspector Controller.profilerEnabled()) {403 if (InspectorBackend.profilerEnabled()) { 404 404 this.enableToggleButton.title = WebInspector.UIString("Profiling enabled. Click to disable."); 405 405 this.enableToggleButton.toggled = true; … … 420 420 _enableProfiling: function() 421 421 { 422 if (Inspector Controller.profilerEnabled())422 if (InspectorBackend.profilerEnabled()) 423 423 return; 424 424 this._toggleProfiling(this.panelEnablerView.alwaysEnabled); … … 427 427 _toggleProfiling: function(optionalAlways) 428 428 { 429 if (Inspector Controller.profilerEnabled())430 Inspector Controller.disableProfiler(true);429 if (InspectorBackend.profilerEnabled()) 430 InspectorBackend.disableProfiler(true); 431 431 else 432 Inspector Controller.enableProfiler(!!optionalAlways);432 InspectorBackend.enableProfiler(!!optionalAlways); 433 433 }, 434 434 … … 450 450 451 451 var callId = WebInspector.Callback.wrap(populateCallback); 452 Inspector Controller.getProfileHeaders(callId);452 InspectorBackend.getProfileHeaders(callId); 453 453 454 454 delete this._shouldPopulateProfiles; -
trunk/WebCore/inspector/front-end/ResourcesPanel.js
r51290 r51528 350 350 this.summaryBar.reset(); 351 351 352 if (Inspector Controller.resourceTrackingEnabled()) {352 if (InspectorBackend.resourceTrackingEnabled()) { 353 353 this.enableToggleButton.title = WebInspector.UIString("Resource tracking enabled. Click to disable."); 354 354 this.enableToggleButton.toggled = true; … … 617 617 this.itemsTreeElement.smallChildren = !this.itemsTreeElement.smallChildren; 618 618 Preferences.resourcesLargeRows = !Preferences.resourcesLargeRows; 619 Inspector Controller.setSetting("resources-large-rows", Preferences.resourcesLargeRows);619 InspectorFrontendHost.setSetting("resources-large-rows", Preferences.resourcesLargeRows); 620 620 621 621 if (this.itemsTreeElement.smallChildren) { … … 676 676 _enableResourceTracking: function() 677 677 { 678 if (Inspector Controller.resourceTrackingEnabled())678 if (InspectorBackend.resourceTrackingEnabled()) 679 679 return; 680 680 this._toggleResourceTracking(this.panelEnablerView.alwaysEnabled); … … 683 683 _toggleResourceTracking: function(optionalAlways) 684 684 { 685 if (Inspector Controller.resourceTrackingEnabled()) {685 if (InspectorBackend.resourceTrackingEnabled()) { 686 686 this.largerResourcesButton.visible = false; 687 687 this.sortingSelectElement.visible = false; 688 Inspector Controller.disableResourceTracking(true);688 InspectorBackend.disableResourceTracking(true); 689 689 } else { 690 690 this.largerResourcesButton.visible = true; 691 691 this.sortingSelectElement.visible = true; 692 Inspector Controller.enableResourceTracking(!!optionalAlways);692 InspectorBackend.enableResourceTracking(!!optionalAlways); 693 693 } 694 694 }, -
trunk/WebCore/inspector/front-end/ScriptView.js
r37313 r51528 60 60 this.attach(); 61 61 62 if (!Inspector Controller.addSourceToFrame("text/javascript", this.script.source, this.sourceFrame.element))62 if (!InspectorFrontendHost.addSourceToFrame("text/javascript", this.script.source, this.sourceFrame.element)) 63 63 return; 64 64 -
trunk/WebCore/inspector/front-end/ScriptsPanel.js
r51341 r51528 236 236 } 237 237 if (this._attachDebuggerWhenShown) { 238 Inspector Controller.enableDebugger(false);238 InspectorBackend.enableDebugger(false); 239 239 delete this._attachDebuggerWhenShown; 240 240 } … … 294 294 295 295 if (breakpoint.enabled) 296 Inspector Controller.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition);296 InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); 297 297 } 298 298 } … … 422 422 { 423 423 if (this.element.parentElement) { 424 Inspector Controller.enableDebugger(false);424 InspectorBackend.enableDebugger(false); 425 425 } else { 426 426 this._attachDebuggerWhenShown = true; … … 445 445 this.searchCanceled(); 446 446 447 if (!Inspector Controller.debuggerEnabled()) {447 if (!InspectorBackend.debuggerEnabled()) { 448 448 this._paused = false; 449 449 this._waitingToPause = false; … … 496 496 canShowResource: function(resource) 497 497 { 498 return resource && resource.scripts.length && Inspector Controller.debuggerEnabled();498 return resource && resource.scripts.length && InspectorBackend.debuggerEnabled(); 499 499 }, 500 500 … … 607 607 var url = scriptOrResource.url || scriptOrResource.sourceURL; 608 608 if (url && !options.initialLoad) 609 Inspector Controller.setSetting("LastViewedScriptFile", url);609 InspectorFrontendHost.setSetting("LastViewedScriptFile", url); 610 610 611 611 if (!options.fromBackForwardAction) { … … 710 710 // if not first item, check to see if this was the last viewed 711 711 var url = option.representedObject.url || option.representedObject.sourceURL; 712 var lastURL = Inspector Controller.setting("LastViewedScriptFile");712 var lastURL = InspectorFrontendHost.setting("LastViewedScriptFile"); 713 713 if (url && url === lastURL) 714 714 this._showScriptOrResource(option.representedObject, {initialLoad: true}); … … 782 782 _updatePauseOnExceptionsButton: function() 783 783 { 784 if (Inspector Controller.pauseOnExceptions()) {784 if (InspectorBackend.pauseOnExceptions()) { 785 785 this.pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions."); 786 786 this.pauseOnExceptionButton.toggled = true; … … 793 793 _updateDebuggerButtons: function() 794 794 { 795 if (Inspector Controller.debuggerEnabled()) {795 if (InspectorBackend.debuggerEnabled()) { 796 796 this.enableToggleButton.title = WebInspector.UIString("Debugging enabled. Click to disable."); 797 797 this.enableToggleButton.toggled = true; … … 872 872 _enableDebugging: function() 873 873 { 874 if (Inspector Controller.debuggerEnabled())874 if (InspectorBackend.debuggerEnabled()) 875 875 return; 876 876 this._toggleDebugging(this.panelEnablerView.alwaysEnabled); … … 883 883 this._stepping = false; 884 884 885 if (Inspector Controller.debuggerEnabled())886 Inspector Controller.disableDebugger(true);885 if (InspectorBackend.debuggerEnabled()) 886 InspectorBackend.disableDebugger(true); 887 887 else 888 Inspector Controller.enableDebugger(!!optionalAlways);888 InspectorBackend.enableDebugger(!!optionalAlways); 889 889 }, 890 890 891 891 _togglePauseOnExceptions: function() 892 892 { 893 Inspector Controller.setPauseOnExceptions(!InspectorController.pauseOnExceptions());893 InspectorBackend.setPauseOnExceptions(!InspectorBackend.pauseOnExceptions()); 894 894 this._updatePauseOnExceptionsButton(); 895 895 }, … … 900 900 this._paused = false; 901 901 this._waitingToPause = false; 902 Inspector Controller.resumeDebugger();902 InspectorBackend.resumeDebugger(); 903 903 } else { 904 904 this._stepping = false; 905 905 this._waitingToPause = true; 906 Inspector Controller.pauseInDebugger();906 InspectorBackend.pauseInDebugger(); 907 907 } 908 908 … … 917 917 this._clearInterface(); 918 918 919 Inspector Controller.stepOverStatementInDebugger();919 InspectorBackend.stepOverStatementInDebugger(); 920 920 }, 921 921 … … 927 927 this._clearInterface(); 928 928 929 Inspector Controller.stepIntoStatementInDebugger();929 InspectorBackend.stepIntoStatementInDebugger(); 930 930 }, 931 931 … … 937 937 this._clearInterface(); 938 938 939 Inspector Controller.stepOutOfFunctionInDebugger();939 InspectorBackend.stepOutOfFunctionInDebugger(); 940 940 } 941 941 } -
trunk/WebCore/inspector/front-end/SourceView.js
r49071 r51528 98 98 delete this._frameNeedsSetup; 99 99 this.sourceFrame.addEventListener("content loaded", this._contentLoaded, this); 100 Inspector Controller.addResourceSourceToFrame(this.resource.identifier, this.sourceFrame.element);100 InspectorFrontendHost.addResourceSourceToFrame(this.resource.identifier, this.sourceFrame.element); 101 101 }, 102 102 … … 181 181 if (isNaN(lineToSearch)) { 182 182 // Search the whole document since there was no line to search. 183 this._searchResults = (Inspector Controller.search(this.sourceFrame.element.contentDocument, query) || []);183 this._searchResults = (InspectorFrontendHost.search(this.sourceFrame.element.contentDocument, query) || []); 184 184 } else { 185 185 var sourceRow = this.sourceFrame.sourceRow(lineToSearch); … … 187 187 if (filterlessQuery) { 188 188 // There is still a query string, so search for that string in the line. 189 this._searchResults = (Inspector Controller.search(sourceRow, filterlessQuery) || []);189 this._searchResults = (InspectorFrontendHost.search(sourceRow, filterlessQuery) || []); 190 190 } else { 191 191 // Match the whole line, since there was no remaining query string to match. … … 197 197 198 198 // Attempt to search for the whole query, just incase it matches a color like "#333". 199 var wholeQueryMatches = Inspector Controller.search(this.sourceFrame.element.contentDocument, query);199 var wholeQueryMatches = InspectorFrontendHost.search(this.sourceFrame.element.contentDocument, query); 200 200 if (wholeQueryMatches) 201 201 this._searchResults = this._searchResults.concat(wholeQueryMatches); -
trunk/WebCore/inspector/front-end/StylesSidebarPane.js
r50627 r51528 335 335 Preferences.colorFormat = selectedOption.value; 336 336 337 Inspector Controller.setSetting("color-format", Preferences.colorFormat);337 InspectorFrontendHost.setSetting("color-format", Preferences.colorFormat); 338 338 339 339 for (var i = 0; i < this.sections.length; ++i) -
trunk/WebCore/inspector/front-end/TestController.js
r50574 r51528 44 44 { 45 45 var message = typeof result === "undefined" ? "\"<undefined>\"" : JSON.stringify(result); 46 Inspector Controller.didEvaluateForTestInFrontend(this._callId, message);46 InspectorBackend.didEvaluateForTestInFrontend(this._callId, message); 47 47 }, 48 48 -
trunk/WebCore/inspector/front-end/TimelinePanel.js
r51339 r51528 120 120 { 121 121 if (this.toggleTimelineButton.toggled) 122 Inspector Controller.stopTimelineProfiler();122 InspectorBackend.stopTimelineProfiler(); 123 123 else 124 Inspector Controller.startTimelineProfiler();124 InspectorBackend.startTimelineProfiler(); 125 125 }, 126 126 -
trunk/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
r50468 r51528 128 128 } 129 129 130 Inspector Controller.releaseWrapperObjectGroup(this._watchObjectGroupId)130 InspectorBackend.releaseWrapperObjectGroup(this._watchObjectGroupId) 131 131 var properties = []; 132 132 … … 184 184 loadSavedExpressions: function() 185 185 { 186 var json = Inspector Controller.setting("watchExpressions");186 var json = InspectorFrontendHost.setting("watchExpressions"); 187 187 if (!json) 188 188 return []; … … 205 205 206 206 var json = JSON.stringify({expressions: toSave}); 207 Inspector Controller.setSetting("watchExpressions", json);207 InspectorFrontendHost.setSetting("watchExpressions", json); 208 208 209 209 return toSave.length; -
trunk/WebCore/inspector/front-end/WebKit.qrc
r51296 r51528 29 29 <file>InjectedScriptAccess.js</file> 30 30 <file>inspector.js</file> 31 <file>InspectorControllerStub.js</file> 31 <file>InspectorBackendStub.js</file> 32 <file>InspectorFrontendHostStub.js</file> 32 33 <file>KeyboardShortcut.js</file> 33 34 <file>MetricsSidebarPane.js</file> -
trunk/WebCore/inspector/front-end/inspector.html
r51296 r51528 35 35 <script type="text/javascript" src="treeoutline.js"></script> 36 36 <script type="text/javascript" src="inspector.js"></script> 37 <script type="text/javascript" src="InspectorControllerStub.js"></script> 37 <script type="text/javascript" src="InspectorBackendStub.js"></script> 38 <script type="text/javascript" src="InspectorFrontendHostStub.js"></script> 38 39 <script type="text/javascript" src="Object.js"></script> 39 40 <script type="text/javascript" src="KeyboardShortcut.js"></script> -
trunk/WebCore/inspector/front-end/inspector.js
r51506 r51528 78 78 { 79 79 if (!("_platform" in this)) 80 this._platform = Inspector Controller.platform();80 this._platform = InspectorFrontendHost.platform(); 81 81 82 82 return this._platform; … … 86 86 { 87 87 if (!("_port" in this)) 88 this._port = Inspector Controller.port();88 this._port = InspectorFrontendHost.port(); 89 89 90 90 return this._port; … … 166 166 for (var panelName in WebInspector.panels) { 167 167 if (WebInspector.panels[panelName] == x) 168 Inspector Controller.storeLastActivePanel(panelName);168 InspectorBackend.storeLastActivePanel(panelName); 169 169 } 170 170 }, … … 172 172 _createPanels: function() 173 173 { 174 var hiddenPanels = (Inspector Controller.hiddenPanels() || "").split(',');174 var hiddenPanels = (InspectorFrontendHost.hiddenPanels() || "").split(','); 175 175 if (hiddenPanels.indexOf("elements") === -1) 176 176 this.panels.elements = new WebInspector.ElementsPanel(); … … 194 194 _loadPreferences: function() 195 195 { 196 var colorFormat = Inspector Controller.setting("color-format");196 var colorFormat = InspectorFrontendHost.setting("color-format"); 197 197 if (colorFormat) 198 198 Preferences.colorFormat = colorFormat; 199 199 200 var eventListenersFilter = Inspector Controller.setting("event-listeners-filter");200 var eventListenersFilter = InspectorFrontendHost.setting("event-listeners-filter"); 201 201 if (eventListenersFilter) 202 202 Preferences.eventListenersFilter = eventListenersFilter; 203 203 204 var resourcesLargeRows = Inspector Controller.setting("resources-large-rows");204 var resourcesLargeRows = InspectorFrontendHost.setting("resources-large-rows"); 205 205 if (typeof resourcesLargeRows !== "undefined") 206 206 Preferences.resourcesLargeRows = resourcesLargeRows; … … 225 225 226 226 if (x) { 227 Inspector Controller.attach();227 InspectorFrontendHost.attach(); 228 228 body.removeStyleClass("detached"); 229 229 body.addStyleClass("attached"); 230 230 dockToggleButton.title = WebInspector.UIString("Undock into separate window."); 231 231 } else { 232 Inspector Controller.detach();232 InspectorFrontendHost.detach(); 233 233 body.removeStyleClass("attached"); 234 234 body.addStyleClass("detached"); … … 399 399 400 400 if (this._hoveredDOMNode) { 401 Inspector Controller.highlightDOMNode(this._hoveredDOMNode.id);401 InspectorBackend.highlightDOMNode(this._hoveredDOMNode.id); 402 402 this.showingDOMNodeHighlight = true; 403 403 } else { 404 Inspector Controller.hideDOMNodeHighlight();404 InspectorBackend.hideDOMNodeHighlight(); 405 405 this.showingDOMNodeHighlight = false; 406 406 } … … 509 509 document.getElementById("close-button-right").addEventListener("click", this.close, true); 510 510 511 Inspector Controller.loaded();511 InspectorFrontendHost.loaded(); 512 512 } 513 513 514 514 var windowLoaded = function() 515 515 { 516 var localizedStringsURL = Inspector Controller.localizedStringsURL();516 var localizedStringsURL = InspectorFrontendHost.localizedStringsURL(); 517 517 if (localizedStringsURL) { 518 518 var localizedStringsScriptElement = document.createElement("script"); … … 547 547 WebInspector.windowUnload = function(event) 548 548 { 549 Inspector Controller.windowUnloading();549 InspectorFrontendHost.windowUnloading(); 550 550 } 551 551 … … 587 587 WebInspector.close = function(event) 588 588 { 589 Inspector Controller.closeWindow();589 InspectorFrontendHost.closeWindow(); 590 590 } 591 591 … … 910 910 var height = window.innerHeight - (event.screenY - toolbar.lastScreenY); 911 911 912 Inspector Controller.setAttachedWindowHeight(height);912 InspectorFrontendHost.setAttachedWindowHeight(height); 913 913 } else { 914 914 var x = event.screenX - toolbar.lastScreenX; … … 917 917 // We cannot call window.moveBy here because it restricts the movement 918 918 // of the window at the edges. 919 Inspector Controller.moveByUnrestricted(x, y);919 InspectorFrontendHost.moveWindowBy(x, y); 920 920 } 921 921 … … 1641 1641 else { 1642 1642 if (!(string in this.missingLocalizedStrings)) { 1643 if (!WebInspector.Inspector ControllerStub)1643 if (!WebInspector.InspectorBackendStub) 1644 1644 console.error("Localized string \"" + string + "\" not found."); 1645 1645 this.missingLocalizedStrings[string] = true;
Note: See TracChangeset
for help on using the changeset viewer.