Fix lint new api error in SystemMessageHandler.
[chromium-blink-merge.git] / remoting / BUILD.gn
blob06b0637f7717ae5e83bde1278ddd5782336ceae3
1 # Copyright 2015 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("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//remoting/remoting_version.gni")
8 import("//remoting/remoting_enable.gni")
9 import("//testing/test.gni")
11 # Various remoting targets need this version definition.
12 config("version") {
13   defines = [ "VERSION=$version_full" ]
16 group("remoting_all") {
17   testonly = true
19   deps = [
20     #"//remoting:remoting_browser_test_resources",
21     "//remoting:remoting_unittests",
22     #"//remoting:remoting_webapp_unittests",
23     #"//app_remoting_test.gyp:ar_sample_test_driver",
24     #"//app_remoting_webapp.gyp:ar_sample_app",
25   ]
27   # TODO(GYP): add is_mac
28   if ((is_linux && !is_chromeos) || is_win) {
29     deps += [ "//remoting/webapp" ]
30   }
32   if (is_win) {
33     deps += [
34       #"//remoting:remoting_breakpad_tester",
35       #"//remoting:remoting_console",
36       #"//remoting:remoting_desktop",
37       #"//remoting:remoting_host_installation",
38     ]
39   }
41   if (is_android) {
42     deps += [
43       #"//remoting:remoting_apk",
44       #"//remoting:remoting_test_apk",
45       #"//remoting:remoting_unittests_apk",
46     ]
47   }
49   if (enable_remoting_host) {
50     deps += [
51       "//remoting:remoting_perftests",
52       "//remoting/host",
53       "//remoting/host:remoting_start_host",
54       "//remoting/host/it2me:remote_assistance_host",
56       #"//remoting:remoting_it2me_native_messaging_host",
57       #"//remoting:remoting_native_messaging_manifests",
58     ]
59   }
61   if (enable_me2me_host) {
62     deps += [
63       "//remoting/host:remoting_me2me_host",
64       #"//remoting/host:remoting_me2me_host_archive",
65     ]
66   }
68   # TODO(GYP) Depends on crbug.com/471924 being fixed for PNaCl.
69   if (enable_nacl) {
70     deps += [ "//remoting:remoting_key_tester" ]
71   }
74 # GYP version: remoting/remoting_test.gypi:remoting_test_support
75 source_set("test_support") {
76   testonly = true
78   deps = [
79     "//base",
80     "//net",
81     "//remoting/base",
82     "//remoting/client",
83     "//remoting/codec",
84     "//remoting/protocol:test_support",
85     "//remoting/resources",
86     "//remoting/signaling:test_support",
87     "//remoting/test:test_support",
88     "//testing/gmock",
89     "//testing/gtest",
90   ]
92   if (enable_configuration_policy) {
93     deps += [ "//components/policy:test_support" ]
94   }
96   if (enable_remoting_host) {
97     deps += [ "//remoting/host:test_support" ]
98   }
101 # TODO(GYP) remoting_unittests on Mac. Needs to be tested.
102 if (!is_mac) {
103   test("remoting_unittests") {
104     configs += [
105       ":version",
107       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
108       "//build/config/compiler:no_size_t_to_int_warning",
109     ]
111     deps = [
112       ":test_support",
113       "//base/allocator",
114       "//google_apis",
115       "//remoting/base:unit_tests",
116       "//remoting/client:unit_tests",
117       "//remoting/protocol:unit_tests",
118       "//remoting/signaling:unit_tests",
119       "//remoting/test:unit_tests",
120       "//testing/gmock",
121       "//testing/gtest",
122       "//third_party/webrtc",
123     ]
125     if (is_android) {
126       deps += [ "//testing/android/native_test:native_test_native_code" ]
127     }
129     if (enable_remoting_host) {
130       deps += [
131         "//remoting/codec:unit_tests",
132         "//remoting/host:unit_tests",
133         "//ui/gfx",
134       ]
135     }
137     if (enable_webrtc) {
138       deps += [
139         "//third_party/libjingle:libjingle_webrtc",
140         "//third_party/libjingle:libpeerconnection",
141       ]
142     }
143   }
145   if (enable_remoting_host) {
146     test("remoting_perftests") {
147       sources = [
148         "codec/codec_test.cc",
149         "codec/codec_test.h",
150         "codec/video_encoder_vpx_perftest.cc",
151         "test/protocol_perftest.cc",
152       ]
154       configs += [ ":version" ]
156       deps = [
157         ":test_support",
158         "//base",
159         "//base/test:run_all_unittests",
160         "//base/test:test_support",
161         "//net:test_support",
162         "//remoting/base",
163         "//testing/gtest",
164         "//third_party/webrtc/modules/desktop_capture",
165         "//third_party/libjingle",
166       ]
168       if (enable_webrtc) {
169         deps += [ "//third_party/libjingle:libjingle_webrtc" ]
170       }
171     }
172   }
173 } else {
174   group("remoting_unittests") {
175   }
178 if (enable_pnacl) {
179   group("remoting_key_tester") {
180     deps = [
181       ":remoting_key_tester_copies",
182     ]
183   }
185   copy("remoting_key_tester_copies") {
186     sources = [
187       "tools/javascript_key_tester/background.js",
188       "tools/javascript_key_tester/chord_tracker.js",
189       "tools/javascript_key_tester/event_listeners.js",
190       "tools/javascript_key_tester/icon_128.png",
191       "tools/javascript_key_tester/main.css",
192       "tools/javascript_key_tester/main.html",
193       "tools/javascript_key_tester/main.js",
194       "tools/javascript_key_tester/manifest.json",
195       "tools/javascript_key_tester/pnacl/remoting_key_tester.nmf",
197       # TODO(GYP): crbug.com/471924 "$target_out_dir/remoting_key_tester_newlib.pexe",
198     ]
200     outputs = [
201       "$target_out_dir/remoting/key_tester/{{source_file_part}}",
202     ]
204     deps = [
205       ":remoting_key_tester_jscompile",
206       ":remoting_key_tester_pexe",
207     ]
208   }
210   group("remoting_key_tester_jscompile") {
211     # TODO(GYP): crbug.com/471926 add support for run_jscompile=true.
212     run_jscompile = false
213     if (run_jscompile) {
214     }
215   }
217   group("remoting_key_tester_pexe") {
218     # TODO(GYP): crbug.com/471924 implement me when we have a pnacl toolchain.
219     #sources = [
220     # "tools/javascript_key_tester/pnacl/remoting_key_tester.cc",
221     #]
222   }