Index: device/device_sensors/BUILD.gn |
diff --git a/device/device_sensors/BUILD.gn b/device/device_sensors/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..db2566258f0b75d83bc49c1569206cba80327458 |
--- /dev/null |
+++ b/device/device_sensors/BUILD.gn |
@@ -0,0 +1,92 @@ |
+# Copyright 2015 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/features.gni") |
+import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") |
+ |
+component("device_sensors") { |
+ output_name = "device_device_sensors" |
+ sources = [ |
+ "ambient_light_mac.cc", |
+ "ambient_light_mac.h", |
+ "data_fetcher_shared_memory.h", |
+ "data_fetcher_shared_memory_android.cc", |
+ "data_fetcher_shared_memory_base.cc", |
+ "data_fetcher_shared_memory_base.h", |
+ "data_fetcher_shared_memory_chromeos.cc", |
+ "data_fetcher_shared_memory_default.cc", |
+ "data_fetcher_shared_memory_mac.cc", |
+ "data_fetcher_shared_memory_win.cc", |
+ "device_inertial_sensor_service.cc", |
+ "device_inertial_sensor_service.h", |
+ "device_light_data.h", |
+ "device_light_hardware_buffer.h", |
+ "device_motion_hardware_buffer.h", |
+ "device_orientation_hardware_buffer.h", |
+ "device_sensors_export.h", |
+ "device_sensors_light_impl.cc", |
+ "device_sensors_light_impl.h", |
+ "device_sensors_motion_impl.cc", |
+ "device_sensors_motion_impl.h", |
+ "device_sensors_orientation_impl.cc", |
+ "device_sensors_orientation_impl.h", |
+ "inertial_sensor_consts.h", |
+ "sensor_manager_android.cc", |
+ "sensor_manager_android.h", |
+ "sensor_manager_chromeos.cc", |
+ "sensor_manager_chromeos.h", |
+ ] |
+ |
+ defines = [ "DEVICE_SENSORS_IMPLEMENTATION" ] |
+ |
+ deps = [ |
+ ":mojo_bindings", |
+ "//base", |
+ "//base/third_party/dynamic_annotations", |
+ "//components/shared_memory_seqlock", |
+ "//mojo/environment:chromium", |
+ "//third_party/WebKit/public:blink_headers", |
+ ] |
+ |
+ if (is_chromeos) { |
+ deps += [ |
+ "//chromeos:chromeos", |
+ ] |
+ sources += [ |
+ "data_fetcher_shared_memory_default.cc", |
+ ] |
+ } |
+ |
+ if (is_mac) { |
+ sources -= [ "data_fetcher_shared_memory_default.cc" ] |
+ deps += [ "//third_party/sudden_motion_sensor" ] |
+ } |
+ |
+ if (is_win) { |
+ sources -= [ "data_fetcher_shared_memory_default.cc" ] |
+ } |
+} |
+ |
+source_set("mojo_bindings") { |
+ sources = [ |
+ "type_converters.cc", |
+ "type_converters.h", |
+ ] |
+ |
+ public_deps = [ |
+ ":mojom_bindings", |
+ ] |
+ |
+ deps = [ |
+ "//base", |
+ "//third_party/mojo/src/mojo/public/cpp/bindings", |
+ "//third_party/mojo/src/mojo/edk/system", |
+ ] |
+} |
+ |
+mojom("mojom_bindings") { |
+ sources = [ |
+ "device_sensors.mojom", |
+ ] |
+} |