| 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 4dd83170f2c9facf0c239bb41dc0dea4c51106bd..f5dff24d695cbe9108dde48f4b62decf43e8498b 100644
|
| --- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
|
| +++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc
|
| @@ -14,6 +14,7 @@
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
| +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoaderClient.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
|
| @@ -27,7 +28,6 @@
|
| #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;
|
| @@ -191,38 +191,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,
|
|
|