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