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/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
| 12 #include "base/metrics/call_stack_profile_params.h" |
| 13 #include "base/profiler/stack_sampling_profiler.h" |
12 #include "base/tracked_objects.h" | 14 #include "base/tracked_objects.h" |
13 #include "base/values.h" | 15 #include "base/values.h" |
14 #include "cc/resources/shared_bitmap_manager.h" | 16 #include "cc/resources/shared_bitmap_manager.h" |
15 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
16 #include "content/common/host_discardable_shared_memory_manager.h" | 18 #include "content/common/host_discardable_shared_memory_manager.h" |
17 #include "ipc/ipc_message_macros.h" | 19 #include "ipc/ipc_message_macros.h" |
18 #include "ui/gfx/gpu_memory_buffer.h" | 20 #include "ui/gfx/gpu_memory_buffer.h" |
19 #include "ui/gfx/ipc/gfx_param_traits.h" | 21 #include "ui/gfx/ipc/gfx_param_traits.h" |
20 | 22 |
21 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 IPC_STRUCT_TRAITS_END() | 59 IPC_STRUCT_TRAITS_END() |
58 | 60 |
59 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::ProcessDataSnapshot) | 61 IPC_STRUCT_TRAITS_BEGIN(tracked_objects::ProcessDataSnapshot) |
60 IPC_STRUCT_TRAITS_MEMBER(phased_snapshots) | 62 IPC_STRUCT_TRAITS_MEMBER(phased_snapshots) |
61 IPC_STRUCT_TRAITS_MEMBER(process_id) | 63 IPC_STRUCT_TRAITS_MEMBER(process_id) |
62 IPC_STRUCT_TRAITS_END() | 64 IPC_STRUCT_TRAITS_END() |
63 | 65 |
64 IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuMemoryBufferType, | 66 IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuMemoryBufferType, |
65 gfx::GPU_MEMORY_BUFFER_TYPE_LAST) | 67 gfx::GPU_MEMORY_BUFFER_TYPE_LAST) |
66 | 68 |
| 69 IPC_ENUM_TRAITS_MAX_VALUE(base::CallStackProfileParams::Trigger, |
| 70 base::CallStackProfileParams::TRIGGER_LAST) |
| 71 |
| 72 IPC_STRUCT_TRAITS_BEGIN(base::StackSamplingProfiler::Module) |
| 73 IPC_STRUCT_TRAITS_MEMBER(base_address) |
| 74 IPC_STRUCT_TRAITS_MEMBER(id) |
| 75 IPC_STRUCT_TRAITS_MEMBER(filename) |
| 76 IPC_STRUCT_TRAITS_END() |
| 77 |
| 78 IPC_STRUCT_TRAITS_BEGIN(base::StackSamplingProfiler::Frame) |
| 79 IPC_STRUCT_TRAITS_MEMBER(instruction_pointer) |
| 80 IPC_STRUCT_TRAITS_MEMBER(module_index) |
| 81 IPC_STRUCT_TRAITS_END() |
| 82 |
| 83 IPC_STRUCT_TRAITS_BEGIN(base::StackSamplingProfiler::CallStackProfile) |
| 84 IPC_STRUCT_TRAITS_MEMBER(modules) |
| 85 IPC_STRUCT_TRAITS_MEMBER(samples) |
| 86 IPC_STRUCT_TRAITS_MEMBER(profile_duration) |
| 87 IPC_STRUCT_TRAITS_MEMBER(sampling_period) |
| 88 IPC_STRUCT_TRAITS_END() |
| 89 |
| 90 IPC_STRUCT_TRAITS_BEGIN(base::CallStackProfileParams) |
| 91 IPC_STRUCT_TRAITS_MEMBER(trigger) |
| 92 IPC_STRUCT_TRAITS_MEMBER(preserve_sample_ordering) |
| 93 IPC_STRUCT_TRAITS_END() |
| 94 |
67 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle) | 95 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle) |
68 IPC_STRUCT_TRAITS_MEMBER(id) | 96 IPC_STRUCT_TRAITS_MEMBER(id) |
69 IPC_STRUCT_TRAITS_MEMBER(type) | 97 IPC_STRUCT_TRAITS_MEMBER(type) |
70 IPC_STRUCT_TRAITS_MEMBER(handle) | 98 IPC_STRUCT_TRAITS_MEMBER(handle) |
71 #if defined(USE_OZONE) | 99 #if defined(USE_OZONE) |
72 IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle) | 100 IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle) |
73 #endif | 101 #endif |
74 IPC_STRUCT_TRAITS_END() | 102 IPC_STRUCT_TRAITS_END() |
75 | 103 |
76 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId) | 104 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 IPC_MESSAGE_CONTROL2( | 166 IPC_MESSAGE_CONTROL2( |
139 ChildProcessHostMsg_ChildProfilerData, | 167 ChildProcessHostMsg_ChildProfilerData, |
140 int, /* sequence_number */ | 168 int, /* sequence_number */ |
141 tracked_objects::ProcessDataSnapshot /* process_data_snapshot */) | 169 tracked_objects::ProcessDataSnapshot /* process_data_snapshot */) |
142 | 170 |
143 // Send back histograms as vector of pickled-histogram strings. | 171 // Send back histograms as vector of pickled-histogram strings. |
144 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, | 172 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, |
145 int, /* sequence_number */ | 173 int, /* sequence_number */ |
146 std::vector<std::string> /* histogram_data */) | 174 std::vector<std::string> /* histogram_data */) |
147 | 175 |
| 176 IPC_MESSAGE_CONTROL3( |
| 177 ChildProcessHostMsg_ChildStackProfilerData, |
| 178 base::StackSamplingProfiler::CallStackProfiles, /* profiler_data */ |
| 179 base::CallStackProfileParams, /* params */ |
| 180 base::TimeTicks /* start_timestamp */) |
| 181 |
148 // Request a histogram from the browser. The browser will send the histogram | 182 // Request a histogram from the browser. The browser will send the histogram |
149 // data only if it has been passed the command line flag | 183 // data only if it has been passed the command line flag |
150 // switches::kDomAutomationController. | 184 // switches::kDomAutomationController. |
151 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_GetBrowserHistogram, | 185 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_GetBrowserHistogram, |
152 std::string, /* histogram_name */ | 186 std::string, /* histogram_name */ |
153 std::string /* histogram_json */) | 187 std::string /* histogram_json */) |
154 | 188 |
155 #if defined(OS_WIN) | 189 #if defined(OS_WIN) |
156 // Request that the given font be loaded by the host so it's cached by the | 190 // Request that the given font be loaded by the host so it's cached by the |
157 // OS. Please see ChildProcessHost::PreCacheFont for details. | 191 // OS. Please see ChildProcessHost::PreCacheFont for details. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 IPC_SYNC_MESSAGE_CONTROL2_1( | 244 IPC_SYNC_MESSAGE_CONTROL2_1( |
211 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, | 245 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, |
212 uint32 /* size */, | 246 uint32 /* size */, |
213 content::DiscardableSharedMemoryId, | 247 content::DiscardableSharedMemoryId, |
214 base::SharedMemoryHandle) | 248 base::SharedMemoryHandle) |
215 | 249 |
216 // Informs the browser that the child deleted a block of discardable shared | 250 // Informs the browser that the child deleted a block of discardable shared |
217 // memory. | 251 // memory. |
218 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, | 252 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, |
219 content::DiscardableSharedMemoryId) | 253 content::DiscardableSharedMemoryId) |
OLD | NEW |