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 import("//build/config/nacl/config.gni") | 5 import("//build/config/nacl/config.gni") |
| 6 import("//mojo/public/tools/bindings/mojom.gni") |
6 import("//testing/test.gni") | 7 import("//testing/test.gni") |
7 import("//tools/ipc_fuzzer/ipc_fuzzer.gni") | 8 import("//tools/ipc_fuzzer/ipc_fuzzer.gni") |
8 | 9 |
9 component("ipc") { | 10 component("ipc") { |
10 sources = [ | 11 sources = [ |
11 "attachment_broker.cc", | 12 "attachment_broker.cc", |
12 "attachment_broker.h", | 13 "attachment_broker.h", |
13 "attachment_broker_messages.h", | 14 "attachment_broker_messages.h", |
14 "attachment_broker_privileged.cc", | 15 "attachment_broker_privileged.cc", |
15 "attachment_broker_privileged.h", | 16 "attachment_broker_privileged.h", |
(...skipping 15 matching lines...) Expand all Loading... |
31 "handle_attachment_win.cc", | 32 "handle_attachment_win.cc", |
32 "handle_attachment_win.h", | 33 "handle_attachment_win.h", |
33 "handle_win.cc", | 34 "handle_win.cc", |
34 "handle_win.h", | 35 "handle_win.h", |
35 "ipc_channel.cc", | 36 "ipc_channel.cc", |
36 "ipc_channel.h", | 37 "ipc_channel.h", |
37 "ipc_channel_common.cc", | 38 "ipc_channel_common.cc", |
38 "ipc_channel_factory.cc", | 39 "ipc_channel_factory.cc", |
39 "ipc_channel_factory.h", | 40 "ipc_channel_factory.h", |
40 "ipc_channel_handle.h", | 41 "ipc_channel_handle.h", |
| 42 "ipc_channel_mojo.cc", |
| 43 "ipc_channel_mojo.h", |
41 "ipc_channel_nacl.cc", | 44 "ipc_channel_nacl.cc", |
42 "ipc_channel_nacl.h", | 45 "ipc_channel_nacl.h", |
43 "ipc_channel_posix.cc", | 46 "ipc_channel_posix.cc", |
44 "ipc_channel_posix.h", | 47 "ipc_channel_posix.h", |
45 "ipc_channel_proxy.cc", | 48 "ipc_channel_proxy.cc", |
46 "ipc_channel_proxy.h", | 49 "ipc_channel_proxy.h", |
47 "ipc_channel_reader.cc", | 50 "ipc_channel_reader.cc", |
48 "ipc_channel_reader.h", | 51 "ipc_channel_reader.h", |
49 "ipc_channel_win.cc", | 52 "ipc_channel_win.cc", |
50 "ipc_channel_win.h", | 53 "ipc_channel_win.h", |
51 "ipc_descriptors.h", | 54 "ipc_descriptors.h", |
52 "ipc_endpoint.cc", | 55 "ipc_endpoint.cc", |
53 "ipc_endpoint.h", | 56 "ipc_endpoint.h", |
54 "ipc_export.h", | 57 "ipc_export.h", |
55 "ipc_handle_win.cc", | 58 "ipc_handle_win.cc", |
56 "ipc_handle_win.h", | 59 "ipc_handle_win.h", |
57 "ipc_listener.h", | 60 "ipc_listener.h", |
58 "ipc_logging.cc", | 61 "ipc_logging.cc", |
59 "ipc_logging.h", | 62 "ipc_logging.h", |
60 "ipc_message.cc", | 63 "ipc_message.cc", |
61 "ipc_message.h", | 64 "ipc_message.h", |
62 "ipc_message_attachment.cc", | 65 "ipc_message_attachment.cc", |
63 "ipc_message_attachment.h", | 66 "ipc_message_attachment.h", |
64 "ipc_message_attachment_set.cc", | 67 "ipc_message_attachment_set.cc", |
65 "ipc_message_attachment_set.h", | 68 "ipc_message_attachment_set.h", |
66 "ipc_message_generator.cc", | 69 "ipc_message_generator.cc", |
67 "ipc_message_generator.h", | 70 "ipc_message_generator.h", |
68 "ipc_message_macros.h", | 71 "ipc_message_macros.h", |
| 72 "ipc_message_pipe_reader.cc", |
| 73 "ipc_message_pipe_reader.h", |
69 "ipc_message_start.h", | 74 "ipc_message_start.h", |
70 "ipc_message_templates.h", | 75 "ipc_message_templates.h", |
71 "ipc_message_templates_impl.h", | 76 "ipc_message_templates_impl.h", |
72 "ipc_message_utils.cc", | 77 "ipc_message_utils.cc", |
73 "ipc_message_utils.h", | 78 "ipc_message_utils.h", |
| 79 "ipc_mojo_bootstrap.cc", |
| 80 "ipc_mojo_bootstrap.h", |
| 81 "ipc_mojo_handle_attachment.cc", |
| 82 "ipc_mojo_handle_attachment.h", |
| 83 "ipc_mojo_message_helper.cc", |
| 84 "ipc_mojo_message_helper.h", |
| 85 "ipc_mojo_param_traits.cc", |
| 86 "ipc_mojo_param_traits.h", |
74 "ipc_platform_file.cc", | 87 "ipc_platform_file.cc", |
75 "ipc_platform_file.h", | 88 "ipc_platform_file.h", |
76 "ipc_platform_file_attachment_posix.cc", | 89 "ipc_platform_file_attachment_posix.cc", |
77 "ipc_platform_file_attachment_posix.h", | 90 "ipc_platform_file_attachment_posix.h", |
78 "ipc_sender.h", | 91 "ipc_sender.h", |
79 "ipc_switches.cc", | 92 "ipc_switches.cc", |
80 "ipc_switches.h", | 93 "ipc_switches.h", |
81 "ipc_sync_channel.cc", | 94 "ipc_sync_channel.cc", |
82 "ipc_sync_channel.h", | 95 "ipc_sync_channel.h", |
83 "ipc_sync_message.cc", | 96 "ipc_sync_message.cc", |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 sources -= [ "unix_domain_socket_util.cc" ] | 138 sources -= [ "unix_domain_socket_util.cc" ] |
126 } | 139 } |
127 | 140 |
128 defines = [ "IPC_IMPLEMENTATION" ] | 141 defines = [ "IPC_IMPLEMENTATION" ] |
129 | 142 |
130 public_deps = [ | 143 public_deps = [ |
131 ":param_traits", | 144 ":param_traits", |
132 "//mojo/public/cpp/system", | 145 "//mojo/public/cpp/system", |
133 ] | 146 ] |
134 deps = [ | 147 deps = [ |
| 148 ":mojom", |
135 "//base", | 149 "//base", |
136 "//mojo/public/cpp/bindings", | 150 "//mojo/public/cpp/bindings", |
137 ] | 151 ] |
138 | 152 |
139 if (is_win || is_mac) { | 153 if (is_win || is_mac) { |
140 # On Windows HandleAttachmentWin needs to generate random IDs. | 154 # On Windows HandleAttachmentWin needs to generate random IDs. |
141 # On Mac MachPortAttachmentMac needs to generate random IDs. | 155 # On Mac MachPortAttachmentMac needs to generate random IDs. |
142 deps += [ "//crypto" ] | 156 deps += [ "//crypto" ] |
143 } | 157 } |
144 | 158 |
145 if (enable_ipc_fuzzer) { | 159 if (enable_ipc_fuzzer) { |
146 public_configs = [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ] | 160 public_configs = [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ] |
147 } | 161 } |
148 } | 162 } |
149 | 163 |
| 164 mojom("mojom") { |
| 165 sources = [ |
| 166 "ipc.mojom", |
| 167 ] |
| 168 } |
| 169 |
150 # This is provided as a separate target so other targets can provide param | 170 # This is provided as a separate target so other targets can provide param |
151 # traits implementations without necessarily linking to all of IPC. | 171 # traits implementations without necessarily linking to all of IPC. |
152 source_set("param_traits") { | 172 source_set("param_traits") { |
153 public = [ | 173 public = [ |
154 "ipc_param_traits.h", | 174 "ipc_param_traits.h", |
155 ] | 175 ] |
156 } | 176 } |
157 | 177 |
158 if (!is_ios) { | 178 if (!is_ios) { |
159 source_set("run_all_unittests") { | 179 source_set("run_all_unittests") { |
160 testonly = true | 180 testonly = true |
161 | 181 |
162 sources = [ | 182 sources = [ |
163 "run_all_unittests.cc", | 183 "run_all_unittests.cc", |
164 ] | 184 ] |
165 | 185 |
166 deps = [ | 186 deps = [ |
167 "//base", | 187 "//base", |
168 "//base/test:test_support", | 188 "//base/test:test_support", |
169 "//mojo/edk/system", | 189 "//mojo/edk/system", |
| 190 "//mojo/edk/test:test_support", |
170 ] | 191 ] |
171 } | 192 } |
172 | 193 |
173 test("ipc_tests") { | 194 test("ipc_tests") { |
174 sources = [ | 195 sources = [ |
175 "attachment_broker_mac_unittest.cc", | 196 "attachment_broker_mac_unittest.cc", |
176 "attachment_broker_privileged_mac_unittest.cc", | 197 "attachment_broker_privileged_mac_unittest.cc", |
177 "attachment_broker_privileged_win_unittest.cc", | 198 "attachment_broker_privileged_win_unittest.cc", |
| 199 "ipc_channel_mojo_unittest.cc", |
178 "ipc_channel_posix_unittest.cc", | 200 "ipc_channel_posix_unittest.cc", |
179 "ipc_channel_proxy_unittest.cc", | 201 "ipc_channel_proxy_unittest.cc", |
180 "ipc_channel_reader_unittest.cc", | 202 "ipc_channel_reader_unittest.cc", |
181 "ipc_fuzzing_tests.cc", | 203 "ipc_fuzzing_tests.cc", |
182 "ipc_message_attachment_set_posix_unittest.cc", | 204 "ipc_message_attachment_set_posix_unittest.cc", |
183 "ipc_message_unittest.cc", | 205 "ipc_message_unittest.cc", |
184 "ipc_message_utils_unittest.cc", | 206 "ipc_message_utils_unittest.cc", |
| 207 "ipc_mojo_bootstrap_unittest.cc", |
185 "ipc_sync_channel_unittest.cc", | 208 "ipc_sync_channel_unittest.cc", |
186 "ipc_sync_message_unittest.cc", | 209 "ipc_sync_message_unittest.cc", |
187 "ipc_sync_message_unittest.h", | 210 "ipc_sync_message_unittest.h", |
188 "ipc_test_message_generator.cc", | 211 "ipc_test_message_generator.cc", |
189 "ipc_test_message_generator.h", | 212 "ipc_test_message_generator.h", |
190 "ipc_test_messages.h", | 213 "ipc_test_messages.h", |
191 "sync_socket_unittest.cc", | 214 "sync_socket_unittest.cc", |
192 ] | 215 ] |
193 | 216 |
194 if (!is_win && !is_ios) { | 217 if (!is_win && !is_ios) { |
195 sources += [ "unix_domain_socket_util_unittest.cc" ] | 218 sources += [ "unix_domain_socket_util_unittest.cc" ] |
196 } | 219 } |
197 | 220 |
198 if (!is_android) { | 221 if (!is_android) { |
199 sources += [ "ipc_channel_unittest.cc" ] | 222 sources += [ "ipc_channel_unittest.cc" ] |
200 } | 223 } |
201 | 224 |
202 if (!is_ios) { | 225 if (!is_ios) { |
203 sources += [ "ipc_send_fds_test.cc" ] | 226 sources += [ "ipc_send_fds_test.cc" ] |
204 } | 227 } |
205 | 228 |
206 # TODO(brettw) hook up Android testing. | 229 # TODO(brettw) hook up Android testing. |
207 #if (is_android && gtest_target_type == "shared_library") { | 230 #if (is_android && gtest_target_type == "shared_library") { |
208 # deps += "/testing/android/native_test.gyp:native_testNative_code" | 231 # deps += "/testing/android/native_test.gyp:native_testNative_code" |
209 #} | 232 #} |
210 | 233 |
211 deps = [ | 234 deps = [ |
212 ":ipc", | 235 ":ipc", |
| 236 ":mojom", |
213 ":run_all_unittests", | 237 ":run_all_unittests", |
214 ":test_support", | 238 ":test_support", |
215 "//base", | 239 "//base", |
216 "//base:i18n", | 240 "//base:i18n", |
217 "//base/test:test_support", | 241 "//base/test:test_support", |
218 "//crypto", | 242 "//crypto", |
| 243 "//mojo/edk/system", |
| 244 "//mojo/edk/test:test_support", |
219 "//testing/gtest", | 245 "//testing/gtest", |
220 ] | 246 ] |
221 | 247 |
222 if (is_mac) { | 248 if (is_mac) { |
223 deps += [ "//sandbox/mac:seatbelt" ] | 249 deps += [ "//sandbox/mac:seatbelt" ] |
224 } | 250 } |
225 } | 251 } |
226 | 252 |
227 test("ipc_perftests") { | 253 test("ipc_perftests") { |
228 sources = [ | 254 sources = [ |
| 255 "ipc_mojo_perftest.cc", |
229 "ipc_perftests.cc", | 256 "ipc_perftests.cc", |
| 257 "run_all_perftests.cc", |
230 ] | 258 ] |
231 | 259 |
232 # TODO(brettw) hook up Android testing. | 260 # TODO(brettw) hook up Android testing. |
233 #if (is_android && gtest_target_type == "shared_library") { | 261 #if (is_android && gtest_target_type == "shared_library") { |
234 # deps += "/testing/android/native_test.gyp:native_testNative_code" | 262 # deps += "/testing/android/native_test.gyp:native_testNative_code" |
235 #} | 263 #} |
236 | 264 |
237 deps = [ | 265 deps = [ |
238 ":ipc", | 266 ":ipc", |
239 ":test_support", | 267 ":test_support", |
240 "//base", | 268 "//base", |
241 "//base:i18n", | 269 "//base:i18n", |
242 "//base/test:test_support", | 270 "//base/test:test_support", |
243 "//base/test:test_support_perf", | 271 "//mojo/edk/system", |
| 272 "//mojo/edk/test:test_support", |
244 "//testing/gtest", | 273 "//testing/gtest", |
245 ] | 274 ] |
246 } | 275 } |
247 | 276 |
248 source_set("test_support") { | 277 source_set("test_support") { |
249 testonly = true | 278 testonly = true |
250 sources = [ | 279 sources = [ |
251 "ipc_multiprocess_test.cc", | 280 "ipc_multiprocess_test.cc", |
252 "ipc_multiprocess_test.h", | 281 "ipc_multiprocess_test.h", |
253 "ipc_perftest_support.cc", | 282 "ipc_perftest_support.cc", |
(...skipping 12 matching lines...) Expand all Loading... |
266 public_deps = [ | 295 public_deps = [ |
267 ":ipc", | 296 ":ipc", |
268 ] | 297 ] |
269 deps = [ | 298 deps = [ |
270 "//base", | 299 "//base", |
271 "//base/test:test_support", | 300 "//base/test:test_support", |
272 "//testing/gtest", | 301 "//testing/gtest", |
273 ] | 302 ] |
274 } | 303 } |
275 } | 304 } |
OLD | NEW |