Update to Chromium revision 241258.

- Update tracing implementation to use the new file-based approach (issue #1157).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1549 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-12-17 22:04:35 +00:00
parent 992cc56583
commit 099664fba0
76 changed files with 1239 additions and 908 deletions

View File

@@ -62,23 +62,7 @@ extern "C" {
//
// This function must be called on the browser process UI thread.
///
CEF_EXPORT int cef_begin_tracing(struct _cef_trace_client_t* client,
const cef_string_t* categories);
///
// Get the maximum trace buffer percent full state across all processes.
//
// cef_trace_client_t::OnTraceBufferPercentFullReply will be called
// asynchronously after the value is determined. When any child process reaches
// 100% full tracing will end automatically and
// cef_trace_client_t::OnEndTracingComplete will be called. This function fails
// and returns false (0) if trace is ending or disabled, no cef_trace_client_t
// was passed to CefBeginTracing, or if a previous call to
// CefGetTraceBufferPercentFullAsync is pending.
//
// This function must be called on the browser process UI thread.
///
CEF_EXPORT int cef_get_trace_buffer_percent_full_async();
CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories);
///
// Stop tracing events on all processes.
@@ -86,9 +70,15 @@ CEF_EXPORT int cef_get_trace_buffer_percent_full_async();
// This function will fail and return false (0) if a previous call to
// CefEndTracingAsync is already pending or if CefBeginTracing was not called.
//
// |tracing_file| is the path at which tracing data will be written and
// |callback| is the callback that will be executed once all processes have sent
// their trace data. If |tracing_file| is NULL a new temporary file path will be
// used. If |callback| is NULL no trace data will be written.
//
// This function must be called on the browser process UI thread.
///
CEF_EXPORT int cef_end_tracing_async();
CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file,
struct _cef_end_tracing_callback_t* callback);
///
// Returns the current system trace time or, if none is defined, the current
@@ -98,35 +88,25 @@ CEF_EXPORT int cef_end_tracing_async();
CEF_EXPORT int64 cef_now_from_system_trace_time();
///
// Implement this structure to receive trace notifications. The functions of
// this structure will be called on the browser process UI thread.
// 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_trace_client_t {
typedef struct _cef_end_tracing_callback_t {
///
// Base structure.
///
cef_base_t base;
///
// Called 0 or more times between CefBeginTracing and OnEndTracingComplete
// with a UTF8 JSON |fragment| of the specified |fragment_size|. Do not keep a
// reference to |fragment|.
///
void (CEF_CALLBACK *on_trace_data_collected)(struct _cef_trace_client_t* self,
const char* fragment, size_t fragment_size);
///
// Called in response to CefGetTraceBufferPercentFullAsync.
///
void (CEF_CALLBACK *on_trace_buffer_percent_full_reply)(
struct _cef_trace_client_t* self, float percent_full);
///
// Called after all processes have sent their trace data.
// 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_trace_client_t* self);
} cef_trace_client_t;
struct _cef_end_tracing_callback_t* self,
const cef_string_t* tracing_file);
} cef_end_tracing_callback_t;
#ifdef __cplusplus