summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authordmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 21:46:38 +0000
committerdmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 21:46:38 +0000
commite6651eeb40b684a72ee104313cf00e39f3156d70 (patch)
treeb0dbf9409c42fa493332fb8d6cc2bc92a244ec59 /ppapi
parent76b0b09da453e43c258201ac42f9febf48b8ed7b (diff)
downloadchromium_src-e6651eeb40b684a72ee104313cf00e39f3156d70.zip
chromium_src-e6651eeb40b684a72ee104313cf00e39f3156d70.tar.gz
chromium_src-e6651eeb40b684a72ee104313cf00e39f3156d70.tar.bz2
Add some files to the C compilation test, and fix the stuff that wasn't C compatible.
TEST=test_c_includes.c compiles successfully BUG=None Review URL: http://codereview.chromium.org/6542064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/c/dev/ppb_context_3d_trusted_dev.h10
-rw-r--r--ppapi/c/private/ppb_flash.h22
-rw-r--r--ppapi/c/private/ppb_flash_menu.h2
-rw-r--r--ppapi/c/private/ppb_pdf.h10
-rw-r--r--ppapi/tests/all_c_includes.h5
5 files changed, 27 insertions, 22 deletions
diff --git a/ppapi/c/dev/ppb_context_3d_trusted_dev.h b/ppapi/c/dev/ppb_context_3d_trusted_dev.h
index e865d06..944b041 100644
--- a/ppapi/c/dev/ppb_context_3d_trusted_dev.h
+++ b/ppapi/c/dev/ppb_context_3d_trusted_dev.h
@@ -13,7 +13,7 @@
#define PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE "PPB_Context3DTrusted(Dev);0.2"
-enum PPB_Context3DTrustedError {
+typedef enum {
kNoError,
kInvalidSize,
kOutOfBounds,
@@ -21,7 +21,7 @@ enum PPB_Context3DTrustedError {
kInvalidArguments,
kLostContext,
kGenericError
-};
+} PPB_Context3DTrustedError;
struct PP_Context3DTrustedState {
// Size of the command buffer in command buffer entries.
@@ -63,7 +63,7 @@ struct PPB_Context3DTrusted_Dev {
uint32_t* shm_size);
// Returns the current state.
- PP_Context3DTrustedState (*GetState)(PP_Resource context);
+ struct PP_Context3DTrustedState (*GetState)(PP_Resource context);
// The writer calls this to update its put offset.
PP_Bool (*Flush)(PP_Resource context, int32_t put_offset);
@@ -72,8 +72,8 @@ struct PPB_Context3DTrusted_Dev {
// The writer calls this to update its put offset. This function returns the
// reader's most recent get offset. Does not return until after the put offset
// change callback has been invoked.
- PP_Context3DTrustedState (*FlushSync)(PP_Resource context,
- int32_t put_offset);
+ struct PP_Context3DTrustedState (*FlushSync)(PP_Resource context,
+ int32_t put_offset);
// Create a transfer buffer and return a handle that uniquely
// identifies it or -1 on error.
diff --git a/ppapi/c/private/ppb_flash.h b/ppapi/c/private/ppb_flash.h
index c2d41dd..4825fe4 100644
--- a/ppapi/c/private/ppb_flash.h
+++ b/ppapi/c/private/ppb_flash.h
@@ -40,7 +40,7 @@ struct PP_DirEntry_Dev {
struct PP_DirContents_Dev {
int32_t count;
- PP_DirEntry_Dev* entries;
+ struct PP_DirEntry_Dev* entries;
};
struct PPB_Flash {
@@ -51,18 +51,18 @@ struct PPB_Flash {
PP_Bool (*DrawGlyphs)(PP_Instance instance,
PP_Resource pp_image_data,
- const PP_FontDescription_Dev* font_desc,
+ const struct PP_FontDescription_Dev* font_desc,
uint32_t color,
- PP_Point position,
- PP_Rect clip,
+ struct PP_Point position,
+ struct PP_Rect clip,
const float transformation[3][3],
uint32_t glyph_count,
const uint16_t glyph_indices[],
- const PP_Point glyph_advances[]);
+ const struct PP_Point glyph_advances[]);
// Retrieves the proxy that will be used for the given URL. The result will
// be a string in PAC format, or an undefined var on error.
- PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
+ struct PP_Var (*GetProxyForURL)(PP_Instance instance, const char* url);
// Opens a module-local file, returning a file descriptor (posix) or a HANDLE
// (win32) into file. Module-local file paths (here and below) are
@@ -96,7 +96,7 @@ struct PPB_Flash {
// ppapi error, PP_OK if success, one of the PP_ERROR_* in case of failure.
int32_t (*QueryModuleLocalFile)(PP_Instance instance,
const char* path,
- PP_FileInfo_Dev* info);
+ struct PP_FileInfo_Dev* info);
// Gets the list of files contained in a module-local directory. The return
// value is the ppapi error, PP_OK if success, one of the PP_ERROR_* in case
@@ -104,11 +104,11 @@ struct PPB_Flash {
// FreeModuleLocalDirContents.
int32_t (*GetModuleLocalDirContents)(PP_Instance instance,
const char* path,
- PP_DirContents_Dev** contents);
+ struct PP_DirContents_Dev** contents);
// Frees the data allocated by GetModuleLocalDirContents.
void (*FreeModuleLocalDirContents)(PP_Instance instance,
- PP_DirContents_Dev* contents);
+ struct PP_DirContents_Dev* contents);
// Navigate to URL. May open a new tab if target is not "_self". Return true
// if success. This differs from javascript:window.open() in that it bypasses
@@ -152,7 +152,7 @@ struct PPB_Flash_NetConnector {
PP_FileHandle* socket_out,
struct PP_Flash_NetAddress* local_addr_out,
struct PP_Flash_NetAddress* remote_addr_out,
- PP_CompletionCallback callback);
+ struct PP_CompletionCallback callback);
// Same as |ConnectTcp()|, but connecting to the address given by |addr|. A
// typical use-case would be for reconnections.
@@ -161,7 +161,7 @@ struct PPB_Flash_NetConnector {
PP_FileHandle* socket_out,
struct PP_Flash_NetAddress* local_addr_out,
struct PP_Flash_NetAddress* remote_addr_out,
- PP_CompletionCallback callback);
+ struct PP_CompletionCallback callback);
};
#endif // PPAPI_C_PRIVATE_PPB_FLASH_H_
diff --git a/ppapi/c/private/ppb_flash_menu.h b/ppapi/c/private/ppb_flash_menu.h
index a183baf..b9a0b95 100644
--- a/ppapi/c/private/ppb_flash_menu.h
+++ b/ppapi/c/private/ppb_flash_menu.h
@@ -51,7 +51,7 @@ struct PPB_Flash_Menu {
int32_t (*Show)(PP_Resource menu_id,
const struct PP_Point* location,
int32_t* selected_id,
- PP_CompletionCallback callback);
+ struct PP_CompletionCallback callback);
};
#endif // PPAPI_C_PRIVATE_PPB_FLASH_MENU_H_
diff --git a/ppapi/c/private/ppb_pdf.h b/ppapi/c/private/ppb_pdf.h
index 2f16ca4..286a782 100644
--- a/ppapi/c/private/ppb_pdf.h
+++ b/ppapi/c/private/ppb_pdf.h
@@ -82,8 +82,8 @@ struct PP_PrivateFindResult {
struct PPB_PDF {
// Returns a localized string.
- PP_Var (*GetLocalizedString)(PP_Instance instance,
- PP_ResourceString string_id);
+ struct PP_Var (*GetLocalizedString)(PP_Instance instance,
+ PP_ResourceString string_id);
// Returns a resource image.
PP_Resource (*GetResourceImage)(PP_Instance instance,
@@ -95,7 +95,7 @@ struct PPB_PDF {
// Currently Linux-only.
PP_Resource (*GetFontFileWithFallback)(
PP_Instance instance,
- const PP_FontDescription_Dev* description,
+ const struct PP_FontDescription_Dev* description,
PP_PrivateFontCharset charset);
// Given a resource previously returned by GetFontFileWithFallback, returns
@@ -112,7 +112,7 @@ struct PPB_PDF {
const unsigned short* string,
const unsigned short* term,
bool case_sensitive,
- PP_PrivateFindResult** results,
+ struct PP_PrivateFindResult** results,
int* count);
// Since WebFrame doesn't know about PPAPI requests, it'll think the page has
@@ -129,7 +129,7 @@ struct PPB_PDF {
void (*HistogramPDFPageCount)(int count);
// Notifies the browser that the given action has been performed.
- void (*UserMetricsRecordAction)(PP_Var action);
+ void (*UserMetricsRecordAction)(struct PP_Var action);
// Notifies the browser that the PDF has an unsupported feature.
void (*HasUnsupportedFeature)(PP_Instance instance);
diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h
index 208c362..86c2925 100644
--- a/ppapi/tests/all_c_includes.h
+++ b/ppapi/tests/all_c_includes.h
@@ -16,6 +16,7 @@
#include "ppapi/c/dev/ppb_buffer_dev.h"
#include "ppapi/c/dev/ppb_char_set_dev.h"
#include "ppapi/c/dev/ppb_context_3d_dev.h"
+#include "ppapi/c/dev/ppb_context_3d_trusted_dev.h"
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
#include "ppapi/c/dev/ppb_directory_reader_dev.h"
#include "ppapi/c/dev/ppb_file_chooser_dev.h"
@@ -74,6 +75,10 @@
#include "ppapi/c/ppb_var.h"
#include "ppapi/c/ppp.h"
#include "ppapi/c/ppp_instance.h"
+#include "ppapi/c/private/ppb_flash.h"
+#include "ppapi/c/private/ppb_flash_menu.h"
+#include "ppapi/c/private/ppb_nacl_private.h"
+#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/c/trusted/ppb_audio_trusted.h"
#include "ppapi/c/trusted/ppb_image_data_trusted.h"
#include "ppapi/c/trusted/ppb_url_loader_trusted.h"