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

Side by Side Diff: ppapi/c/ppb_core.h

Issue 6711047: Fix up some types in the API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months 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
OLDNEW
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"
dmichael(do not use this one) 2011/03/21 21:53:24 Are you going to put in any backwards compatibilit
neb 2011/03/21 22:16:15 Nope. Breakage will ensue.
David Springer 2011/03/21 22:31:29 This will, in particular, break all the NaCl galle
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
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)(const void* ptr);
dmichael(do not use this one) 2011/03/21 21:53:24 This isn't really that obvious to me. I understan
neb 2011/03/21 22:16:15 Const-ness of pointer has to do with what the func
70 70
71 /** 71 /**
72 * GetTime is a pointer to a function that returns the "wall clock 72 * GetTime is a pointer to a function that returns the "wall clock
73 * time" according to the browser. 73 * time" according to the browser.
74 * 74 *
75 * @return A PP_Time containing the "wall clock time" according to the 75 * @return A PP_Time containing the "wall clock time" according to the
76 * browser. 76 * browser.
77 */ 77 */
78 PP_Time (*GetTime)(); 78 PP_Time (*GetTime)();
79 79
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ppapi/c/ppb_audio.h ('k') | ppapi/c/ppb_url_loader.h » ('j') | ppapi/cpp/core.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698