summaryrefslogtreecommitdiff
path: root/chromium/extensions/renderer/BUILD.gn
blob: 78083644e84823a1f1512ab04d7ee493d8eaaf33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/features.gni")
import("//build/config/jumbo.gni")
import("//extensions/buildflags/buildflags.gni")

assert(enable_extensions)

jumbo_source_set("renderer") {
  sources = [
    "activity_log_converter_strategy.cc",
    "activity_log_converter_strategy.h",
    "api/automation/automation_api_helper.cc",
    "api/automation/automation_api_helper.h",
    "api/display_source/display_source_session.cc",
    "api/display_source/display_source_session.h",
    "api_activity_logger.cc",
    "api_activity_logger.h",
    "api_definitions_natives.cc",
    "api_definitions_natives.h",
    "app_window_custom_bindings.cc",
    "app_window_custom_bindings.h",
    "async_scripts_run_info.cc",
    "async_scripts_run_info.h",
    "binding_generating_native_handler.cc",
    "binding_generating_native_handler.h",
    "bindings/api_binding.cc",
    "bindings/api_binding.h",
    "bindings/api_binding_bridge.cc",
    "bindings/api_binding_bridge.h",
    "bindings/api_binding_hooks.cc",
    "bindings/api_binding_hooks.h",
    "bindings/api_binding_hooks_delegate.cc",
    "bindings/api_binding_hooks_delegate.h",
    "bindings/api_binding_js_util.cc",
    "bindings/api_binding_js_util.h",
    "bindings/api_binding_types.cc",
    "bindings/api_binding_types.h",
    "bindings/api_binding_util.cc",
    "bindings/api_binding_util.h",
    "bindings/api_bindings_system.cc",
    "bindings/api_bindings_system.h",
    "bindings/api_event_handler.cc",
    "bindings/api_event_handler.h",
    "bindings/api_event_listeners.cc",
    "bindings/api_event_listeners.h",
    "bindings/api_invocation_errors.cc",
    "bindings/api_invocation_errors.h",
    "bindings/api_last_error.cc",
    "bindings/api_last_error.h",
    "bindings/api_request_handler.cc",
    "bindings/api_request_handler.h",
    "bindings/api_signature.cc",
    "bindings/api_signature.h",
    "bindings/api_type_reference_map.cc",
    "bindings/api_type_reference_map.h",
    "bindings/argument_spec.cc",
    "bindings/argument_spec.h",
    "bindings/binding_access_checker.cc",
    "bindings/binding_access_checker.h",
    "bindings/declarative_event.cc",
    "bindings/declarative_event.h",
    "bindings/event_emitter.cc",
    "bindings/event_emitter.h",
    "bindings/exception_handler.cc",
    "bindings/exception_handler.h",
    "bindings/js_runner.cc",
    "bindings/js_runner.h",
    "blob_native_handler.cc",
    "blob_native_handler.h",
    "chrome_setting.cc",
    "chrome_setting.h",
    "console.cc",
    "console.h",
    "content_setting.cc",
    "content_setting.h",
    "content_watcher.cc",
    "content_watcher.h",
    "context_menus_custom_bindings.cc",
    "context_menus_custom_bindings.h",
    "css_native_handler.cc",
    "css_native_handler.h",
    "declarative_content_hooks_delegate.cc",
    "declarative_content_hooks_delegate.h",
    "dispatcher.cc",
    "dispatcher.h",
    "dispatcher_delegate.h",
    "display_source_custom_bindings.cc",
    "display_source_custom_bindings.h",
    "document_custom_bindings.cc",
    "document_custom_bindings.h",
    "dom_activity_logger.cc",
    "dom_activity_logger.h",
    "easy_unlock_proximity_required_stub.cc",
    "easy_unlock_proximity_required_stub.h",
    "event_bindings.cc",
    "event_bindings.h",
    "event_bookkeeper.cc",
    "event_bookkeeper.h",
    "extension_bindings_system.cc",
    "extension_bindings_system.h",
    "extension_frame_helper.cc",
    "extension_frame_helper.h",
    "extension_injection_host.cc",
    "extension_injection_host.h",
    "extension_js_runner.cc",
    "extension_js_runner.h",
    "extension_port.cc",
    "extension_port.h",
    "extensions_render_frame_observer.cc",
    "extensions_render_frame_observer.h",
    "extensions_renderer_client.cc",
    "extensions_renderer_client.h",
    "feature_cache.cc",
    "feature_cache.h",
    "file_system_natives.cc",
    "file_system_natives.h",
    "gc_callback.cc",
    "gc_callback.h",
    "get_script_context.cc",
    "get_script_context.h",
    "gin_port.cc",
    "gin_port.h",
    "guest_view/extensions_guest_view_container.cc",
    "guest_view/extensions_guest_view_container.h",
    "guest_view/extensions_guest_view_container_dispatcher.cc",
    "guest_view/extensions_guest_view_container_dispatcher.h",
    "guest_view/guest_view_internal_custom_bindings.cc",
    "guest_view/guest_view_internal_custom_bindings.h",
    "guest_view/mime_handler_view/mime_handler_view_container.cc",
    "guest_view/mime_handler_view/mime_handler_view_container.h",
    "i18n_custom_bindings.cc",
    "i18n_custom_bindings.h",
    "i18n_hooks_delegate.cc",
    "i18n_hooks_delegate.h",
    "i18n_hooks_util.cc",
    "i18n_hooks_util.h",
    "id_generator_custom_bindings.cc",
    "id_generator_custom_bindings.h",
    "injection_host.cc",
    "injection_host.h",
    "ipc_message_sender.cc",
    "ipc_message_sender.h",
    "js_extension_bindings_system.cc",
    "js_extension_bindings_system.h",
    "js_renderer_messaging_service.cc",
    "js_renderer_messaging_service.h",
    "lazy_background_page_native_handler.cc",
    "lazy_background_page_native_handler.h",
    "logging_native_handler.cc",
    "logging_native_handler.h",
    "message_target.cc",
    "message_target.h",
    "messaging_bindings.cc",
    "messaging_bindings.h",
    "messaging_util.cc",
    "messaging_util.h",
    "module_system.cc",
    "module_system.h",
    "native_extension_bindings_system.cc",
    "native_extension_bindings_system.h",
    "native_handler.cc",
    "native_handler.h",
    "native_renderer_messaging_service.cc",
    "native_renderer_messaging_service.h",
    "object_backed_native_handler.cc",
    "object_backed_native_handler.h",
    "one_time_message_handler.cc",
    "one_time_message_handler.h",
    "process_info_native_handler.cc",
    "process_info_native_handler.h",
    "programmatic_script_injector.cc",
    "programmatic_script_injector.h",
    "render_frame_observer_natives.cc",
    "render_frame_observer_natives.h",
    "renderer_extension_registry.cc",
    "renderer_extension_registry.h",
    "renderer_messaging_service.cc",
    "renderer_messaging_service.h",
    "request_sender.cc",
    "request_sender.h",
    "resource_bundle_source_map.cc",
    "resource_bundle_source_map.h",
    "resources/app_runtime_custom_bindings.js",
    "resources/app_window_custom_bindings.js",
    "resources/binding.js",
    "resources/context_menus_custom_bindings.js",
    "resources/declarative_webrequest_custom_bindings.js",
    "resources/entry_id_manager.js",
    "resources/event.js",
    "resources/extension.css",
    "resources/extension_custom_bindings.js",
    "resources/extension_fonts.css",
    "resources/feedback_private_custom_bindings.js",
    "resources/file_entry_binding_util.js",
    "resources/file_system_custom_bindings.js",
    "resources/greasemonkey_api.js",
    "resources/guest_view/app_view/app_view.js",
    "resources/guest_view/extension_options/extension_options.js",
    "resources/guest_view/extension_options/extension_options_attributes.js",
    "resources/guest_view/extension_options/extension_options_constants.js",
    "resources/guest_view/extension_options/extension_options_events.js",
    "resources/guest_view/extension_view/extension_view.js",
    "resources/guest_view/extension_view/extension_view_api_methods.js",
    "resources/guest_view/extension_view/extension_view_attributes.js",
    "resources/guest_view/extension_view/extension_view_constants.js",
    "resources/guest_view/extension_view/extension_view_events.js",
    "resources/guest_view/extension_view/extension_view_internal.js",
    "resources/guest_view/guest_view.js",
    "resources/guest_view/guest_view_attributes.js",
    "resources/guest_view/guest_view_container.js",
    "resources/guest_view/guest_view_deny.js",
    "resources/guest_view/guest_view_events.js",
    "resources/guest_view/guest_view_iframe.js",
    "resources/guest_view/guest_view_iframe_container.js",
    "resources/guest_view/web_view/web_view.js",
    "resources/guest_view/web_view/web_view_action_requests.js",
    "resources/guest_view/web_view/web_view_api_methods.js",
    "resources/guest_view/web_view/web_view_attributes.js",
    "resources/guest_view/web_view/web_view_constants.js",
    "resources/guest_view/web_view/web_view_events.js",
    "resources/guest_view/web_view/web_view_internal.js",
    "resources/guest_view/web_view/web_view_request_custom_bindings.js",
    "resources/i18n_custom_bindings.js",
    "resources/image_util.js",
    "resources/json_schema.js",
    "resources/last_error.js",
    "resources/messaging.js",
    "resources/messaging_utils.js",
    "resources/permissions_custom_bindings.js",
    "resources/platform_app.css",
    "resources/platform_app.js",
    "resources/runtime_custom_bindings.js",
    "resources/schema_utils.js",
    "resources/send_request.js",
    "resources/set_icon.js",
    "resources/storage_area.js",
    "resources/test_custom_bindings.js",
    "resources/uncaught_exception_handler.js",
    "resources/utils.js",
    "resources/web_request_custom_bindings.js",
    "runtime_custom_bindings.cc",
    "runtime_custom_bindings.h",
    "runtime_hooks_delegate.cc",
    "runtime_hooks_delegate.h",
    "safe_builtins.cc",
    "safe_builtins.h",
    "script_context.cc",
    "script_context.h",
    "script_context_set.cc",
    "script_context_set.h",
    "script_injection.cc",
    "script_injection.h",
    "script_injection_callback.cc",
    "script_injection_callback.h",
    "script_injection_manager.cc",
    "script_injection_manager.h",
    "script_injector.h",
    "scripts_run_info.cc",
    "scripts_run_info.h",
    "send_request_natives.cc",
    "send_request_natives.h",
    "service_worker_data.cc",
    "service_worker_data.h",
    "set_icon_natives.cc",
    "set_icon_natives.h",
    "source_map.h",
    "static_v8_external_one_byte_string_resource.cc",
    "static_v8_external_one_byte_string_resource.h",
    "storage_area.cc",
    "storage_area.h",
    "test_features_native_handler.cc",
    "test_features_native_handler.h",
    "test_native_handler.cc",
    "test_native_handler.h",
    "user_gestures_native_handler.cc",
    "user_gestures_native_handler.h",
    "user_script_injector.cc",
    "user_script_injector.h",
    "user_script_set.cc",
    "user_script_set.h",
    "user_script_set_manager.cc",
    "user_script_set_manager.h",
    "utils_native_handler.cc",
    "utils_native_handler.h",
    "v8_context_native_handler.cc",
    "v8_context_native_handler.h",
    "v8_helpers.h",
    "v8_schema_registry.cc",
    "v8_schema_registry.h",
    "wake_event_page.cc",
    "wake_event_page.h",
    "web_request_hooks.cc",
    "web_request_hooks.h",
    "web_ui_injection_host.cc",
    "web_ui_injection_host.h",
    "worker_script_context_set.cc",
    "worker_script_context_set.h",
    "worker_thread_dispatcher.cc",
    "worker_thread_dispatcher.h",
  ]

  configs += [ "//build/config:precompiled_headers" ]

  deps = [
    "//chrome:resources",
    "//components/guest_view/renderer",
    "//content:resources",
    "//extensions:extensions_resources",
    "//extensions/common",
    "//extensions/common/api",
    "//gin",
    "//skia",
    "//third_party/blink/public:blink",
    "//third_party/cld_3/src/src:cld_3",
  ]

  if (proprietary_codecs && enable_wifi_display) {
    sources += [
      "api/display_source/wifi_display/wifi_display_audio_encoder.cc",
      "api/display_source/wifi_display/wifi_display_audio_encoder.h",
      "api/display_source/wifi_display/wifi_display_audio_encoder_lpcm.cc",
      "api/display_source/wifi_display/wifi_display_elementary_stream_descriptor.cc",
      "api/display_source/wifi_display/wifi_display_elementary_stream_descriptor.h",
      "api/display_source/wifi_display/wifi_display_elementary_stream_info.cc",
      "api/display_source/wifi_display/wifi_display_elementary_stream_info.h",
      "api/display_source/wifi_display/wifi_display_elementary_stream_packetizer.cc",
      "api/display_source/wifi_display/wifi_display_elementary_stream_packetizer.h",
      "api/display_source/wifi_display/wifi_display_media_encoder.cc",
      "api/display_source/wifi_display/wifi_display_media_encoder.h",
      "api/display_source/wifi_display/wifi_display_media_manager.cc",
      "api/display_source/wifi_display/wifi_display_media_manager.h",
      "api/display_source/wifi_display/wifi_display_media_packetizer.cc",
      "api/display_source/wifi_display/wifi_display_media_packetizer.h",
      "api/display_source/wifi_display/wifi_display_media_pipeline.cc",
      "api/display_source/wifi_display/wifi_display_media_pipeline.h",
      "api/display_source/wifi_display/wifi_display_session.cc",
      "api/display_source/wifi_display/wifi_display_session.h",
      "api/display_source/wifi_display/wifi_display_stream_packet_part.h",
      "api/display_source/wifi_display/wifi_display_transport_stream_packetizer.cc",
      "api/display_source/wifi_display/wifi_display_transport_stream_packetizer.h",
      "api/display_source/wifi_display/wifi_display_video_encoder.cc",
      "api/display_source/wifi_display/wifi_display_video_encoder.h",
      "api/display_source/wifi_display/wifi_display_video_encoder_svc.cc",
      "api/display_source/wifi_display/wifi_display_video_encoder_vea.cc",
    ]

    deps += [
      "//third_party/openh264:encoder",
      "//third_party/wds:libwds",
    ]
  }
}

