Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / extensions / shell / BUILD.gn
bloba251765c0ee4aa54f1577f6b0a5b8d952f4083f5
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/base",
54     "//ui/base/ime",
55     "//ui/wm",
56     "//v8",
57   ]
58   sources = [
59     "app/shell_main_delegate.cc",
60     "app/shell_main_delegate.h",
61     "browser/api/identity/identity_api.cc",
62     "browser/api/identity/identity_api.h",
63     "browser/default_shell_browser_main_delegate.cc",
64     "browser/default_shell_browser_main_delegate.h",
65     "browser/desktop_controller.cc",
66     "browser/desktop_controller.h",
67     "browser/media_capture_util.cc",
68     "browser/media_capture_util.h",
69     "browser/shell_app_delegate.cc",
70     "browser/shell_app_delegate.h",
71     "browser/shell_app_view_guest_delegate.cc",
72     "browser/shell_app_view_guest_delegate.h",
73     "browser/shell_app_window_client.cc",
74     "browser/shell_app_window_client.h",
75     "browser/shell_app_window_client_aura.cc",
76     "browser/shell_audio_controller_chromeos.cc",
77     "browser/shell_audio_controller_chromeos.h",
78     "browser/shell_browser_context.cc",
79     "browser/shell_browser_context.h",
80     "browser/shell_browser_context_keyed_service_factories.cc",
81     "browser/shell_browser_context_keyed_service_factories.h",
82     "browser/shell_browser_main_delegate.h",
83     "browser/shell_browser_main_parts.cc",
84     "browser/shell_browser_main_parts.h",
85     "browser/shell_content_browser_client.cc",
86     "browser/shell_content_browser_client.h",
87     "browser/shell_desktop_controller_aura.cc",
88     "browser/shell_desktop_controller_aura.h",
89     "browser/shell_device_client.cc",
90     "browser/shell_device_client.h",
91     "browser/shell_display_info_provider.cc",
92     "browser/shell_display_info_provider.h",
93     "browser/shell_extension_host_delegate.cc",
94     "browser/shell_extension_host_delegate.h",
95     "browser/shell_extension_system.cc",
96     "browser/shell_extension_system.h",
97     "browser/shell_extension_system_factory.cc",
98     "browser/shell_extension_system_factory.h",
99     "browser/shell_extension_web_contents_observer.cc",
100     "browser/shell_extension_web_contents_observer.h",
101     "browser/shell_extensions_api_client.cc",
102     "browser/shell_extensions_api_client.h",
103     "browser/shell_extensions_browser_client.cc",
104     "browser/shell_extensions_browser_client.h",
105     "browser/shell_native_app_window.cc",
106     "browser/shell_native_app_window.h",
107     "browser/shell_native_app_window_aura.cc",
108     "browser/shell_native_app_window_aura.h",
109     "browser/shell_network_controller_chromeos.cc",
110     "browser/shell_network_controller_chromeos.h",
111     "browser/shell_network_delegate.cc",
112     "browser/shell_network_delegate.h",
113     "browser/shell_oauth2_token_service.cc",
114     "browser/shell_oauth2_token_service.h",
115     "browser/shell_prefs.cc",
116     "browser/shell_prefs.h",
117     "browser/shell_runtime_api_delegate.cc",
118     "browser/shell_runtime_api_delegate.h",
119     "browser/shell_screen.cc",
120     "browser/shell_screen.h",
121     "browser/shell_special_storage_policy.cc",
122     "browser/shell_special_storage_policy.h",
123     "browser/shell_speech_recognition_manager_delegate.cc",
124     "browser/shell_speech_recognition_manager_delegate.h",
125     "browser/shell_update_query_params_delegate.cc",
126     "browser/shell_update_query_params_delegate.h",
127     "browser/shell_url_request_context_getter.cc",
128     "browser/shell_url_request_context_getter.h",
129     "browser/shell_web_contents_modal_dialog_manager.cc",
130     "common/shell_content_client.cc",
131     "common/shell_content_client.h",
132     "common/shell_extensions_client.cc",
133     "common/shell_extensions_client.h",
134     "common/switches.cc",
135     "common/switches.h",
136     "renderer/shell_content_renderer_client.cc",
137     "renderer/shell_content_renderer_client.h",
138     "renderer/shell_extensions_renderer_client.cc",
139     "renderer/shell_extensions_renderer_client.h",
140     "utility/shell_content_utility_client.cc",
141     "utility/shell_content_utility_client.h",
142   ]
143   if (is_chromeos) {
144     deps += [
145       "//chromeos",
146       "//ui/chromeos:ui_chromeos",
147       "//ui/display",
148     ]
149     sources += [
150       "browser/api/shell_gcd/shell_gcd_api.cc",
151       "browser/api/shell_gcd/shell_gcd_api.h",
152       "browser/api/vpn_provider/vpn_service_factory.cc",
153     ]
154   }
157 if (!(is_chromeos && !use_ozone) && (!is_win || link_chrome_on_windows)) {
158   executable("app_shell") {
159     # testonly because :app_shell_lib is testonly. See :app_shell_lib comment.
160     testonly = true
161     sources = [
162       "app/shell_main.cc",
163     ]
164     deps = [
165       ":app_shell_lib",
166       "//extensions:shell_and_test_pak",
167     ]
169     if (is_win) {
170       configs += [ "//build/config/win:windowed" ]
171       configs -= [ "//build/config/win:console" ]
172     }
173   }
176 process_version("version_header") {
177   source = "common/version.h.in"
178   output = "$target_gen_dir/common/version.h"