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

Unified Diff: ppapi/c/ppb_core.h

Issue 7349016: Added versioning for PPB_Core::MemAlloc and MemFree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/ppb_core.h
diff --git a/ppapi/c/ppb_core.h b/ppapi/c/ppb_core.h
index 50da6dbc7f2541728168935b340a38fc9a4361e8..0044e061c95424d8cec54664c6b89ccc9ee08803 100644
--- a/ppapi/c/ppb_core.h
+++ b/ppapi/c/ppb_core.h
@@ -13,7 +13,13 @@
struct PP_CompletionCallback;
#define PPB_CORE_INTERFACE_0_5 "PPB_Core;0.5"
+#define PPB_CORE_INTERFACE_0_6 "PPB_Core;0.6"
+#ifdef PPAPI_INSTANCE_REMOVE_MEMALLOC
dmichael (off chromium) 2011/07/12 19:10:27 With Brett's change, we don't need the conditional
Matt Ball 2011/07/12 23:15:26 Done.
+#define PPB_CORE_INTERFACE PPB_CORE_INTERFACE_0_6
+#else
#define PPB_CORE_INTERFACE PPB_CORE_INTERFACE_0_5
+#endif
+
/**
* @file
@@ -32,7 +38,12 @@ struct PP_CompletionCallback;
* to memory management, time, and threads on the browser.
*
*/
+
+#ifdef PPAPI_INSTANCE_REMOVE_MEMALLOC
struct PPB_Core {
+#else
+struct PPB_Core_0_6 {
+#endif
/**
*
* AddRefResource() adds a reference to a resource.
@@ -131,6 +142,31 @@ struct PPB_Core {
*/
PP_Bool (*IsMainThread)();
};
+
+#ifdef PPAPI_INSTANCE_REMOVE_MEMALLOC
+struct PPB_Core_0_5 {
+#else
+struct PPB_Core {
+#endif
+ void (*AddRefResource)(PP_Resource resource);
+ void (*ReleaseResource)(PP_Resource resource);
+ void* (*MemAlloc)(uint32_t num_bytes);
+ void (*MemFree)(void* ptr);
+ PP_Time (*GetTime)();
+ PP_TimeTicks (*GetTimeTicks)();
+ void (*CallOnMainThread)(int32_t delay_in_milliseconds,
+ struct PP_CompletionCallback callback,
+ int32_t result);
+ PP_Bool (*IsMainThread)();
+};
+
+#ifdef PPAPI_INSTANCE_REMOVE_MEMALLOC
+typedef struct PPB_Core PPB_Core_0_6;
+#else
+typedef struct PPB_Core PPB_Core_0_5;
+#endif
+
+
/**
* @}
*/
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698