diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 21:57:50 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 21:57:50 +0000 |
commit | 77ac44f19b5d1ead7c1b29900341fbfc07286ce6 (patch) | |
tree | a09b9951a19ca4a322fbd37a82438ed5e38ae44d /webkit/plugins/ppapi/ppb_flash_impl.cc | |
parent | 6b292e3db6ccdda0477289b3d8c713f2707ae9ff (diff) | |
download | chromium_src-77ac44f19b5d1ead7c1b29900341fbfc07286ce6.zip chromium_src-77ac44f19b5d1ead7c1b29900341fbfc07286ce6.tar.gz chromium_src-77ac44f19b5d1ead7c1b29900341fbfc07286ce6.tar.bz2 |
Add a new globals object for PPAPI tracking information.
This adds a specialization on the host and plugin side of the proxy. This
replaces the ad-hoc singleton tracking done by the resource and var trackers
with just being getters on this global object.
Most code can use the single PpapiGlobals class. I also allow code to get the
host and plugin specializations since some code needs access to some specific
features of each side.
In a later pass I'll move the other stuff out of TrackerBase and delete it.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/8316008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_flash_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_flash_impl.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc index 58354db..78d5677 100644 --- a/webkit/plugins/ppapi/ppb_flash_impl.cc +++ b/webkit/plugins/ppapi/ppb_flash_impl.cc @@ -14,6 +14,7 @@ #include "ppapi/shared_impl/var.h" #include "ppapi/thunk/enter.h" #include "webkit/plugins/ppapi/common.h" +#include "webkit/plugins/ppapi/host_globals.h" #include "webkit/plugins/ppapi/plugin_delegate.h" #include "webkit/plugins/ppapi/plugin_module.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" @@ -32,14 +33,16 @@ namespace ppapi { namespace { void SetInstanceAlwaysOnTop(PP_Instance pp_instance, PP_Bool on_top) { - PluginInstance* instance = ResourceTracker::Get()->GetInstance(pp_instance); + PluginInstance* instance = + HostGlobals::Get()->host_resource_tracker()->GetInstance(pp_instance); if (!instance) return; instance->set_always_on_top(PPBoolToBool(on_top)); } PP_Var GetProxyForURL(PP_Instance pp_instance, const char* url) { - PluginInstance* instance = ResourceTracker::Get()->GetInstance(pp_instance); + PluginInstance* instance = + HostGlobals::Get()->host_resource_tracker()->GetInstance(pp_instance); if (!instance) return PP_MakeUndefined(); @@ -83,7 +86,8 @@ void QuitMessageLoop(PP_Instance instance) { } double GetLocalTimeZoneOffset(PP_Instance pp_instance, PP_Time t) { - PluginInstance* instance = ResourceTracker::Get()->GetInstance(pp_instance); + PluginInstance* instance = + HostGlobals::Get()->host_resource_tracker()->GetInstance(pp_instance); if (!instance) return 0.0; @@ -101,7 +105,8 @@ double GetLocalTimeZoneOffset(PP_Instance pp_instance, PP_Time t) { } PP_Var GetCommandLineArgs(PP_Module pp_module) { - PluginModule* module = ResourceTracker::Get()->GetModule(pp_module); + PluginModule* module = + HostGlobals::Get()->host_resource_tracker()->GetModule(pp_module); if (!module) return PP_MakeUndefined(); |