Commit 35ac9413 authored by mgiuca@chromium.org's avatar mgiuca@chromium.org

[PPAPI] Updated documentation for PP_VarType enum constants.

Wrote proper documentation for PP_VARTYPE_ARRAY and PP_VARTYPE_DICTIONARY. These
previously said that they are not currently supported, but they are.

For PP_VARTYPE_STRING, added note that AddRef and Release must be used.

Review URL: https://chromiumcodereview.appspot.com/23757014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221654 0039d316-1c4b-4281-b951-d872f2087c98
parent cf2a8110
...@@ -44,23 +44,33 @@ enum PP_VarType { ...@@ -44,23 +44,33 @@ enum PP_VarType {
/** /**
* The Var represents a string. The <code>as_id</code> field is used to * The Var represents a string. The <code>as_id</code> field is used to
* identify the string, which may be created and retrieved from the * identify the string, which may be created and retrieved from the
* <code>PPB_Var</code> interface. * <code>PPB_Var</code> interface. These objects are reference counted, so
* AddRef and Release must be used properly to avoid memory leaks.
*/ */
PP_VARTYPE_STRING = 5, PP_VARTYPE_STRING = 5,
/** /**
* Represents a JavaScript object. This vartype is not currently usable * Represents a JavaScript object. This vartype is not currently usable
* from modules, although it is used internally for some tasks. * from modules, although it is used internally for some tasks. These objects
* are reference counted, so AddRef and Release must be used properly to avoid
* memory leaks.
*/ */
PP_VARTYPE_OBJECT = 6, PP_VARTYPE_OBJECT = 6,
/** /**
* Arrays and dictionaries are not currently supported but will be added * Represents an array of Vars. The <code>as_id</code> field is used to
* in future revisions. These objects are reference counted so be sure * identify the array, which may be created and manipulated from the
* to properly AddRef/Release them as you would with strings to ensure your * <code>PPB_VarArray</code> interface. These objects are reference counted,
* module will continue to work with future versions of the API. * so AddRef and Release must be used properly to avoid memory leaks.
*/ */
PP_VARTYPE_ARRAY = 7, PP_VARTYPE_ARRAY = 7,
/**
* Represents a mapping from strings to Vars. The <code>as_id</code> field is
* used to identify the dictionary, which may be created and manipulated from
* the <code>PPB_VarDictionary</code> interface. These objects are reference
* counted, so AddRef and Release must be used properly to avoid memory leaks.
*/
PP_VARTYPE_DICTIONARY = 8, PP_VARTYPE_DICTIONARY = 8,
/** /**
...@@ -68,7 +78,8 @@ enum PP_VarType { ...@@ -68,7 +78,8 @@ enum PP_VarType {
* represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is * represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is
* only meant to contain basic numeric types, and is always stored * only meant to contain basic numeric types, and is always stored
* contiguously. See PPB_VarArrayBuffer_Dev for functions special to * contiguously. See PPB_VarArrayBuffer_Dev for functions special to
* ArrayBuffer vars. * ArrayBuffer vars. These objects are reference counted, so AddRef and
* Release must be used properly to avoid memory leaks.
*/ */
PP_VARTYPE_ARRAY_BUFFER = 9 PP_VARTYPE_ARRAY_BUFFER = 9
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* found in the LICENSE file. * found in the LICENSE file.
*/ */
/* From pp_var.idl modified Mon Feb 11 15:41:10 2013. */ /* From pp_var.idl modified Wed Sep 4 10:11:31 2013. */
#ifndef PPAPI_C_PP_VAR_H_ #ifndef PPAPI_C_PP_VAR_H_
#define PPAPI_C_PP_VAR_H_ #define PPAPI_C_PP_VAR_H_
...@@ -53,28 +53,38 @@ typedef enum { ...@@ -53,28 +53,38 @@ typedef enum {
/** /**
* The Var represents a string. The <code>as_id</code> field is used to * The Var represents a string. The <code>as_id</code> field is used to
* identify the string, which may be created and retrieved from the * identify the string, which may be created and retrieved from the
* <code>PPB_Var</code> interface. * <code>PPB_Var</code> interface. These objects are reference counted, so
* AddRef and Release must be used properly to avoid memory leaks.
*/ */
PP_VARTYPE_STRING = 5, PP_VARTYPE_STRING = 5,
/** /**
* Represents a JavaScript object. This vartype is not currently usable * Represents a JavaScript object. This vartype is not currently usable
* from modules, although it is used internally for some tasks. * from modules, although it is used internally for some tasks. These objects
* are reference counted, so AddRef and Release must be used properly to avoid
* memory leaks.
*/ */
PP_VARTYPE_OBJECT = 6, PP_VARTYPE_OBJECT = 6,
/** /**
* Arrays and dictionaries are not currently supported but will be added * Represents an array of Vars. The <code>as_id</code> field is used to
* in future revisions. These objects are reference counted so be sure * identify the array, which may be created and manipulated from the
* to properly AddRef/Release them as you would with strings to ensure your * <code>PPB_VarArray</code> interface. These objects are reference counted,
* module will continue to work with future versions of the API. * so AddRef and Release must be used properly to avoid memory leaks.
*/ */
PP_VARTYPE_ARRAY = 7, PP_VARTYPE_ARRAY = 7,
/**
* Represents a mapping from strings to Vars. The <code>as_id</code> field is
* used to identify the dictionary, which may be created and manipulated from
* the <code>PPB_VarDictionary</code> interface. These objects are reference
* counted, so AddRef and Release must be used properly to avoid memory leaks.
*/
PP_VARTYPE_DICTIONARY = 8, PP_VARTYPE_DICTIONARY = 8,
/** /**
* ArrayBuffer represents a JavaScript ArrayBuffer. This is the type which * ArrayBuffer represents a JavaScript ArrayBuffer. This is the type which
* represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is * represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is
* only meant to contain basic numeric types, and is always stored * only meant to contain basic numeric types, and is always stored
* contiguously. See PPB_VarArrayBuffer_Dev for functions special to * contiguously. See PPB_VarArrayBuffer_Dev for functions special to
* ArrayBuffer vars. * ArrayBuffer vars. These objects are reference counted, so AddRef and
* Release must be used properly to avoid memory leaks.
*/ */
PP_VARTYPE_ARRAY_BUFFER = 9 PP_VARTYPE_ARRAY_BUFFER = 9
} PP_VarType; } PP_VarType;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment