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/profiler/stack_sampling_profiler.h" |
12 #include "base/tracked_objects.h" | 13 #include "base/tracked_objects.h" |
13 #include "base/values.h" | 14 #include "base/values.h" |
14 #include "cc/resources/shared_bitmap_manager.h" | 15 #include "cc/resources/shared_bitmap_manager.h" |
15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
16 #include "content/common/host_discardable_shared_memory_manager.h" | 17 #include "content/common/host_discardable_shared_memory_manager.h" |
| 18 #include "content/common/profiled_stack_state.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) |
22 #include "content/common/mac/io_surface_manager_token.h" | 24 #include "content/common/mac/io_surface_manager_token.h" |
23 #endif | 25 #endif |
24 | 26 |
25 IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status, | 27 IPC_ENUM_TRAITS_MAX_VALUE(tracked_objects::ThreadData::Status, |
26 tracked_objects::ThreadData::STATUS_LAST) | 28 tracked_objects::ThreadData::STATUS_LAST) |
(...skipping 30 matching lines...) Expand all 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(content::ProfiledStackState::Trigger, |
| 70 content::ProfiledStackState::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(content::ProfiledStackState) |
| 91 IPC_STRUCT_TRAITS_MEMBER(trigger) |
| 92 IPC_STRUCT_TRAITS_MEMBER(preserve_sample_ordering) |
| 93 IPC_STRUCT_TRAITS_MEMBER(start_timestamp) |
| 94 IPC_STRUCT_TRAITS_MEMBER(profiles) |
| 95 IPC_STRUCT_TRAITS_END() |
| 96 |
67 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle) | 97 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle) |
68 IPC_STRUCT_TRAITS_MEMBER(id) | 98 IPC_STRUCT_TRAITS_MEMBER(id) |
69 IPC_STRUCT_TRAITS_MEMBER(type) | 99 IPC_STRUCT_TRAITS_MEMBER(type) |
70 IPC_STRUCT_TRAITS_MEMBER(handle) | 100 IPC_STRUCT_TRAITS_MEMBER(handle) |
71 #if defined(USE_OZONE) | 101 #if defined(USE_OZONE) |
72 IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle) | 102 IPC_STRUCT_TRAITS_MEMBER(native_pixmap_handle) |
73 #endif | 103 #endif |
74 IPC_STRUCT_TRAITS_END() | 104 IPC_STRUCT_TRAITS_END() |
75 | 105 |
76 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId) | 106 IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 IPC_MESSAGE_CONTROL2( | 168 IPC_MESSAGE_CONTROL2( |
139 ChildProcessHostMsg_ChildProfilerData, | 169 ChildProcessHostMsg_ChildProfilerData, |
140 int, /* sequence_number */ | 170 int, /* sequence_number */ |
141 tracked_objects::ProcessDataSnapshot /* process_data_snapshot */) | 171 tracked_objects::ProcessDataSnapshot /* process_data_snapshot */) |
142 | 172 |
143 // Send back histograms as vector of pickled-histogram strings. | 173 // Send back histograms as vector of pickled-histogram strings. |
144 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, | 174 IPC_MESSAGE_CONTROL2(ChildProcessHostMsg_ChildHistogramData, |
145 int, /* sequence_number */ | 175 int, /* sequence_number */ |
146 std::vector<std::string> /* histogram_data */) | 176 std::vector<std::string> /* histogram_data */) |
147 | 177 |
| 178 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_ChildStackProfilerData, |
| 179 content::ProfiledStackState /* profiles_state */) |
| 180 |
148 // Request a histogram from the browser. The browser will send the histogram | 181 // Request a histogram from the browser. The browser will send the histogram |
149 // data only if it has been passed the command line flag | 182 // data only if it has been passed the command line flag |
150 // switches::kDomAutomationController. | 183 // switches::kDomAutomationController. |
151 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_GetBrowserHistogram, | 184 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_GetBrowserHistogram, |
152 std::string, /* histogram_name */ | 185 std::string, /* histogram_name */ |
153 std::string /* histogram_json */) | 186 std::string /* histogram_json */) |
154 | 187 |
155 #if defined(OS_WIN) | 188 #if defined(OS_WIN) |
156 // Request that the given font be loaded by the host so it's cached by the | 189 // Request that the given font be loaded by the host so it's cached by the |
157 // OS. Please see ChildProcessHost::PreCacheFont for details. | 190 // 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( | 243 IPC_SYNC_MESSAGE_CONTROL2_1( |
211 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, | 244 ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory, |
212 uint32 /* size */, | 245 uint32 /* size */, |
213 content::DiscardableSharedMemoryId, | 246 content::DiscardableSharedMemoryId, |
214 base::SharedMemoryHandle) | 247 base::SharedMemoryHandle) |
215 | 248 |
216 // Informs the browser that the child deleted a block of discardable shared | 249 // Informs the browser that the child deleted a block of discardable shared |
217 // memory. | 250 // memory. |
218 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, | 251 IPC_MESSAGE_CONTROL1(ChildProcessHostMsg_DeletedDiscardableSharedMemory, |
219 content::DiscardableSharedMemoryId) | 252 content::DiscardableSharedMemoryId) |
OLD | NEW |