| OLD | NEW |
| 1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 #ifndef PPAPI_C_PP_RESOURCE_H_ | 5 #ifndef PPAPI_C_PP_RESOURCE_H_ |
| 6 #define PPAPI_C_PP_RESOURCE_H_ | 6 #define PPAPI_C_PP_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_macros.h" | 8 #include "ppapi/c/pp_macros.h" |
| 9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * @file | 12 * @file |
| 13 * Defines the API ... | 13 * Defines the API ... |
| 14 * | 14 */ |
| 15 * @addtogroup PP | 15 |
| 16 /** |
| 17 * @addtogroup Typedefs |
| 16 * @{ | 18 * @{ |
| 17 */ | 19 */ |
| 18 | 20 |
| 19 /** | 21 /** |
| 20 * A resource is data associated with the Pepper plugin interface. While a | 22 * A resource is data associated with the Pepper plugin interface. While a |
| 21 * Var represents something callable to JS or from the plugin to the DOM, a | 23 * Var represents something callable to JS or from the plugin to the DOM, a |
| 22 * resource has no meaning or visibility outside of the plugin interface. | 24 * resource has no meaning or visibility outside of the plugin interface. |
| 23 * | 25 * |
| 24 * Resources are reference counted. Use AddRefResource and ReleaseResource to | 26 * Resources are reference counted. Use AddRefResource and ReleaseResource to |
| 25 * manage your reference count of a resource. The data will be automatically | 27 * manage your reference count of a resource. The data will be automatically |
| 26 * destroyed when the internal reference count reaches 0. | 28 * destroyed when the internal reference count reaches 0. |
| 27 * | 29 * |
| 28 * Value is an opaque handle assigned by the browser to the resource. It is | 30 * Value is an opaque handle assigned by the browser to the resource. It is |
| 29 * guaranteed never to be 0 for a valid resource, so a plugin can initialize | 31 * guaranteed never to be 0 for a valid resource, so a plugin can initialize |
| 30 * it to 0 to indicate a "NULL handle." Some interfaces may return a NULL | 32 * it to 0 to indicate a "NULL handle." Some interfaces may return a NULL |
| 31 * resource to indicate failure. | 33 * resource to indicate failure. |
| 34 * |
| 32 */ | 35 */ |
| 33 typedef int32_t PP_Resource; | 36 typedef int32_t PP_Resource; |
| 34 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Resource, 4); | 37 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Resource, 4); |
| 35 | |
| 36 /** | 38 /** |
| 37 * @} | 39 * @} |
| 38 * End addtogroup PP | |
| 39 */ | 40 */ |
| 40 | 41 |
| 41 #endif /* PPAPI_C_PP_RESOURCE_H_ */ | 42 #endif /* PPAPI_C_PP_RESOURCE_H_ */ |
| 42 | 43 |
| OLD | NEW |