| 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> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
| 12 #include "base/tracked_objects.h" | 12 #include "base/tracked_objects.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/common/tab_load_stats.h" |
| 15 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 16 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
| 17 | 18 |
| 18 IPC_ENUM_TRAITS(tracked_objects::ThreadData::Status) | 19 IPC_ENUM_TRAITS(tracked_objects::ThreadData::Status) |
| 19 | 20 |
| 21 IPC_STRUCT_TRAITS_BEGIN(content::TabLoadTime) |
| 22 IPC_STRUCT_TRAITS_MEMBER(start_time) |
| 23 IPC_STRUCT_TRAITS_MEMBER(stop_time) |
| 24 IPC_STRUCT_TRAITS_END() |
| 25 |
| 20 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) | 26 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::LocationSnapshot) |
| 21 IPC_STRUCT_TRAITS_MEMBER(file_name) | 27 IPC_STRUCT_TRAITS_MEMBER(file_name) |
| 22 IPC_STRUCT_TRAITS_MEMBER(function_name) | 28 IPC_STRUCT_TRAITS_MEMBER(function_name) |
| 23 IPC_STRUCT_TRAITS_MEMBER(line_number) | 29 IPC_STRUCT_TRAITS_MEMBER(line_number) |
| 24 IPC_STRUCT_TRAITS_END() | 30 IPC_STRUCT_TRAITS_END() |
| 25 | 31 |
| 26 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot) | 32 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::BirthOnThreadSnapshot) |
| 27 IPC_STRUCT_TRAITS_MEMBER(location) | 33 IPC_STRUCT_TRAITS_MEMBER(location) |
| 28 IPC_STRUCT_TRAITS_MEMBER(thread_name) | 34 IPC_STRUCT_TRAITS_MEMBER(thread_name) |
| 29 IPC_STRUCT_TRAITS_END() | 35 IPC_STRUCT_TRAITS_END() |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int, /* sequence_number */ | 109 int, /* sequence_number */ |
| 104 tracked_objects::ProcessDataSnapshot /* profiler_data */) | 110 tracked_objects::ProcessDataSnapshot /* profiler_data */) |
| 105 | 111 |
| 106 // Send back histograms as vector of pickled-histogram strings. | 112 // Send back histograms as vector of pickled-histogram strings. |
| 107 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, | 113 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, |
| 108 int, /* sequence_number */ | 114 int, /* sequence_number */ |
| 109 std::vector<std::string> /* histogram_data */) | 115 std::vector<std::string> /* histogram_data */) |
| 110 | 116 |
| 111 // Request a histogram from the browser. The browser will send the histogram | 117 // Request a histogram from the browser. The browser will send the histogram |
| 112 // data only if it has been passed the command line flag | 118 // data only if it has been passed the command line flag |
| 113 // switches::kDomAutomationController. | 119 // switches::kStatsCollectionExtension. |
| 114 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_GetBrowserHistogram, | 120 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_GetBrowserHistogram, |
| 115 std::string, /* histogram_name */ | 121 std::string, /* histogram_name */ |
| 116 std::string /* histogram_json */) | 122 std::string /* histogram_json */) |
| 117 | 123 |
| 124 // Get timing data for a given tab. |
| 125 IPC_SYNC_MESSAGE_CONTROL1_2(ChildProcessHostMsg_GetTabLoadTimingInformation, |
| 126 int, /* routing_id */ |
| 127 content::TabLoadTime, /* tab_timing_data */ |
| 128 base::TimeTicks /* timer_start */) |
| 129 |
| 118 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. | 130 // Reply to ChildProcessMsg_DumpHandles when handle table dump is complete. |
| 119 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) | 131 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_DumpHandlesDone) |
| 120 | 132 |
| 121 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 122 // Request that the given font be loaded by the host so it's cached by the | 134 // Request that the given font be loaded by the host so it's cached by the |
| 123 // OS. Please see ChildProcessHost::PreCacheFont for details. | 135 // OS. Please see ChildProcessHost::PreCacheFont for details. |
| 124 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, | 136 IPC_SYNC_MESSAGE_CONTROL1_0(ChildProcessHostMsg_PreCacheFont, |
| 125 LOGFONT /* font data */) | 137 LOGFONT /* font data */) |
| 126 | 138 |
| 127 // Release the cached font | 139 // Release the cached font |
| 128 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) | 140 IPC_MESSAGE_CONTROL0(ChildProcessHostMsg_ReleaseCachedFonts) |
| 129 #endif // defined(OS_WIN) | 141 #endif // defined(OS_WIN) |
| 130 | 142 |
| 131 // Asks the browser to create a block of shared memory for the child process to | 143 // Asks the browser to create a block of shared memory for the child process to |
| 132 // fill in and pass back to the browser. | 144 // fill in and pass back to the browser. |
| 133 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, | 145 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory, |
| 134 uint32 /* buffer size */, | 146 uint32 /* buffer size */, |
| 135 base::SharedMemoryHandle) | 147 base::SharedMemoryHandle) |
| 136 | 148 |
| 137 #if defined(USE_TCMALLOC) | 149 #if defined(USE_TCMALLOC) |
| 138 // Reply to ChildProcessMsg_GetTcmallocStats. | 150 // Reply to ChildProcessMsg_GetTcmallocStats. |
| 139 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TcmallocStats, | 151 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_TcmallocStats, |
| 140 std::string /* output */) | 152 std::string /* output */) |
| 141 #endif | 153 #endif |
| OLD | NEW |