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

Unified Diff: ppapi/proxy/plugin_var_tracker.h

Issue 6334016: Refactor PPAPI proxy resource handling to maintain which host they came from,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/proxy/plugin_var_serialization_rules.cc ('k') | ppapi/proxy/plugin_var_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_var_tracker.h
===================================================================
--- ppapi/proxy/plugin_var_tracker.h (revision 72840)
+++ ppapi/proxy/plugin_var_tracker.h (working copy)
@@ -44,6 +44,11 @@
// Dispatcher in this class, which makes it easy to unit test.
typedef IPC::Channel::Sender Sender;
+ // Called by tests that want to specify a specific VarTracker. This allows
+ // them to use a unique one each time and avoids singletons sticking around
+ // across tests.
+ static void SetInstanceForTest(PluginVarTracker* tracker);
+
// Returns the global var tracker for the plugin object.
static PluginVarTracker* GetInstance();
@@ -75,6 +80,10 @@
// should be a VARTYPE_OBJECT
PP_Var GetHostObject(const PP_Var& plugin_object) const;
+ // Like Release() but the var is identified by its host object ID (as
+ // returned by GetHostObject).
+ void ReleaseHostObject(Sender* sender, const PP_Var& host_object);
+
// Retrieves the internal reference counts for testing. Returns 0 if we
// know about the object but the corresponding value is 0, or -1 if the
// given object ID isn't in our map.
@@ -83,7 +92,7 @@
private:
friend struct DefaultSingletonTraits<PluginVarTracker>;
- friend class PluginVarTrackerTest;
+ friend class PluginProxyTest;
// Represents a var as received from the host.
struct HostVar {
« no previous file with comments | « ppapi/proxy/plugin_var_serialization_rules.cc ('k') | ppapi/proxy/plugin_var_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698