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

Issue 2323683002: [Sensors] Implement sensor data polling (Closed)

Created:
4 years, 3 months ago by Mikhail
Modified:
4 years, 3 months ago
Reviewers:
haraken, timvolodine
CC:
chromium-reviews, blink-reviews, shalamov
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sensors] Implement sensor data polling This patch contains implementations of SensorPollingStrategy interface, defining when sensor reading is updated from shared buffer. Also it contains logic for Suspend/Resume mojo API calls based on the page visibility. For this purpose 'SensorProxy' inherits 'PageVisibilityObserver'. Specification: https://w3c.github.io/sensors BUG=606766 Committed: https://crrev.com/ed85e05c4b6872a9f595e56120d61db4dd35a6bc Cr-Commit-Position: refs/heads/master@{#417541}

Patch Set 1 #

Total comments: 5

Patch Set 2 : No extra PageVisibilityObservers #

Total comments: 6

Patch Set 3 : Applied Tim's suggestions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -8 lines) Patch
M third_party/WebKit/Source/modules/sensor/Sensor.cpp View 1 2 2 chunks +11 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.h View 1 2 2 chunks +13 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp View 1 2 1 chunk +98 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/sensor/SensorProxy.cpp View 1 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (22 generated)
Mikhail
PTAL
4 years, 3 months ago (2016-09-08 09:59:10 UTC) #9
haraken
https://codereview.chromium.org/2323683002/diff/1/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp File third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp (right): https://codereview.chromium.org/2323683002/diff/1/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp#newcode55 third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp:55: SensorProxy* sensor = new SensorProxy(type, m_frame->page(), this); How is ...
4 years, 3 months ago (2016-09-08 11:07:13 UTC) #10
Mikhail
https://codereview.chromium.org/2323683002/diff/1/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp File third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp (right): https://codereview.chromium.org/2323683002/diff/1/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp#newcode55 third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp:55: SensorProxy* sensor = new SensorProxy(type, m_frame->page(), this); On 2016/09/08 ...
4 years, 3 months ago (2016-09-08 11:24:48 UTC) #13
Mikhail
In the latest patch Sensor instance invokes SensorProxy::suspend()/resume() methods from its 'pageVisibilityChanged' override. In order ...
4 years, 3 months ago (2016-09-08 12:35:30 UTC) #16
haraken
In terms of implementation, LGTM
4 years, 3 months ago (2016-09-08 13:18:44 UTC) #17
timvolodine
also lgtm, with a few suggestions https://codereview.chromium.org/2323683002/diff/20001/third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp File third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp (right): https://codereview.chromium.org/2323683002/diff/20001/third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp#newcode16 third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp:16: DCHECK(m_frequency); DCHECK(m_frequency > ...
4 years, 3 months ago (2016-09-08 17:02:06 UTC) #20
timvolodine
Additionally you could consider some tests for the SensorPollingStrategy at some point since it contains ...
4 years, 3 months ago (2016-09-08 17:06:45 UTC) #21
Mikhail
thanks for the suggestions https://codereview.chromium.org/2323683002/diff/20001/third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp File third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp (right): https://codereview.chromium.org/2323683002/diff/20001/third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp#newcode16 third_party/WebKit/Source/modules/sensor/SensorPollingStrategy.cpp:16: DCHECK(m_frequency); On 2016/09/08 17:02:06, timvolodine ...
4 years, 3 months ago (2016-09-08 19:03:19 UTC) #24
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/2323683002/40001
4 years, 3 months ago (2016-09-09 09:13:32 UTC) #29
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-09 09:16:50 UTC) #31
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 09:18:25 UTC) #33
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ed85e05c4b6872a9f595e56120d61db4dd35a6bc
Cr-Commit-Position: refs/heads/master@{#417541}

Powered by Google App Engine
This is Rietveld 408576698