Use AppCompat AlertDialogs even when dialogs contain EditTexts.
[chromium-blink-merge.git] / ipc / BUILD.gn
blobc27522aa22f39b4c76267e54c08b752d2e48dc04
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 import("//testing/test.gni")
7 component("ipc") {
8   sources = [
9     "attachment_broker.h",
10     "attachment_broker_messages.h",
11     "attachment_broker_win.cc",
12     "attachment_broker_win.h",
13     "brokerable_attachment.cc",
14     "brokerable_attachment.h",
15     "handle_attachment_win.cc",
16     "handle_attachment_win.h",
17     "ipc_channel.cc",
18     "ipc_channel.h",
19     "ipc_channel_common.cc",
20     "ipc_channel_factory.cc",
21     "ipc_channel_factory.h",
22     "ipc_channel_handle.h",
23     "ipc_channel_nacl.cc",
24     "ipc_channel_nacl.h",
25     "ipc_channel_posix.cc",
26     "ipc_channel_posix.h",
27     "ipc_channel_proxy.cc",
28     "ipc_channel_proxy.h",
29     "ipc_channel_reader.cc",
30     "ipc_channel_reader.h",
31     "ipc_channel_win.cc",
32     "ipc_channel_win.h",
33     "ipc_descriptors.h",
34     "ipc_export.h",
35     "ipc_handle_win.cc",
36     "ipc_handle_win.h",
37     "ipc_listener.h",
38     "ipc_logging.cc",
39     "ipc_logging.h",
40     "ipc_message.cc",
41     "ipc_message.h",
42     "ipc_message_attachment.cc",
43     "ipc_message_attachment.h",
44     "ipc_message_attachment_set.cc",
45     "ipc_message_attachment_set.h",
46     "ipc_message_generator.cc",
47     "ipc_message_generator.h",
48     "ipc_message_macros.h",
49     "ipc_message_start.h",
50     "ipc_message_utils.cc",
51     "ipc_message_utils.h",
52     "ipc_param_traits.h",
53     "ipc_platform_file.cc",
54     "ipc_platform_file.h",
55     "ipc_platform_file_attachment_posix.cc",
56     "ipc_platform_file_attachment_posix.h",
57     "ipc_sender.h",
58     "ipc_switches.cc",
59     "ipc_switches.h",
60     "ipc_sync_channel.cc",
61     "ipc_sync_channel.h",
62     "ipc_sync_message.cc",
63     "ipc_sync_message.h",
64     "ipc_sync_message_filter.cc",
65     "ipc_sync_message_filter.h",
66     "message_filter.cc",
67     "message_filter.h",
68     "message_filter_router.cc",
69     "message_filter_router.h",
70     "param_traits_log_macros.h",
71     "param_traits_macros.h",
72     "param_traits_read_macros.h",
73     "param_traits_write_macros.h",
74     "struct_constructor_macros.h",
75     "struct_destructor_macros.h",
76     "unix_domain_socket_util.cc",
77     "unix_domain_socket_util.h",
78   ]
80   if (is_nacl) {
81     sources -= [
82       "ipc_channel.cc",
83       "ipc_channel_posix.cc",
84       "unix_domain_socket_util.cc",
85     ]
86   } else {
87     sources -= [
88       "ipc_channel_nacl.cc",
89       "ipc_channel_nacl.h",
90     ]
91   }
93   if (is_win || is_ios) {
94     sources -= [ "unix_domain_socket_util.cc" ]
95   }
97   defines = [ "IPC_IMPLEMENTATION" ]
99   deps = [
100     "//base",
102     # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
103     "//base/third_party/dynamic_annotations",
104     "//crypto:crypto",
105   ]
108 # TODO(GYP): crbug.com/360936. Get this to build and run on Android.
109 if (!is_android) {
110   group("ipc_tests_run") {
111     testonly = true
112     deps = [
113       ":ipc_tests",
114     ]
115   }
117   test("ipc_tests") {
118     sources = [
119       "attachment_broker_win_unittest.cc",
120       "ipc_channel_posix_unittest.cc",
121       "ipc_channel_unittest.cc",
122       "ipc_fuzzing_tests.cc",
123       "ipc_message_attachment_set_posix_unittest.cc",
124       "ipc_message_unittest.cc",
125       "ipc_message_utils_unittest.cc",
126       "ipc_send_fds_test.cc",
127       "ipc_sync_channel_unittest.cc",
128       "ipc_sync_message_unittest.cc",
129       "ipc_sync_message_unittest.h",
130       "sync_socket_unittest.cc",
131       "unix_domain_socket_util_unittest.cc",
132     ]
134     if (is_win || is_ios) {
135       sources -= [ "unix_domain_socket_util_unittest.cc" ]
136     }
138     # TODO(brettw) hook up Android testing.
139     #if (is_android && gtest_target_type == "shared_library") {
140     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
141     #}
143     # TODO(brettw) hook up tcmalloc to this target.
144     #if (is_posix && !is_mac && !is_android) {
145     #  if (use_allocator!="none") {
146     #    deps += "/base/allocator"
147     #  }
148     #}
150     deps = [
151       ":ipc",
152       ":test_support",
153       "//base",
154       "//base:i18n",
155       "//base/test:run_all_unittests",
156       "//base/test:test_support",
157       "//testing/gtest",
158     ]
159   }
161   test("ipc_perftests") {
162     sources = [
163       "ipc_perftests.cc",
164     ]
166     # TODO(brettw) hook up Android testing.
167     #if (is_android && gtest_target_type == "shared_library") {
168     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
169     #}
171     # TODO(brettw) hook up tcmalloc to this target.
172     #if (is_posix && !is_mac && !is_android) {
173     #  if (use_allocator!="none") {
174     #    deps += "//base/allocator"
175     #  }
176     #}
177     deps = [
178       ":ipc",
179       ":test_support",
180       "//base",
181       "//base:i18n",
182       "//base/test:test_support",
183       "//base/test:test_support_perf",
184       "//testing/gtest",
185     ]
186   }
189 static_library("test_support") {
190   testonly = true
191   sources = [
192     "ipc_multiprocess_test.cc",
193     "ipc_multiprocess_test.h",
194     "ipc_perftest_support.cc",
195     "ipc_perftest_support.h",
196     "ipc_security_test_util.cc",
197     "ipc_security_test_util.h",
198     "ipc_test_base.cc",
199     "ipc_test_base.h",
200     "ipc_test_channel_listener.cc",
201     "ipc_test_channel_listener.h",
202     "ipc_test_sink.cc",
203     "ipc_test_sink.h",
204   ]
205   deps = [
206     ":ipc",
207     "//base",
208     "//base/test:test_support",
209     "//testing/gtest",
210   ]