diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-04 22:53:08 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-04 22:53:08 +0000 |
commit | 19bb672d814c1927874efd9a17c3e24cccb169b5 (patch) | |
tree | 6d4f4271a00587260b5e3d617d8e6d89e223cdc1 /webkit/plugins/ppapi/host_globals.h | |
parent | e72322502b4068e5caae8929646d02a29a00480d (diff) | |
download | chromium_src-19bb672d814c1927874efd9a17c3e24cccb169b5.zip chromium_src-19bb672d814c1927874efd9a17c3e24cccb169b5.tar.gz chromium_src-19bb672d814c1927874efd9a17c3e24cccb169b5.tar.bz2 |
Use the new callback tracker and delete the old one
I added some ClearAndRun and ClearAndAbort helper functions to clean up the
common pattern of doing a swap to run the callbacks. I was also able to clean
up some of the file callbacks stuff since the parameters to the new
TrackedCallback are simpler.
This fixes a scary bug in the Transport API where all completion callbacks
would be aborted for all objects when you close the connection (!)
The HostResourceTracker is no longer necessary since the only point of this
was to integrate with the callback tracker. I removed it.
BUG=74062
TEST=
Review URL: http://codereview.chromium.org/9015009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/host_globals.h')
-rw-r--r-- | webkit/plugins/ppapi/host_globals.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/webkit/plugins/ppapi/host_globals.h b/webkit/plugins/ppapi/host_globals.h index 914be3a..db840aa 100644 --- a/webkit/plugins/ppapi/host_globals.h +++ b/webkit/plugins/ppapi/host_globals.h @@ -8,8 +8,8 @@ #include "base/compiler_specific.h" #include "ppapi/shared_impl/callback_tracker.h" #include "ppapi/shared_impl/ppapi_globals.h" +#include "ppapi/shared_impl/resource_tracker.h" #include "ppapi/shared_impl/var_tracker.h" -#include "webkit/plugins/ppapi/host_resource_tracker.h" #include "webkit/plugins/ppapi/host_var_tracker.h" #include "webkit/plugins/webkit_plugins_export.h" @@ -39,9 +39,6 @@ class HostGlobals : public ::ppapi::PpapiGlobals { ::ppapi::ApiID id) OVERRIDE; virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; - HostResourceTracker* host_resource_tracker() { - return &host_resource_tracker_; - } HostVarTracker* host_var_tracker() { return &host_var_tracker_; } @@ -83,7 +80,7 @@ class HostGlobals : public ::ppapi::PpapiGlobals { WEBKIT_PLUGINS_EXPORT static HostGlobals* host_globals_; - HostResourceTracker host_resource_tracker_; + ::ppapi::ResourceTracker resource_tracker_; HostVarTracker host_var_tracker_; // Tracks all live instances and their associated data. |