diff options
-rw-r--r-- | webkit/glue/webdevtoolsagent_impl.cc | 50 | ||||
-rw-r--r-- | webkit/glue/webdevtoolsagent_impl.h | 20 |
2 files changed, 70 insertions, 0 deletions
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc index df1fa7b..e621058 100644 --- a/webkit/glue/webdevtoolsagent_impl.cc +++ b/webkit/glue/webdevtoolsagent_impl.cc @@ -15,6 +15,9 @@ #include "Node.h" #include "Page.h" #include "PlatformString.h" +#include "ResourceError.h" +#include "ResourceRequest.h" +#include "ResourceResponse.h" #include "ScriptObject.h" #include "ScriptState.h" #include "ScriptValue.h" @@ -29,7 +32,9 @@ #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" #include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h" #include "third_party/WebKit/WebKit/chromium/src/WebViewImpl.h" #include "webkit/glue/devtools/bound_object.h" @@ -39,12 +44,17 @@ #include "webkit/glue/webdevtoolsagent_impl.h" using WebCore::Document; +using WebCore::DocumentLoader; +using WebCore::FrameLoader; using WebCore::InspectorBackend; using WebCore::InspectorController; using WebCore::InspectorFrontend; using WebCore::InspectorResource; using WebCore::Node; using WebCore::Page; +using WebCore::ResourceError; +using WebCore::ResourceRequest; +using WebCore::ResourceResponse; using WebCore::SafeAllocation; using WebCore::ScriptObject; using WebCore::ScriptState; @@ -60,7 +70,9 @@ using WebKit::WebFrameImpl; using WebKit::WebPoint; using WebKit::WebString; using WebKit::WebURL; +using WebKit::WebURLError; using WebKit::WebURLRequest; +using WebKit::WebURLResponse; using WebKit::WebViewImpl; namespace { @@ -459,6 +471,44 @@ v8::Handle<v8::Value> WebDevToolsAgentImpl::JsOnRuntimeFeatureStateChanged( return v8::Undefined(); } + +WebCore::InspectorController* WebDevToolsAgentImpl::GetInspectorController() { + if (Page* page = web_view_impl_->page()) + return page->inspectorController(); + return NULL; +} + + +//------- plugin resource load notifications --------------- +void WebDevToolsAgentImpl::identifierForInitialRequest( + unsigned long resourceId, + WebKit::WebFrame* frame, + const WebURLRequest& request) { +} + +void WebDevToolsAgentImpl::willSendRequest( + unsigned long resourceId, + const WebURLRequest& request) { +} + +void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId, + int length) { +} + +void WebDevToolsAgentImpl::didReceiveResponse( + unsigned long resourceId, + const WebURLResponse& response) { +} + +void WebDevToolsAgentImpl::didFinishLoading( + unsigned long resourceId) { +} + +void WebDevToolsAgentImpl::didFailLoading(unsigned long resourceId, + const WebURLError& error) { +} + + namespace WebKit { // static diff --git a/webkit/glue/webdevtoolsagent_impl.h b/webkit/glue/webdevtoolsagent_impl.h index 39851f0..fa87ae9 100644 --- a/webkit/glue/webdevtoolsagent_impl.h +++ b/webkit/glue/webdevtoolsagent_impl.h @@ -17,6 +17,7 @@ namespace WebCore { class Document; +class InspectorController; class Node; class ScriptState; class String; @@ -27,7 +28,10 @@ class WebDevToolsAgentClient; class WebFrame; class WebFrameImpl; class WebString; +class WebURLRequest; +class WebURLResponse; class WebViewImpl; +struct WebURLError; } class BoundObject; @@ -75,6 +79,20 @@ class WebDevToolsAgentImpl : public WebKit::WebDevToolsAgentPrivate, virtual void inspectElementAt(const WebKit::WebPoint& point); virtual void setRuntimeFeatureEnabled(const WebKit::WebString& feature, bool enabled); + virtual void identifierForInitialRequest( + unsigned long resourceId, + WebKit::WebFrame* frame, + const WebKit::WebURLRequest& request); + virtual void willSendRequest(unsigned long resourceId, + const WebKit::WebURLRequest& request); + virtual void didReceiveData(unsigned long resourceId, int length); + virtual void didReceiveResponse( + unsigned long resourceId, + const WebKit::WebURLResponse& response); + virtual void didFinishLoading(unsigned long resourceId); + virtual void didFailLoading( + unsigned long resourceId, + const WebKit::WebURLError& error); // DevToolsRpc::Delegate implementation. void SendRpcMessage(const WebCore::String& class_name, @@ -100,6 +118,8 @@ class WebDevToolsAgentImpl : public WebKit::WebDevToolsAgentPrivate, void ResetInspectorFrontendProxy(); void setApuAgentEnabled(bool enabled); + WebCore::InspectorController* GetInspectorController(); + // Creates InspectorBackend v8 wrapper in the utility context so that it's // methods prototype is Function.protoype object from the utility context. // Otherwise some useful methods defined on Function.prototype(such as bind) |