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

Unified Diff: ppapi/proxy/ppb_url_response_info_proxy.cc

Issue 6282007: First pass at making the proxy handle multiple renderers. This associates the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « ppapi/proxy/ppb_url_response_info_proxy.h ('k') | ppapi/proxy/ppb_var_deprecated_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_url_response_info_proxy.cc
===================================================================
--- ppapi/proxy/ppb_url_response_info_proxy.cc (revision 71973)
+++ ppapi/proxy/ppb_url_response_info_proxy.cc (working copy)
@@ -15,7 +15,7 @@
class URLResponseInfo : public PluginResource {
public:
- URLResponseInfo() {}
+ URLResponseInfo(PP_Instance instance) : PluginResource(instance) {}
virtual ~URLResponseInfo() {}
// Resource overrides.
@@ -33,7 +33,14 @@
}
PP_Var GetProperty(PP_Resource response, PP_URLResponseProperty property) {
- Dispatcher* dispatcher = PluginDispatcher::Get();
+ URLResponseInfo* object = PluginResource::GetAs<URLResponseInfo>(response);
+ if (!object)
+ return PP_MakeUndefined();
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(
+ object->instance());
+ if (!dispatcher)
+ return PP_MakeUndefined();
+
ReceiveSerializedVarReturnValue result;
dispatcher->Send(new PpapiHostMsg_PPBURLResponseInfo_GetProperty(
INTERFACE_ID_PPB_URL_RESPONSE_INFO, response, property, &result));
@@ -43,7 +50,6 @@
PP_Resource GetBodyAsFileRef(PP_Resource response) {
PP_Resource result = 0;
/*
- Dispatcher* dispatcher = PluginDispatcher::Get();
dispatcher->Send(new PpapiHostMsg_PPBURLResponseInfo_GetBodyAsFileRef(
INTERFACE_ID_PPB_URL_RESPONSE_INFO, response, &result));
// TODO(brettw) when we have FileRef proxied, make an object from that
@@ -71,9 +77,10 @@
// static
void PPB_URLResponseInfo_Proxy::TrackPluginResource(
+ PP_Instance instance,
PP_Resource response_resource) {
- linked_ptr<URLResponseInfo> object(new URLResponseInfo);
- PluginDispatcher::Get()->plugin_resource_tracker()->AddResource(
+ linked_ptr<URLResponseInfo> object(new URLResponseInfo(instance));
+ PluginResourceTracker::GetInstance()->AddResource(
response_resource, object);
}
« no previous file with comments | « ppapi/proxy/ppb_url_response_info_proxy.h ('k') | ppapi/proxy/ppb_var_deprecated_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698