JSONStringValueSerializer takes a StringPiece instead of std::string&.
[chromium-blink-merge.git] / extensions / shell / BUILD.gn
bloba1d362a154696c6fa45b74c9d6781fdc60b716ea
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 # Technically, this directory should not depend on files from src/chrome, but
6 # that's where the VERSION file is. This  should probably all be moved to
7 # src/build.
8 import("//chrome/version.gni")
9 import("//tools/grit/grit_rule.gni")
11 assert(enable_extensions)
13 grit("resources") {
14   source = "app_shell_resources.grd"
15   outputs = [
16     "grit/app_shell_resources.h",
17     "app_shell_resources.pak",
18   ]
21 source_set("app_shell_lib") {
22   # TODO(jamescook): investigate and get rid of test dependencies. This library
23   # is testonly because it depends on testonly libraries, namely
24   # //content/shell:content_shell_lib. See http://crbug.com/438283
25   testonly = true
26   deps = [
27     ":resources",
28     ":version_header",
29     "//base",
30     "//base:prefs",
31     "//components/pref_registry",
32     "//components/update_client",
33     "//components/user_prefs",
34     "//components/web_cache/renderer",
35     "//content",
36     "//content/shell:content_shell_lib",
37     "//device/core",
38     "//device/hid",
39     "//extensions/common/api",
40     "//extensions/common/api:api_registration",
41     "//extensions/browser",
42     "//extensions/common",
43     "//extensions/renderer",
44     "//extensions/shell/common/api",
45     "//extensions/shell/common/api:api_registration",
46     "//extensions/utility",
47     "//extensions:extensions_resources",
48     "//extensions:shell_and_test_pak",
49     "//mojo/environment:chromium",
50     "//skia",
51     "//third_party/WebKit/public:blink",
52     "//third_party/mojo/src/mojo/edk/system",
53     "//ui/wm",
54     "//v8",
55   ]
56   sources = [
57     "app/shell_main_delegate.cc",
58     "app/shell_main_delegate.h",
59     "browser/api/identity/identity_api.cc",
60     "browser/api/identity/identity_api.h",
61     "browser/default_shell_browser_main_delegate.cc",
62     "browser/default_shell_browser_main_delegate.h",
63     "browser/desktop_controller.cc",
64     "browser/desktop_controller.h",
65     "browser/media_capture_util.cc",
66     "browser/media_capture_util.h",
67     "browser/shell_app_delegate.cc",
68     "browser/shell_app_delegate.h",
69     "browser/shell_app_view_guest_delegate.cc",
70     "browser/shell_app_view_guest_delegate.h",
71     "browser/shell_app_window_client.cc",
72     "browser/shell_app_window_client.h",
73     "browser/shell_app_window_client_aura.cc",
74     "browser/shell_audio_controller_chromeos.cc",
75     "browser/shell_audio_controller_chromeos.h",
76     "browser/shell_browser_context.cc",
77     "browser/shell_browser_context.h",
78     "browser/shell_browser_context_keyed_service_factories.cc",
79     "browser/shell_browser_context_keyed_service_factories.h",
80     "browser/shell_browser_main_delegate.h",
81     "browser/shell_browser_main_parts.cc",
82     "browser/shell_browser_main_parts.h",
83     "browser/shell_content_browser_client.cc",
84     "browser/shell_content_browser_client.h",
85     "browser/shell_desktop_controller_aura.cc",
86     "browser/shell_desktop_controller_aura.h",
87     "browser/shell_device_client.cc",
88     "browser/shell_device_client.h",
89     "browser/shell_display_info_provider.cc",
90     "browser/shell_display_info_provider.h",
91     "browser/shell_extension_host_delegate.cc",
92     "browser/shell_extension_host_delegate.h",
93     "browser/shell_extension_system.cc",
94     "browser/shell_extension_system.h",
95     "browser/shell_extension_system_factory.cc",
96     "browser/shell_extension_system_factory.h",
97     "browser/shell_extension_web_contents_observer.cc",
98     "browser/shell_extension_web_contents_observer.h",
99     "browser/shell_extensions_api_client.cc",
100     "browser/shell_extensions_api_client.h",
101     "browser/shell_extensions_browser_client.cc",
102     "browser/shell_extensions_browser_client.h",
103     "browser/shell_native_app_window.cc",
104     "browser/shell_native_app_window.h",
105     "browser/shell_native_app_window_aura.cc",
106     "browser/shell_native_app_window_aura.h",
107     "browser/shell_network_controller_chromeos.cc",
108     "browser/shell_network_controller_chromeos.h",
109     "browser/shell_network_delegate.cc",
110     "browser/shell_network_delegate.h",
111     "browser/shell_oauth2_token_service.cc",
112     "browser/shell_oauth2_token_service.h",
113     "browser/shell_prefs.cc",
114     "browser/shell_prefs.h",
115     "browser/shell_runtime_api_delegate.cc",
116     "browser/shell_runtime_api_delegate.h",
117     "browser/shell_screen.cc",
118     "browser/shell_screen.h",
119     "browser/shell_special_storage_policy.cc",
120     "browser/shell_special_storage_policy.h",
121     "browser/shell_speech_recognition_manager_delegate.cc",
122     "browser/shell_speech_recognition_manager_delegate.h",
123     "browser/shell_update_query_params_delegate.cc",
124     "browser/shell_update_query_params_delegate.h",
125     "browser/shell_url_request_context_getter.cc",
126     "browser/shell_url_request_context_getter.h",
127     "browser/shell_web_contents_modal_dialog_manager.cc",
128     "common/shell_content_client.cc",
129     "common/shell_content_client.h",
130     "common/shell_extensions_client.cc",
131     "common/shell_extensions_client.h",
132     "common/switches.cc",
133     "common/switches.h",
134     "renderer/shell_content_renderer_client.cc",
135     "renderer/shell_content_renderer_client.h",
136     "renderer/shell_extensions_renderer_client.cc",
137     "renderer/shell_extensions_renderer_client.h",
138     "utility/shell_content_utility_client.cc",
139     "utility/shell_content_utility_client.h",
140   ]
141   if (is_chromeos) {
142     deps += [
143       "//chromeos",
144       "//ui/chromeos:ui_chromeos",
145       "//ui/display",
146     ]
147     sources += [
148       "browser/api/shell_gcd/shell_gcd_api.cc",
149       "browser/api/shell_gcd/shell_gcd_api.h",
150       "browser/api/vpn_provider/vpn_service_factory.cc",
151     ]
152   }
155 if (!(is_chromeos && !use_ozone) && (!is_win || link_chrome_on_windows)) {
156   executable("app_shell") {
157     # testonly because :app_shell_lib is testonly. See :app_shell_lib comment.
158     testonly = true
159     sources = [
160       "app/shell_main.cc",
161     ]
162     deps = [
163       ":app_shell_lib",
164       "//extensions:shell_and_test_pak",
165     ]
167     if (is_win) {
168       configs += [ "//build/config/win:windowed" ]
169       configs -= [ "//build/config/win:console" ]
170     }
171   }
174 process_version("version_header") {
175   source = "common/version.h.in"
176   output = "$target_gen_dir/common/version.h"