Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 <string> | |
| 9 #include <vector> | |
| 10 | |
| 8 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
| 9 #include "base/tracked_objects.h" | 12 #include "base/tracked_objects.h" |
| 10 #include "base/values.h" | 13 #include "base/values.h" |
| 11 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 12 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 13 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
| 14 | 17 |
| 15 IPC_ENUM_TRAITS(tracked_objects::ThreadData::Status) | 18 IPC_ENUM_TRAITS(tracked_objects::ThreadData::Status) |
| 16 | 19 |
| 17 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) | 20 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 // Sent to all child processes to get trace buffer fullness. | 83 // Sent to all child processes to get trace buffer fullness. |
| 81 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) | 84 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) |
| 82 | 85 |
| 83 // Tell the child process to enable or disable the profiler status. | 86 // Tell the child process to enable or disable the profiler status. |
| 84 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus, | 87 IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus, |
| 85 tracked_objects::ThreadData::Status /* profiler status */) | 88 tracked_objects::ThreadData::Status /* profiler status */) |
| 86 | 89 |
| 87 // Send to all the child processes to send back profiler data (ThreadData in | 90 // Send to all the child processes to send back profiler data (ThreadData in |
| 88 // tracked_objects). | 91 // tracked_objects). |
| 89 IPC_MESSAGE_CONTROL1(ChildProcessMsg_GetChildProfilerData, | 92 IPC_MESSAGE_CONTROL1(ChildProcessMsg_GetChildProfilerData, |
| 90 int /* sequence number */) | 93 int /* sequence number */) |
|
jam
2012/06/07 03:34:33
nit: the convention is to put the parameter name f
ramant (doing other things)
2012/06/07 23:39:25
Done.
| |
| 91 | 94 |
| 95 // Send to all the child processes to send back histogram data. | |
| 96 IPC_MESSAGE_CONTROL1(ChildProcessMsg_GetChildHistogramData, | |
| 97 int /* sequence number */) | |
| 98 | |
| 92 // Sent to child processes to dump their handle table. | 99 // Sent to child processes to dump their handle table. |
| 93 IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles) | 100 IPC_MESSAGE_CONTROL0(ChildProcessMsg_DumpHandles) |
| 94 | 101 |
| 95 #if defined(USE_TCMALLOC) | 102 #if defined(USE_TCMALLOC) |
| 96 // Sent to child process to request tcmalloc stats. | 103 // Sent to child process to request tcmalloc stats. |
| 97 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTcmallocStats) | 104 IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTcmallocStats) |
| 98 #endif | 105 #endif |
| 99 | 106 |
| 100 //////////////////////////////////////////////////////////////////////////////// | 107 //////////////////////////////////////////////////////////////////////////////// |
| 101 // Messages sent from the child process to the browser. | 108 // Messages sent from the child process to the browser. |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 118 | 125 |
| 119 // Reply to ChildProcessMsg_GetTraceBufferPercentFull. | 126 // Reply to ChildProcessMsg_GetTraceBufferPercentFull. |
| 120 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply, | 127 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TraceBufferPercentFullReply, |
| 121 float /*trace buffer percent full*/) | 128 float /*trace buffer percent full*/) |
| 122 | 129 |
| 123 // Send back profiler data (ThreadData in tracked_objects). | 130 // Send back profiler data (ThreadData in tracked_objects). |
| 124 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildProfilerData, | 131 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildProfilerData, |
| 125 int, /* sequence number */ | 132 int, /* sequence number */ |
| 126 tracked_objects::ProcessDataSnapshot /* profiler data */) | 133 tracked_objects::ProcessDataSnapshot /* profiler data */) |
| 127 | 134 |
| 135 // Send back histograms as vector of pickled-histogram strings. | |
| 136 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, | |
| 137 int, /* sequence number */ | |
| 138 std::vector<std::string> /* histogram data */) | |
| 139 | |
| 128 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. | 140 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. |
| 129 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) | 141 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) |
| 130 | 142 |
| 131 #if defined(OS_WIN) | 143 #if defined(OS_WIN) |
| 132 // Request that the given font be loaded by the host so it's cached by the | 144 // Request that the given font be loaded by the host so it's cached by the |
| 133 // OS. Please see ChildProcessHost::PreCacheFont for details. | 145 // OS. Please see ChildProcessHost::PreCacheFont for details. |
| 134 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, | 146 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, |
| 135 LOGFONT /* font data */) | 147 LOGFONT /* font data */) |
| 136 | 148 |
| 137 // Release the cached font | 149 // Release the cached font |
| 138 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) | 150 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) |
| 139 #endif // defined(OS_WIN) | 151 #endif // defined(OS_WIN) |
| 140 | 152 |
| 141 // Asks the browser to create a block of shared memory for the child process to | 153 // Asks the browser to create a block of shared memory for the child process to |
| 142 // fill in and pass back to the browser. | 154 // fill in and pass back to the browser. |
| 143 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, | 155 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, |
| 144 uint32 /* buffer size */, | 156 uint32 /* buffer size */, |
| 145 base::SharedMemoryHandle) | 157 base::SharedMemoryHandle) |
| 146 | 158 |
| 147 #if defined(USE_TCMALLOC) | 159 #if defined(USE_TCMALLOC) |
| 148 // Reply to ChildProcessMsg_GetTcmallocStats. | 160 // Reply to ChildProcessMsg_GetTcmallocStats. |
| 149 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TcmallocStats, | 161 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TcmallocStats, |
| 150 std::string /* output */) | 162 std::string /* output */) |
| 151 #endif | 163 #endif |
| OLD | NEW |