Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Common IPC messages used for child processes. | 5 // Common IPC messages used for child processes. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/process.h" | |
|
jam
2011/11/28 15:17:34
not needed
ramant (doing other things)
2011/11/29 01:32:20
Done.
| |
| 9 #include "base/values.h" | |
|
jam
2011/11/28 15:17:34
nit: order
ramant (doing other things)
2011/11/29 01:32:20
Done.
| |
| 8 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| 9 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 10 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 11 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 12 | 14 |
| 13 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
| 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 15 | 17 |
| 16 #define IPC_MESSAGE_START ChildProcessMsgStart | 18 #define IPC_MESSAGE_START ChildProcessMsgStart |
| 17 | 19 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 34 IPC_MESSAGE_CONTROL2(ChildProcessMsg_BeginTracing, | 36 IPC_MESSAGE_CONTROL2(ChildProcessMsg_BeginTracing, |
| 35 std::vector<std::string> /* included_categories */, | 37 std::vector<std::string> /* included_categories */, |
| 36 std::vector<std::string> /* excluded_categories */) | 38 std::vector<std::string> /* excluded_categories */) |
| 37 | 39 |
| 38 // Sent to all child processes to disable trace event recording. | 40 // Sent to all child processes to disable trace event recording. |
| 39 IPC_MESSAGE_CONTROL0(ChildProcessMsg_EndTracing) | 41 IPC_MESSAGE_CONTROL0(ChildProcessMsg_EndTracing) |
| 40 | 42 |
| 41 // Sent to all child processes to get trace buffer fullness. | 43 // Sent to all child processes to get trace buffer fullness. |
| 42 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) | 44 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) |
| 43 | 45 |
| 46 // Tell the child process to enable or disable the profiler status. | |
| 47 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus, | |
| 48 bool /* profiler status */) | |
| 49 | |
| 50 // Send to all the child processes to send back profiler data (ThreadData in | |
| 51 // tracked_objects). | |
| 52 IPC_MESSAGE_CONTROL2(ChildProcessMsg_GetChildProfilerData, | |
| 53 int, /* sequence number. */ | |
| 54 std::string /* pickled Value of process type. */) | |
| 55 | |
| 44 // Sent to child processes to dump their handle table. | 56 // Sent to child processes to dump their handle table. |
| 45 IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles) | 57 IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles) |
| 46 | 58 |
| 47 //////////////////////////////////////////////////////////////////////////////// | 59 //////////////////////////////////////////////////////////////////////////////// |
| 48 // Messages sent from the child process to the browser. | 60 // Messages sent from the child process to the browser. |
| 49 | 61 |
| 50 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) | 62 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ShutdownRequest) |
| 51 | 63 |
| 52 // Notify the browser that this child process supports tracing. | 64 // Notify the browser that this child process supports tracing. |
| 53 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ChildSupportsTracing) | 65 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ChildSupportsTracing) |
| 54 | 66 |
| 55 // Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). | 67 // Reply from child processes acking ChildProcessMsg_TraceChangeStatus(false). |
| 56 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_EndTracingAck, | 68 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_EndTracingAck, |
| 57 std::vector<std::string> /* known_categories */) | 69 std::vector<std::string> /* known_categories */) |
| 58 | 70 |
| 59 // Sent if the trace buffer becomes full. | 71 // Sent if the trace buffer becomes full. |
| 60 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_TraceBufferFull) | 72 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_TraceBufferFull) |
| 61 | 73 |
| 62 // Child processes send trace data back in JSON chunks. | 74 // Child processes send trace data back in JSON chunks. |
| 63 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceDataCollected, | 75 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceDataCollected, |
| 64 std::string /*json trace data*/) | 76 std::string /*json trace data*/) |
| 65 | 77 |
| 66 // Reply to ChildProcessMsg_GetTraceBufferPercentFull. | 78 // Reply to ChildProcessMsg_GetTraceBufferPercentFull. |
| 67 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply, | 79 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply, |
| 68 float /*trace buffer percent full*/) | 80 float /*trace buffer percent full*/) |
| 69 | 81 |
| 82 // Send back profiler data (ThreadData in tracked_objects). | |
| 83 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildProfilerData, | |
| 84 int, /* sequence number. */ | |
| 85 DictionaryValue /* profiler data. */) | |
| 86 | |
| 70 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. | 87 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. |
| 71 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) | 88 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) |
| 72 | 89 |
| 73 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
| 74 // Request that the given font be loaded by the host so it's cached by the | 91 // Request that the given font be loaded by the host so it's cached by the |
| 75 // OS. Please see ChildProcessHost::PreCacheFont for details. | 92 // OS. Please see ChildProcessHost::PreCacheFont for details. |
| 76 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, | 93 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, |
| 77 LOGFONT /* font data */) | 94 LOGFONT /* font data */) |
| 78 | 95 |
| 79 // Release the cached font | 96 // Release the cached font |
| 80 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) | 97 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) |
| 81 #endif // defined(OS_WIN) | 98 #endif // defined(OS_WIN) |
| 82 | 99 |
| 83 // Asks the browser to create a block of shared memory for the child process to | 100 // Asks the browser to create a block of shared memory for the child process to |
| 84 // fill in and pass back to the browser. | 101 // fill in and pass back to the browser. |
| 85 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, | 102 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, |
| 86 uint32 /* buffer size */, | 103 uint32 /* buffer size */, |
| 87 base::SharedMemoryHandle) | 104 base::SharedMemoryHandle) |
| OLD | NEW |