Use GuestView embedder when determing the print preview dialog dimensions.
[chromium-blink-merge.git] / ipc / BUILD.gn
blobac5631f15044b9968c3c6496099c2a483e22c73a
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     "ipc_channel.cc",
10     "ipc_channel.h",
11     "ipc_channel_factory.cc",
12     "ipc_channel_factory.h",
13     "ipc_channel_common.cc",
14     "ipc_channel_handle.h",
15     "ipc_channel_nacl.cc",
16     "ipc_channel_nacl.h",
17     "ipc_channel_posix.cc",
18     "ipc_channel_posix.h",
19     "ipc_channel_proxy.cc",
20     "ipc_channel_proxy.h",
21     "ipc_channel_reader.cc",
22     "ipc_channel_reader.h",
23     "ipc_channel_win.cc",
24     "ipc_channel_win.h",
25     "ipc_descriptors.h",
26     "ipc_export.h",
27     "ipc_forwarding_message_filter.cc",
28     "ipc_forwarding_message_filter.h",
29     "ipc_listener.h",
30     "ipc_logging.cc",
31     "ipc_logging.h",
32     "ipc_message.cc",
33     "ipc_message.h",
34     "ipc_message_attachment_set.cc",
35     "ipc_message_attachment_set.h",
36     "ipc_message_macros.h",
37     "ipc_message_start.h",
38     "ipc_message_utils.cc",
39     "ipc_message_utils.h",
40     "ipc_param_traits.h",
41     "ipc_platform_file.cc",
42     "ipc_platform_file.h",
43     "ipc_sender.h",
44     "ipc_switches.cc",
45     "ipc_switches.h",
46     "ipc_sync_channel.cc",
47     "ipc_sync_channel.h",
48     "ipc_sync_message.cc",
49     "ipc_sync_message.h",
50     "ipc_sync_message_filter.cc",
51     "ipc_sync_message_filter.h",
52     "message_filter.cc",
53     "message_filter.h",
54     "message_filter_router.cc",
55     "message_filter_router.h",
56     "param_traits_log_macros.h",
57     "param_traits_macros.h",
58     "param_traits_read_macros.h",
59     "param_traits_write_macros.h",
60     "struct_constructor_macros.h",
61     "struct_destructor_macros.h",
62     "unix_domain_socket_util.cc",
63     "unix_domain_socket_util.h",
64   ]
66   if (!is_nacl) {
67     sources -= [
68       "ipc_channel_nacl.cc",
69       "ipc_channel_nacl.h",
70     ]
71   }
73   if (is_win || is_ios) {
74     sources -= [ "unix_domain_socket_util.cc" ]
75   }
77   defines = [ "IPC_IMPLEMENTATION" ]
79   deps = [
80     "//base",
82     # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
83     "//base/third_party/dynamic_annotations",
84   ]
87 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
88 if (!is_android) {
89   test("ipc_tests") {
90     sources = [
91       "ipc_channel_posix_unittest.cc",
92       "ipc_channel_unittest.cc",
93       "ipc_fuzzing_tests.cc",
94       "ipc_message_attachment_set_posix_unittest.cc",
95       "ipc_message_unittest.cc",
96       "ipc_message_utils_unittest.cc",
97       "ipc_send_fds_test.cc",
98       "ipc_sync_channel_unittest.cc",
99       "ipc_sync_message_unittest.cc",
100       "ipc_sync_message_unittest.h",
101       "sync_socket_unittest.cc",
102       "unix_domain_socket_util_unittest.cc",
103     ]
105     if (is_win || is_ios) {
106       sources -= [ "unix_domain_socket_util_unittest.cc" ]
107     }
109     # TODO(brettw) hook up Android testing.
110     #if (is_android && gtest_target_type == "shared_library") {
111     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
112     #}
114     # TODO(brettw) hook up tcmalloc to this target.
115     #if (is_posix && !is_mac && !is_android) {
116     #  if (use_allocator!="none") {
117     #    deps += "/base/allocator"
118     #  }
119     #}
121     deps = [
122       ":ipc",
123       ":test_support",
124       "//base",
125       "//base:i18n",
126       "//base/test:run_all_unittests",
127       "//base/test:test_support",
128       "//testing/gtest",
129     ]
130   }
132   test("ipc_perftests") {
133     sources = [
134       "ipc_perftests.cc",
135     ]
137     # TODO(brettw) hook up Android testing.
138     #if (is_android && gtest_target_type == "shared_library") {
139     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
140     #}
142     # TODO(brettw) hook up tcmalloc to this target.
143     #if (is_posix && !is_mac && !is_android) {
144     #  if (use_allocator!="none") {
145     #    deps += "//base/allocator"
146     #  }
147     #}
149     deps = [
150       ":ipc",
151       ":test_support",
152       "//base",
153       "//base:i18n",
154       "//base/test:test_support",
155       "//base/test:test_support_perf",
156       "//testing/gtest",
157     ]
158   }
161 static_library("test_support") {
162   testonly = true
163   sources = [
164     "ipc_multiprocess_test.cc",
165     "ipc_multiprocess_test.h",
166     "ipc_perftest_support.cc",
167     "ipc_perftest_support.h",
168     "ipc_security_test_util.cc",
169     "ipc_security_test_util.h",
170     "ipc_test_base.cc",
171     "ipc_test_base.h",
172     "ipc_test_channel_listener.cc",
173     "ipc_test_channel_listener.h",
174     "ipc_test_sink.cc",
175     "ipc_test_sink.h",
176   ]
177   deps = [
178     ":ipc",
179     "//base",
180     "//testing/gtest",
181   ]