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.
5 // Multiply-included message header, no traditional include guard.
9 #include "base/basictypes.h"
10 #include "base/sync_socket.h"
11 #include "base/trace_event/trace_event_impl.h"
12 #include "ipc/ipc_channel_handle.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_message_utils.h"
15 #include "ipc/ipc_platform_file.h"
17 #define IPC_MESSAGE_START TracingMsgStart
19 IPC_STRUCT_TRAITS_BEGIN(base::debug::TraceLogStatus
)
20 IPC_STRUCT_TRAITS_MEMBER(event_capacity
)
21 IPC_STRUCT_TRAITS_MEMBER(event_count
)
22 IPC_STRUCT_TRAITS_END()
24 // Sent to all child processes to enable trace event recording.
25 IPC_MESSAGE_CONTROL3(TracingMsg_BeginTracing
,
26 std::string
/* category_filter_str */,
27 base::TimeTicks
/* browser_time */,
28 std::string
/* base::debug::TraceOptions */)
30 // Sent to all child processes to disable trace event recording.
31 IPC_MESSAGE_CONTROL0(TracingMsg_EndTracing
)
33 // Sent to all child processes to start monitoring.
34 IPC_MESSAGE_CONTROL3(TracingMsg_EnableMonitoring
,
35 std::string
/* category_filter_str */,
36 base::TimeTicks
/* browser_time */,
37 std::string
/* base::debug::TraceOptions */)
39 // Sent to all child processes to stop monitoring.
40 IPC_MESSAGE_CONTROL0(TracingMsg_DisableMonitoring
)
42 // Sent to all child processes to capture the current monitorint snapshot.
43 IPC_MESSAGE_CONTROL0(TracingMsg_CaptureMonitoringSnapshot
)
45 // Sent to all child processes to get trace buffer fullness.
46 IPC_MESSAGE_CONTROL0(TracingMsg_GetTraceLogStatus
)
48 // Sent to all child processes to set watch event.
49 IPC_MESSAGE_CONTROL2(TracingMsg_SetWatchEvent
,
50 std::string
/* category_name */,
51 std::string
/* event_name */)
53 // Sent to all child processes to clear watch event.
54 IPC_MESSAGE_CONTROL0(TracingMsg_CancelWatchEvent
)
56 // Sent everytime when a watch event is matched.
57 IPC_MESSAGE_CONTROL0(TracingHostMsg_WatchEventMatched
)
59 // Notify the browser that this child process supports tracing.
60 IPC_MESSAGE_CONTROL0(TracingHostMsg_ChildSupportsTracing
)
62 // Reply from child processes acking TracingMsg_EndTracing.
63 IPC_MESSAGE_CONTROL1(TracingHostMsg_EndTracingAck
,
64 std::vector
<std::string
> /* known_categories */)
66 // Reply from child processes acking TracingMsg_CaptureMonitoringSnapshot.
67 IPC_MESSAGE_CONTROL0(TracingHostMsg_CaptureMonitoringSnapshotAck
)
69 // Child processes send back trace data in JSON chunks.
70 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceDataCollected
,
71 std::string
/*json trace data*/)
73 // Child processes send back trace data of the current monitoring
75 IPC_MESSAGE_CONTROL1(TracingHostMsg_MonitoringTraceDataCollected
,
76 std::string
/*json trace data*/)
78 // Reply to TracingMsg_GetTraceLogStatus.
79 IPC_MESSAGE_CONTROL1(TracingHostMsg_TraceLogStatusReply
,
80 base::debug::TraceLogStatus
/*status of the trace log*/)