| 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_CORE_H_ | 5 #ifndef PPAPI_C_PPB_CORE_H_ |
| 6 #define PPAPI_C_PPB_CORE_H_ | 6 #define PPAPI_C_PPB_CORE_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
| 10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
| 11 #include "ppapi/c/pp_time.h" | 11 #include "ppapi/c/pp_time.h" |
| 12 #include "ppapi/c/pp_var.h" | 12 #include "ppapi/c/pp_var.h" |
| 13 | 13 |
| 14 struct PP_CompletionCallback; | 14 struct PP_CompletionCallback; |
| 15 | 15 |
| 16 #define PPB_CORE_INTERFACE "PPB_Core;0.3" | 16 #define PPB_CORE_INTERFACE "PPB_Core;0.4" |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * @file | 19 * @file |
| 20 * This file defines the PPB_Core interface defined by the browser and | 20 * This file defines the PPB_Core interface defined by the browser and |
| 21 * and containing pointers to functions related to memory management, | 21 * and containing pointers to functions related to memory management, |
| 22 * time, and threads. | 22 * time, and threads. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * @addtogroup Interfaces | 26 * @addtogroup Interfaces |
| (...skipping 20 matching lines...) Expand all Loading... |
| 47 * from a resource. | 47 * from a resource. |
| 48 * | 48 * |
| 49 * @param[in] config A PP_Resource containing the resource. | 49 * @param[in] config A PP_Resource containing the resource. |
| 50 */ | 50 */ |
| 51 /*Same as ReleaseVar for Resources. */ | 51 /*Same as ReleaseVar for Resources. */ |
| 52 void (*ReleaseResource)(PP_Resource resource); | 52 void (*ReleaseResource)(PP_Resource resource); |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * MemAlloc is a pointer to a function that allocate memory. | 55 * MemAlloc is a pointer to a function that allocate memory. |
| 56 * | 56 * |
| 57 * @param[in] num_bytes A size_t number of bytes to allocate. | 57 * @param[in] num_bytes A number of bytes to allocate. |
| 58 * @return A pointer to the memory if successful, NULL If the | 58 * @return A pointer to the memory if successful, NULL If the |
| 59 * allocation fails. | 59 * allocation fails. |
| 60 */ | 60 */ |
| 61 void* (*MemAlloc)(size_t num_bytes); | 61 void* (*MemAlloc)(uint32_t num_bytes); |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * MemFree is a pointer to a function that deallocates memory. | 64 * MemFree is a pointer to a function that deallocates memory. |
| 65 * | 65 * |
| 66 * @param[in] ptr A pointer to the memory to deallocate. It is safe to | 66 * @param[in] ptr A pointer to the memory to deallocate. It is safe to |
| 67 * pass NULL to this function. | 67 * pass NULL to this function. |
| 68 */ | 68 */ |
| 69 void (*MemFree)(void* ptr); | 69 void (*MemFree)(void* ptr); |
| 70 | 70 |
| 71 /** | 71 /** |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 */ | 132 */ |
| 133 PP_Bool (*IsMainThread)(); | 133 PP_Bool (*IsMainThread)(); |
| 134 }; | 134 }; |
| 135 /** | 135 /** |
| 136 * @} | 136 * @} |
| 137 */ | 137 */ |
| 138 | 138 |
| 139 | 139 |
| 140 #endif /* PPAPI_C_DEV_PPB_CORE_DEV_H_ */ | 140 #endif /* PPAPI_C_DEV_PPB_CORE_DEV_H_ */ |
| 141 | 141 |
| OLD | NEW |