summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.h
diff options
context:
space:
mode:
authoriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 02:09:49 +0000
committeriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 02:09:49 +0000
commit84f89cacc8f09a2fbc1fd82b30af13dd35624869 (patch)
tree9e60daee9caffaaaa3da96fd46b0c4ba28318fc8 /webkit/glue/webplugin_impl.h
parent172300b0cd0748cade220e03dcc2b3459ee14b80 (diff)
downloadchromium_src-84f89cacc8f09a2fbc1fd82b30af13dd35624869.zip
chromium_src-84f89cacc8f09a2fbc1fd82b30af13dd35624869.tar.gz
chromium_src-84f89cacc8f09a2fbc1fd82b30af13dd35624869.tar.bz2
This CB fixes the following issue1. http://code.google.com/p/chromium/issues/detail?id=206This is a performance issue while loading PDF documents. The fix is to support PDF fast webview, which is basically support for the NPN_RequestRead API, which allows a plugin to request specific byte ranges in HTTP GET requests. This also needs support for seekable streams. Our support for seekable streams is limited to HTTP servers which allow byte range requests. Firefox also supports a mode in which the the browser caches the file on disk for servers which don't support byte range requests. The plugin_data_stream.cc/.h files are being removed as there is not much value in their existence. The needed functionality is available in the PluginStreamUrl class, which now services manual data streams as well. Testing this is a touch tricky as we need a HTTP server which serves byte range requests. Will add those in a subsequent CB.Also fixed a bug in the multipart parser where we need to ignore leading newline characters while parsing the header.Bug=206
Review URL: http://codereview.chromium.org/2896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.h')
-rw-r--r--webkit/glue/webplugin_impl.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index 04b48b3..2a5efb5 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -6,6 +6,7 @@
#define WEBKIT_GLUE_WEBPLUGIN_IMPL_H__
#include <string>
+#include <map>
#include <vector>
#include "config.h"
@@ -25,6 +26,7 @@
class WebFrameImpl;
class WebPluginDelegate;
class WebPluginImpl;
+class MultipartResponseDelegate;
namespace WebCore {
class DeprecatedString;
@@ -149,7 +151,8 @@ class WebPluginImpl : public WebPlugin,
// Returns true on success.
bool InitiateHTTPRequest(int resource_id, WebPluginResourceClient* client,
const char* method, const char* buf, int buf_len,
- const GURL& complete_url_string);
+ const GURL& complete_url_string,
+ const char* range_info);
gfx::Rect GetWindowClipRect(const gfx::Rect& rect);
@@ -242,6 +245,17 @@ class WebPluginImpl : public WebPlugin,
bool notify, const char* url,
void* notify_data, bool popups_allowed);
+ void CancelDocumentLoad();
+
+ void InitiateHTTPRangeRequest(const char* url, const char* range_info,
+ HANDLE existing_stream, bool notify_needed,
+ HANDLE notify_data);
+
+ // Handles HTTP multipart responses, i.e. responses received with a HTTP
+ // status code of 206.
+ void HandleHttpMultipartResponse(const WebCore::ResourceResponse& response,
+ WebPluginResourceClient* client);
+
struct ClientInfo {
int id;
WebPluginResourceClient* client;
@@ -264,6 +278,12 @@ class WebPluginImpl : public WebPlugin,
WebPluginContainer* widget_;
+ typedef std::map<WebPluginResourceClient*, MultipartResponseDelegate*>
+ MultiPartResponseHandlerMap;
+ // Tracks HTTP multipart response handlers instantiated for
+ // a WebPluginResourceClient instance.
+ MultiPartResponseHandlerMap multi_part_response_map_;
+
DISALLOW_EVIL_CONSTRUCTORS(WebPluginImpl);
};