Remove unused libpeerconnection code.
[chromium-blink-merge.git] / extensions / shell / BUILD.gn
blob09cbb82d31881efc634d71dbb40d213391c5be8d
1 # Copyright 2014 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("//extensions/shell/app_shell.gni")
7 # Technically, this directory should not depend on files from src/chrome, but
8 # that's where the VERSION file is. This  should probably all be moved to
9 # src/build.
10 import("//chrome/version.gni")
11 import("//testing/test.gni")
12 import("//tools/grit/grit_rule.gni")
14 assert(enable_extensions)
16 grit("resources") {
17   source = "app_shell_resources.grd"
18   outputs = [
19     "grit/app_shell_resources.h",
20     "app_shell_resources.pak",
21   ]
24 source_set("app_shell_lib") {
25   # TODO(jamescook): investigate and get rid of test dependencies. This library
26   # is testonly because it depends on testonly libraries, namely
27   # //content/shell:content_shell_lib. See http://crbug.com/438283
28   testonly = true
29   deps = [
30     ":resources",
31     ":version_header",
32     "//base",
33     "//base:prefs",
34     "//components/devtools_discovery",
35     "//components/devtools_http_handler",
36     "//components/guest_view:guest_view",
37     "//components/pref_registry",
38     "//components/update_client",
39     "//components/user_prefs",
40     "//components/web_cache/renderer",
41     "//content",
42     "//content/shell:content_shell_lib",
43     "//device/core",
44     "//device/hid",
45     "//extensions/common/api",
46     "//extensions/common/api:api_registration",
47     "//extensions/browser",
48     "//extensions/common",
49     "//extensions/renderer",
50     "//extensions/shell/common/api",
51     "//extensions/shell/common/api:api_registration",
52     "//extensions/utility",
53     "//extensions:extensions_resources",
54     "//extensions:shell_and_test_pak",
55     "//mojo/environment:chromium",
56     "//skia",
57     "//third_party/WebKit/public:blink",
58     "//third_party/mojo/src/mojo/edk/system",
59     "//ui/base",
60     "//ui/base/ime",
61     "//v8",
62   ]
64   sources = rebase_path(app_shell_gypi_values.app_shell_lib_sources,
65                         ".",
66                         "//extensions/shell")
68   if (use_aura) {
69     deps += [ "//ui/wm" ]
71     aura_sources = rebase_path(app_shell_gypi_values.app_shell_lib_sources_aura,
72                                ".",
73                                "//extensions/shell")
74     sources += aura_sources
75   }
77   if (is_chromeos) {
78     deps += [
79       "//chromeos",
80       "//ui/chromeos:ui_chromeos",
81       "//ui/display",
82     ]
83     chromeos_sources =
84         rebase_path(app_shell_gypi_values.app_shell_lib_sources_chromeos,
85                     ".",
86                     "//extensions/shell")
87     sources += chromeos_sources
88   }
90   # TODO(GYP): Enable this when //components/nacl GN is done. See
91   # http://crbug.com/430602
92   if (false) {
93     if (enable_nacl) {
94       if (is_linux) {
95         deps += [ "//components/nacl:nacl_helper" ]
96       }
97       deps += [
98         "//components/nacl",
99         "//components/nacl:browser",
100         "//components/nacl:common",
101         "//components/nacl:renderer",
102         "//components/nacl:switches",
103       ]
104       nacl_sources =
105           rebase_path(app_shell_gypi_values.app_shell_lib_sources_nacl,
106                       ".",
107                       "//extensions/shell")
108       sources += nacl_sources
109     }
110   }
112   if (enable_nacl) {
113     sources += [
114       "browser/shell_nacl_browser_delegate.cc",
115       "browser/shell_nacl_browser_delegate.h",
116     ]
118     deps += [
119       "//components/nacl",
120       "//components/nacl:nacl_browser",
121       "//components/nacl:nacl_common",
122       "//components/nacl:nacl_renderer",
123       "//components/nacl:nacl_switches",
124       "//components/nacl/renderer/plugin:nacl_trusted_plugin",
125     ]
127     if (is_linux) {
128       deps += [ "//components/nacl:nacl_helper" ]
129     }
130   }
133 if (!(is_chromeos && !use_ozone)) {
134   executable("app_shell") {
135     # testonly because :app_shell_lib is testonly. See :app_shell_lib comment.
136     testonly = true
137     sources = rebase_path(app_shell_gypi_values.app_shell_sources,
138                           ".",
139                           "//extensions/shell")
140     deps = [
141       ":app_shell_lib",
142       "//extensions:shell_and_test_pak",
143     ]
145     if (is_win) {
146       configs += [ "//build/config/win:windowed" ]
147       configs -= [ "//build/config/win:console" ]
148       deps += [ "//base/allocator" ]
149     }
151     if (is_mac) {
152       # TODO(GYP): Mac bundling
153     }
154   }
157 test("app_shell_unittests") {
158   sources = rebase_path(app_shell_gypi_values.app_shell_unittests_sources,
159                         ".",
160                         "//extensions/shell")
162   deps = [
163     ":app_shell_lib",
164     "//base",
165     "//base/test:test_support",
166     "//content/test:test_support",
167     "//extensions:shell_and_test_pak",
168     "//extensions:test_support",
169     "//testing/gtest",
170   ]
172   if (use_aura) {
173     deps += [ "//ui/aura:test_support" ]
175     aura_sources =
176         rebase_path(app_shell_gypi_values.app_shell_unittests_sources_aura,
177                     ".",
178                     "//extensions/shell")
179     sources += aura_sources
180   }
182   if (is_chromeos) {
183     deps += [ "//chromeos:test_support_without_gmock" ]
185     chromeos_sources =
186         rebase_path(app_shell_gypi_values.app_shell_unittests_sources_chromeos,
187                     ".",
188                     "//extensions/shell")
189     sources += chromeos_sources
190   }
192   # TODO(GYP): Enable this when //components/nacl GN is done.
193   if (false) {
194     if (use_nacl) {
195       nacl_sources =
196           rebase_path(app_shell_gypi_values.app_shell_unittests_sources_nacl,
197                       ".",
198                       "//extensions/shell")
199       sources += nacl_sources
200     }
201   }
203   if (is_win) {
204     deps += [ "//base/allocator" ]
205   }
208 process_version("version_header") {
209   template_file = "common/version.h.in"
210   output = "$target_gen_dir/common/version.h"