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

Unified Diff: webkit/plugins/ppapi/ppb_var_impl.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/ppb_proxy_impl.cc ('k') | webkit/plugins/ppapi/ppb_video_capture_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_var_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_var_impl.cc (revision 106515)
+++ webkit/plugins/ppapi/ppb_var_impl.cc (working copy)
@@ -11,6 +11,7 @@
#include "ppapi/c/pp_var.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "webkit/plugins/ppapi/common.h"
+#include "webkit/plugins/ppapi/host_globals.h"
#include "webkit/plugins/ppapi/npapi_glue.h"
#include "webkit/plugins/ppapi/npobject_var.h"
#include "webkit/plugins/ppapi/plugin_module.h"
@@ -20,6 +21,7 @@
#include "v8/include/v8.h"
using ppapi::NPObjectVar;
+using ppapi::PpapiGlobals;
using ppapi::StringVar;
using ppapi::Var;
using WebKit::WebBindings;
@@ -124,7 +126,8 @@
NPObjectVar* object() { return object_.get(); }
PluginInstance* GetPluginInstance() {
- return ResourceTracker::Get()->GetInstance(object()->pp_instance());
+ return HostGlobals::Get()->host_resource_tracker()->GetInstance(
+ object()->pp_instance());
}
protected:
@@ -170,11 +173,11 @@
// PPB_Var methods -------------------------------------------------------------
void AddRefVar(PP_Var var) {
- ResourceTracker::Get()->GetVarTracker()->AddRefVar(var);
+ PpapiGlobals::Get()->GetVarTracker()->AddRefVar(var);
}
void ReleaseVar(PP_Var var) {
- ResourceTracker::Get()->GetVarTracker()->ReleaseVar(var);
+ PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var);
}
PP_Var VarFromUtf8(PP_Module module, const char* data, uint32_t len) {
@@ -404,10 +407,11 @@
ppp_class, ppp_class_data);
}
-PP_Var CreateObjectDeprecated(PP_Instance instance_id,
+PP_Var CreateObjectDeprecated(PP_Instance pp_instance,
const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data) {
- PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
+ PluginInstance* instance =
+ HostGlobals::Get()->host_resource_tracker()->GetInstance(pp_instance);
if (!instance) {
DLOG(ERROR) << "Create object passed an invalid instance.";
return PP_MakeNull();
@@ -415,10 +419,11 @@
return PluginObject::Create(instance, ppp_class, ppp_class_data);
}
-PP_Var CreateObjectWithModuleDeprecated(PP_Module module_id,
+PP_Var CreateObjectWithModuleDeprecated(PP_Module pp_module,
const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data) {
- PluginModule* module = ResourceTracker::Get()->GetModule(module_id);
+ PluginModule* module =
+ HostGlobals::Get()->host_resource_tracker()->GetModule(pp_module);
if (!module)
return PP_MakeNull();
return PluginObject::Create(module->GetSomeInstance(),
Property changes on: webkit/plugins/ppapi/ppb_var_impl.cc
___________________________________________________________________
Deleted: svn:mergeinfo
Reverse-merged /branches/chrome_webkit_merge_branch/src/webkit/plugins/ppapi/ppb_var_impl.cc:r3734-4217,4606-5108,5177-5263
« no previous file with comments | « webkit/plugins/ppapi/ppb_proxy_impl.cc ('k') | webkit/plugins/ppapi/ppb_video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698