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/pref_registry",
37 "//components/update_client",
38 "//components/user_prefs",
39 "//components/web_cache/renderer",
41 "//content/shell:content_shell_lib",
44 "//extensions/common/api",
45 "//extensions/common/api:api_registration",
46 "//extensions/browser",
47 "//extensions/common",
48 "//extensions/renderer",
49 "//extensions/shell/common/api",
50 "//extensions/shell/common/api:api_registration",
51 "//extensions/utility",
52 "//extensions:extensions_resources",
53 "//extensions:shell_and_test_pak",
54 "//mojo/environment:chromium",
56 "//third_party/WebKit/public:blink",
57 "//third_party/mojo/src/mojo/edk/system",
63 sources = rebase_path(app_shell_gypi_values.app_shell_lib_sources,
70 aura_sources = rebase_path(app_shell_gypi_values.app_shell_lib_sources_aura,
73 sources += aura_sources
79 "//ui/chromeos:ui_chromeos",
83 rebase_path(app_shell_gypi_values.app_shell_lib_sources_chromeos,
86 sources += chromeos_sources
89 # TODO(GYP): Enable this when //components/nacl GN is done. See
90 # http://crbug.com/430602
94 deps += [ "//components/nacl:nacl_helper" ]
98 "//components/nacl:browser",
99 "//components/nacl:common",
100 "//components/nacl:renderer",
101 "//components/nacl:switches",
104 rebase_path(app_shell_gypi_values.app_shell_lib_sources_nacl,
106 "//extensions/shell")
107 sources += nacl_sources
113 "browser/shell_nacl_browser_delegate.cc",
114 "browser/shell_nacl_browser_delegate.h",
119 "//components/nacl:nacl_browser",
120 "//components/nacl:nacl_common",
121 "//components/nacl:nacl_renderer",
122 "//components/nacl:nacl_switches",
123 "//components/nacl/renderer/plugin:nacl_trusted_plugin",
127 deps += [ "//components/nacl:nacl_helper" ]
132 if (!(is_chromeos && !use_ozone)) {
133 executable("app_shell") {
134 # testonly because :app_shell_lib is testonly. See :app_shell_lib comment.
136 sources = rebase_path(app_shell_gypi_values.app_shell_sources,
138 "//extensions/shell")
141 "//extensions:shell_and_test_pak",
145 configs += [ "//build/config/win:windowed" ]
146 configs -= [ "//build/config/win:console" ]
147 deps += [ "//base/allocator" ]
151 # TODO(GYP): Mac bundling
156 test("app_shell_unittests") {
157 sources = rebase_path(app_shell_gypi_values.app_shell_unittests_sources,
159 "//extensions/shell")
164 "//base/test:test_support",
165 "//content/test:test_support",
166 "//extensions:shell_and_test_pak",
167 "//extensions:test_support",
172 deps += [ "//ui/aura:test_support" ]
175 rebase_path(app_shell_gypi_values.app_shell_unittests_sources_aura,
177 "//extensions/shell")
178 sources += aura_sources
182 deps += [ "//chromeos:test_support_without_gmock" ]
185 rebase_path(app_shell_gypi_values.app_shell_unittests_sources_chromeos,
187 "//extensions/shell")
188 sources += chromeos_sources
191 # TODO(GYP): Enable this when //components/nacl GN is done.
195 rebase_path(app_shell_gypi_values.app_shell_unittests_sources_nacl,
197 "//extensions/shell")
198 sources += nacl_sources
203 deps += [ "//base/allocator" ]
207 process_version("version_header") {
208 template_file = "common/version.h.in"
209 output = "$target_gen_dir/common/version.h"