summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/var_tracker.h
diff options
context:
space:
mode:
authormgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-31 10:59:03 +0000
committermgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-31 10:59:03 +0000
commit17d69d8f367c5662b1c0be354d523f17d2a319b4 (patch)
tree3bd424646a210d043a01aa39f35583da3b54833b /ppapi/shared_impl/var_tracker.h
parent958e785645c18e72c5246684fdf344b8c1a9324a (diff)
downloadchromium_src-17d69d8f367c5662b1c0be354d523f17d2a319b4.zip
chromium_src-17d69d8f367c5662b1c0be354d523f17d2a319b4.tar.gz
chromium_src-17d69d8f367c5662b1c0be354d523f17d2a319b4.tar.bz2
[PPAPI] It is now possible to pass filesystems from JavaScript to NaCl modules.
If a DOMFileSystem is passed as a message to the NaCl module, it will be converted into a resource var which is available to the plugin via the dev interface PPB_VarResource_Dev. BUG=177017 Review URL: https://codereview.chromium.org/26564009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/var_tracker.h')
-rw-r--r--ppapi/shared_impl/var_tracker.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
index 168fcb9..4856766 100644
--- a/ppapi/shared_impl/var_tracker.h
+++ b/ppapi/shared_impl/var_tracker.h
@@ -21,6 +21,10 @@
#include "ppapi/shared_impl/ppapi_shared_export.h"
#include "ppapi/shared_impl/var.h"
+namespace IPC {
+class Message;
+} // namespace IPC
+
namespace ppapi {
class ArrayBufferVar;
@@ -85,6 +89,16 @@ class PPAPI_SHARED_EXPORT VarTracker {
// usually immediately put this in a scoped_refptr).
ArrayBufferVar* MakeArrayBufferVar(uint32 size_in_bytes, const void* data);
+ // Creates a new resource var from a resource creation message. Returns a
+ // PP_Var that references a new PP_Resource, both with an initial reference
+ // count of 1. On the host side, |creation_message| is ignored, and an empty
+ // resource var is always returned.
+ virtual PP_Var MakeResourcePPVarFromMessage(
+ PP_Instance instance,
+ const IPC::Message& creation_message,
+ int pending_renderer_id,
+ int pending_browser_id) = 0;
+
// Creates a new resource var that points to a given resource ID. Returns a
// PP_Var that references it and has an initial reference count of 1.
// If |pp_resource| is 0, returns a valid, empty resource var. On the plugin