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

Issue 2480773002: Reland of [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)

Created:
4 years, 1 month ago by maksims (do not use this acc)
Modified:
4 years, 1 month ago
CC:
chromium-reviews, jam, creis+watch_chromium.org, nasko+codewatch_chromium.org, darin-cc_chromium.org, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of [sensors] Ambient light sensor implementation for ChromeOS and Linux. The patch introduces sensors implementation for ChromeOS/Linux platforms using ambient light sensor. Both platforms share the same code and require polling threads to be used. SensorDataIio structure is used to initialize a generic SensorReader, which is created only when sensor read files are found, and to create a concrete sensor, which takes an ownership of the SensorReader. A SensorReader must always be created on a polling thread, which is further used by a sensor to poll data. Each new sensor will have its own thread in order to avoid blocking of each other. As a temp solution to manage polling threads, which are not passed to new sensors, a manager thread is used. It kills a polling thread if a sensor cannot be created. In the future, the manager thread will evolve to a manager class that will manage finding new sensors attached to a system and notify a provider about that. The provider will have its own cache in order to avoid trying to find sensors each time after it fails to find a requested sensor. Once the manager notifies the provider about a new sensor, the provider updates its cache and starts to process requests for that type of sensor. Intent to Implement: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/TkfdVqYAYiE/xLGN2b1-AAAJ The first patchset is a last reverted patch. The second one provides a fix to reland the code. reverted cl: https://codereview.chromium.org/2370343002/ BUG=606766 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/c0876ac8f8439dc4511f4172bc4856d2358e9f67 Cr-Commit-Position: refs/heads/master@{#430049}

Patch Set 1 : rebased #

Patch Set 2 : fix for reland #

Total comments: 1

Patch Set 3 : remove parenthesis #

Unified diffs Side-by-side diffs Delta from patch set Stats (+889 lines, -10 lines) Patch
M chrome/browser/about_flags.cc View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M device/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M device/generic_sensor/BUILD.gn View 2 chunks +11 lines, -1 line 0 comments Download
A device/generic_sensor/linux/platform_sensor_utils_linux.h View 1 chunk +43 lines, -0 lines 0 comments Download
A device/generic_sensor/linux/platform_sensor_utils_linux.cc View 1 chunk +94 lines, -0 lines 0 comments Download
A device/generic_sensor/linux/sensor_data_linux.h View 1 chunk +38 lines, -0 lines 0 comments Download
A device/generic_sensor/linux/sensor_data_linux.cc View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
A device/generic_sensor/linux/sensor_reader_unittest.cc View 1 chunk +260 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_linux.h View 1 chunk +75 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_linux.cc View 1 chunk +114 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider_base.h View 1 chunk +5 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_provider_linux.h View 1 chunk +75 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_provider_linux.cc View 1 chunk +102 lines, -0 lines 0 comments Download
M device/generic_sensor/sensor_provider_impl.h View 1 chunk +3 lines, -1 line 0 comments Download
M device/generic_sensor/sensor_provider_impl.cc View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 20 (13 generated)
maksims (do not use this acc)
Please review changes to reland the generic sensor implementation for CrOS/Linux with ambient light.
4 years, 1 month ago (2016-11-04 16:13:49 UTC) #8
Reilly Grant (use Gerrit)
lgtm with nit https://codereview.chromium.org/2480773002/diff/40001/device/generic_sensor/linux/sensor_data_linux.cc File device/generic_sensor/linux/sensor_data_linux.cc (right): https://codereview.chromium.org/2480773002/diff/40001/device/generic_sensor/linux/sensor_data_linux.cc#newcode20 device/generic_sensor/linux/sensor_data_linux.cc:20: "in_illuminance_raw"}); The parenthesis here are unnecessary.
4 years, 1 month ago (2016-11-04 17:00:12 UTC) #9
Mikhail
lgtm
4 years, 1 month ago (2016-11-04 19:28:35 UTC) #12
alexmos
frame_host LGTM
4 years, 1 month ago (2016-11-04 20:12:37 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2480773002/60001
4 years, 1 month ago (2016-11-04 21:03:27 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 1 month ago (2016-11-04 22:54:41 UTC) #18
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 22:57:40 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/c0876ac8f8439dc4511f4172bc4856d2358e9f67
Cr-Commit-Position: refs/heads/master@{#430049}

Powered by Google App Engine
This is Rietveld 408576698