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

Unified Diff: device/sensors/public/cpp/BUILD.gn

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (Closed)
Patch Set: Rebase Created 3 years, 9 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/sensors/BUILD.gn ('k') | device/sensors/public/cpp/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/sensors/public/cpp/BUILD.gn
diff --git a/device/sensors/public/cpp/BUILD.gn b/device/sensors/public/cpp/BUILD.gn
index 8a930264a446302b95b30574656e0b370640b5a0..a6d0ed87ed603f3430399884f76305352564e53c 100644
--- a/device/sensors/public/cpp/BUILD.gn
+++ b/device/sensors/public/cpp/BUILD.gn
@@ -2,7 +2,35 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-source_set("cpp") {
+# This target contains only those files that are shared by the Device Sensors
+# implementation and all Device Sensors clients, including Blink. Add a file
+# here only if it meets the following constraints:
+# (1) It is *necessary* to use the file to consume Device Sensors (the
+# current files define structs that are used as a consistent interpretation of
+# shared memory by the Device Sensor and its clients).
+# (2) The file has no dependencies on the STL or Chromium code and will not
+# grow them over time (the current files are POD structs and will necessarily
+# stay that way due to their above-described purpose).
+# If a file does not meet these constraints, it cannot be used by the Blink
+# client and should be placed in the "full" target below. Similarly, clients
+# without Blink's constraints should depend on the "full" target below rather
+# than this one.
+# Consult {platform-architecture-dev, services-dev}@chromium.org in the case
+# of any uncertainty.
+source_set("shared_with_blink") {
+ sources = [
+ "motion_data.cc",
+ "motion_data.h",
+ "orientation_data.cc",
+ "orientation_data.h",
+ ]
+ # Do not add deps here per the above comment.
+}
+
+# This target is a superset of the above one that contains additional optional
+# files available to Device Sensors clients. This target may bring in
+# dependencies on the STL and Chromium code.
+source_set("full") {
sources = [
"device_light_data.h",
"device_light_hardware_buffer.h",
@@ -14,7 +42,7 @@ source_set("cpp") {
]
public_deps = [
+ ":shared_with_blink",
"//device/base/synchronization",
- "//third_party/WebKit/public:blink_headers",
]
}
« no previous file with comments | « device/sensors/BUILD.gn ('k') | device/sensors/public/cpp/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698