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 |
+ |
+ |
/** |
* @} |
*/ |