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

Unified Diff: ppapi/cpp/graphics_3d_client.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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/cpp/graphics_3d_client.h ('k') | ppapi/cpp/image_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/graphics_3d_client.cc
diff --git a/ppapi/cpp/graphics_3d_client.cc b/ppapi/cpp/graphics_3d_client.cc
index d827f9d95f1e01081a182e6ee57bdf4e2a35aae6..6702c057e0836a4e1dab34cd747d0df478e00fd7 100644
--- a/ppapi/cpp/graphics_3d_client.cc
+++ b/ppapi/cpp/graphics_3d_client.cc
@@ -6,6 +6,7 @@
#include "ppapi/c/ppp_graphics_3d.h"
#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
@@ -17,7 +18,7 @@ const char kPPPGraphics3DInterface[] = PPP_GRAPHICS_3D_INTERFACE;
void Graphics3D_ContextLost(PP_Instance instance) {
void* object =
- pp::Instance::GetPerInstanceObject(instance, kPPPGraphics3DInterface);
+ Instance::GetPerInstanceObject(instance, kPPPGraphics3DInterface);
if (!object)
return;
return static_cast<Graphics3DClient*>(object)->Graphics3DContextLost();
@@ -29,15 +30,16 @@ static PPP_Graphics3D graphics3d_interface = {
} // namespace
-Graphics3DClient::Graphics3DClient(Instance* instance)
+Graphics3DClient::Graphics3DClient(const InstanceHandle& instance)
: associated_instance_(instance) {
- pp::Module::Get()->AddPluginInterface(kPPPGraphics3DInterface,
- &graphics3d_interface);
- associated_instance_->AddPerInstanceObject(kPPPGraphics3DInterface, this);
+ Module::Get()->AddPluginInterface(kPPPGraphics3DInterface,
+ &graphics3d_interface);
+ Instance::AddPerInstanceObject(instance, kPPPGraphics3DInterface, this);
}
Graphics3DClient::~Graphics3DClient() {
- associated_instance_->RemovePerInstanceObject(kPPPGraphics3DInterface, this);
+ Instance::RemovePerInstanceObject(associated_instance_,
+ kPPPGraphics3DInterface, this);
}
} // namespace pp
« no previous file with comments | « ppapi/cpp/graphics_3d_client.h ('k') | ppapi/cpp/image_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698