Web Inspector: extract ContentProvider into its own file, make NetworkRequest, Resoru...
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 11:46:56 +0000 (11:46 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 11:46:56 +0000 (11:46 +0000)
commit8a57c2dedcfead477eb8d001dc5f7f0d53f6048b
tree49f06b24d639b904a315fb7a4ea64aca0f5f6ccb
parent34741d980140c0eee83d73e0c2bd65f55106d3c5
Web Inspector: extract ContentProvider into its own file, make NetworkRequest, Resoruce and others implement it.
https://bugs.webkit.org/show_bug.cgi?id=83922

Reviewed by Yury Semikhatsky.

Source/WebCore:

We have two different types of requestContent methods: one on the source mapping level and one on the resource level.
There are also adapters between the two. I'm aligning it all to a single requestContent method declared in ContentProvider.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint.didRequestContent):
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
* inspector/front-end/ContentProvider.js: Added.
(WebInspector.ContentProvider):
(WebInspector.ContentProvider.prototype.contentURL):
(WebInspector.ContentProvider.prototype.requestContent):
(WebInspector.ContentProvider.prototype.searchInContent):
(WebInspector.ContentProvider.SearchMatch):
* inspector/front-end/ContentProviders.js:
(WebInspector.ScriptContentProvider.prototype.contentURL):
(WebInspector.ScriptContentProvider.prototype.requestContent):
(WebInspector.ConcatenatedScriptsContentProvider.prototype.contentURL):
(WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent):
(WebInspector.CompilerSourceMappingContentProvider.prototype.contentURL):
(WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
(WebInspector.StaticContentProvider.prototype.contentURL):
(WebInspector.StaticContentProvider.prototype.requestContent):
* inspector/front-end/DebuggerPresentationModel.js:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._getResourceContent):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.requestContent):
* inspector/front-end/NetworkItemView.js:
(WebInspector.RequestContentView.prototype._ensureInnerViewShown.callback):
(WebInspector.RequestContentView.prototype._ensureInnerViewShown):
* inspector/front-end/NetworkRequest.js:
(WebInspector.NetworkRequest.prototype.contentURL):
(WebInspector.NetworkRequest.prototype.requestContent):
(WebInspector.NetworkRequest.prototype.searchInContent):
(WebInspector.NetworkRequest.prototype.populateImageSource):
(WebInspector.NetworkRequest.prototype._innerRequestContent.onResourceContent):
(WebInspector.NetworkRequest.prototype._innerRequestContent):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.prototype._createContentProvider):
(WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
(WebInspector.RawSourceCode.prototype._createSourceMapping):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.contentURL):
(WebInspector.Resource.prototype.requestContent):
(WebInspector.Resource.prototype._innerRequestContent.callback):
(WebInspector.Resource.prototype._innerRequestContent):
(WebInspector.ResourceRevision.prototype.contentURL):
(WebInspector.ResourceRevision.prototype.requestContent.callbackWrapper):
(WebInspector.ResourceRevision.prototype.requestContent):
(WebInspector.ResourceRevision.prototype.searchInContent):
* inspector/front-end/ResourceView.js:
(WebInspector.ResourceSourceFrame.prototype.requestContent):
(WebInspector.ResourceSourceFrame.prototype._contentChanged):
(WebInspector.ResourceRevisionSourceFrame.prototype.requestContent):
* inspector/front-end/ScriptFormatter.js:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.requestVisibleScriptOutline):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.setContent):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
(WebInspector.UISourceCode.prototype.requestContent):
(WebInspector.UISourceCode.prototype._didRequestContent):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

LayoutTests:

* http/tests/inspector/compiler-script-mapping.html:
* inspector/debugger/content-providers-expected.txt:
* inspector/debugger/content-providers.html:
* inspector/debugger/raw-source-code.html:
* inspector/debugger/ui-source-code.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/compiler-script-mapping.html
LayoutTests/inspector/debugger/content-providers-expected.txt
LayoutTests/inspector/debugger/content-providers.html
LayoutTests/inspector/debugger/raw-source-code.html
LayoutTests/inspector/debugger/ui-source-code.html
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/inspector/compile-front-end.py
Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js
Source/WebCore/inspector/front-end/ContentProvider.js [new file with mode: 0644]
Source/WebCore/inspector/front-end/ContentProviders.js
Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
Source/WebCore/inspector/front-end/ExtensionServer.js
Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js
Source/WebCore/inspector/front-end/NetworkItemView.js
Source/WebCore/inspector/front-end/NetworkRequest.js
Source/WebCore/inspector/front-end/RawSourceCode.js
Source/WebCore/inspector/front-end/Resource.js
Source/WebCore/inspector/front-end/ResourceView.js
Source/WebCore/inspector/front-end/ScriptFormatter.js
Source/WebCore/inspector/front-end/ScriptsPanel.js
Source/WebCore/inspector/front-end/SourceFrame.js
Source/WebCore/inspector/front-end/UISourceCode.js
Source/WebCore/inspector/front-end/WebKit.qrc
Source/WebCore/inspector/front-end/inspector.html