Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: ppapi/api/dev/ppb_memory_dev.idl

Issue 8586031: Convert a few ppapi dev interfaces to IDL. NaCl has tests for these (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up a bit more Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/api/dev/ppb_cursor_control_dev.idl ('k') | ppapi/api/dev/ppb_testing_dev.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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_DEV_PPB_MEMORY_DEV_H_
6 #define PPAPI_C_DEV_PPB_MEMORY_DEV_H_
7
8 #include "ppapi/c/pp_stdint.h"
9
10 #define PPB_MEMORY_DEV_INTERFACE_0_1 "PPB_Memory(Dev);0.1"
11 #define PPB_MEMORY_DEV_INTERFACE PPB_MEMORY_DEV_INTERFACE_0_1
12 5
13 /** 6 /**
14 * @file 7 * This file defines the <code>PPB_Memory interface</code> for functions
15 * This file defines the PPB_Memory interface defined by the browser and 8 * related to memory management.
16 * and containing pointers to functions related to memory management.
17 */ 9 */
18 10
19 /** 11 label Chrome {
20 * @addtogroup Interfaces 12 M14 = 0.1
21 * @{ 13 };
22 */
23 14
24 /** 15 /**
25 * The PPB_Memory_Dev interface contains pointers to functions related to memory 16 * The PPB_Memory_Dev interface contains pointers to functions related to memory
26 * management. 17 * management.
27 * 18 *
28 */ 19 */
29 struct PPB_Memory_Dev { 20 interface PPB_Memory_Dev {
30 /** 21 /**
31 * MemAlloc is a pointer to a function that allocate memory. 22 * MemAlloc is a pointer to a function that allocate memory.
32 * 23 *
33 * @param[in] num_bytes A number of bytes to allocate. 24 * @param[in] num_bytes A number of bytes to allocate.
34 * @return A pointer to the memory if successful, NULL If the 25 * @return A pointer to the memory if successful, NULL If the
35 * allocation fails. 26 * allocation fails.
36 */ 27 */
37 void* (*MemAlloc)(uint32_t num_bytes); 28 mem_t MemAlloc([in] uint32_t num_bytes);
38 29
39 /** 30 /**
40 * MemFree is a pointer to a function that deallocates memory. 31 * MemFree is a pointer to a function that deallocates memory.
41 * 32 *
42 * @param[in] ptr A pointer to the memory to deallocate. It is safe to 33 * @param[in] ptr A pointer to the memory to deallocate. It is safe to
43 * pass NULL to this function. 34 * pass NULL to this function.
44 */ 35 */
45 void (*MemFree)(void* ptr); 36 void MemFree([inout] mem_t ptr);
46 }; 37 };
47 /**
48 * @}
49 */
50
51 #endif /* PPAPI_C_DEV_PPB_MEMORY_DEV_H_ */
OLDNEW
« no previous file with comments | « ppapi/api/dev/ppb_cursor_control_dev.idl ('k') | ppapi/api/dev/ppb_testing_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698