Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: base/BUILD.gn

Issue 2379133002: Merge M54: "Implement base::PowerMonitor::IsOnBatteryPower() for OSX." (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/power_monitor/power_monitor_device_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # HOW TO WRITE CONDITIONALS IN THIS FILE 5 # HOW TO WRITE CONDITIONALS IN THIS FILE
6 # ====================================== 6 # ======================================
7 # 7 #
8 # In many other places, one would write a conditional that expresses all the 8 # In many other places, one would write a conditional that expresses all the
9 # cases when a source file is used or unused, and then either add or subtract 9 # cases when a source file is used or unused, and then either add or subtract
10 # it from the sources list in that case 10 # it from the sources list in that case
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 "posix/global_descriptors.cc", 587 "posix/global_descriptors.cc",
588 "posix/global_descriptors.h", 588 "posix/global_descriptors.h",
589 "posix/safe_strerror.cc", 589 "posix/safe_strerror.cc",
590 "posix/safe_strerror.h", 590 "posix/safe_strerror.h",
591 "posix/unix_domain_socket_linux.cc", 591 "posix/unix_domain_socket_linux.cc",
592 "posix/unix_domain_socket_linux.h", 592 "posix/unix_domain_socket_linux.h",
593 "power_monitor/power_monitor.cc", 593 "power_monitor/power_monitor.cc",
594 "power_monitor/power_monitor.h", 594 "power_monitor/power_monitor.h",
595 "power_monitor/power_monitor_device_source.cc", 595 "power_monitor/power_monitor_device_source.cc",
596 "power_monitor/power_monitor_device_source.h", 596 "power_monitor/power_monitor_device_source.h",
597 "power_monitor/power_monitor_device_source_android.cc",
598 "power_monitor/power_monitor_device_source_android.h",
599 "power_monitor/power_monitor_device_source_chromeos.cc",
600 "power_monitor/power_monitor_device_source_ios.mm",
601 "power_monitor/power_monitor_device_source_mac.mm",
602 "power_monitor/power_monitor_device_source_posix.cc",
603 "power_monitor/power_monitor_device_source_win.cc",
604 "power_monitor/power_monitor_source.cc", 597 "power_monitor/power_monitor_source.cc",
605 "power_monitor/power_monitor_source.h", 598 "power_monitor/power_monitor_source.h",
606 "power_monitor/power_observer.h", 599 "power_monitor/power_observer.h",
607 "process/internal_linux.cc", 600 "process/internal_linux.cc",
608 "process/internal_linux.h", 601 "process/internal_linux.h",
609 "process/kill.cc", 602 "process/kill.cc",
610 "process/kill.h", 603 "process/kill.h",
611 "process/kill_mac.cc", 604 "process/kill_mac.cc",
612 "process/kill_posix.cc", 605 "process/kill_posix.cc",
613 "process/kill_win.cc", 606 "process/kill_win.cc",
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 } 1052 }
1060 1053
1061 # Allow more direct string conversions on platforms with native utf8 1054 # Allow more direct string conversions on platforms with native utf8
1062 # strings 1055 # strings
1063 if (is_mac || is_ios || is_chromeos || is_chromecast) { 1056 if (is_mac || is_ios || is_chromeos || is_chromecast) {
1064 defines += [ "SYSTEM_NATIVE_UTF8" ] 1057 defines += [ "SYSTEM_NATIVE_UTF8" ]
1065 } 1058 }
1066 1059
1067 # Android. 1060 # Android.
1068 if (is_android) { 1061 if (is_android) {
1069 sources -= [ 1062 sources -= [ "debug/stack_trace_posix.cc" ]
1070 "debug/stack_trace_posix.cc",
1071 "power_monitor/power_monitor_device_source_posix.cc",
1072 ]
1073 1063
1074 # Android uses some Linux sources, put those back. 1064 # Android uses some Linux sources, put those back.
1075 set_sources_assignment_filter([]) 1065 set_sources_assignment_filter([])
1076 sources += [ 1066 sources += [
1077 "debug/proc_maps_linux.cc", 1067 "debug/proc_maps_linux.cc",
1078 "files/file_path_watcher_linux.cc", 1068 "files/file_path_watcher_linux.cc",
1079 "posix/unix_domain_socket_linux.cc", 1069 "posix/unix_domain_socket_linux.cc",
1070 "power_monitor/power_monitor_device_source_android.cc",
1071 "power_monitor/power_monitor_device_source_android.h",
1080 "process/internal_linux.cc", 1072 "process/internal_linux.cc",
1081 "process/memory_linux.cc", 1073 "process/memory_linux.cc",
1082 "process/process_handle_linux.cc", 1074 "process/process_handle_linux.cc",
1083 "process/process_iterator_linux.cc", 1075 "process/process_iterator_linux.cc",
1084 "process/process_metrics_linux.cc", 1076 "process/process_metrics_linux.cc",
1085 "sys_info_linux.cc", 1077 "sys_info_linux.cc",
1086 ] 1078 ]
1087 set_sources_assignment_filter(sources_assignment_filter) 1079 set_sources_assignment_filter(sources_assignment_filter)
1088 1080
1089 deps += [ 1081 deps += [
1090 ":base_jni_headers", 1082 ":base_jni_headers",
1091 "//third_party/android_tools:cpu_features", 1083 "//third_party/android_tools:cpu_features",
1092 "//third_party/ashmem", 1084 "//third_party/ashmem",
1093 ] 1085 ]
1094 1086
1095 # Needs to be a public config so that dependent targets link against it as 1087 # Needs to be a public config so that dependent targets link against it as
1096 # well when doing a component build. 1088 # well when doing a component build.
1097 public_configs = [ ":android_system_libs" ] 1089 public_configs = [ ":android_system_libs" ]
1098 } 1090 }
1099 1091
1100 # Chromeos. 1092 # Chromeos.
1101 if (is_chromeos) { 1093 if (is_chromeos) {
1102 sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ] 1094 sources += [ "power_monitor/power_monitor_device_source_chromeos.cc" ]
1103 } 1095 }
1104 1096
1105 # NaCl. 1097 # NaCl.
1106 if (is_nacl) { 1098 if (is_nacl) {
1107 # We reset sources_assignment_filter in order to explicitly include 1099 # We reset sources_assignment_filter in order to explicitly include
1108 # the linux file (which would otherwise be filtered out). 1100 # the linux file (which would otherwise be filtered out).
1109 set_sources_assignment_filter([]) 1101 set_sources_assignment_filter([])
1110 sources += [ 1102 sources += [
1111 "files/file_path_watcher_stub.cc", 1103 "files/file_path_watcher_stub.cc",
1112 "process/process_metrics_nacl.cc", 1104 "process/process_metrics_nacl.cc",
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 "os_compat_nacl.cc", 1175 "os_compat_nacl.cc",
1184 "os_compat_nacl.h", 1176 "os_compat_nacl.h",
1185 "rand_util_nacl.cc", 1177 "rand_util_nacl.cc",
1186 "synchronization/read_write_lock_nacl.cc", 1178 "synchronization/read_write_lock_nacl.cc",
1187 ] 1179 ]
1188 } 1180 }
1189 1181
1190 # Windows. 1182 # Windows.
1191 if (is_win) { 1183 if (is_win) {
1192 sources += [ 1184 sources += [
1185 "power_monitor/power_monitor_device_source_win.cc",
1193 "profiler/win32_stack_frame_unwinder.cc", 1186 "profiler/win32_stack_frame_unwinder.cc",
1194 "profiler/win32_stack_frame_unwinder.h", 1187 "profiler/win32_stack_frame_unwinder.h",
1195 ] 1188 ]
1196 1189
1197 sources -= [ 1190 sources -= [
1198 "message_loop/message_pump_libevent.cc", 1191 "message_loop/message_pump_libevent.cc",
1199 "strings/string16.cc", 1192 "strings/string16.cc",
1200 ] 1193 ]
1201 1194
1202 deps += [ 1195 deps += [
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 "winmm.lib", 1284 "winmm.lib",
1292 ] 1285 ]
1293 all_dependent_configs = [ ":base_win_linker_flags" ] 1286 all_dependent_configs = [ ":base_win_linker_flags" ]
1294 } else if (!is_nacl || is_nacl_nonsfi) { 1287 } else if (!is_nacl || is_nacl_nonsfi) {
1295 # Non-Windows. 1288 # Non-Windows.
1296 deps += [ "//base/third_party/libevent" ] 1289 deps += [ "//base/third_party/libevent" ]
1297 } 1290 }
1298 1291
1299 # Desktop Mac. 1292 # Desktop Mac.
1300 if (is_mac) { 1293 if (is_mac) {
1294 sources += [ "power_monitor/power_monitor_device_source_mac.mm" ]
1295
1301 libs = [ 1296 libs = [
1302 "ApplicationServices.framework", 1297 "ApplicationServices.framework",
1303 "AppKit.framework", 1298 "AppKit.framework",
1304 "bsm", 1299 "bsm",
1305 "CoreFoundation.framework", 1300 "CoreFoundation.framework",
1306 "IOKit.framework", 1301 "IOKit.framework",
1307 "Security.framework", 1302 "Security.framework",
1308 ] 1303 ]
1309 } 1304 }
1310 1305
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 "mac/scoped_nsautorelease_pool.h", 1419 "mac/scoped_nsautorelease_pool.h",
1425 "mac/scoped_nsautorelease_pool.mm", 1420 "mac/scoped_nsautorelease_pool.mm",
1426 "mac/scoped_nsobject.h", 1421 "mac/scoped_nsobject.h",
1427 "mac/scoped_nsobject.mm", 1422 "mac/scoped_nsobject.mm",
1428 "mac/scoped_objc_class_swizzler.h", 1423 "mac/scoped_objc_class_swizzler.h",
1429 "mac/scoped_objc_class_swizzler.mm", 1424 "mac/scoped_objc_class_swizzler.mm",
1430 "mac/scoped_typeref.h", 1425 "mac/scoped_typeref.h",
1431 "memory/shared_memory_posix.cc", 1426 "memory/shared_memory_posix.cc",
1432 "message_loop/message_pump_mac.h", 1427 "message_loop/message_pump_mac.h",
1433 "message_loop/message_pump_mac.mm", 1428 "message_loop/message_pump_mac.mm",
1429 "power_monitor/power_monitor_device_source_ios.mm",
1434 "process/memory_stubs.cc", 1430 "process/memory_stubs.cc",
1435 "strings/sys_string_conversions_mac.mm", 1431 "strings/sys_string_conversions_mac.mm",
1436 "threading/platform_thread_mac.mm", 1432 "threading/platform_thread_mac.mm",
1437 "time/time_mac.cc", 1433 "time/time_mac.cc",
1438 ] 1434 ]
1439 1435
1440 set_sources_assignment_filter(sources_assignment_filter) 1436 set_sources_assignment_filter(sources_assignment_filter)
1441 } 1437 }
1442 1438
1439 if (is_posix && !is_mac && !is_ios && !is_android && !is_chromeos) {
1440 sources += [ "power_monitor/power_monitor_device_source_posix.cc" ]
1441 }
1442
1443 if (!use_glib) { 1443 if (!use_glib) {
1444 sources -= [ 1444 sources -= [
1445 "message_loop/message_pump_glib.cc", 1445 "message_loop/message_pump_glib.cc",
1446 "message_loop/message_pump_glib.h", 1446 "message_loop/message_pump_glib.h",
1447 ] 1447 ]
1448 } 1448 }
1449 1449
1450 if (is_asan || is_lsan || is_msan || is_tsan) { 1450 if (is_asan || is_lsan || is_msan || is_tsan) {
1451 data += [ "//tools/valgrind/asan/" ] 1451 data += [ "//tools/valgrind/asan/" ]
1452 if (is_win) { 1452 if (is_win) {
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 android_library("base_java_unittest_support") { 2440 android_library("base_java_unittest_support") {
2441 deps = [ 2441 deps = [
2442 ":base_java", 2442 ":base_java",
2443 ] 2443 ]
2444 java_files = [ 2444 java_files = [
2445 "test/android/java/src/org/chromium/base/ContentUriTestUtils.java", 2445 "test/android/java/src/org/chromium/base/ContentUriTestUtils.java",
2446 "test/android/java/src/org/chromium/base/TestSystemMessageHandler.java", 2446 "test/android/java/src/org/chromium/base/TestSystemMessageHandler.java",
2447 ] 2447 ]
2448 } 2448 }
2449 } 2449 }
OLDNEW
« no previous file with comments | « no previous file | base/power_monitor/power_monitor_device_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698