Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2008)

Unified Diff: content/renderer/npapi/webplugin_delegate_proxy.cc

Issue 23830007: Support byte range requests when routing resource requests directly through the browser process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/npapi/webplugin_delegate_proxy.cc
===================================================================
--- content/renderer/npapi/webplugin_delegate_proxy.cc (revision 223347)
+++ content/renderer/npapi/webplugin_delegate_proxy.cc (working copy)
@@ -450,6 +450,8 @@
IPC_MESSAGE_HANDLER(PluginHostMsg_CancelDocumentLoad, OnCancelDocumentLoad)
IPC_MESSAGE_HANDLER(PluginHostMsg_InitiateHTTPRangeRequest,
OnInitiateHTTPRangeRequest)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_DidStartLoading, OnDidStartLoading)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_DidStopLoading, OnDidStopLoading)
IPC_MESSAGE_HANDLER(PluginHostMsg_DeferResourceLoading,
OnDeferResourceLoading)
IPC_MESSAGE_HANDLER(PluginHostMsg_URLRedirectResponse,
@@ -1123,7 +1125,8 @@
const GURL& url,
const GURL& first_party_for_cookies,
const std::string& method,
- const std::string& post_data,
+ const char* buf,
+ unsigned int len,
const GURL& referrer,
bool notify_redirects,
bool is_plugin_src_load,
@@ -1135,7 +1138,10 @@
params.url = url;
params.first_party_for_cookies = first_party_for_cookies;
params.method = method;
- params.post_data = post_data;
+ if (len) {
+ params.post_data.resize(len);
+ memcpy(&params.post_data.front(), buf, len);
+ }
params.referrer = referrer;
params.notify_redirect = notify_redirects;
params.is_plugin_src_load = is_plugin_src_load;
@@ -1171,6 +1177,14 @@
url.c_str(), range_info.c_str(), range_request_id);
}
+void WebPluginDelegateProxy::OnDidStartLoading() {
+ plugin_->DidStartLoading();
+}
+
+void WebPluginDelegateProxy::OnDidStopLoading() {
+ plugin_->DidStopLoading();
+}
+
void WebPluginDelegateProxy::OnDeferResourceLoading(unsigned long resource_id,
bool defer) {
plugin_->SetDeferResourceLoading(resource_id, defer);

Powered by Google App Engine
This is Rietveld 408576698