| 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_PPB_VAR_DEPRECATED_H_ | 5 #ifndef PPAPI_C_PPB_VAR_DEPRECATED_H_ |
| 6 #define PPAPI_C_PPB_VAR_DEPRECATED_H_ | 6 #define PPAPI_C_PPB_VAR_DEPRECATED_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/deprecated_bool.h" | 8 #include "ppapi/c/dev/deprecated_bool.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 * true and sets *object_data to the value passed to CreateObject provided | 199 * true and sets *object_data to the value passed to CreateObject provided |
| 200 * object_data is non-NULL. Otherwise, this method returns false. | 200 * object_data is non-NULL. Otherwise, this method returns false. |
| 201 */ | 201 */ |
| 202 bool (*IsInstanceOf)(struct PP_Var var, | 202 bool (*IsInstanceOf)(struct PP_Var var, |
| 203 const struct PPP_Class_Deprecated* object_class, | 203 const struct PPP_Class_Deprecated* object_class, |
| 204 void** object_data); | 204 void** object_data); |
| 205 | 205 |
| 206 /** | 206 /** |
| 207 * Creates an object that the plugin implements. The plugin supplies a | 207 * Creates an object that the plugin implements. The plugin supplies a |
| 208 * pointer to the class interface it implements for that object, and its | 208 * pointer to the class interface it implements for that object, and its |
| 209 * associated internal data that represents that object. | 209 * associated internal data that represents that object. This object data |
| 210 * must be unique among all "live" objects. |
| 210 * | 211 * |
| 211 * The returned object will have a reference count of 1. When the reference | 212 * The returned object will have a reference count of 1. When the reference |
| 212 * count reached 0, the class' Destruct function wlil be called. | 213 * count reached 0, the class' Destruct function wlil be called. |
| 213 * | 214 * |
| 214 * On failure, this will return a null var. This probably means the module | 215 * On failure, this will return a null var. This probably means the module |
| 215 * was invalid. | 216 * was invalid. |
| 216 * | 217 * |
| 217 * Example: Say we're implementing a "Point" object. | 218 * Example: Say we're implementing a "Point" object. |
| 218 * <pre> void PointDestruct(void* object) { | 219 * <pre> void PointDestruct(void* object) { |
| 219 * delete (Point*)object; | 220 * delete (Point*)object; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 244 const struct PPP_Class_Deprecated* object_class, | 245 const struct PPP_Class_Deprecated* object_class, |
| 245 void* object_data); | 246 void* object_data); |
| 246 }; | 247 }; |
| 247 | 248 |
| 248 /** | 249 /** |
| 249 * @} | 250 * @} |
| 250 * End addtogroup PPB | 251 * End addtogroup PPB |
| 251 */ | 252 */ |
| 252 #endif /* PPAPI_C_PPB_VAR_DEPRECATED_H_ */ | 253 #endif /* PPAPI_C_PPB_VAR_DEPRECATED_H_ */ |
| 253 | 254 |
| OLD | NEW |