Index: content/browser/BUILD.gn |
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn |
index e2f2899491ed21d644925f77ace19487c4db3684..c28b3bf747c5a13a87839534a5ebeaeb0f41a62b 100644 |
--- a/content/browser/BUILD.gn |
+++ b/content/browser/BUILD.gn |
@@ -258,10 +258,37 @@ source_set("browser") { |
if (use_x11) { |
configs += [ "//build/config/linux:x11" ] |
} else { |
- sources -= [ |
- "power_save_blocker_x11.cc", |
- "renderer_host/web_input_event_aurax11.cc", |
- ] |
+ sources -= [ "renderer_host/web_input_event_aurax11.cc" ] |
+ } |
+ |
+ # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated |
+ # given the interaction between os_chromeos and the feature flags for X11 and |
+ # ozone, so do it all in one spot. |
+ if (is_chromeos || !use_ozone) { |
brettw
2014/09/11 17:13:44
I think this would be more clear with one if for t
Chris Masone
2014/09/11 17:16:17
That would change the semantics, though. If I did
brettw
2014/09/11 17:35:48
Oh, right.
|
+ sources -= [ "power_save_blocker_ozone.cc", ] |
+ } |
+ if (is_chromeos || !use_x11) { |
+ sources -= [ "power_save_blocker_x11.cc", ] |
+ } |
+ |
+ # Dealing with battery_status_manager_*.cc and *wifi_data_provider_*.cc |
+ # is also a bit complicated given android, chromeos, linux and use_dbus. |
+ if (is_android || is_chromeos || (is_linux && use_dbus)) { |
+ sources -= [ "battery_status/battery_status_manager_default.cc" ] |
+ } |
+ if (is_linux && !use_dbus) { |
+ # This will already have gotten removed for all non-Linux cases. |
+ sources -= [ "battery_status/battery_status_manager_linux.cc" ] |
+ } |
+ |
+ if (is_android) { |
+ sources -= [ "geolocation/wifi_data_provider_common.cc" ] |
+ } |
+ if (is_chromeos || (is_linux && !use_dbus)) { |
+ sources -= [ "geolocation/wifi_data_provider_linux.cc" ] |
+ } |
+ if (is_linux && use_dbus) { |
+ sources -= [ "geolocation/empty_wifi_data_provider.cc" ] |
} |
if (use_pango) { |
@@ -272,7 +299,6 @@ source_set("browser") { |
sources += rebase_path(content_browser_gypi_values.android_browser_sources, |
".", "//content") |
sources -= [ |
- "battery_status/battery_status_manager_default.cc", |
"browser_ipc_logging.cc", |
"device_sensors/data_fetcher_shared_memory_default.cc", |
"font_list_async.cc", |
@@ -280,7 +306,6 @@ source_set("browser") { |
"geolocation/network_location_provider.h", |
"geolocation/network_location_request.cc", |
"geolocation/network_location_request.h", |
- "geolocation/wifi_data_provider_common.cc", |
"renderer_host/native_web_keyboard_event.cc", |
"tracing/tracing_ui.cc", |
"tracing/tracing_ui.h", |
@@ -324,20 +349,9 @@ source_set("browser") { |
} |
if (is_chromeos) { |
- sources -= [ |
- "battery_status/battery_status_manager_default.cc", |
- "geolocation/wifi_data_provider_linux.cc", |
- "power_save_blocker_x11.cc", |
- ] |
deps += [ "//chromeos:power_manager_proto" ] |
} |
- if (!use_ozone || is_chromeos) { |
- sources -= [ |
- "power_save_blocker_ozone.cc", |
- ] |
- } |
- |
if (use_aura) { |
deps += [ |
"//ui/aura", |
@@ -401,19 +415,7 @@ source_set("browser") { |
] |
} |
- if (is_linux) { |
- if (use_dbus) { |
- sources -= [ |
- "battery_status/battery_status_manager_default.cc", |
- "geolocation/empty_wifi_data_provider.cc", |
- ] |
+ if (is_linux && use_dbus) { |
deps += [ "//dbus" ] |
- } else { |
- # This will already have gotten removed for all non-Linux cases. |
- sources -= [ |
- "battery_status/battery_status_manager_linux.cc", |
- "geolocation/wifi_data_provider_linux.cc", |
- ] |
- } |
} |
} |