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

Unified Diff: webkit/glue/plugins/pepper_resource_tracker.cc

Issue 2859023: Boilerplate implementation of the Pepper URL Loader API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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/glue/plugins/pepper_resource_tracker.h ('k') | webkit/glue/plugins/pepper_url_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_resource_tracker.cc
===================================================================
--- webkit/glue/plugins/pepper_resource_tracker.cc (revision 50727)
+++ webkit/glue/plugins/pepper_resource_tracker.cc (working copy)
@@ -12,6 +12,9 @@
#include "webkit/glue/plugins/pepper_device_context_2d.h"
#include "webkit/glue/plugins/pepper_image_data.h"
#include "webkit/glue/plugins/pepper_resource.h"
+#include "webkit/glue/plugins/pepper_url_loader.h"
+#include "webkit/glue/plugins/pepper_url_request_info.h"
+#include "webkit/glue/plugins/pepper_url_response_info.h"
namespace pepper {
@@ -66,6 +69,30 @@
return scoped_refptr<ImageData>(resource->AsImageData());
}
+scoped_refptr<URLLoader> ResourceTracker::GetAsURLLoader(
+ PP_Resource res) const {
+ scoped_refptr<Resource> resource = GetResource(res);
+ if (!resource.get())
+ return scoped_refptr<URLLoader>();
+ return scoped_refptr<URLLoader>(resource->AsURLLoader());
+}
+
+scoped_refptr<URLRequestInfo> ResourceTracker::GetAsURLRequestInfo(
+ PP_Resource res) const {
+ scoped_refptr<Resource> resource = GetResource(res);
+ if (!resource.get())
+ return scoped_refptr<URLRequestInfo>();
+ return scoped_refptr<URLRequestInfo>(resource->AsURLRequestInfo());
+}
+
+scoped_refptr<URLResponseInfo> ResourceTracker::GetAsURLResponseInfo(
+ PP_Resource res) const {
+ scoped_refptr<Resource> resource = GetResource(res);
+ if (!resource.get())
+ return scoped_refptr<URLResponseInfo>();
+ return scoped_refptr<URLResponseInfo>(resource->AsURLResponseInfo());
+}
+
scoped_refptr<Buffer> ResourceTracker::GetAsBuffer(
PP_Resource res) const {
scoped_refptr<Resource> resource = GetResource(res);
« no previous file with comments | « webkit/glue/plugins/pepper_resource_tracker.h ('k') | webkit/glue/plugins/pepper_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698