| Index: webkit/plugins/ppapi/npapi_glue.cc
|
| diff --git a/webkit/plugins/ppapi/npapi_glue.cc b/webkit/plugins/ppapi/npapi_glue.cc
|
| index cdb49d57cfd193ed9e94a03ab646e2b740402a66..dceb25bae2a83ae76a166cba14ef0dda66902a09 100644
|
| --- a/webkit/plugins/ppapi/npapi_glue.cc
|
| +++ b/webkit/plugins/ppapi/npapi_glue.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/string_util.h"
|
| +#include "webkit/plugins/ppapi/host_globals.h"
|
| #include "webkit/plugins/ppapi/npobject_var.h"
|
| #include "webkit/plugins/ppapi/plugin_module.h"
|
| #include "webkit/plugins/ppapi/plugin_object.h"
|
| @@ -17,6 +18,7 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
|
|
|
| using ppapi::NPObjectVar;
|
| +using ppapi::PpapiGlobals;
|
| using ppapi::StringVar;
|
| using ppapi::Var;
|
| using WebKit::WebBindings;
|
| @@ -132,8 +134,8 @@ PP_Var NPIdentifierToPPVar(PP_Module module, NPIdentifier id) {
|
| PP_Var NPObjectToPPVar(PluginInstance* instance, NPObject* object) {
|
| DCHECK(object);
|
| scoped_refptr<NPObjectVar> object_var(
|
| - ResourceTracker::Get()->NPObjectVarForNPObject(instance->pp_instance(),
|
| - object));
|
| + HostGlobals::Get()->host_resource_tracker()->NPObjectVarForNPObject(
|
| + instance->pp_instance(), object));
|
| if (!object_var) { // No object for this module yet, make a new one.
|
| object_var = new NPObjectVar(instance->module()->pp_module(),
|
| instance->pp_instance(), object);
|
| @@ -159,7 +161,7 @@ PPResultAndExceptionToNPResult::~PPResultAndExceptionToNPResult() {
|
| // been lost.
|
| DCHECK(checked_exception_);
|
|
|
| - ResourceTracker::Get()->GetVarTracker()->ReleaseVar(exception_);
|
| + PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(exception_);
|
| }
|
|
|
| // Call this with the return value of the PPAPI function. It will convert
|
| @@ -184,7 +186,7 @@ bool PPResultAndExceptionToNPResult::SetResult(PP_Var result) {
|
| // No matter what happened, we need to release the reference to the
|
| // value passed in. On success, a reference to this value will be in
|
| // the np_result_.
|
| - ResourceTracker::Get()->GetVarTracker()->ReleaseVar(result);
|
| + PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(result);
|
| return success_;
|
| }
|
|
|
| @@ -236,7 +238,7 @@ PPVarArrayFromNPVariantArray::PPVarArrayFromNPVariantArray(
|
| }
|
|
|
| PPVarArrayFromNPVariantArray::~PPVarArrayFromNPVariantArray() {
|
| - ::ppapi::VarTracker* var_tracker = ResourceTracker::Get()->GetVarTracker();
|
| + ::ppapi::VarTracker* var_tracker = PpapiGlobals::Get()->GetVarTracker();
|
| for (size_t i = 0; i < size_; i++)
|
| var_tracker->ReleaseVar(array_[i]);
|
| }
|
| @@ -248,7 +250,7 @@ PPVarFromNPObject::PPVarFromNPObject(PluginInstance* instance, NPObject* object)
|
| }
|
|
|
| PPVarFromNPObject::~PPVarFromNPObject() {
|
| - ResourceTracker::Get()->GetVarTracker()->ReleaseVar(var_);
|
| + PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_);
|
| }
|
|
|
| // NPObjectAccessorWithIdentifier ----------------------------------------------
|
| @@ -268,7 +270,7 @@ NPObjectAccessorWithIdentifier::NPObjectAccessorWithIdentifier(
|
| }
|
|
|
| NPObjectAccessorWithIdentifier::~NPObjectAccessorWithIdentifier() {
|
| - ResourceTracker::Get()->GetVarTracker()->ReleaseVar(identifier_);
|
| + PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(identifier_);
|
| }
|
|
|
| // TryCatch --------------------------------------------------------------------
|
|
|