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

Unified Diff: ppapi/c/private/ppb_proxy_private.h

Issue 6628019: Ensure that PP_Instance values are unique within a plugin process in addition... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | « content/common/child_process.h ('k') | ppapi/ppapi_shared_proxy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/private/ppb_proxy_private.h
===================================================================
--- ppapi/c/private/ppb_proxy_private.h (revision 77663)
+++ ppapi/c/private/ppb_proxy_private.h (working copy)
@@ -5,11 +5,12 @@
#ifndef PPAPI_C_PRIVATE_PROXY_PRIVATE_H_
#define PPAPI_C_PRIVATE_PROXY_PRIVATE_H_
+#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"
-#define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;2"
+#define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;3"
// Exposes functions needed by the out-of-process proxy to call into the
// renderer PPAPI implementation.
@@ -19,6 +20,19 @@
// Returns the instance for the given resource, or 0 on failure.
PP_Instance (*GetInstanceForResource)(PP_Resource resource);
+
+ // Sets a callback that will be used to make sure that PP_Instance IDs
+ // are unique in the plugin.
+ //
+ // Since the plugin may be shared between several browser processes, we need
+ // to do extra work to make sure that an instance ID is globally unqiue. The
+ // given function will be called and will return true if the given
+ // PP_Instance is OK to use in the plugin. It will then be marked as "in use"
+ // On failure (returns false), the host implementation will generate a new
+ // instance ID and try again.
+ void (*SetReserveInstanceIDCallback)(
+ PP_Module module,
+ PP_Bool (*is_seen)(PP_Module, PP_Instance));
};
#endif // PPAPI_C_PRIVATE_PROXY_PRIVATE_H_
« no previous file with comments | « content/common/child_process.h ('k') | ppapi/ppapi_shared_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698