diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 17:24:13 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 17:24:13 +0000 |
commit | 943b2925ce99deafb646573cf146c63dac2f33e4 (patch) | |
tree | 459ed3bb525abd6f74857ba3e83922a086298d1c /webkit/glue/webplugin_impl.h | |
parent | 9762f54d6f7b357b278dfffd7b47c44e63271db9 (diff) | |
download | chromium_src-943b2925ce99deafb646573cf146c63dac2f33e4.zip chromium_src-943b2925ce99deafb646573cf146c63dac2f33e4.tar.gz chromium_src-943b2925ce99deafb646573cf146c63dac2f33e4.tar.bz2 |
Handle HTTP 200 responses received in response to byte range requests issued by the plugin. This means that the server does not support byte range requests. Firefox handles this by destroying the current plugin instance and creating a new instance to handle the response. The stream which is created to pass the data off to the plugin is not seekable.Fix is to emulate Firefox behavior. Will work on unit testing the NPN_RequestRead related code in a separate CB. This fixes http://code.google.com/p/chromium/issues/detail?id=5403Bug=5403
Review URL: http://codereview.chromium.org/14122
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.h')
-rw-r--r-- | webkit/glue/webplugin_impl.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h index 01cf7db..1d11d71 100644 --- a/webkit/glue/webplugin_impl.h +++ b/webkit/glue/webplugin_impl.h @@ -124,7 +124,8 @@ class WebPluginImpl : public WebPlugin, WebCore::Element* element, WebFrameImpl* frame, WebPluginDelegate* delegate, - bool load_manually); + bool load_manually, + const std::string& mime_type); virtual ~WebPluginImpl(); virtual NPObject* GetPluginScriptableObject(); @@ -139,7 +140,8 @@ class WebPluginImpl : public WebPlugin, WebPluginImpl(WebCore::Element *element, WebFrameImpl *frame, WebPluginDelegate* delegate, const GURL& plugin_url, - bool load_manually); + bool load_manually, const std::string& mime_type, + int arg_count, char** arg_names, char** arg_values); // WebPlugin implementation: void SetWindow(HWND window, HANDLE pump_messages_event); @@ -231,6 +233,12 @@ class WebPluginImpl : public WebPlugin, // Sets the actual Widget for the plugin. void SetContainer(WebPluginContainer* container); + // 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( + WebCore::ResourceHandle* response_handle_to_ignore); + WebCore::ScrollView* parent() const; // ResourceHandleClient implementation. We implement this interface in the @@ -294,6 +302,14 @@ class WebPluginImpl : public WebPlugin, void* notify_data, bool popups_allowed, 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 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, + std::vector<std::string>* value_vector); + struct ClientInfo { int id; WebPluginResourceClient* client; @@ -332,6 +348,15 @@ class WebPluginImpl : public WebPlugin, // Indicates if this is the first geometry update received by the plugin. bool first_geometry_update_; + // The mime type of the plugin. + std::string mime_type_; + + // Holds the list of argument names passed to the plugin. + std::vector<std::string> arg_names_; + + // Holds the list of argument values passed to the plugin. + std::vector<std::string> arg_values_; + DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); }; |