| Index: webkit/plugins/ppapi/ppapi_webplugin_impl.cc
|
| diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
|
| index 04161408bce499a3a82557deeb2f25d694b50dd0..447b54c8dee1d752e70b1127aa962b00e7beab38 100644
|
| --- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
|
| +++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
|
| @@ -21,12 +21,12 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
| +#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
| #include "webkit/plugins/ppapi/message_channel.h"
|
| #include "webkit/plugins/ppapi/npobject_var.h"
|
| #include "webkit/plugins/ppapi/plugin_module.h"
|
| #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
|
| -#include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
|
|
|
| using ppapi::NPObjectVar;
|
| using WebKit::WebCanvas;
|
| @@ -187,38 +187,26 @@ bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event,
|
|
|
| void WebPluginImpl::didReceiveResponse(
|
| const WebKit::WebURLResponse& response) {
|
| - DCHECK(!document_loader_);
|
| -
|
| - if (instance_->module()->is_crashed()) {
|
| - // Don't create a resource for a crashed plugin.
|
| - instance_->container()->element().document().frame()->stopLoading();
|
| - return;
|
| - }
|
| -
|
| - document_loader_ = new PPB_URLLoader_Impl(instance_->pp_instance(), true);
|
| - document_loader_->didReceiveResponse(NULL, response);
|
| -
|
| - if (!instance_->HandleDocumentLoad(document_loader_))
|
| - document_loader_ = NULL;
|
| + DCHECK(!instance_->document_loader());
|
| + instance_->HandleDocumentLoad(response);
|
| }
|
|
|
| void WebPluginImpl::didReceiveData(const char* data, int data_length) {
|
| - if (document_loader_)
|
| - document_loader_->didReceiveData(NULL, data, data_length, data_length);
|
| + WebKit::WebURLLoaderClient* document_loader = instance_->document_loader();
|
| + if (document_loader)
|
| + document_loader->didReceiveData(NULL, data, data_length, 0);
|
| }
|
|
|
| void WebPluginImpl::didFinishLoading() {
|
| - if (document_loader_) {
|
| - document_loader_->didFinishLoading(NULL, 0);
|
| - document_loader_ = NULL;
|
| - }
|
| + WebKit::WebURLLoaderClient* document_loader = instance_->document_loader();
|
| + if (document_loader)
|
| + document_loader->didFinishLoading(NULL, 0.0);
|
| }
|
|
|
| void WebPluginImpl::didFailLoading(const WebKit::WebURLError& error) {
|
| - if (document_loader_) {
|
| - document_loader_->didFail(NULL, error);
|
| - document_loader_ = NULL;
|
| - }
|
| + WebKit::WebURLLoaderClient* document_loader = instance_->document_loader();
|
| + if (document_loader)
|
| + document_loader->didFail(NULL, error);
|
| }
|
|
|
| void WebPluginImpl::didFinishLoadingFrameRequest(const WebKit::WebURL& url,
|
|
|