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

Unified Diff: ppapi/cpp/dev/printing_dev.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/dev/printing_dev.h ('k') | ppapi/cpp/dev/resource_array_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/printing_dev.cc
diff --git a/ppapi/cpp/dev/printing_dev.cc b/ppapi/cpp/dev/printing_dev.cc
index 6c07be96ed6081ad8cee8ee5c82acdbd244bda4f..26fff41f677ae70446547bc0f1a36a1b3ed5a7a0 100644
--- a/ppapi/cpp/dev/printing_dev.cc
+++ b/ppapi/cpp/dev/printing_dev.cc
@@ -5,6 +5,7 @@
#include "ppapi/cpp/dev/printing_dev.h"
#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
@@ -16,7 +17,7 @@ static const char kPPPPrintingInterface[] = PPP_PRINTING_DEV_INTERFACE;
uint32_t QuerySupportedFormats(PP_Instance instance) {
void* object =
- pp::Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
+ Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
if (!object)
return 0;
return static_cast<Printing_Dev*>(object)->QuerySupportedPrintOutputFormats();
@@ -25,7 +26,7 @@ uint32_t QuerySupportedFormats(PP_Instance instance) {
int32_t Begin(PP_Instance instance,
const struct PP_PrintSettings_Dev* print_settings) {
void* object =
- pp::Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
+ Instance::GetPerInstanceObject(instance, kPPPPrintingInterface);
if (!object)
return 0;
return static_cast<Printing_Dev*>(object)->PrintBegin(*print_settings);
@@ -69,14 +70,15 @@ const PPP_Printing_Dev ppp_printing = {
} // namespace
-Printing_Dev::Printing_Dev(Instance* instance)
+Printing_Dev::Printing_Dev(const InstanceHandle& instance)
: associated_instance_(instance) {
- pp::Module::Get()->AddPluginInterface(kPPPPrintingInterface, &ppp_printing);
- associated_instance_->AddPerInstanceObject(kPPPPrintingInterface, this);
+ Module::Get()->AddPluginInterface(kPPPPrintingInterface, &ppp_printing);
+ Instance::AddPerInstanceObject(instance, kPPPPrintingInterface, this);
}
Printing_Dev::~Printing_Dev() {
- associated_instance_->RemovePerInstanceObject(kPPPPrintingInterface, this);
+ Instance::RemovePerInstanceObject(associated_instance_,
+ kPPPPrintingInterface, this);
}
} // namespace pp
« no previous file with comments | « ppapi/cpp/dev/printing_dev.h ('k') | ppapi/cpp/dev/resource_array_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698