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

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

Issue 8344025: Add a new globals object for PPAPI tracking information. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/host_globals.cc ('k') | webkit/plugins/ppapi/npobject_var.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/npapi_glue.cc
===================================================================
--- webkit/plugins/ppapi/npapi_glue.cc (revision 106515)
+++ webkit/plugins/ppapi/npapi_glue.cc (working copy)
@@ -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 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 @@
// 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 @@
// 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() {
- ::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() {
- ResourceTracker::Get()->GetVarTracker()->ReleaseVar(var_);
+ PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_);
}
// NPObjectAccessorWithIdentifier ----------------------------------------------
@@ -268,7 +270,7 @@
}
NPObjectAccessorWithIdentifier::~NPObjectAccessorWithIdentifier() {
- ResourceTracker::Get()->GetVarTracker()->ReleaseVar(identifier_);
+ PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(identifier_);
}
// TryCatch --------------------------------------------------------------------
Property changes on: webkit/plugins/ppapi/npapi_glue.cc
___________________________________________________________________
Deleted: svn:mergeinfo
Reverse-merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/ppapi/npapi_glue.cc:r3734-4217,4606-5108,5177-5263
« no previous file with comments | « webkit/plugins/ppapi/host_globals.cc ('k') | webkit/plugins/ppapi/npobject_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698