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

Unified Diff: webkit/plugins/ppapi/ppapi_webplugin_impl.cc

Issue 14371021: Implementation of URLLoader using PluginResource/ResourceHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase, track src/webkit gypi changes. Created 7 years, 7 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
« no previous file with comments | « webkit/plugins/ppapi/ppapi_webplugin_impl.h ('k') | webkit/plugins/ppapi/ppb_proxy_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7257f2e13559b879edcc5489106210a5c585ca4d..30820fbecc10de58a3da6e5bab671c42b3bcc523 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,
« no previous file with comments | « webkit/plugins/ppapi/ppapi_webplugin_impl.h ('k') | webkit/plugins/ppapi/ppb_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698