1 # Copyright 2013 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.
11 'target_name': 'extensions_common',
12 'type': 'static_library',
14 'common/api/api.gyp:extensions_api',
15 # TODO(benwells): figure out what to do with the api target and
16 # api resources compiled into the chrome resource bundle.
17 # http://crbug.com/162530
18 '../chrome/chrome_resources.gyp:chrome_resources',
19 # TODO(jamescook|derat): Pull strings into extensions module.
20 '../chrome/chrome_resources.gyp:chrome_strings',
21 # TODO(tfarina): This dep here is for extensions/common/constants.*
22 # We should find a way to compile this module within extensions_common.
23 '../chrome/common_constants.gyp:common_constants',
24 '../components/components.gyp:url_matcher',
25 '../content/content.gyp:content_common',
26 '../crypto/crypto.gyp:crypto',
29 '../third_party/re2/re2.gyp:re2',
30 '../ui/base/ui_base.gyp:ui_base',
31 '../ui/gfx/gfx.gyp:gfx_geometry',
32 '../url/url.gyp:url_lib',
36 '<(INTERMEDIATE_DIR)',
39 'common/api/messaging/message.h',
40 'common/api/sockets/sockets_manifest_data.cc',
41 'common/api/sockets/sockets_manifest_data.h',
42 'common/api/sockets/sockets_manifest_handler.cc',
43 'common/api/sockets/sockets_manifest_handler.h',
44 'common/api/sockets/sockets_manifest_permission.cc',
45 'common/api/sockets/sockets_manifest_permission.h',
46 'common/common_manifest_handlers.cc',
47 'common/common_manifest_handlers.h',
50 'common/csp_validator.cc',
51 'common/csp_validator.h',
52 'common/draggable_region.cc',
53 'common/draggable_region.h',
54 'common/error_utils.cc',
55 'common/error_utils.h',
56 'common/event_filter.cc',
57 'common/event_filter.h',
58 'common/event_filtering_info.cc',
59 'common/event_filtering_info.h',
60 'common/event_matcher.cc',
61 'common/event_matcher.h',
62 'common/extension.cc',
64 'common/extension_api.cc',
65 'common/extension_api.h',
66 'common/extension_api_stub.cc',
67 'common/extension_message_generator.cc',
68 'common/extension_message_generator.h',
69 'common/extension_messages.cc',
70 'common/extension_messages.h',
71 'common/extension_paths.cc',
72 'common/extension_paths.h',
73 'common/extension_resource.cc',
74 'common/extension_resource.h',
75 'common/extension_set.cc',
76 'common/extension_set.h',
77 'common/extension_urls.cc',
78 'common/extension_urls.h',
79 'common/extensions_client.cc',
80 'common/extensions_client.h',
81 'common/feature_switch.cc',
82 'common/feature_switch.h',
83 'common/features/api_feature.cc',
84 'common/features/api_feature.h',
85 'common/features/base_feature_provider.cc',
86 'common/features/base_feature_provider.h',
87 'common/features/complex_feature.cc',
88 'common/features/complex_feature.h',
89 'common/features/feature.cc',
90 'common/features/feature.h',
91 'common/features/feature_provider.cc',
92 'common/features/feature_provider.h',
93 'common/features/manifest_feature.cc',
94 'common/features/manifest_feature.h',
95 'common/features/permission_feature.cc',
96 'common/features/permission_feature.h',
97 'common/features/simple_feature.cc',
98 'common/features/simple_feature.h',
99 'common/features/simple_feature_filter.cc',
100 'common/features/simple_feature_filter.h',
101 'common/file_util.cc',
102 'common/file_util.h',
105 'common/install_warning.cc',
106 'common/install_warning.h',
107 'common/manifest.cc',
109 'common/manifest_constants.cc',
110 'common/manifest_constants.h',
111 'common/manifest_handler.cc',
112 'common/manifest_handler.h',
113 'common/manifest_handlers/background_info.cc',
114 'common/manifest_handlers/background_info.h',
115 'common/manifest_handlers/csp_info.cc',
116 'common/manifest_handlers/csp_info.h',
117 'common/manifest_handlers/incognito_info.cc',
118 'common/manifest_handlers/incognito_info.h',
119 'common/manifest_handlers/kiosk_mode_info.cc',
120 'common/manifest_handlers/kiosk_mode_info.h',
121 'common/manifest_handlers/offline_enabled_info.cc',
122 'common/manifest_handlers/offline_enabled_info.h',
123 'common/manifest_handlers/requirements_info.cc',
124 'common/manifest_handlers/requirements_info.h',
125 'common/manifest_handlers/sandboxed_page_info.cc',
126 'common/manifest_handlers/sandboxed_page_info.h',
127 'common/manifest_handlers/shared_module_info.cc',
128 'common/manifest_handlers/shared_module_info.h',
129 'common/manifest_handlers/web_accessible_resources_info.cc',
130 'common/manifest_handlers/web_accessible_resources_info.h',
131 'common/manifest_handlers/webview_info.cc',
132 'common/manifest_handlers/webview_info.h',
133 'common/one_shot_event.cc',
134 'common/one_shot_event.h',
135 'common/permissions/api_permission.cc',
136 'common/permissions/api_permission.h',
137 'common/permissions/api_permission_set.cc',
138 'common/permissions/api_permission_set.h',
139 'common/permissions/base_set_operators.h',
140 'common/permissions/manifest_permission.cc',
141 'common/permissions/manifest_permission.h',
142 'common/permissions/manifest_permission_set.cc',
143 'common/permissions/manifest_permission_set.h',
144 'common/permissions/media_galleries_permission.cc',
145 'common/permissions/media_galleries_permission.h',
146 'common/permissions/media_galleries_permission_data.cc',
147 'common/permissions/media_galleries_permission_data.h',
148 'common/permissions/permission_message.cc',
149 'common/permissions/permission_message.h',
150 'common/permissions/permission_message_provider.cc',
151 'common/permissions/permission_message_provider.h',
152 'common/permissions/permission_message_util.cc',
153 'common/permissions/permission_message_util.h',
154 'common/permissions/permission_set.cc',
155 'common/permissions/permission_set.h',
156 'common/permissions/permissions_data.cc',
157 'common/permissions/permissions_data.h',
158 'common/permissions/permissions_info.cc',
159 'common/permissions/permissions_info.h',
160 'common/permissions/permissions_provider.h',
161 'common/permissions/set_disjunction_permission.h',
162 'common/permissions/settings_override_permission.cc',
163 'common/permissions/settings_override_permission.h',
164 'common/permissions/socket_permission.cc',
165 'common/permissions/socket_permission.h',
166 'common/permissions/socket_permission_data.cc',
167 'common/permissions/socket_permission_data.h',
168 'common/permissions/socket_permission_entry.cc',
169 'common/permissions/socket_permission_entry.h',
170 'common/permissions/usb_device_permission.cc',
171 'common/permissions/usb_device_permission.h',
172 'common/permissions/usb_device_permission_data.cc',
173 'common/permissions/usb_device_permission_data.h',
174 'common/stack_frame.cc',
175 'common/stack_frame.h',
176 'common/switches.cc',
178 'common/url_pattern.cc',
179 'common/url_pattern.h',
180 'common/url_pattern_set.cc',
181 'common/url_pattern_set.h',
182 'common/user_script.cc',
183 'common/user_script.h',
184 'common/view_type.cc',
185 'common/view_type.h',
187 # Disable c4267 warnings until we fix size_t to int truncations.
188 'msvs_disabled_warnings': [ 4267, ],
190 ['enable_extensions==1', {
192 'common/extension_api_stub.cc',
194 }, { # enable_extensions == 0
196 'common/extension_api.cc',
202 'target_name': 'extensions_browser',
203 'type': 'static_library',
206 'common/api/api.gyp:extensions_api',
207 # TODO(jamescook|derat): Pull strings into extensions module.
208 '../chrome/chrome_resources.gyp:chrome_strings',
209 '../components/components.gyp:keyed_service_content',
210 '../content/content.gyp:content_browser',
211 '../skia/skia.gyp:skia',
212 '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
216 '<(INTERMEDIATE_DIR)',
217 # Needed to access generated API headers.
218 '<(SHARED_INTERMEDIATE_DIR)',
220 '<(SHARED_INTERMEDIATE_DIR)/chrome',
223 'browser/admin_policy.cc',
224 'browser/admin_policy.h',
225 # NOTE: When moving an API out of Chrome be sure to verify that the
226 # Android build still compiles. See conditions below.
227 'browser/api/api_resource.cc',
228 'browser/api/api_resource.h',
229 'browser/api/api_resource_manager.h',
230 'browser/api/async_api_function.cc',
231 'browser/api/async_api_function.h',
232 'browser/api/dns/dns_api.cc',
233 'browser/api/dns/dns_api.h',
234 'browser/api/dns/host_resolver_wrapper.cc',
235 'browser/api/dns/host_resolver_wrapper.h',
236 'browser/api/extensions_api_client.cc',
237 'browser/api/extensions_api_client.h',
238 'browser/api/socket/socket.cc',
239 'browser/api/socket/socket.h',
240 'browser/api/socket/socket_api.cc',
241 'browser/api/socket/socket_api.h',
242 'browser/api/socket/tcp_socket.cc',
243 'browser/api/socket/tcp_socket.h',
244 'browser/api/socket/udp_socket.cc',
245 'browser/api/socket/udp_socket.h',
246 'browser/api/sockets_tcp/sockets_tcp_api.cc',
247 'browser/api/sockets_tcp/sockets_tcp_api.h',
248 'browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc',
249 'browser/api/sockets_tcp/tcp_socket_event_dispatcher.h',
250 'browser/api/sockets_tcp_server/sockets_tcp_server_api.cc',
251 'browser/api/sockets_tcp_server/sockets_tcp_server_api.h',
252 'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc',
253 'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h',
254 'browser/api/sockets_udp/sockets_udp_api.cc',
255 'browser/api/sockets_udp/sockets_udp_api.h',
256 'browser/api/sockets_udp/udp_socket_event_dispatcher.cc',
257 'browser/api/sockets_udp/udp_socket_event_dispatcher.h',
258 'browser/api/storage/leveldb_settings_storage_factory.cc',
259 'browser/api/storage/leveldb_settings_storage_factory.h',
260 'browser/api/storage/local_value_store_cache.cc',
261 'browser/api/storage/local_value_store_cache.h',
262 'browser/api/storage/settings_namespace.cc',
263 'browser/api/storage/settings_namespace.h',
264 'browser/api/storage/settings_observer.h',
265 'browser/api/storage/settings_storage_factory.h',
266 'browser/api/storage/settings_storage_quota_enforcer.cc',
267 'browser/api/storage/settings_storage_quota_enforcer.h',
268 'browser/api/storage/storage_api.cc',
269 'browser/api/storage/storage_api.h',
270 'browser/api/storage/storage_frontend.cc',
271 'browser/api/storage/storage_frontend.h',
272 'browser/api/storage/value_store_cache.cc',
273 'browser/api/storage/value_store_cache.h',
274 'browser/api/storage/weak_unlimited_settings_storage.cc',
275 'browser/api/storage/weak_unlimited_settings_storage.h',
276 'browser/api/test/test_api.cc',
277 'browser/api/test/test_api.h',
278 'browser/api_activity_monitor.h',
279 'browser/app_sorting.h',
280 'browser/blacklist_state.h',
281 'browser/browser_context_keyed_api_factory.h',
282 'browser/browser_context_keyed_service_factories.cc',
283 'browser/browser_context_keyed_service_factories.h',
284 'browser/error_map.cc',
285 'browser/error_map.h',
286 'browser/event_listener_map.cc',
287 'browser/event_listener_map.h',
288 'browser/event_router.cc',
289 'browser/event_router.h',
290 'browser/extension_host.cc',
291 'browser/extension_host.h',
292 'browser/extension_host_delegate.h',
293 'browser/extension_error.cc',
294 'browser/extension_error.h',
295 'browser/extension_function.cc',
296 'browser/extension_function.h',
297 'browser/extension_function_dispatcher.cc',
298 'browser/extension_function_dispatcher.h',
299 'browser/extension_function_registry.cc',
300 'browser/extension_function_registry.h',
301 'browser/extension_function_util.cc',
302 'browser/extension_function_util.h',
303 'browser/extension_message_filter.cc',
304 'browser/extension_message_filter.h',
305 'browser/extension_pref_store.cc',
306 'browser/extension_pref_store.h',
307 'browser/extension_pref_value_map.cc',
308 'browser/extension_pref_value_map_factory.cc',
309 'browser/extension_pref_value_map_factory.h',
310 'browser/extension_pref_value_map.h',
311 'browser/extension_prefs.cc',
312 'browser/extension_prefs.h',
313 'browser/extension_prefs_factory.cc',
314 'browser/extension_prefs_factory.h',
315 'browser/extension_prefs_observer.h',
316 'browser/extension_prefs_scope.h',
317 'browser/extension_registry.cc',
318 'browser/extension_registry.h',
319 'browser/extension_registry_factory.cc',
320 'browser/extension_registry_factory.h',
321 'browser/extension_registry_observer.h',
322 'browser/extension_scoped_prefs.h',
323 'browser/extension_system.cc',
324 'browser/extension_system.h',
325 'browser/extension_system_provider.cc',
326 'browser/extension_system_provider.h',
327 'browser/extension_web_contents_observer.cc',
328 'browser/extension_web_contents_observer.h',
329 'browser/extensions_browser_client.cc',
330 'browser/extensions_browser_client.h',
331 'browser/external_provider_interface.h',
332 'browser/image_util.cc',
333 'browser/image_util.h',
334 'browser/info_map.cc',
335 'browser/info_map.h',
336 'browser/file_highlighter.cc',
337 'browser/file_highlighter.h',
338 'browser/file_reader.cc',
339 'browser/file_reader.h',
340 'browser/lazy_background_task_queue.cc',
341 'browser/lazy_background_task_queue.h',
342 'browser/management_policy.cc',
343 'browser/management_policy.h',
344 'browser/pref_names.cc',
345 'browser/pref_names.h',
346 'browser/process_manager.cc',
347 'browser/process_manager.h',
348 'browser/process_manager_observer.h',
349 'browser/process_map.cc',
350 'browser/process_map.h',
351 'browser/process_map_factory.cc',
352 'browser/process_map_factory.h',
353 'browser/quota_service.cc',
354 'browser/quota_service.h',
355 'browser/renderer_startup_helper.cc',
356 'browser/renderer_startup_helper.h',
357 'browser/runtime_data.cc',
358 'browser/runtime_data.h',
359 'browser/update_observer.h',
360 'browser/value_store/leveldb_value_store.cc',
361 'browser/value_store/leveldb_value_store.h',
362 'browser/value_store/testing_value_store.cc',
363 'browser/value_store/testing_value_store.h',
364 'browser/value_store/value_store.cc',
365 'browser/value_store/value_store.h',
366 'browser/value_store/value_store_change.cc',
367 'browser/value_store/value_store_change.h',
368 'browser/value_store/value_store_frontend.cc',
369 'browser/value_store/value_store_frontend.h',
370 'browser/value_store/value_store_util.cc',
371 'browser/value_store/value_store_util.h',
372 'browser/view_type_utils.cc',
373 'browser/view_type_utils.h',
376 ['enable_extensions==0', {
377 # Exclude all API implementations and the ExtensionsApiClient
378 # interface. Moving an API from src/chrome to src/extensions implies
379 # it can be cleanly disabled with enable_extensions==0.
380 # TODO: Eventually the entire extensions module should not be built
381 # when enable_extensions==0.
383 ['exclude', '^browser/api/'],
386 'browser/browser_context_keyed_service_factories.cc',
387 'browser/browser_context_keyed_service_factories.h',
391 # Disable c4267 warnings until we fix size_t to int truncations.
392 'msvs_disabled_warnings': [ 4267, ],
395 'target_name': 'extensions_renderer',
396 'type': 'static_library',
401 'renderer/native_handler.cc',
402 'renderer/native_handler.h',
403 'renderer/scoped_persistent.h',
404 'renderer/unsafe_persistent.h',
407 '../third_party/WebKit/public/blink.gyp:blink',
409 # Disable c4267 warnings until we fix size_t to int truncations.
410 'msvs_disabled_warnings': [ 4267, ],
413 'target_name': 'extensions_test_support',
414 'type': 'static_library',
416 'extensions_browser',
418 '../base/base.gyp:base',
419 '../testing/gtest.gyp:gtest',
425 'browser/test_extensions_browser_client.cc',
426 'browser/test_extensions_browser_client.h',
427 'browser/test_management_policy.cc',
428 'browser/test_management_policy.h',
429 'common/extension_builder.cc',
430 'common/extension_builder.h',
431 'common/test_util.cc',
432 'common/test_util.h',
433 'common/value_builder.cc',
434 'common/value_builder.h',
436 # Disable c4267 warnings until we fix size_t to int truncations.
437 'msvs_disabled_warnings': [ 4267, ],
440 # TODO(tfarina): Our plan is to build and run this target on Chromium bots
441 # (TS, CQ, Waterfall). First we will get this target passing all tests,
442 # after that we will start the work on buildbot to get this running there.
443 # When we consider this stable in the bots, we can go to unit_tests target
444 # and remove the duplicated entries from there, otherwise if we just
445 # remove them right now we would be losing coverage.
446 # http://crbug.com/348066
447 'target_name': 'extensions_unittests',
448 'type': 'executable',
450 '../base/base.gyp:base',
451 '../base/base.gyp:run_all_unittests',
452 '../base/base.gyp:test_support_base',
453 '../testing/gtest.gyp:gtest',
455 'extensions_test_support',
458 'common/api/sockets/sockets_manifest_permission_unittest.cc',
459 'common/csp_validator_unittest.cc',
460 'common/event_filter_unittest.cc',
461 'common/file_util_unittest.cc',
462 'common/id_util_unittest.cc',
463 'common/manifest_handler_unittest.cc',
464 'common/one_shot_event_unittest.cc',
465 'common/permissions/api_permission_set_unittest.cc',
466 'common/permissions/manifest_permission_set_unittest.cc',
467 'common/url_pattern_set_unittest.cc',
468 'common/url_pattern_unittest.cc',
469 'common/user_script_unittest.cc',