Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / extensions / common / BUILD.gn
blobe6bfde42db2ce94cea87a47fc5796c540f4273a9
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("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
9 # GYP version: extensions/extensions.gyp:extensions_common_constants
10 source_set("common_constants") {
11   sources = [
12     "constants.cc",
13     "constants.h",
14   ]
16   if (is_win) {
17     cflags = [ "/wd4267" ]  # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
18   }
21 if (enable_extensions) {
22   mojom("mojo") {
23     sources = [
24       "mojo/keep_alive.mojom",
25       "mojo/stash.mojom",
26     ]
27   }
29   # GYP version: extensions/extensions.gyp:extensions_common
30   source_set("common") {
31     sources = [
32       "api/messaging/message.h",
33       "api/bluetooth/bluetooth_manifest_data.cc",
34       "api/bluetooth/bluetooth_manifest_data.h",
35       "api/bluetooth/bluetooth_manifest_handler.cc",
36       "api/bluetooth/bluetooth_manifest_handler.h",
37       "api/bluetooth/bluetooth_manifest_permission.cc",
38       "api/bluetooth/bluetooth_manifest_permission.h",
39       "api/sockets/sockets_manifest_data.cc",
40       "api/sockets/sockets_manifest_data.h",
41       "api/sockets/sockets_manifest_handler.cc",
42       "api/sockets/sockets_manifest_handler.h",
43       "api/sockets/sockets_manifest_permission.cc",
44       "api/sockets/sockets_manifest_permission.h",
45       "cast/cast_cert_validator.cc",
46       "cast/cast_cert_validator.h",
47       "common_manifest_handlers.cc",
48       "common_manifest_handlers.h",
49       "csp_validator.cc",
50       "csp_validator.h",
51       "dom_action_types.h",
52       "draggable_region.cc",
53       "draggable_region.h",
54       "error_utils.cc",
55       "error_utils.h",
56       "event_filter.cc",
57       "event_filter.h",
58       "event_filtering_info.cc",
59       "event_filtering_info.h",
60       "event_matcher.cc",
61       "event_matcher.h",
62       "extension.cc",
63       "extension.h",
64       "extension_api.cc",
65       "extension_api.h",
66       "extension_icon_set.cc",
67       "extension_icon_set.h",
68       "extension_l10n_util.cc",
69       "extension_l10n_util.h",
70       "extension_message_generator.cc",
71       "extension_message_generator.h",
72       "extension_messages.cc",
73       "extension_messages.h",
74       "extension_paths.cc",
75       "extension_paths.h",
76       "extension_resource.cc",
77       "extension_resource.h",
78       "extension_set.cc",
79       "extension_set.h",
80       "extension_urls.cc",
81       "extension_urls.h",
82       "extensions_client.cc",
83       "extensions_client.h",
84       "feature_switch.cc",
85       "feature_switch.h",
86       "features/api_feature.cc",
87       "features/api_feature.h",
88       "features/base_feature_provider.cc",
89       "features/base_feature_provider.h",
90       "features/complex_feature.cc",
91       "features/complex_feature.h",
92       "features/feature.cc",
93       "features/feature.h",
94       "features/feature_provider.cc",
95       "features/feature_provider.h",
96       "features/json_feature_provider_source.cc",
97       "features/json_feature_provider_source.h",
98       "features/manifest_feature.cc",
99       "features/manifest_feature.h",
100       "features/permission_feature.cc",
101       "features/permission_feature.h",
102       "features/simple_feature.cc",
103       "features/simple_feature.h",
104       "features/simple_feature_filter.cc",
105       "features/simple_feature_filter.h",
106       "features/behavior_feature.cc",
107       "features/behavior_feature.h",
108       "file_util.cc",
109       "file_util.h",
110       "guest_view/guest_view_constants.cc",
111       "guest_view/guest_view_constants.h",
112       "guest_view/guest_view_messages.h",
113       "host_id.h",
114       "image_util.cc",
115       "image_util.h",
116       "install_warning.cc",
117       "install_warning.h",
118       "manifest.cc",
119       "manifest.h",
120       "manifest_constants.cc",
121       "manifest_constants.h",
122       "manifest_handler.cc",
123       "manifest_handler.h",
124       "manifest_handler_helpers.cc",
125       "manifest_handler_helpers.h",
126       "manifest_handlers/background_info.cc",
127       "manifest_handlers/background_info.h",
128       "manifest_handlers/content_capabilities_handler.cc",
129       "manifest_handlers/content_capabilities_handler.h",
130       "manifest_handlers/csp_info.cc",
131       "manifest_handlers/csp_info.h",
132       "manifest_handlers/default_locale_handler.cc",
133       "manifest_handlers/default_locale_handler.h",
134       "manifest_handlers/externally_connectable.cc",
135       "manifest_handlers/externally_connectable.h",
136       "manifest_handlers/file_handler_info.cc",
137       "manifest_handlers/file_handler_info.h",
138       "manifest_handlers/icons_handler.cc",
139       "manifest_handlers/icons_handler.h",
140       "manifest_handlers/incognito_info.cc",
141       "manifest_handlers/incognito_info.h",
142       "manifest_handlers/kiosk_mode_info.cc",
143       "manifest_handlers/kiosk_mode_info.h",
144       "manifest_handlers/launcher_page_info.cc",
145       "manifest_handlers/launcher_page_info.h",
146       "manifest_handlers/mime_types_handler.cc",
147       "manifest_handlers/mime_types_handler.h",
148       "manifest_handlers/oauth2_manifest_handler.cc",
149       "manifest_handlers/oauth2_manifest_handler.h",
150       "manifest_handlers/offline_enabled_info.cc",
151       "manifest_handlers/offline_enabled_info.h",
152       "manifest_handlers/options_page_info.cc",
153       "manifest_handlers/options_page_info.h",
154       "manifest_handlers/permissions_parser.cc",
155       "manifest_handlers/permissions_parser.h",
156       "manifest_handlers/requirements_info.cc",
157       "manifest_handlers/requirements_info.h",
158       "manifest_handlers/sandboxed_page_info.cc",
159       "manifest_handlers/sandboxed_page_info.h",
160       "manifest_handlers/shared_module_info.cc",
161       "manifest_handlers/shared_module_info.h",
162       "manifest_handlers/web_accessible_resources_info.cc",
163       "manifest_handlers/web_accessible_resources_info.h",
164       "manifest_handlers/webview_info.cc",
165       "manifest_handlers/webview_info.h",
166       "manifest_url_handlers.cc",
167       "manifest_url_handlers.h",
168       "message_bundle.cc",
169       "message_bundle.h",
170       "one_shot_event.cc",
171       "one_shot_event.h",
172       "permissions/api_permission.cc",
173       "permissions/api_permission.h",
174       "permissions/api_permission_set.cc",
175       "permissions/api_permission_set.h",
176       "permissions/base_set_operators.h",
177       "permissions/extensions_api_permissions.cc",
178       "permissions/extensions_api_permissions.h",
179       "permissions/manifest_permission.cc",
180       "permissions/manifest_permission.h",
181       "permissions/manifest_permission_set.cc",
182       "permissions/manifest_permission_set.h",
183       "permissions/media_galleries_permission.cc",
184       "permissions/media_galleries_permission.h",
185       "permissions/media_galleries_permission_data.cc",
186       "permissions/media_galleries_permission_data.h",
187       "permissions/permission_message.cc",
188       "permissions/permission_message.h",
189       "permissions/permission_message_provider.cc",
190       "permissions/permission_message_provider.h",
191       "permissions/permission_message_util.cc",
192       "permissions/permission_message_util.h",
193       "permissions/permission_set.cc",
194       "permissions/permission_set.h",
195       "permissions/permissions_data.cc",
196       "permissions/permissions_data.h",
197       "permissions/permissions_info.cc",
198       "permissions/permissions_info.h",
199       "permissions/permissions_provider.h",
200       "permissions/set_disjunction_permission.h",
201       "permissions/settings_override_permission.cc",
202       "permissions/settings_override_permission.h",
203       "permissions/socket_permission.cc",
204       "permissions/socket_permission.h",
205       "permissions/socket_permission_data.cc",
206       "permissions/socket_permission_data.h",
207       "permissions/socket_permission_entry.cc",
208       "permissions/socket_permission_entry.h",
209       "permissions/usb_device_permission.cc",
210       "permissions/usb_device_permission.h",
211       "permissions/usb_device_permission_data.cc",
212       "permissions/usb_device_permission_data.h",
213       "stack_frame.cc",
214       "stack_frame.h",
215       "switches.cc",
216       "switches.h",
217       "update_manifest.cc",
218       "update_manifest.h",
219       "url_pattern.cc",
220       "url_pattern.h",
221       "url_pattern_set.cc",
222       "url_pattern_set.h",
223       "user_script.cc",
224       "user_script.h",
225       "value_counter.cc",
226       "value_counter.h",
227       "view_type.cc",
228       "view_type.h",
229     ]
231     deps = [
232       ":common_constants",
233       ":mojo",
235       # TODO(benwells): figure out what to do with the api target and
236       # api resources compiled into the chrome resource bundle.
237       # http://crbug.com/162530
238       "//chrome:resources",
239       "//components/crx_file",
240       "//components/url_matcher",
241       "//content/public/common",
242       "//crypto",
243       "//device/bluetooth",
244       "//device/usb",
245       "//extensions/common/api",
246       "//extensions/strings",
247       "//extensions:extensions_resources",
248       "//ipc",
249       "//net",
250       "//third_party/icu",
251       "//third_party/libxml",
252       "//third_party/re2",
253       "//ui/base",
254       "//ui/gfx/geometry",
255       "//ui/gfx/ipc",
256       "//url",
257     ]
259     if (use_openssl) {
260       sources += [ "cast/cast_cert_validator_openssl.cc" ]
261     } else {
262       sources += [ "cast/cast_cert_validator_nss.cc" ]
263     }
265     if (enable_nacl) {
266       sources += [
267         "manifest_handlers/nacl_modules_handler.cc",
268         "manifest_handlers/nacl_modules_handler.h",
269       ]
270     }
272     if (is_win) {
273       cflags = [ "/wd4267" ]  # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
274     }
275   }
276 }  # enable_extensions