Reland "Replace Chrome IPC with Mojo IPC for querying BatteryStatus service"
[chromium-blink-merge.git] / content / renderer / BUILD.gn
blobfeb81262a84931c7a84a572ba747e2a6ed3cda3e
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/features.gni")
6 import("//build/config/ui.gni")
7 import("//content/renderer/renderer.gni")
8 import("//media/media_options.gni")
10 source_set("renderer") {
11   # Only the public target should depend on this. All other targets (even
12   # internal content ones) should depend on the public one.
13   visibility = [ "//content/public/renderer:renderer_sources" ]
15   sources = rebase_path(content_renderer_gypi_values.private_renderer_sources,
16                         ".", "//content")
18   configs += [
19     "//content:content_implementation",
20   ]
22   deps = [
23     # TODO(GYP) bug 376846 remove this. This should be inherited from //net but
24     # those don't cross component boundaries.
25     "//crypto:platform",
27     "//base/allocator",
28     "//cc",
29     "//cc/blink",
30     "//content:resources",
31     "//content/common:mojo_bindings",
32     "//content/public/child:child_sources",
33     "//content/public/common:common_sources",
34     "//device/battery:mojo_bindings",
35     "//gin",
36     "//gpu",
37     "//gpu/command_buffer/client:gles2_interface",
38     "//jingle:jingle_glue",
39     "//media",
40     "//media/blink",
41     "//mojo/bindings/js",
42     "//mojo/environment:chromium",
43     "//mojo/public/js/bindings",
44     "//mojo/public/interfaces/application",
45     "//net",
46     "//skia",
47     "//storage/common",
48     "//third_party/icu",
49     "//third_party/libjingle",
50     "//third_party/npapi",
51     "//third_party/WebKit/public:blink",
52     "//third_party/widevine/cdm:version_h",
53     "//ui/accessibility",
54     "//ui/base",
55     "//ui/events:events_base",
56     "//ui/events:dom4_keycode_converter",
57     "//ui/gl",
58     "//ui/native_theme",
59     "//ui/surface",
60     "//v8",
61     "//webkit/common/gpu",
62   ]
64   if (!enable_notifications) {
65     sources -= [
66       "notification_provider.cc",
67       "active_notification_tracker.cc",
68     ]
69   }
71   if (is_mac) {
72     sources -= [
73       "webscrollbarbehavior_impl_gtkoraura.cc",
74       "webscrollbarbehavior_impl_gtkoraura.h",
75     ]
76     sources += [
77       "external_popup_menu.cc",
78       "external_popup_menu.h",
79     ]
80   }
82   if (is_android) {
83     sources -= [
84       "media/audio_decoder.cc",
85       "media/crypto/encrypted_media_player_support_impl.cc",
86     ]
87     sources += [
88       "external_popup_menu.cc",
89       "external_popup_menu.h",
90     ]
92     # Add back the Linux file which Android shares.
93     set_sources_assignment_filter([])
94     sources += [
95       "render_view_linux.cc",
96     ]
98     deps += [
99       "//third_party/android_tools:cpu_features",
100       "//third_party/libphonenumber",
101     ]
102   } else {
103     sources -= [
104       "java/gin_java_bridge_dispatcher.cc",
105       "java/gin_java_bridge_dispatcher.h",
106       "java/gin_java_bridge_object.cc",
107       "java/gin_java_bridge_object.h",
108       "java/gin_java_bridge_value_converter.cc",
109       "java/gin_java_bridge_value_converter.h",
110     ]
111   }
113   # TODO(jrg): remove the OS=="android" section?
114   # http://crbug.com/113172
115   # Understand better how media_stream_ is tied into Chromium.
116   if (!enable_webrtc && is_android) {
117     sources -= [
118       "media/media_stream_audio_level_calculator.cc",
119       "media/media_stream_audio_level_calculator.h",
120       "media/media_stream_audio_renderer.cc",
121       "media/media_stream_audio_renderer.h",
122       "media/media_stream_center.h",
123       "media/media_stream_constraints_util.cc",
124       "media/media_stream_constraints_util.h",
125       "media/media_stream_dispatcher.h",
126       "media/media_stream_dispatcher_eventhandler.h",
127       "media/media_stream_track.cc",
128       "media/media_stream_track.h",
129     ]
130   }
132   if (enable_webrtc) {
133     sources += rebase_path(
134         content_renderer_gypi_values.private_renderer_webrtc_sources,
135         ".", "//content")
136     deps += [
137       "//crypto",
138       "//third_party/libyuv",
139       "//third_party/webrtc/modules/audio_device",
140       "//third_party/webrtc/modules/audio_processing",
141       "//third_party/libjingle:libjingle_webrtc",
142       "//third_party/libjingle:libpeerconnection",
143     ]
144   } else {
145     sources += [
146       "media/webrtc_logging_noop.cc",
147       "media/webrtc_logging.h",
148     ]
149   }
151   if (enable_plugins) {
152     sources += rebase_path(
153         content_renderer_gypi_values.private_renderer_plugin_sources,
154         ".", "//content")
155     deps += [
156       "//ppapi:ppapi_host",
157       "//ppapi:ppapi_proxy",
158       "//ppapi:ppapi_shared",
159       "//third_party/libyuv",
160     ]
161   } else {
162     # These files are in the WebRTC list, but also require plugins.
163     if (enable_webrtc) {
164       sources -= [
165         "media/webrtc/video_destination_handler.cc",
166         "media/webrtc/video_destination_handler.h",
167       ]
168     }
169   }
171   if (enable_plugins && enable_webrtc) {
172     sources += rebase_path(
173         content_renderer_gypi_values.private_renderer_plugin_webrtc_sources,
174         ".", "//content")
175   }
177   if (!enable_pepper_cdms) {
178     sources -= [
179       "media/crypto/pepper_cdm_wrapper.h",
180       "media/crypto/pepper_cdm_wrapper_impl.cc",
181       "media/crypto/pepper_cdm_wrapper_impl.h",
182       "media/crypto/ppapi_decryptor.cc",
183       "media/crypto/ppapi_decryptor.h",
184     ]
185   }
187   if (printing_mode == 1) {
188     deps += [ "//printing" ]
189   }
191   if (enable_browser_cdms) {
192     sources += [
193       "media/crypto/proxy_media_keys.cc",
194       "media/crypto/proxy_media_keys.h",
195       "media/crypto/renderer_cdm_manager.cc",
196       "media/crypto/renderer_cdm_manager.h",
197     ]
198   }