OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /* From dev/ppb_trace_event_dev.idl modified Wed Dec 5 16:55:45 2012. */ |
| 7 |
| 8 #ifndef PPAPI_C_DEV_PPB_TRACE_EVENT_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPB_TRACE_EVENT_DEV_H_ |
| 10 |
| 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_macros.h" |
| 13 #include "ppapi/c/pp_stdint.h" |
| 14 |
| 15 #define PPB_TRACE_EVENT_DEV_INTERFACE_0_1 "PPB_Trace_Event(Dev);0.1" |
| 16 #define PPB_TRACE_EVENT_DEV_INTERFACE PPB_TRACE_EVENT_DEV_INTERFACE_0_1 |
| 17 |
| 18 /** |
| 19 * @file |
| 20 * This file defines the <code>PPB_Trace_Event</code> interface. It is meant |
| 21 * to be used in plugins as the API that trace macros from trace_event.h use. |
| 22 * It is not supported in Native Client currently. |
| 23 */ |
| 24 |
| 25 |
| 26 /** |
| 27 * @addtogroup Interfaces |
| 28 * @{ |
| 29 */ |
| 30 struct PPB_Trace_Event_Dev_0_1 { |
| 31 /** |
| 32 * Gets a pointer to a character for identifying a category name in the |
| 33 * tracing system as well as for being able to early exit in client-side |
| 34 * tracing code. |
| 35 * |
| 36 * NB: This mem_t return value should technically be const, but return values |
| 37 * for Pepper IDL of mem_t type are not const. The same is true for the arg |
| 38 * |category_enabled| for AddTraceEvent. |
| 39 */ |
| 40 void* (*GetCategoryEnabled)(PP_Instance instance, const char* category_name); |
| 41 /** |
| 42 * Adds a trace event to the platform tracing system. |
| 43 */ |
| 44 int32_t (*AddTraceEvent)(PP_Instance instance, |
| 45 int8_t phase, |
| 46 const void* category_enabled, |
| 47 const char* name, |
| 48 uint64_t id, |
| 49 uint32_t num_args, |
| 50 const char* arg_names[], |
| 51 const uint8_t arg_types[], |
| 52 const uint64_t arg_values[], |
| 53 int32_t threshold_begin_id, |
| 54 int64_t threshold, |
| 55 uint8_t flags); |
| 56 /** |
| 57 * Sets the thread name so it will show up properly in chrome://tracing. |
| 58 */ |
| 59 void (*SetThreadName)(PP_Instance instance, const char* thread_name); |
| 60 }; |
| 61 |
| 62 typedef struct PPB_Trace_Event_Dev_0_1 PPB_Trace_Event_Dev; |
| 63 /** |
| 64 * @} |
| 65 */ |
| 66 |
| 67 #endif /* PPAPI_C_DEV_PPB_TRACE_EVENT_DEV_H_ */ |
| 68 |
OLD | NEW |