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
10 import("//chrome/version.gni")
11 import("//testing/test.gni")
12 import("//tools/grit/grit_rule.gni")
14 assert(enable_extensions)
17 source = "app_shell_resources.grd"
19 "grit/app_shell_resources.h",
20 "app_shell_resources.pak",
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
34 "//components/devtools_discovery",
35 "//components/devtools_http_handler",
36 "//components/guest_view/browser",
37 "//components/guest_view/common",
38 "//components/guest_view/renderer",
39 "//components/pref_registry",
40 "//components/update_client",
41 "//components/user_prefs",
42 "//components/web_cache/renderer",
44 "//content/shell:content_shell_lib",
47 "//extensions/common/api",
48 "//extensions/common/api:api_registration",
49 "//extensions/browser",
50 "//extensions/common",
51 "//extensions/renderer",
52 "//extensions/shell/common/api",
53 "//extensions/shell/common/api:api_registration",
54 "//extensions/utility",
55 "//extensions:extensions_resources",
56 "//extensions:shell_and_test_pak",
57 "//mojo/environment:chromium",
59 "//third_party/WebKit/public:blink",
60 "//third_party/mojo/src/mojo/edk/system",
66 sources = rebase_path(app_shell_gypi_values.app_shell_lib_sources,
73 aura_sources = rebase_path(app_shell_gypi_values.app_shell_lib_sources_aura,
76 sources += aura_sources
82 "//ui/chromeos:ui_chromeos",
86 rebase_path(app_shell_gypi_values.app_shell_lib_sources_chromeos,
89 sources += chromeos_sources
92 # TODO(GYP): Enable this when //components/nacl GN is done. See
93 # http://crbug.com/430602
97 deps += [ "//components/nacl:nacl_helper" ]
101 "//components/nacl:browser",
102 "//components/nacl:common",
103 "//components/nacl:renderer",
104 "//components/nacl:switches",
107 rebase_path(app_shell_gypi_values.app_shell_lib_sources_nacl,
109 "//extensions/shell")
110 sources += nacl_sources
116 "browser/shell_nacl_browser_delegate.cc",
117 "browser/shell_nacl_browser_delegate.h",
122 "//components/nacl:nacl_browser",
123 "//components/nacl:nacl_common",
124 "//components/nacl:nacl_renderer",
125 "//components/nacl:nacl_switches",
126 "//components/nacl/renderer/plugin:nacl_trusted_plugin",
130 deps += [ "//components/nacl:nacl_helper" ]
134 if (cld_version == 2) {
135 deps += [ "//third_party/cld_2:cld2_platform_impl" ]
139 if (!(is_chromeos && !use_ozone)) {
140 executable("app_shell") {
141 # testonly because :app_shell_lib is testonly. See :app_shell_lib comment.
143 sources = rebase_path(app_shell_gypi_values.app_shell_sources,
145 "//extensions/shell")
148 "//build/config/sanitizers:deps",
149 "//extensions:shell_and_test_pak",
153 configs += [ "//build/config/win:windowed" ]
154 configs -= [ "//build/config/win:console" ]
155 deps += [ "//base/allocator" ]
159 # TODO(GYP): Mac bundling
164 # TODO(GYP): Delete this after we've converted everything to GN.
165 # The _run targets exist only for compatibility w/ GYP.
166 group("app_shell_unittests_run") {
169 ":app_shell_unittests",
173 test("app_shell_unittests") {
174 sources = rebase_path(app_shell_gypi_values.app_shell_unittests_sources,
176 "//extensions/shell")
179 "//extensions/test/data/",
180 "$root_out_dir/extensions_shell_and_test.pak",
182 #"$root_out_dir/natives_blob.bin", # move to gin
183 #"$root_out_dir/snapshot_blob.bin",
189 "//base/test:test_support",
190 "//content/test:test_support",
191 "//extensions:shell_and_test_pak",
192 "//extensions:test_support",
197 # "//gin", # TODO(dpranke): Either gin or v8 data is needed ...
198 "//third_party/mesa:osmesa",
202 deps += [ "//ui/aura:test_support" ]
205 rebase_path(app_shell_gypi_values.app_shell_unittests_sources_aura,
207 "//extensions/shell")
208 sources += aura_sources
212 deps += [ "//chromeos:test_support_without_gmock" ]
215 rebase_path(app_shell_gypi_values.app_shell_unittests_sources_chromeos,
217 "//extensions/shell")
218 sources += chromeos_sources
221 # TODO(GYP): Enable this when //components/nacl GN is done.
225 rebase_path(app_shell_gypi_values.app_shell_unittests_sources_nacl,
227 "//extensions/shell")
228 sources += nacl_sources
233 deps += [ "//base/allocator" ]
237 process_version("version_header") {
238 template_file = "common/version.h.in"
239 output = "$target_gen_dir/common/version.h"