summaryrefslogtreecommitdiff
path: root/chromium/content/renderer/BUILD.gn
blob: 7b3bc9668755c562434458c3fde80ad22d28674c (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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# 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/chromecast_build.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//build/split_static_library.gni")
import("//content/common/features.gni")
import("//media/media_options.gni")
import("//ppapi/features/features.gni")
import("//printing/features/features.gni")
import("//third_party/webrtc/webrtc.gni")
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")

if (is_component_build) {
  link_target_type = "source_set"
} else {
  link_target_type = "split_static_library"
}

target(link_target_type, "renderer") {
  # Only the public target should depend on this. All other targets (even
  # internal content ones) should depend on the public one.
  visibility = [
    ":for_content_tests",
    "//content/app:*",
    "//content/public/renderer:renderer_sources",
  ]

  sources = [
    "accessibility/blink_ax_enum_conversion.cc",
    "accessibility/blink_ax_enum_conversion.h",
    "accessibility/blink_ax_tree_source.cc",
    "accessibility/blink_ax_tree_source.h",
    "accessibility/render_accessibility_impl.cc",
    "accessibility/render_accessibility_impl.h",
    "android/disambiguation_popup_helper.cc",
    "android/disambiguation_popup_helper.h",
    "android/renderer_date_time_picker.cc",
    "android/renderer_date_time_picker.h",
    "android/synchronous_compositor_filter.cc",
    "android/synchronous_compositor_filter.h",
    "android/synchronous_compositor_frame_sink.cc",
    "android/synchronous_compositor_frame_sink.h",
    "android/synchronous_compositor_proxy.cc",
    "android/synchronous_compositor_proxy.h",
    "android/synchronous_compositor_registry.h",
    "browser_plugin/browser_plugin.cc",
    "browser_plugin/browser_plugin.h",
    "browser_plugin/browser_plugin_manager.cc",
    "browser_plugin/browser_plugin_manager.h",
    "cache_storage/cache_storage_dispatcher.cc",
    "cache_storage/cache_storage_dispatcher.h",
    "cache_storage/cache_storage_message_filter.cc",
    "cache_storage/cache_storage_message_filter.h",
    "cache_storage/webserviceworkercachestorage_impl.cc",
    "cache_storage/webserviceworkercachestorage_impl.h",
    "categorized_worker_pool.cc",
    "categorized_worker_pool.h",
    "child_frame_compositing_helper.cc",
    "child_frame_compositing_helper.h",
    "clipboard_utils.cc",
    "clipboard_utils.h",
    "content_security_policy_util.cc",
    "content_security_policy_util.h",
    "context_menu_params_builder.cc",
    "context_menu_params_builder.h",
    "cursor_utils.cc",
    "cursor_utils.h",
    "device_sensors/device_motion_event_pump.cc",
    "device_sensors/device_motion_event_pump.h",
    "device_sensors/device_orientation_event_pump.cc",
    "device_sensors/device_orientation_event_pump.h",
    "device_sensors/device_sensor_event_pump.h",
    "devtools/devtools_agent.cc",
    "devtools/devtools_agent.h",
    "devtools/devtools_agent_filter.cc",
    "devtools/devtools_agent_filter.h",
    "devtools/devtools_client.cc",
    "devtools/devtools_client.h",
    "devtools/devtools_cpu_throttler.cc",
    "devtools/devtools_cpu_throttler.h",
    "devtools/render_widget_screen_metrics_emulator.cc",
    "devtools/render_widget_screen_metrics_emulator.h",
    "devtools/render_widget_screen_metrics_emulator_delegate.h",
    "dom_automation_controller.cc",
    "dom_automation_controller.h",
    "dom_storage/dom_storage_cached_area.cc",
    "dom_storage/dom_storage_cached_area.h",
    "dom_storage/dom_storage_dispatcher.cc",
    "dom_storage/dom_storage_dispatcher.h",
    "dom_storage/dom_storage_proxy.h",
    "dom_storage/local_storage_area.cc",
    "dom_storage/local_storage_area.h",
    "dom_storage/local_storage_cached_area.cc",
    "dom_storage/local_storage_cached_area.h",
    "dom_storage/local_storage_cached_areas.cc",
    "dom_storage/local_storage_cached_areas.h",
    "dom_storage/local_storage_namespace.cc",
    "dom_storage/local_storage_namespace.h",
    "dom_storage/webstoragearea_impl.cc",
    "dom_storage/webstoragearea_impl.h",
    "dom_storage/webstoragenamespace_impl.cc",
    "dom_storage/webstoragenamespace_impl.h",
    "drop_data_builder.cc",
    "drop_data_builder.h",
    "effective_connection_type_helper.cc",
    "effective_connection_type_helper.h",
    "fetchers/associated_resource_fetcher_impl.cc",
    "fetchers/associated_resource_fetcher_impl.h",
    "fetchers/manifest_fetcher.cc",
    "fetchers/manifest_fetcher.h",
    "fetchers/multi_resolution_image_resource_fetcher.cc",
    "fetchers/multi_resolution_image_resource_fetcher.h",
    "fetchers/resource_fetcher_impl.cc",
    "fetchers/resource_fetcher_impl.h",
    "frame_blame_context.cc",
    "frame_blame_context.h",
    "frame_owner_properties.cc",
    "frame_owner_properties.h",
    "gamepad_shared_memory_reader.cc",
    "gamepad_shared_memory_reader.h",
    "gpu/actions_parser.cc",
    "gpu/actions_parser.h",
    "gpu/compositor_dependencies.h",
    "gpu/compositor_external_begin_frame_source.cc",
    "gpu/compositor_external_begin_frame_source.h",
    "gpu/compositor_forwarding_message_filter.cc",
    "gpu/compositor_forwarding_message_filter.h",
    "gpu/frame_swap_message_queue.cc",
    "gpu/frame_swap_message_queue.h",
    "gpu/gpu_benchmarking_extension.cc",
    "gpu/gpu_benchmarking_extension.h",
    "gpu/queue_message_swap_promise.cc",
    "gpu/queue_message_swap_promise.h",
    "gpu/render_widget_compositor.cc",
    "gpu/render_widget_compositor.h",
    "gpu/render_widget_compositor_delegate.h",
    "gpu/renderer_compositor_frame_sink.cc",
    "gpu/renderer_compositor_frame_sink.h",
    "gpu/stream_texture_host_android.cc",
    "gpu/stream_texture_host_android.h",
    "history_entry.cc",
    "history_entry.h",
    "history_serialization.cc",
    "history_serialization.h",
    "idle_user_detector.cc",
    "idle_user_detector.h",
    "image_downloader/image_downloader_base.cc",
    "image_downloader/image_downloader_base.h",
    "image_downloader/image_downloader_impl.cc",
    "image_downloader/image_downloader_impl.h",
    "image_downloader/single_image_downloader.cc",
    "image_downloader/single_image_downloader.h",
    "ime_event_guard.cc",
    "ime_event_guard.h",
    "in_process_renderer_thread.cc",
    "in_process_renderer_thread.h",
    "input/input_event_filter.cc",
    "input/input_event_filter.h",
    "input/input_handler_manager.cc",
    "input/input_handler_manager.h",
    "input/input_handler_manager_client.h",
    "input/input_handler_wrapper.cc",
    "input/input_handler_wrapper.h",
    "input/main_thread_event_queue.cc",
    "input/main_thread_event_queue.h",
    "input/main_thread_event_queue_task.h",
    "input/main_thread_event_queue_task_list.cc",
    "input/main_thread_event_queue_task_list.h",
    "input/main_thread_input_event_filter.cc",
    "input/main_thread_input_event_filter.h",
    "input/render_widget_input_handler.cc",
    "input/render_widget_input_handler.h",
    "input/render_widget_input_handler_delegate.h",
    "input/scoped_web_input_event_with_latency_info.cc",
    "input/scoped_web_input_event_with_latency_info.h",
    "installedapp/related_apps_fetcher.cc",
    "installedapp/related_apps_fetcher.h",
    "internal_document_state_data.cc",
    "internal_document_state_data.h",
    "java/gin_java_bridge_dispatcher.cc",
    "java/gin_java_bridge_dispatcher.h",
    "java/gin_java_bridge_object.cc",
    "java/gin_java_bridge_object.h",
    "java/gin_java_bridge_value_converter.cc",
    "java/gin_java_bridge_value_converter.h",
    "java/gin_java_function_invocation_helper.cc",
    "java/gin_java_function_invocation_helper.h",
    "layout_test_dependencies.h",
    "manifest/manifest_debug_info.cc",
    "manifest/manifest_debug_info.h",
    "manifest/manifest_manager.cc",
    "manifest/manifest_manager.h",
    "manifest/manifest_parser.cc",
    "manifest/manifest_parser.h",
    "manifest/manifest_uma_util.cc",
    "manifest/manifest_uma_util.h",
    "media/android/media_info_loader.cc",
    "media/android/media_info_loader.h",
    "media/android/media_player_renderer_client.cc",
    "media/android/media_player_renderer_client.h",
    "media/android/media_player_renderer_client_factory.cc",
    "media/android/media_player_renderer_client_factory.h",
    "media/android/renderer_media_player_manager.cc",
    "media/android/renderer_media_player_manager.h",
    "media/android/renderer_surface_view_manager.cc",
    "media/android/renderer_surface_view_manager.h",
    "media/android/stream_texture_factory.cc",
    "media/android/stream_texture_factory.h",
    "media/android/stream_texture_wrapper_impl.cc",
    "media/android/stream_texture_wrapper_impl.h",
    "media/audio_decoder.cc",
    "media/audio_decoder.h",
    "media/audio_device_factory.cc",
    "media/audio_device_factory.h",
    "media/audio_input_message_filter.cc",
    "media/audio_input_message_filter.h",
    "media/audio_message_filter.cc",
    "media/audio_message_filter.h",
    "media/audio_renderer_mixer_manager.cc",
    "media/audio_renderer_mixer_manager.h",
    "media/audio_renderer_sink_cache.h",
    "media/audio_renderer_sink_cache_impl.cc",
    "media/audio_renderer_sink_cache_impl.h",
    "media/cdm/pepper_cdm_wrapper.h",
    "media/cdm/pepper_cdm_wrapper_impl.cc",
    "media/cdm/pepper_cdm_wrapper_impl.h",
    "media/cdm/ppapi_decryptor.cc",
    "media/cdm/ppapi_decryptor.h",
    "media/cdm/render_cdm_factory.cc",
    "media/cdm/render_cdm_factory.h",
    "media/media_permission_dispatcher.cc",
    "media/media_permission_dispatcher.h",
    "media/midi_message_filter.cc",
    "media/midi_message_filter.h",
    "media/render_media_client.cc",
    "media/render_media_client.h",
    "media/render_media_log.cc",
    "media/render_media_log.h",
    "media/renderer_gpu_video_accelerator_factories.cc",
    "media/renderer_gpu_video_accelerator_factories.h",
    "media/renderer_webaudiodevice_impl.cc",
    "media/renderer_webaudiodevice_impl.h",
    "media/renderer_webmediaplayer_delegate.cc",
    "media/renderer_webmediaplayer_delegate.h",
    "media/renderer_webmidiaccessor_impl.cc",
    "media/renderer_webmidiaccessor_impl.h",
    "media/video_capture_impl.cc",
    "media/video_capture_impl.h",
    "media/video_capture_impl_manager.cc",
    "media/video_capture_impl_manager.h",
    "media/web_media_element_source_utils.cc",
    "media/web_media_element_source_utils.h",
    "media/webmediaplayer_ms.cc",
    "media/webmediaplayer_ms.h",
    "media/webmediaplayer_ms_compositor.cc",
    "media/webmediaplayer_ms_compositor.h",
    "menu_item_builder.cc",
    "menu_item_builder.h",
    "message_delivery_policy.h",
    "mojo/blink_connector_js_wrapper.cc",
    "mojo/blink_connector_js_wrapper.h",
    "mojo/blink_interface_provider_impl.cc",
    "mojo/blink_interface_provider_impl.h",
    "mojo/blink_interface_registry_impl.cc",
    "mojo/blink_interface_registry_impl.h",
    "mojo/interface_provider_js_wrapper.cc",
    "mojo/interface_provider_js_wrapper.h",
    "mojo_bindings_controller.cc",
    "mojo_bindings_controller.h",
    "mojo_context_state.cc",
    "mojo_context_state.h",
    "mojo_main_runner.cc",
    "mojo_main_runner.h",
    "mouse_lock_dispatcher.cc",
    "mouse_lock_dispatcher.h",
    "navigation_state_impl.cc",
    "navigation_state_impl.h",
    "net_info_helper.cc",
    "net_info_helper.h",
    "origin_trials/web_trial_token_validator_impl.cc",
    "origin_trials/web_trial_token_validator_impl.h",
    "p2p/network_list_manager.h",
    "p2p/socket_client.h",
    "p2p/socket_client_delegate.h",
    "pepper/fullscreen_container.h",
    "peripheral_content_heuristic.cc",
    "peripheral_content_heuristic.h",
    "possibly_associated_interface_ptr.h",
    "presentation/presentation_connection_proxy.cc",
    "presentation/presentation_connection_proxy.h",
    "presentation/presentation_dispatcher.cc",
    "presentation/presentation_dispatcher.h",
    "push_messaging/push_messaging_client.cc",
    "push_messaging/push_messaging_client.h",
    "render_frame_impl.cc",
    "render_frame_impl.h",
    "render_frame_proxy.cc",
    "render_frame_proxy.h",
    "render_process.cc",
    "render_process.h",
    "render_process_impl.cc",
    "render_process_impl.h",
    "render_thread_impl.cc",
    "render_thread_impl.h",
    "render_view_impl.cc",
    "render_view_impl.h",
    "render_view_impl_android.cc",
    "render_view_linux.cc",
    "render_view_win.cc",
    "render_widget.cc",
    "render_widget.h",
    "render_widget_mouse_lock_dispatcher.cc",
    "render_widget_mouse_lock_dispatcher.h",
    "render_widget_owner_delegate.h",
    "renderer_blink_platform_impl.cc",
    "renderer_blink_platform_impl.h",
    "renderer_clipboard_delegate.cc",
    "renderer_clipboard_delegate.h",
    "renderer_main.cc",
    "renderer_main_platform_delegate.h",
    "renderer_main_platform_delegate_android.cc",
    "renderer_main_platform_delegate_linux.cc",
    "renderer_main_platform_delegate_mac.mm",
    "renderer_main_platform_delegate_win.cc",
    "renderer_webapplicationcachehost_impl.cc",
    "renderer_webapplicationcachehost_impl.h",
    "renderer_webcolorchooser_impl.cc",
    "renderer_webcolorchooser_impl.h",
    "renderer_webcookiejar_impl.cc",
    "renderer_webcookiejar_impl.h",
    "resizing_mode_selector.cc",
    "resizing_mode_selector.h",
    "sad_plugin.cc",
    "sad_plugin.h",
    "savable_resources.cc",
    "savable_resources.h",
    "scheduler/resource_dispatch_throttler.cc",
    "scheduler/resource_dispatch_throttler.h",
    "screen_orientation/screen_orientation_dispatcher.cc",
    "screen_orientation/screen_orientation_dispatcher.h",
    "seccomp_sandbox_status_android.cc",
    "seccomp_sandbox_status_android.h",
    "service_worker/embedded_worker_devtools_agent.cc",
    "service_worker/embedded_worker_devtools_agent.h",
    "service_worker/embedded_worker_instance_client_impl.cc",
    "service_worker/embedded_worker_instance_client_impl.h",
    "service_worker/service_worker_context_client.cc",
    "service_worker/service_worker_context_client.h",
    "service_worker/service_worker_context_message_filter.cc",
    "service_worker/service_worker_context_message_filter.h",
    "service_worker/service_worker_fetch_context_impl.cc",
    "service_worker/service_worker_fetch_context_impl.h",
    "service_worker/service_worker_type_converters.cc",
    "service_worker/service_worker_type_converters.h",
    "service_worker/service_worker_type_util.cc",
    "service_worker/service_worker_type_util.h",
    "service_worker/worker_fetch_context_impl.cc",
    "service_worker/worker_fetch_context_impl.h",
    "shared_memory_seqlock_reader.cc",
    "shared_memory_seqlock_reader.h",
    "shared_worker/embedded_shared_worker_content_settings_client_proxy.cc",
    "shared_worker/embedded_shared_worker_content_settings_client_proxy.h",
    "shared_worker/embedded_shared_worker_stub.cc",
    "shared_worker/embedded_shared_worker_stub.h",
    "shared_worker/shared_worker_repository.cc",
    "shared_worker/shared_worker_repository.h",
    "shared_worker/websharedworker_proxy.cc",
    "shared_worker/websharedworker_proxy.h",
    "skia_benchmarking_extension.cc",
    "skia_benchmarking_extension.h",
    "speech_recognition_dispatcher.cc",
    "speech_recognition_dispatcher.h",
    "stats_collection_controller.cc",
    "stats_collection_controller.h",
    "stats_collection_observer.cc",
    "stats_collection_observer.h",
    "text_input_client_observer.cc",
    "text_input_client_observer.h",
    "theme_helper_mac.h",
    "theme_helper_mac.mm",
    "top_level_blame_context.cc",
    "top_level_blame_context.h",
    "web_frame_utils.cc",
    "web_frame_utils.h",
    "web_ui_extension.cc",
    "web_ui_extension.h",
    "web_ui_extension_data.cc",
    "web_ui_extension_data.h",
    "webclipboard_impl.cc",
    "webclipboard_impl.h",
    "webgraphicscontext3d_provider_impl.cc",
    "webgraphicscontext3d_provider_impl.h",
    "webpublicsuffixlist_impl.cc",
    "webpublicsuffixlist_impl.h",
    "webscrollbarbehavior_impl_aura.cc",
    "webscrollbarbehavior_impl_aura.h",
    "webscrollbarbehavior_impl_mac.h",
    "webscrollbarbehavior_impl_mac.mm",
  ]

  if (!is_component_build) {
    if (is_win && is_official_build) {
      split_count = 2  # In certain configurations a full renderer.lib can
                       # be 2+ GB which breaks some Windows tools.
    } else {
      split_count = 1
    }
  }

  configs += [
    "//content:content_implementation",
    "//build/config/compiler:no_size_t_to_int_warning",
  ]
  defines = []

  public_deps = [
    "//content/public/common:common_sources",
    "//ipc",
  ]

  deps = [
    "//base:i18n",
    "//cc",
    "//cc/animation",
    "//cc/blink",
    "//cc/ipc",
    "//cc/paint",
    "//cc/surfaces",
    "//cc/surfaces:surface_id",
    "//cc/surfaces:surfaces",
    "//components/discardable_memory/client",
    "//components/metrics",
    "//components/metrics:single_sample_metrics",
    "//components/payments/mojom:mojom_payment_app",
    "//components/url_formatter",
    "//components/variations",
    "//content:resources",
    "//content/child",
    "//content/common",
    "//content/common:features",
    "//content/gpu:gpu_sources",
    "//content/public/child:child_sources",
    "//content/public/common:feature_h264_with_openh264_ffmpeg",
    "//content/public/common:features",
    "//content/public/common:service_names",
    "//crypto:platform",
    "//device/base/synchronization",
    "//device/gamepad/public/cpp:shared_with_blink",
    "//device/gamepad/public/interfaces",
    "//device/screen_orientation/public/interfaces",
    "//device/sensors/public/cpp:full",
    "//device/sensors/public/interfaces",
    "//device/usb/public/interfaces",
    "//gin",
    "//gpu",
    "//gpu/command_buffer/client:gles2_interface",
    "//jingle:jingle_glue",
    "//media",
    "//media/blink",
    "//media/capture",
    "//media/gpu",
    "//media/gpu/ipc/client",
    "//media/gpu/ipc/common",
    "//media/midi",
    "//media/midi:mojo",
    "//media/mojo:features",
    "//media/mojo/interfaces:remoting",
    "//mojo/common",
    "//mojo/edk/js",
    "//mojo/public/cpp/bindings",
    "//mojo/public/js",
    "//net",
    "//ppapi/features",
    "//printing/features",
    "//sandbox",
    "//services/device/public/interfaces",
    "//services/device/public/interfaces:constants",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/interfaces",
    "//services/ui/public/cpp/bitmap",
    "//services/ui/public/cpp/gpu",
    "//skia",
    "//storage/common",
    "//third_party/WebKit/public:blink",
    "//third_party/WebKit/public:features",
    "//third_party/WebKit/public:mojo_bindings",
    "//third_party/boringssl",
    "//third_party/icu",
    "//third_party/libyuv",
    "//third_party/widevine/cdm:headers",
    "//ui/accessibility",
    "//ui/base",
    "//ui/base/ime",
    "//ui/display",
    "//ui/events:dom_keycode_converter",
    "//ui/events:events_base",
    "//ui/events/blink",
    "//ui/gfx/geometry/mojo",
    "//ui/gl",
    "//ui/latency",
    "//ui/native_theme",
    "//ui/surface",
    "//v8",
  ]
  allow_circular_includes_from = []

  if (use_aura && !use_qt) {
    public_deps += [ "//content/renderer/mus" ]
    allow_circular_includes_from += [ "//content/renderer/mus" ]
    deps += [ "//services/ui/public/cpp" ]
  }

  if (use_external_popup_menu) {
    sources += [
      "external_popup_menu.cc",
      "external_popup_menu.h",
    ]
  }

  if (is_mac) {
    sources -= [
      "webscrollbarbehavior_impl_aura.cc",
      "webscrollbarbehavior_impl_aura.h",
    ]
  }

  if (is_android) {
    # Add back the Linux file which Android shares.
    set_sources_assignment_filter([])
    sources += [ "render_view_linux.cc" ]

    deps += [
      "//third_party/android_tools:cpu_features",
      "//third_party/libphonenumber",
    ]
  } else {
    sources -= [
      "java/gin_java_bridge_dispatcher.cc",
      "java/gin_java_bridge_dispatcher.h",
      "java/gin_java_bridge_object.cc",
      "java/gin_java_bridge_object.h",
      "java/gin_java_bridge_value_converter.cc",
      "java/gin_java_bridge_value_converter.h",
      "java/gin_java_function_invocation_helper.cc",
      "java/gin_java_function_invocation_helper.h",
    ]
  }

  if (enable_media_remoting) {
    deps += [ "//media/remoting" ]
  }

  if (enable_webrtc) {
    # WebRTC plugin-related stuff goes in a different section below.
    sources += [
      "image_capture/image_capture_frame_grabber.cc",
      "image_capture/image_capture_frame_grabber.h",
      "media/aec_dump_message_filter.cc",
      "media/aec_dump_message_filter.h",
      "media/audio_repetition_detector.cc",
      "media/audio_repetition_detector.h",
      "media/external_media_stream_audio_source.cc",
      "media/external_media_stream_audio_source.h",
      "media/gpu/rtc_video_decoder.cc",
      "media/gpu/rtc_video_decoder.h",
      "media/gpu/rtc_video_decoder_factory.cc",
      "media/gpu/rtc_video_decoder_factory.h",
      "media/gpu/rtc_video_encoder.cc",
      "media/gpu/rtc_video_encoder.h",
      "media/gpu/rtc_video_encoder_factory.cc",
      "media/gpu/rtc_video_encoder_factory.h",
      "media/local_media_stream_audio_source.cc",
      "media/local_media_stream_audio_source.h",
      "media/media_devices_event_dispatcher.cc",
      "media/media_devices_event_dispatcher.h",
      "media/media_devices_listener_impl.cc",
      "media/media_devices_listener_impl.h",
      "media/media_stream.cc",
      "media/media_stream.h",
      "media/media_stream_audio_deliverer.h",
      "media/media_stream_audio_level_calculator.cc",
      "media/media_stream_audio_level_calculator.h",
      "media/media_stream_audio_processor.cc",
      "media/media_stream_audio_processor.h",
      "media/media_stream_audio_processor_options.cc",
      "media/media_stream_audio_processor_options.h",
      "media/media_stream_audio_source.cc",
      "media/media_stream_audio_source.h",
      "media/media_stream_audio_track.cc",
      "media/media_stream_audio_track.h",
      "media/media_stream_center.cc",
      "media/media_stream_center.h",
      "media/media_stream_constraints_util.cc",
      "media/media_stream_constraints_util.h",
      "media/media_stream_constraints_util_sets.cc",
      "media/media_stream_constraints_util_sets.h",
      "media/media_stream_constraints_util_video_content.cc",
      "media/media_stream_constraints_util_video_content.h",
      "media/media_stream_constraints_util_video_device.cc",
      "media/media_stream_constraints_util_video_device.h",
      "media/media_stream_dispatcher.cc",
      "media/media_stream_dispatcher.h",
      "media/media_stream_dispatcher_eventhandler.h",
      "media/media_stream_registry_interface.h",
      "media/media_stream_renderer_factory_impl.cc",
      "media/media_stream_renderer_factory_impl.h",
      "media/media_stream_source.cc",
      "media/media_stream_source.h",
      "media/media_stream_track.cc",
      "media/media_stream_track.h",
      "media/media_stream_video_capturer_source.cc",
      "media/media_stream_video_capturer_source.h",
      "media/media_stream_video_renderer_sink.cc",
      "media/media_stream_video_renderer_sink.h",
      "media/media_stream_video_source.cc",
      "media/media_stream_video_source.h",
      "media/media_stream_video_track.cc",
      "media/media_stream_video_track.h",
      "media/peer_connection_tracker.cc",
      "media/peer_connection_tracker.h",
      "media/remote_media_stream_impl.cc",
      "media/remote_media_stream_impl.h",
      "media/rtc_certificate.cc",
      "media/rtc_certificate.h",
      "media/rtc_certificate_generator.cc",
      "media/rtc_certificate_generator.h",
      "media/rtc_data_channel_handler.cc",
      "media/rtc_data_channel_handler.h",
      "media/rtc_dtmf_sender_handler.cc",
      "media/rtc_dtmf_sender_handler.h",
      "media/rtc_peer_connection_handler.cc",
      "media/rtc_peer_connection_handler.h",
      "media/secure_display_link_tracker.h",
      "media/speech_recognition_audio_sink.cc",
      "media/speech_recognition_audio_sink.h",
      "media/track_audio_renderer.cc",
      "media/track_audio_renderer.h",
      "media/user_media_client_impl.cc",
      "media/user_media_client_impl.h",
      "media/video_track_adapter.cc",
      "media/video_track_adapter.h",
      "media/webaudio_media_stream_source.cc",
      "media/webaudio_media_stream_source.h",
      "media/webrtc/media_stream_remote_video_source.cc",
      "media/webrtc/media_stream_remote_video_source.h",
      "media/webrtc/media_stream_track_metrics.cc",
      "media/webrtc/media_stream_track_metrics.h",
      "media/webrtc/media_stream_video_webrtc_sink.cc",
      "media/webrtc/media_stream_video_webrtc_sink.h",
      "media/webrtc/peer_connection_dependency_factory.cc",
      "media/webrtc/peer_connection_dependency_factory.h",
      "media/webrtc/peer_connection_remote_audio_source.cc",
      "media/webrtc/peer_connection_remote_audio_source.h",
      "media/webrtc/processed_local_audio_source.cc",
      "media/webrtc/processed_local_audio_source.h",
      "media/webrtc/rtc_rtp_contributing_source.cc",
      "media/webrtc/rtc_rtp_contributing_source.h",
      "media/webrtc/rtc_rtp_receiver.cc",
      "media/webrtc/rtc_rtp_receiver.h",
      "media/webrtc/rtc_rtp_sender.cc",
      "media/webrtc/rtc_rtp_sender.h",
      "media/webrtc/rtc_stats.cc",
      "media/webrtc/rtc_stats.h",
      "media/webrtc/stun_field_trial.cc",
      "media/webrtc/stun_field_trial.h",
      "media/webrtc/track_observer.cc",
      "media/webrtc/track_observer.h",
      "media/webrtc/webrtc_audio_sink.cc",
      "media/webrtc/webrtc_audio_sink.h",
      "media/webrtc/webrtc_media_stream_adapter.cc",
      "media/webrtc/webrtc_media_stream_adapter.h",
      "media/webrtc/webrtc_video_capturer_adapter.cc",
      "media/webrtc/webrtc_video_capturer_adapter.h",
      "media/webrtc/webrtc_video_frame_adapter.cc",
      "media/webrtc/webrtc_video_frame_adapter.h",
      "media/webrtc_audio_device_impl.cc",
      "media/webrtc_audio_device_impl.h",
      "media/webrtc_audio_device_not_impl.cc",
      "media/webrtc_audio_device_not_impl.h",
      "media/webrtc_audio_renderer.cc",
      "media/webrtc_audio_renderer.h",
      "media/webrtc_local_audio_source_provider.cc",
      "media/webrtc_local_audio_source_provider.h",
      "media/webrtc_logging.cc",
      "media/webrtc_logging.h",
      "media/webrtc_uma_histograms.cc",
      "media/webrtc_uma_histograms.h",
      "media_capture_from_element/canvas_capture_handler.cc",
      "media_capture_from_element/canvas_capture_handler.h",
      "media_capture_from_element/html_audio_element_capturer_source.cc",
      "media_capture_from_element/html_audio_element_capturer_source.h",
      "media_capture_from_element/html_video_element_capturer_source.cc",
      "media_capture_from_element/html_video_element_capturer_source.h",
      "media_recorder/audio_track_recorder.cc",
      "media_recorder/audio_track_recorder.h",
      "media_recorder/media_recorder_handler.cc",
      "media_recorder/media_recorder_handler.h",
      "media_recorder/vea_encoder.cc",
      "media_recorder/vea_encoder.h",
      "media_recorder/video_track_recorder.cc",
      "media_recorder/video_track_recorder.h",
      "media_recorder/vpx_encoder.cc",
      "media_recorder/vpx_encoder.h",
      "p2p/empty_network_manager.cc",
      "p2p/empty_network_manager.h",
      "p2p/filtering_network_manager.cc",
      "p2p/filtering_network_manager.h",
      "p2p/host_address_request.cc",
      "p2p/host_address_request.h",
      "p2p/ipc_network_manager.cc",
      "p2p/ipc_network_manager.h",
      "p2p/ipc_socket_factory.cc",
      "p2p/ipc_socket_factory.h",
      "p2p/network_list_observer.h",
      "p2p/network_manager_uma.cc",
      "p2p/network_manager_uma.h",
      "p2p/port_allocator.cc",
      "p2p/port_allocator.h",
      "p2p/socket_client_impl.cc",
      "p2p/socket_client_impl.h",
      "p2p/socket_dispatcher.cc",
      "p2p/socket_dispatcher.h",
    ]

    if (enable_plugins) {
      sources += [
        "media/pepper_to_video_track_adapter.cc",
        "media/pepper_to_video_track_adapter.h",
        "media/video_track_to_pepper_adapter.cc",
        "media/video_track_to_pepper_adapter.h",
        "pepper/pepper_media_stream_audio_track_host.cc",
        "pepper/pepper_media_stream_audio_track_host.h",
        "pepper/pepper_media_stream_track_host_base.cc",
        "pepper/pepper_media_stream_track_host_base.h",
        "pepper/pepper_media_stream_video_track_host.cc",
        "pepper/pepper_media_stream_video_track_host.h",
        "pepper/pepper_video_destination_host.cc",
        "pepper/pepper_video_destination_host.h",
        "pepper/pepper_video_source_host.cc",
        "pepper/pepper_video_source_host.h",
      ]
    }

    deps += [
      "//crypto",
      "//third_party/libvpx",
      "//third_party/opus",
      "//third_party/webrtc/api:libjingle_peerconnection",
      "//third_party/webrtc/api:rtc_stats_api",
      "//third_party/webrtc/api:video_frame_api",
      "//third_party/webrtc/api/audio_codecs:builtin_audio_decoder_factory",
      "//third_party/webrtc/api/audio_codecs:builtin_audio_encoder_factory",
      "//third_party/webrtc/base:rtc_base",
      "//third_party/webrtc/media:rtc_media",
      "//third_party/webrtc/media:rtc_media_base",
      "//third_party/webrtc/modules/audio_device",
      "//third_party/webrtc/modules/audio_processing",
      "//third_party/webrtc/modules/video_coding:webrtc_h264",
      "//third_party/webrtc/p2p:libstunprober",
      "//third_party/webrtc/p2p:rtc_p2p",
      "//third_party/webrtc/pc:rtc_pc",
      "//third_party/webrtc/stats",
      "//third_party/webrtc/system_wrappers",
      "//third_party/webrtc_overrides:init_webrtc",
    ]
    if (rtc_use_h264) {
      sources += [
        "media_recorder/h264_encoder.cc",
        "media_recorder/h264_encoder.h",
      ]
      deps += [ "//third_party/openh264:encoder" ]
    }
  } else {
    sources += [
      "media/webrtc_logging.h",
      "media/webrtc_logging_noop.cc",
    ]
  }

  if (enable_plugins) {
    sources += [
      "pepper/audio_helper.cc",
      "pepper/audio_helper.h",
      "pepper/content_decryptor_delegate.cc",
      "pepper/content_decryptor_delegate.h",
      "pepper/content_renderer_pepper_host_factory.cc",
      "pepper/content_renderer_pepper_host_factory.h",
      "pepper/event_conversion.cc",
      "pepper/event_conversion.h",
      "pepper/fullscreen_container.h",
      "pepper/gfx_conversion.h",
      "pepper/host_array_buffer_var.cc",
      "pepper/host_array_buffer_var.h",
      "pepper/host_dispatcher_wrapper.cc",
      "pepper/host_dispatcher_wrapper.h",
      "pepper/host_globals.cc",
      "pepper/host_globals.h",
      "pepper/host_resource_var.cc",
      "pepper/host_resource_var.h",
      "pepper/host_var_tracker.cc",
      "pepper/host_var_tracker.h",
      "pepper/message_channel.cc",
      "pepper/message_channel.h",
      "pepper/pepper_audio_controller.cc",
      "pepper/pepper_audio_controller.h",
      "pepper/pepper_audio_encoder_host.cc",
      "pepper/pepper_audio_encoder_host.h",
      "pepper/pepper_audio_input_host.cc",
      "pepper/pepper_audio_input_host.h",
      "pepper/pepper_audio_output_host.cc",
      "pepper/pepper_audio_output_host.h",
      "pepper/pepper_broker.cc",
      "pepper/pepper_broker.h",
      "pepper/pepper_browser_connection.cc",
      "pepper/pepper_browser_connection.h",
      "pepper/pepper_camera_device_host.cc",
      "pepper/pepper_camera_device_host.h",
      "pepper/pepper_compositor_host.cc",
      "pepper/pepper_compositor_host.h",
      "pepper/pepper_device_enumeration_host_helper.cc",
      "pepper/pepper_device_enumeration_host_helper.h",
      "pepper/pepper_file_chooser_host.cc",
      "pepper/pepper_file_chooser_host.h",
      "pepper/pepper_file_ref_renderer_host.cc",
      "pepper/pepper_file_ref_renderer_host.h",
      "pepper/pepper_file_system_host.cc",
      "pepper/pepper_file_system_host.h",
      "pepper/pepper_graphics_2d_host.cc",
      "pepper/pepper_graphics_2d_host.h",
      "pepper/pepper_hung_plugin_filter.cc",
      "pepper/pepper_hung_plugin_filter.h",
      "pepper/pepper_in_process_resource_creation.cc",
      "pepper/pepper_in_process_resource_creation.h",
      "pepper/pepper_in_process_router.cc",
      "pepper/pepper_in_process_router.h",
      "pepper/pepper_media_device_manager.cc",
      "pepper/pepper_media_device_manager.h",
      "pepper/pepper_platform_audio_input.cc",
      "pepper/pepper_platform_audio_input.h",
      "pepper/pepper_platform_audio_output.cc",
      "pepper/pepper_platform_audio_output.h",
      "pepper/pepper_platform_audio_output_dev.cc",
      "pepper/pepper_platform_audio_output_dev.h",
      "pepper/pepper_platform_camera_device.cc",
      "pepper/pepper_platform_camera_device.h",
      "pepper/pepper_platform_video_capture.cc",
      "pepper/pepper_platform_video_capture.h",
      "pepper/pepper_plugin_instance_impl.cc",
      "pepper/pepper_plugin_instance_impl.h",
      "pepper/pepper_plugin_instance_metrics.cc",
      "pepper/pepper_plugin_instance_metrics.h",
      "pepper/pepper_plugin_registry.cc",
      "pepper/pepper_plugin_registry.h",
      "pepper/pepper_proxy_channel_delegate_impl.cc",
      "pepper/pepper_proxy_channel_delegate_impl.h",
      "pepper/pepper_try_catch.cc",
      "pepper/pepper_try_catch.h",
      "pepper/pepper_url_loader_host.cc",
      "pepper/pepper_url_loader_host.h",
      "pepper/pepper_video_capture_host.cc",
      "pepper/pepper_video_capture_host.h",
      "pepper/pepper_video_decoder_host.cc",
      "pepper/pepper_video_decoder_host.h",
      "pepper/pepper_video_encoder_host.cc",
      "pepper/pepper_video_encoder_host.h",
      "pepper/pepper_webplugin_impl.cc",
      "pepper/pepper_webplugin_impl.h",
      "pepper/pepper_websocket_host.cc",
      "pepper/pepper_websocket_host.h",
      "pepper/plugin_instance_throttler_impl.cc",
      "pepper/plugin_instance_throttler_impl.h",
      "pepper/plugin_module.cc",
      "pepper/plugin_module.h",
      "pepper/plugin_object.cc",
      "pepper/plugin_object.h",
      "pepper/plugin_power_saver_helper.cc",
      "pepper/plugin_power_saver_helper.h",
      "pepper/ppapi_preferences_builder.cc",
      "pepper/ppapi_preferences_builder.h",
      "pepper/ppb_audio_impl.cc",
      "pepper/ppb_audio_impl.h",
      "pepper/ppb_broker_impl.cc",
      "pepper/ppb_broker_impl.h",
      "pepper/ppb_buffer_impl.cc",
      "pepper/ppb_buffer_impl.h",
      "pepper/ppb_flash_message_loop_impl.cc",
      "pepper/ppb_flash_message_loop_impl.h",
      "pepper/ppb_graphics_3d_impl.cc",
      "pepper/ppb_graphics_3d_impl.h",
      "pepper/ppb_image_data_impl.cc",
      "pepper/ppb_image_data_impl.h",
      "pepper/ppb_proxy_impl.cc",
      "pepper/ppb_proxy_impl.h",
      "pepper/ppb_var_deprecated_impl.cc",
      "pepper/ppb_var_deprecated_impl.h",
      "pepper/ppb_video_decoder_impl.cc",
      "pepper/ppb_video_decoder_impl.h",
      "pepper/renderer_ppapi_host_impl.cc",
      "pepper/renderer_ppapi_host_impl.h",
      "pepper/renderer_restrict_dispatch_group.h",
      "pepper/resource_converter.cc",
      "pepper/resource_converter.h",
      "pepper/resource_creation_impl.cc",
      "pepper/resource_creation_impl.h",
      "pepper/url_request_info_util.cc",
      "pepper/url_request_info_util.h",
      "pepper/url_response_info_util.cc",
      "pepper/url_response_info_util.h",
      "pepper/v8_var_converter.cc",
      "pepper/v8_var_converter.h",
      "pepper/v8object_var.cc",
      "pepper/v8object_var.h",
      "pepper/video_decoder_shim.cc",
      "pepper/video_decoder_shim.h",
      "pepper/video_encoder_shim.cc",
      "pepper/video_encoder_shim.h",
      "render_widget_fullscreen_pepper.cc",
      "render_widget_fullscreen_pepper.h",
    ]

    deps += [
      "//ppapi/host",
      "//ppapi/proxy",
      "//ppapi/shared_impl",
      "//third_party/libvpx",
      "//third_party/opus",
    ]
  }

  if (!enable_pepper_cdms) {
    sources -= [
      "media/cdm/pepper_cdm_wrapper.h",
      "media/cdm/pepper_cdm_wrapper_impl.cc",
      "media/cdm/pepper_cdm_wrapper_impl.h",
      "media/cdm/ppapi_decryptor.cc",
      "media/cdm/ppapi_decryptor.h",
    ]
  }

  if (enable_basic_printing || enable_print_preview) {
    deps += [ "//printing" ]
  }

  if (enable_mojo_media) {
    sources += [
      "media/media_interface_provider.cc",
      "media/media_interface_provider.h",
    ]

    deps += [
      "//media/mojo/clients",
      "//media/mojo/interfaces",
    ]
  }

  if (is_linux || is_android) {
    deps += [ "//sandbox:sandbox_features" ]
  }

  if (use_ozone) {
    deps += [ "//ui/ozone" ]
  }

  if (enable_ipc_fuzzer) {
    configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
  }

  if (is_chromecast) {
    defines += [ "MEDIA_EVENT_LOG_UTILITY=LOG(INFO)" ]
  }
}

# See comment at the top of //content/BUILD.gn for how this works.
group("for_content_tests") {
  visibility = [ "//content/test/*" ]

  if (!is_component_build) {
    public_deps = [
      ":renderer",
    ]
  }
}