diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-30 22:42:58 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-30 22:42:58 +0000 |
commit | eed529ce5d09706bc2b9da5b96822eda2919a9ae (patch) | |
tree | f5afad43a1e8412ed9473fa9d7e418621373decd /webkit/glue/webplugin_impl.h | |
parent | ee8f54a54cab5cc3eaf837622ec61b482fac8858 (diff) | |
download | chromium_src-eed529ce5d09706bc2b9da5b96822eda2919a9ae.zip chromium_src-eed529ce5d09706bc2b9da5b96822eda2919a9ae.tar.gz chromium_src-eed529ce5d09706bc2b9da5b96822eda2919a9ae.tar.bz2 |
Revert WebURLLoader landing. Too many layout test failures.
TBR=dglazkov
Review URL: http://codereview.chromium.org/115973
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.h')
-rw-r--r-- | webkit/glue/webplugin_impl.h | 99 |
1 files changed, 49 insertions, 50 deletions
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h index 1c3be91..8d14792 100644 --- a/webkit/glue/webplugin_impl.h +++ b/webkit/glue/webplugin_impl.h @@ -9,43 +9,41 @@ #include <map> #include <vector> +#include "config.h" +#include "base/compiler_specific.h" +#include "base/gfx/native_widget_types.h" + +MSVC_PUSH_WARNING_LEVEL(0); +#include "ResourceHandle.h" +#include "ResourceHandleClient.h" +#include "ResourceRequest.h" #include "Widget.h" +MSVC_POP_WARNING(); #include "base/basictypes.h" -#include "base/gfx/native_widget_types.h" -#include "base/linked_ptr.h" -#include "webkit/api/public/WebURLLoaderClient.h" -#include "webkit/api/public/WebURLRequest.h" #include "webkit/glue/webframe_impl.h" #include "webkit/glue/webplugin.h" #include "webkit/glue/webplugin_delegate.h" - class WebFrameImpl; class WebPluginDelegate; class WebPluginImpl; +class MultipartResponseDelegate; namespace WebCore { -class Event; -class Frame; -class HTMLPlugInElement; -class IntRect; -class KeyboardEvent; -class KURL; -class MouseEvent; -class ResourceError; -class ResourceResponse; -class ScrollView; -class String; -class Widget; -} - -namespace WebKit { -class WebURLResponse; -} - -namespace webkit_glue { -class MultipartResponseDelegate; + class Event; + class Frame; + class HTMLPlugInElement; + class IntRect; + class KeyboardEvent; + class KURL; + class MouseEvent; + class ResourceHandle; + class ResourceError; + class ResourceResponse; + class ScrollView; + class String; + class Widget; } // Implements WebCore::Widget functions that WebPluginImpl needs. This class @@ -117,7 +115,7 @@ class WebPluginContainer : public WebCore::Widget { // after changing out of WebCore types, to a delegate. The delegate will // be in a different process. class WebPluginImpl : public WebPlugin, - public WebKit::WebURLLoaderClient { + public WebCore::ResourceHandleClient { public: // Creates a WebPlugin instance, as long as the delegate's initialization // succeeds. If it fails, the delegate is deleted and NULL is returned. @@ -136,7 +134,7 @@ class WebPluginImpl : public WebPlugin, virtual NPObject* GetPluginScriptableObject(); // Helper function for sorting post data. - static bool SetPostData(WebKit::WebURLRequest* request, + static bool SetPostData(WebCore::ResourceRequest* request, const char* buf, uint32 length); @@ -242,28 +240,27 @@ class WebPluginImpl : public WebPlugin, // Destroys the plugin instance. // The response_handle_to_ignore parameter if not NULL indicates the // resource handle to be left valid during plugin shutdown. - void TearDownPluginInstance(WebKit::WebURLLoader* loader_to_ignore); + void TearDownPluginInstance( + WebCore::ResourceHandle* response_handle_to_ignore); WebCore::ScrollView* parent() const; - // WebURLLoaderClient implementation. We implement this interface in the + // ResourceHandleClient implementation. We implement this interface in the // renderer process, and then use the simple WebPluginResourceClient interface // to relay the callbacks to the plugin. - virtual void willSendRequest(WebKit::WebURLLoader* loader, - WebKit::WebURLRequest& request, - const WebKit::WebURLResponse&); - virtual void didSendData(WebKit::WebURLLoader* loader, - unsigned long long bytes_sent, - unsigned long long total_bytes_to_be_sent); - virtual void didReceiveResponse(WebKit::WebURLLoader* loader, - const WebKit::WebURLResponse& response); - virtual void didReceiveData(WebKit::WebURLLoader* loader, const char *buffer, - int length, long long total_length); - virtual void didFinishLoading(WebKit::WebURLLoader* loader); - virtual void didFail(WebKit::WebURLLoader* loader, const WebKit::WebURLError&); + void willSendRequest(WebCore::ResourceHandle* handle, + WebCore::ResourceRequest& request, + const WebCore::ResourceResponse&); + + void didReceiveResponse(WebCore::ResourceHandle* handle, + const WebCore::ResourceResponse& response); + void didReceiveData(WebCore::ResourceHandle* handle, const char *buffer, + int length, int); + void didFinishLoading(WebCore::ResourceHandle* handle); + void didFail(WebCore::ResourceHandle* handle, const WebCore::ResourceError&); // Helper function - WebPluginResourceClient* GetClientFromLoader(WebKit::WebURLLoader* loader); + WebPluginResourceClient* GetClientFromHandle(WebCore::ResourceHandle* handle); // Helper function to remove the stored information about a resource // request given its index in m_clients. @@ -271,7 +268,10 @@ class WebPluginImpl : public WebPlugin, // Helper function to remove the stored information about a resource // request given a handle. - void RemoveClient(WebKit::WebURLLoader* loader); + void RemoveClient(WebCore::ResourceHandle* handle); + + // Returns all the response headers in one string, including the status code. + std::wstring GetAllHeaders(const WebCore::ResourceResponse& response); WebCore::Frame* frame() { return webframe_ ? webframe_->frame() : NULL; } @@ -300,7 +300,7 @@ class WebPluginImpl : public WebPlugin, // Handles HTTP multipart responses, i.e. responses received with a HTTP // status code of 206. - void HandleHttpMultipartResponse(const WebKit::WebURLResponse& response, + void HandleHttpMultipartResponse(const WebCore::ResourceResponse& response, WebPluginResourceClient* client); void HandleURLRequestInternal(const char *method, bool is_javascript_url, @@ -311,8 +311,8 @@ class WebPluginImpl : public WebPlugin, bool use_plugin_src_as_referrer); // Tears down the existing plugin instance and creates a new plugin instance - // to handle the response identified by the loader parameter. - bool ReinitializePluginForResponse(WebKit::WebURLLoader* loader); + // to handle the response identified by the response_handle parameter. + bool ReinitializePluginForResponse(WebCore::ResourceHandle* response_handle); // Helper functions to convert an array of names/values to a vector. static void ArrayToVector(int total_values, char** values, @@ -321,8 +321,8 @@ class WebPluginImpl : public WebPlugin, struct ClientInfo { int id; WebPluginResourceClient* client; - WebKit::WebURLRequest request; - linked_ptr<WebKit::WebURLLoader> loader; + WebCore::ResourceRequest request; + RefPtr<WebCore::ResourceHandle> handle; }; std::vector<ClientInfo> clients_; @@ -336,8 +336,7 @@ class WebPluginImpl : public WebPlugin, WebPluginContainer* widget_; - typedef std::map<WebPluginResourceClient*, - webkit_glue::MultipartResponseDelegate*> + typedef std::map<WebPluginResourceClient*, MultipartResponseDelegate*> MultiPartResponseHandlerMap; // Tracks HTTP multipart response handlers instantiated for // a WebPluginResourceClient instance. |