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

Unified Diff: ppapi/shared_impl/resource_tracker.h

Issue 9455083: Proxy the PPP_Printing interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « ppapi/shared_impl/api_id.h ('k') | ppapi/shared_impl/resource_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/resource_tracker.h
diff --git a/ppapi/shared_impl/resource_tracker.h b/ppapi/shared_impl/resource_tracker.h
index b58541382a483661af7747d29417c1781a097904..6a926ccc58fc78e495a025c4deeb101e3cfd45bc 100644
--- a/ppapi/shared_impl/resource_tracker.h
+++ b/ppapi/shared_impl/resource_tracker.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/memory/linked_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
@@ -30,6 +31,9 @@ class PPAPI_SHARED_EXPORT ResourceTracker {
void AddRefResource(PP_Resource res);
void ReleaseResource(PP_Resource res);
+ // Releases a reference on the given resource once the message loop returns.
+ void ReleaseResourceSoon(PP_Resource res);
+
// Notifies the tracker that a new instance has been created. This must be
// called before creating any resources associated with the instance.
void DidCreateInstance(PP_Instance instance);
@@ -90,6 +94,8 @@ class PPAPI_SHARED_EXPORT ResourceTracker {
int32 last_resource_value_;
+ base::WeakPtrFactory<ResourceTracker> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ResourceTracker);
};
« no previous file with comments | « ppapi/shared_impl/api_id.h ('k') | ppapi/shared_impl/resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698