OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 | 6 |
7 if (is_android) { | 7 if (is_android) { |
8 import("//build/config/android/rules.gni") # For generate_jni(). | 8 import("//build/config/android/rules.gni") # For generate_jni(). |
9 } | 9 } |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 if (is_android) { | 34 if (is_android) { |
35 sources += [ | 35 sources += [ |
36 "android/sensors_jni_registrar.cc", | 36 "android/sensors_jni_registrar.cc", |
37 "android/sensors_jni_registrar.h", | 37 "android/sensors_jni_registrar.h", |
38 ] | 38 ] |
39 sources -= [ "platform_sensor_provider_default.cc" ] | 39 sources -= [ "platform_sensor_provider_default.cc" ] |
40 | 40 |
41 deps += [ ":jni_headers" ] | 41 deps += [ ":jni_headers" ] |
42 } | 42 } |
| 43 |
| 44 if (is_chromeos || is_linux) { |
| 45 sources += [ |
| 46 "ambient_light_reader_iio.cc", |
| 47 "ambient_light_reader_iio.h", |
| 48 "platform_sensor_ambient_light_iio.cc", |
| 49 "platform_sensor_ambient_light_iio.h", |
| 50 "platform_sensor_provider_iio.cc", |
| 51 "polling_platform_sensor.cc", |
| 52 "polling_platform_sensor.h", |
| 53 ] |
| 54 |
| 55 sources -= [ "platform_sensor_provider_default.cc" ] |
| 56 } |
43 } | 57 } |
44 | 58 |
45 if (is_android) { | 59 if (is_android) { |
46 device_sensors_jni_sources = [ | 60 device_sensors_jni_sources = [ |
47 "android/java/src/org/chromium/device/sensors/PlatformSensor.java", | 61 "android/java/src/org/chromium/device/sensors/PlatformSensor.java", |
48 "android/java/src/org/chromium/device/sensors/PlatformSensorProvider.java", | 62 "android/java/src/org/chromium/device/sensors/PlatformSensorProvider.java", |
49 ] | 63 ] |
50 | 64 |
51 generate_jni("jni_headers") { | 65 generate_jni("jni_headers") { |
52 sources = device_sensors_jni_sources | 66 sources = device_sensors_jni_sources |
(...skipping 18 matching lines...) Expand all Loading... |
71 "fake_platform_sensor_provider.cc", | 85 "fake_platform_sensor_provider.cc", |
72 "fake_platform_sensor_provider.h", | 86 "fake_platform_sensor_provider.h", |
73 ] | 87 ] |
74 | 88 |
75 public_deps = [ | 89 public_deps = [ |
76 ":generic_sensor", | 90 ":generic_sensor", |
77 "//base", | 91 "//base", |
78 "//device/generic_sensor/public/interfaces", | 92 "//device/generic_sensor/public/interfaces", |
79 ] | 93 ] |
80 } | 94 } |
OLD | NEW |