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 source_set("cpp") { | 5 # This target contains only those files that are shared by the Device Sensors |
| 6 # implementation and all Device Sensors clients, including Blink. Add a file |
| 7 # here only if it meets the following constraints: |
| 8 # (1) It is *necessary* to use the file to consume Device Sensors (the |
| 9 # current files define structs that are used as a consistent interpretation of |
| 10 # shared memory by the Device Sensor and its clients). |
| 11 # (2) The file has no dependencies on the STL or Chromium code and will not |
| 12 # grow them over time (the current files are POD structs and will necessarily |
| 13 # stay that way due to their above-described purpose). |
| 14 # If a file does not meet these constraints, it cannot be used by the Blink |
| 15 # client and should be placed in the "full" target below. Similarly, clients |
| 16 # without Blink's constraints should depend on the "full" target below rather |
| 17 # than this one. |
| 18 # Consult {platform-architecture-dev, services-dev}@chromium.org in the case |
| 19 # of any uncertainty. |
| 20 source_set("shared_with_blink") { |
| 21 sources = [ |
| 22 "motion_data.cc", |
| 23 "motion_data.h", |
| 24 "orientation_data.cc", |
| 25 "orientation_data.h", |
| 26 ] |
| 27 # Do not add deps here per the above comment. |
| 28 } |
| 29 |
| 30 # This target is a superset of the above one that contains additional optional |
| 31 # files available to Device Sensors clients. This target may bring in |
| 32 # dependencies on the STL and Chromium code. |
| 33 source_set("full") { |
6 sources = [ | 34 sources = [ |
7 "device_light_data.h", | 35 "device_light_data.h", |
8 "device_light_hardware_buffer.h", | 36 "device_light_hardware_buffer.h", |
9 "device_motion_hardware_buffer.h", | 37 "device_motion_hardware_buffer.h", |
10 "device_orientation_hardware_buffer.h", | 38 "device_orientation_hardware_buffer.h", |
11 "device_sensors_consts.h", | 39 "device_sensors_consts.h", |
12 "device_util_mac.cc", | 40 "device_util_mac.cc", |
13 "device_util_mac.h", | 41 "device_util_mac.h", |
14 ] | 42 ] |
15 | 43 |
16 public_deps = [ | 44 public_deps = [ |
| 45 ":shared_with_blink", |
17 "//device/base/synchronization", | 46 "//device/base/synchronization", |
18 "//third_party/WebKit/public:blink_headers", | |
19 ] | 47 ] |
20 } | 48 } |
OLD | NEW |