jumbo_static_library("unit_test_support") {
  # Sources that are shared between chrome-based renderer unit tests and
  # top-level extensions renderer unit tests.
  testonly = true
  sources = [
    "bindings/api_binding_test.cc",
    "bindings/api_binding_test.h",
    "bindings/api_binding_test_util.cc",
    "bindings/api_binding_test_util.h",
    "bindings/test_js_runner.cc",
    "bindings/test_js_runner.h",
    "native_extension_bindings_system_test_base.cc",
    "native_extension_bindings_system_test_base.h",
    "send_message_tester.cc",
    "send_message_tester.h",
    "string_source_map.cc",
    "string_source_map.h",
    "test_v8_extension_configuration.cc",
    "test_v8_extension_configuration.h",
  ]

  deps = [
    ":renderer",
    "//base",
    "//components/crx_file",
    "//content/public/child",
    "//content/test:test_support",
    "//extensions:test_support",
    "//extensions/common",
    "//gin",
    "//gin:gin_test",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "activity_log_converter_strategy_unittest.cc",
    "api_activity_logger_unittest.cc",
    "bindings/api_binding_bridge_unittest.cc",
    "bindings/api_binding_hooks_test_delegate.cc",
    "bindings/api_binding_hooks_test_delegate.h",
    "bindings/api_binding_js_util_unittest.cc",
    "bindings/api_binding_unittest.cc",
    "bindings/api_bindings_system_unittest.cc",
    "bindings/api_bindings_system_unittest.h",
    "bindings/api_event_handler_unittest.cc",
    "bindings/api_event_listeners_unittest.cc",
    "bindings/api_invocation_errors_unittest.cc",
    "bindings/api_last_error_unittest.cc",
    "bindings/api_request_handler_unittest.cc",
    "bindings/api_signature_unittest.cc",
    "bindings/argument_spec_builder.cc",
    "bindings/argument_spec_builder.h",
    "bindings/argument_spec_unittest.cc",
    "bindings/binding_access_checker_unittest.cc",
    "bindings/declarative_event_unittest.cc",
    "bindings/event_emitter_unittest.cc",
    "bindings/exception_handler_unittest.cc",
    "event_unittest.cc",
    "feature_cache_unittest.cc",
    "gc_callback_unittest.cc",
    "gin_port_unittest.cc",
    "json_schema_unittest.cc",
    "messaging_util_unittest.cc",
    "messaging_utils_unittest.cc",
    "module_system_test.cc",
    "module_system_test.h",
    "module_system_unittest.cc",
    "native_extension_bindings_system_unittest.cc",
    "native_renderer_messaging_service_unittest.cc",
    "one_time_message_handler_unittest.cc",
    "runtime_hooks_delegate_unittest.cc",
    "safe_builtins_unittest.cc",
    "scoped_web_frame.cc",
    "scoped_web_frame.h",
    "script_context_set_unittest.cc",
    "storage_area_unittest.cc",
    "utils_unittest.cc",
  ]

  deps = [
    ":renderer",
    ":unit_test_support",
    "//base",
    "//base/test:test_support",
    "//components/crx_file:crx_file",
    "//content/public/child",
    "//content/test:test_support",
    "//extensions:extensions_renderer_resources",
    "//extensions:test_support",
    "//extensions/common",
    "//gin",
    "//gin:gin_test",
    "//ipc:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:blink",
    "//ui/base",
  ]

  if (enable_wifi_display && proprietary_codecs) {
    sources += [
      "api/display_source/wifi_display/wifi_display_elementary_stream_descriptor_unittest.cc",
      "api/display_source/wifi_display/wifi_display_media_packetizer_unittest.cc",
    ]
  }
}