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

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

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nulls auditeed Created 9 years, 4 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_plugin_instance.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 52b1eac5dfa41fd386c627cd5ed57a4c98d88c93..1268e820948827e50249ed81ad55a441ce48aa46 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -29,6 +29,7 @@
#include "ppapi/c/ppp_messaging.h"
#include "ppapi/c/private/ppb_instance_private.h"
#include "ppapi/c/private/ppp_instance_private.h"
+#include "ppapi/shared_impl/resource.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_buffer_api.h"
@@ -65,6 +66,7 @@
#include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
#include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
#include "webkit/plugins/ppapi/ppp_pdf.h"
+#include "webkit/plugins/ppapi/resource_tracker.h"
#include "webkit/plugins/ppapi/string.h"
#include "webkit/plugins/sad_plugin.h"
@@ -431,9 +433,8 @@ bool PluginInstance::Initialize(WebPluginContainer* container,
}
bool PluginInstance::HandleDocumentLoad(PPB_URLLoader_Impl* loader) {
- Resource::ScopedResourceId resource(loader);
- return PP_ToBool(instance_interface_->HandleDocumentLoad(pp_instance(),
- resource.id));
+ return PP_ToBool(instance_interface_->HandleDocumentLoad(
+ pp_instance(), loader->pp_resource()));
}
bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event,
@@ -460,11 +461,10 @@ bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event,
else
rv = true; // Unfiltered events are assumed to be handled.
scoped_refptr<PPB_InputEvent_Impl> event_resource(
- new PPB_InputEvent_Impl(this, events[i]));
- Resource::ScopedResourceId resource(event_resource);
+ new PPB_InputEvent_Impl(pp_instance(), events[i]));
rv |= PP_ToBool(plugin_input_event_interface_->HandleInputEvent(
- pp_instance(), resource.id));
+ pp_instance(), event_resource->pp_resource()));
}
}
}
@@ -1369,7 +1369,7 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
static_cast<PPB_Surface3D_Impl*>(enter_surface_3d.object()) : NULL;
if (graphics_2d) {
- if (graphics_2d->instance() != this)
+ if (graphics_2d->pp_instance() != pp_instance())
return PP_FALSE; // Can't bind other instance's contexts.
if (!graphics_2d->BindToInstance(this))
return PP_FALSE; // Can't bind to more than one instance.
@@ -1380,7 +1380,7 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
} else if (graphics_3d) {
// Make sure graphics can only be bound to the instance it is
// associated with.
- if (graphics_3d->instance() != this)
+ if (graphics_3d->pp_instance() != pp_instance())
return PP_FALSE;
if (!graphics_3d->BindToInstance(true))
return PP_FALSE;
@@ -1390,7 +1390,7 @@ PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
} else if (surface_3d) {
// Make sure graphics can only be bound to the instance it is
// associated with.
- if (surface_3d->instance() != this)
+ if (surface_3d->pp_instance() != pp_instance())
return PP_FALSE;
if (!surface_3d->BindToInstance(true))
return PP_FALSE;
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppapi_webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698