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

Unified Diff: device/sensors/BUILD.gn

Issue 2646093002: Move //content/browser/device_sensor/ into device/sensors (Closed)
Patch Set: gn format & code rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/BUILD.gn ('k') | device/sensors/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/sensors/BUILD.gn
diff --git a/device/sensors/BUILD.gn b/device/sensors/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..c47c2ef2b520103fbfd762d41dfffc9936307706
--- /dev/null
+++ b/device/sensors/BUILD.gn
@@ -0,0 +1,110 @@
+# Copyright 2017 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")
+
+if (is_android) {
+ import("//build/config/android/rules.gni") # For generate_jni().
+}
+
+component("sensors") {
+ sources = [
+ "ambient_light_mac.cc",
+ "ambient_light_mac.h",
+ "android/device_sensor_jni_registrar.cc",
+ "android/device_sensor_jni_registrar.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_sensor_export.h",
+ "device_sensor_host.cc",
+ "device_sensor_host.h",
+ "device_sensor_service.cc",
+ "device_sensor_service.h",
+ "device_sensors_consts.h",
+ "sensor_manager_android.cc",
+ "sensor_manager_android.h",
+ "sensor_manager_chromeos.cc",
+ "sensor_manager_chromeos.h",
+ ]
+
+ defines = [ "DEVICE_SENSOR_IMPLEMENTATION" ]
+
+ deps = [
+ "//base",
+ "//device/sensors/public/cpp",
+ "//mojo/public/cpp/bindings",
+ ]
+
+ public_deps = [
+ "//device/sensors/public/interfaces",
+ ]
+
+ if (is_win) {
+ sources -= [ "data_fetcher_shared_memory_default.cc" ]
+ libs = [
+ "sensorsapi.lib",
+ "portabledeviceguids.lib",
+ ]
+ }
+ if (is_android) {
+ sources -= [ "data_fetcher_shared_memory_default.cc" ]
+ deps += [ ":device_sensors_jni_headers" ]
+ }
+ if (is_mac) {
+ sources -= [ "data_fetcher_shared_memory_default.cc" ]
+ deps += [ "//third_party/sudden_motion_sensor" ]
+ libs = [
+ "CoreFoundation.framework",
+ "IOKit.framework",
+ ]
+ }
+ if (is_chromeos) {
+ sources -= [ "data_fetcher_shared_memory_default.cc" ]
+ deps += [
+ "//chromeos",
+ "//ui/gfx",
+ ]
+ }
+}
+
+if (is_android) {
+ generate_jni("device_sensors_jni_headers") {
+ sources = [
+ "android/java/src/org/chromium/device/sensors/DeviceSensors.java",
+ ]
+ jni_package = "sensors"
+ }
+
+ android_library("java") {
+ java_files =
+ [ "android/java/src/org/chromium/device/sensors/DeviceSensors.java" ]
+ deps = [
+ "//base:base_java",
+ "//third_party/android_tools:android_support_annotations_java",
+ ]
+ srcjar_deps = [ ":device_sensors_android_java_enums_srcjar" ]
+ }
+
+ android_library("javatests") {
+ testonly = true
+ java_files = [ "android/javatests/src/org/chromium/device/sensors/DeviceSensorsTest.java" ]
+ deps = [
+ ":java",
+ "//third_party/android_support_test_runner:runner_java",
+ ]
+ }
+
+ java_cpp_enum("device_sensors_android_java_enums_srcjar") {
+ sources = [
+ "device_sensors_consts.h",
+ "sensor_manager_android.h",
+ ]
+ }
+}
« no previous file with comments | « device/BUILD.gn ('k') | device/sensors/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698