Fix C compiler errors when using the C API (issue #1165).

- Replace 'bool' with 'int' in cef_types[_*].h.
- Typedef enums in cef_types.h
- Add includes and struct forward declarations in C API header files.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1558 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-01-06 19:59:48 +00:00
parent 7074154725
commit 72660c6fed
72 changed files with 612 additions and 477 deletions

View File

@@ -45,6 +45,28 @@ extern "C" {
#include "include/capi/cef_base_capi.h"
///
// Implement this structure to receive notification when tracing has completed.
// The functions of this structure will be called on the browser process UI
// thread.
///
typedef struct _cef_end_tracing_callback_t {
///
// Base structure.
///
cef_base_t base;
///
// Called after all processes have sent their trace data. |tracing_file| is
// the path at which tracing data was written. The client is responsible for
// deleting |tracing_file|.
///
void (CEF_CALLBACK *on_end_tracing_complete)(
struct _cef_end_tracing_callback_t* self,
const cef_string_t* tracing_file);
} cef_end_tracing_callback_t;
///
// Start tracing events on all processes. Tracing begins immediately locally,
// and asynchronously on child processes as soon as they receive the
@@ -78,7 +100,7 @@ CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories);
// This function must be called on the browser process UI thread.
///
CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file,
struct _cef_end_tracing_callback_t* callback);
cef_end_tracing_callback_t* callback);
///
// Returns the current system trace time or, if none is defined, the current
@@ -87,28 +109,6 @@ CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file,
///
CEF_EXPORT int64 cef_now_from_system_trace_time();
///
// Implement this structure to receive notification when tracing has completed.
// The functions of this structure will be called on the browser process UI
// thread.
///
typedef struct _cef_end_tracing_callback_t {
///
// Base structure.
///
cef_base_t base;
///
// Called after all processes have sent their trace data. |tracing_file| is
// the path at which tracing data was written. The client is responsible for
// deleting |tracing_file|.
///
void (CEF_CALLBACK *on_end_tracing_complete)(
struct _cef_end_tracing_callback_t* self,
const cef_string_t* tracing_file);
} cef_end_tracing_callback_t;
#ifdef __cplusplus
}
#endif