diff options
author | vsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-31 19:01:48 +0000 |
---|---|---|
committer | vsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-31 19:01:48 +0000 |
commit | c7d5601fa3df36215e46de17d5699b40bce82fa4 (patch) | |
tree | 351e51d291a64939e25a14a6e78f2ec9f88e3906 /webkit/plugins/npapi | |
parent | c4bc58d55fb1b29f69fc1bccc93b74e56c99b010 (diff) | |
download | chromium_src-c7d5601fa3df36215e46de17d5699b40bce82fa4.zip chromium_src-c7d5601fa3df36215e46de17d5699b40bce82fa4.tar.gz chromium_src-c7d5601fa3df36215e46de17d5699b40bce82fa4.tar.bz2 |
Migrated chromium to new didReceiveData method in WebURLLoaderClient
BUG=40502
Review URL: http://codereview.chromium.org/6737026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi')
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.cc | 30 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.h | 8 |
2 files changed, 30 insertions, 8 deletions
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc index 86002c4..ef48e40 100644 --- a/webkit/plugins/npapi/webplugin_impl.cc +++ b/webkit/plugins/npapi/webplugin_impl.cc @@ -110,14 +110,21 @@ class MultiPartResponseClient : public WebURLLoaderClient { } // Receives individual part data from a multipart response. - virtual void didReceiveData( - WebURLLoader*, const char* data, int data_size) { + // FIXME(vsevik): rename once renamed in webkit + virtual void didReceiveData2( + WebURLLoader*, const char* data, int data_length, int length_received) { // TODO(ananta) // We should defer further loads on multipart resources on the same lines // as regular resources requested by plugins to prevent reentrancy. resource_client_->DidReceiveData( - data, data_size, byte_range_lower_bound_); - byte_range_lower_bound_ += data_size; + data, data_length, byte_range_lower_bound_); + byte_range_lower_bound_ += data_length; + } + + // FIXME(vsevik): remove once removed in webkit + virtual void didReceiveData( + WebURLLoader* webURLLoader, const char* data, int data_length) { + didReceiveData2(webURLLoader, data, data_length, -1); } virtual void didFinishLoading(WebURLLoader*, double finishTime) {} @@ -949,9 +956,18 @@ void WebPluginImpl::didReceiveResponse(WebURLLoader* loader, } } +// FIXME(vsevik): remove once removed in webkit void WebPluginImpl::didReceiveData(WebURLLoader* loader, const char *buffer, - int length) { + int data_length) { + didReceiveData2(loader, buffer, data_length, -1); +} + +// FIXME(vsevik): rename once renamed in webkit +void WebPluginImpl::didReceiveData2(WebURLLoader* loader, + const char *buffer, + int data_length, + int length_received) { WebPluginResourceClient* client = GetClientFromLoader(loader); if (!client) return; @@ -961,10 +977,10 @@ void WebPluginImpl::didReceiveData(WebURLLoader* loader, if (index != multi_part_response_map_.end()) { MultipartResponseDelegate* multi_part_handler = (*index).second; DCHECK(multi_part_handler != NULL); - multi_part_handler->OnReceivedData(buffer, length); + multi_part_handler->OnReceivedData(buffer, data_length); } else { loader->setDefersLoading(true); - client->DidReceiveData(buffer, length, 0); + client->DidReceiveData(buffer, data_length, 0); } } diff --git a/webkit/plugins/npapi/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h index 8b6177e..0821ef7 100644 --- a/webkit/plugins/npapi/webplugin_impl.h +++ b/webkit/plugins/npapi/webplugin_impl.h @@ -203,8 +203,14 @@ class WebPluginImpl : public WebPlugin, unsigned long long total_bytes_to_be_sent); virtual void didReceiveResponse(WebKit::WebURLLoader* loader, const WebKit::WebURLResponse& response); + + // FIXME(vsevik): remove once migrated to new webkit virtual void didReceiveData(WebKit::WebURLLoader* loader, const char *buffer, - int length); + int data_length); + + // FIXME(vsevik): rename once renamed in webkit + virtual void didReceiveData2(WebKit::WebURLLoader* loader, const char *buffer, + int data_length, int length_received); virtual void didFinishLoading(WebKit::WebURLLoader* loader, double finishTime); virtual void didFail(WebKit::WebURLLoader* loader, |