Use ExtensionRegistry::enabled_extensions instead of deprecated ExtensionService...
[chromium-blink-merge.git] / ipc / BUILD.gn
blobcccbb585caa9d1662bab4208f5c11e7046075f48
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
3 # found in the LICENSE file.
5 component("ipc") {
6   sources = [
7     "file_descriptor_set_posix.cc",
8     "file_descriptor_set_posix.h",
9     "ipc_channel.cc",
10     "ipc_channel.h",
11     "ipc_channel_factory.cc",
12     "ipc_channel_factory.h",
13     "ipc_channel_handle.h",
14     "ipc_channel_nacl.cc",
15     "ipc_channel_nacl.h",
16     "ipc_channel_posix.cc",
17     "ipc_channel_posix.h",
18     "ipc_channel_proxy.cc",
19     "ipc_channel_proxy.h",
20     "ipc_channel_reader.cc",
21     "ipc_channel_reader.h",
22     "ipc_channel_win.cc",
23     "ipc_channel_win.h",
24     "ipc_descriptors.h",
25     "ipc_export.h",
26     "ipc_forwarding_message_filter.cc",
27     "ipc_forwarding_message_filter.h",
28     "ipc_listener.h",
29     "ipc_logging.cc",
30     "ipc_logging.h",
31     "ipc_message.cc",
32     "ipc_message.h",
33     "ipc_message_macros.h",
34     "ipc_message_start.h",
35     "ipc_message_utils.cc",
36     "ipc_message_utils.h",
37     "ipc_param_traits.h",
38     "ipc_platform_file.cc",
39     "ipc_platform_file.h",
40     "ipc_sender.h",
41     "ipc_switches.cc",
42     "ipc_switches.h",
43     "ipc_sync_channel.cc",
44     "ipc_sync_channel.h",
45     "ipc_sync_message.cc",
46     "ipc_sync_message.h",
47     "ipc_sync_message_filter.cc",
48     "ipc_sync_message_filter.h",
49     "message_filter.cc",
50     "message_filter.h",
51     "message_filter_router.cc",
52     "message_filter_router.h",
53     "param_traits_log_macros.h",
54     "param_traits_macros.h",
55     "param_traits_read_macros.h",
56     "param_traits_write_macros.h",
57     "struct_constructor_macros.h",
58     "struct_destructor_macros.h",
59     "unix_domain_socket_util.cc",
60     "unix_domain_socket_util.h",
61   ]
63   if (!is_nacl) {
64     sources -= [
65       "ipc_channel_nacl.cc",
66       "ipc_channel_nacl.h",
67     ]
68   }
70   if (is_win || is_ios) {
71     sources -= [
72       "ipc_channel_factory.cc",
73       "unix_domain_socket_util.cc",
74     ]
75   }
77   defines = [ "IPC_IMPLEMENTATION" ]
79   deps = [
80     "//base",
81     # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
82     "//base/third_party/dynamic_annotations",
83   ]
86 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
87 if (!is_android) {
88   test("ipc_tests") {
89     sources = [
90       "file_descriptor_set_posix_unittest.cc",
91       "ipc_channel_posix_unittest.cc",
92       "ipc_channel_unittest.cc",
93       "ipc_fuzzing_tests.cc",
94       "ipc_message_unittest.cc",
95       "ipc_message_utils_unittest.cc",
96       "ipc_send_fds_test.cc",
97       "ipc_sync_channel_unittest.cc",
98       "ipc_sync_message_unittest.cc",
99       "ipc_sync_message_unittest.h",
100       "ipc_test_base.cc",
101       "ipc_test_base.h",
102       "sync_socket_unittest.cc",
103       "unix_domain_socket_util_unittest.cc",
104     ]
106     if (is_win || is_ios) {
107       sources -= [ "unix_domain_socket_util_unittest.cc" ]
108     }
110     # TODO(brettw) hook up Android testing.
111     #if (is_android && gtest_target_type == "shared_library") {
112     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
113     #}
115     # TODO(brettw) hook up tcmalloc to this target.
116     #if (is_posix && !is_mac && !is_android) {
117     #  # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
118     #  if ((use_allocator!="none" && use_allocator!="see_use_tcmalloc") || (use_allocator=="see_use_tcmalloc" && linux_use_tcmalloc)) {
119     #    deps += "/base/allocator"
120     #  }
121     #}
123     deps = [
124       ":ipc",
125       ":test_support_ipc",
126       "//base",
127       "//base:i18n",
128       "//base/test:run_all_unittests",
129       "//base/test:test_support",
130       "//testing/gtest",
131     ]
132   }
134   test("ipc_perftests") {
135     sources = [
136       "ipc_perftests.cc",
137       "ipc_test_base.cc",
138       "ipc_test_base.h",
139     ]
141     # TODO(brettw) hook up Android testing.
142     #if (is_android && gtest_target_type == "shared_library") {
143     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
144     #}
146     # TODO(brettw) hook up tcmalloc to this target.
147     #if (is_posix && !is_mac && !is_android) {
148     #  # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
149     #  if ((use_allocator!="none" && use_allocator!="see_use_tcmalloc") || (use_allocator=="see_use_tcmalloc" && linux_use_tcmalloc)) {
150     #    deps += "//base/allocator"
151     #  }
152     #}
154     deps = [
155       ":ipc",
156       ":test_support_ipc",
157       "//base",
158       "//base:i18n",
159       "//base/test:test_support",
160       "//base/test:test_support_perf",
161       "//testing/gtest",
162     ]
163   }
166 static_library("test_support_ipc") {
167   sources = [
168     "ipc_multiprocess_test.cc",
169     "ipc_multiprocess_test.h",
170     "ipc_test_sink.cc",
171     "ipc_test_sink.h",
172   ]
173   deps = [
174     ":ipc",
175     "//base",
176     "//testing/gtest",
177   ]