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

Issue 1942663003: [sensors]: Introduce the Generic Sensor API. (Closed)

Created:
4 years, 7 months ago by riju_
Modified:
4 years, 5 months ago
CC:
chromium-reviews, blink-reviews, kinuko+watch, asvitkine+watch_chromium.org, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sensors]: Introduce the Generic Sensor API. The Generic Sensor API defines a framework for exposing sensor data to the Open Web Platform. This CL introduces the IDLs for Sensor* interface and adds the supporting .h|cpp files. The ED for the Generic Sensor API is here - https://w3c.github.io/sensors/ Intent to Implement : https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/TkfdVqYAYiE BUG=606766 Committed: https://crrev.com/ea88054ae4e7cd154177bb23426271fc0d6906ab Cr-Commit-Position: refs/heads/master@{#396707}

Patch Set 1 #

Patch Set 2 : rebase + remove state from global interface listing #

Total comments: 45

Patch Set 3 : Fix Tim's comments #

Patch Set 4 : rebase , m_sensorReading and options are private #

Total comments: 16

Patch Set 5 : Move stuff to Sensor from ALS #

Patch Set 6 : Rebase + add Tim as owner #

Total comments: 35

Patch Set 7 : Fix tim's comments #

Patch Set 8 : re entrancy fix #

Total comments: 6

Patch Set 9 : use postTask #

Total comments: 10

Patch Set 10 : fix final comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+677 lines, -0 lines) Patch
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/EventTargetModulesFactory.in View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 5 chunks +24 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/DEPS View 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/OWNERS View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/Sensor.h View 1 2 3 4 5 6 7 8 9 1 chunk +72 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/modules/sensor/Sensor.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +135 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/Sensor.idl View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h View 1 2 3 4 5 6 7 8 9 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorErrorEvent.idl View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorErrorEventInit.idl View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorOptions.idl View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReading.h View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReading.cpp View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReading.idl View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReadingEvent.h View 1 2 3 4 5 6 7 8 9 1 chunk +62 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReadingEvent.cpp View 1 chunk +47 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReadingEvent.idl View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorReadingEventInit.idl View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/sensor/SensorState.h View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (18 generated)
riju_
Hi Tim, Please take a look.
4 years, 7 months ago (2016-05-04 06:51:59 UTC) #4
timvolodine
Thanks for the patch, I've left some initial comments. I realize some of them are ...
4 years, 7 months ago (2016-05-06 17:04:30 UTC) #5
timvolodine
oh, on a related note: do you have intent to implement on blink-dev for this?
4 years, 7 months ago (2016-05-06 17:07:04 UTC) #6
riju_
On 2016/05/06 17:07:04, timvolodine wrote: > oh, on a related note: do you have intent ...
4 years, 7 months ago (2016-05-12 14:11:51 UTC) #8
riju_
Thanks Tim, Fixed most of the issues, for spec related ones, lets find consensus on ...
4 years, 7 months ago (2016-05-12 14:12:46 UTC) #9
timvolodine
Thanks Riju for following up on the issues, some more comments/questions below https://codereview.chromium.org/1942663003/diff/60001/third_party/WebKit/Source/core/frame/UseCounter.h File third_party/WebKit/Source/core/frame/UseCounter.h ...
4 years, 7 months ago (2016-05-17 17:44:40 UTC) #10
haraken
https://codereview.chromium.org/1942663003/diff/100001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/1942663003/diff/100001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode51 third_party/WebKit/Source/modules/sensor/Sensor.cpp:51: void Sensor::suspend() On 2016/05/17 17:44:39, timvolodine wrote: > if ...
4 years, 7 months ago (2016-05-17 23:42:48 UTC) #12
riju_
Thanks Tim and Haraken for the comments, @Tim : outstanding issue : https://github.com/w3c/sensors/issues/103 Can we ...
4 years, 7 months ago (2016-05-20 11:20:11 UTC) #14
timvolodine
> Can we progress on this CL assuming current spec stays, and when we get ...
4 years, 7 months ago (2016-05-24 15:30:36 UTC) #15
riju_
Thanks Tim for the review. Comments inline. @Ilya : histograms.xml owner. https://codereview.chromium.org/1942663003/diff/60001/third_party/WebKit/Source/core/frame/UseCounter.h File third_party/WebKit/Source/core/frame/UseCounter.h (right): ...
4 years, 7 months ago (2016-05-25 15:07:18 UTC) #18
timvolodine
https://codereview.chromium.org/1942663003/diff/160001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/1942663003/diff/160001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode78 third_party/WebKit/Source/modules/sensor/Sensor.cpp:78: dispatchEvent(Event::create(EventTypeNames::statechange)); On 2016/05/25 15:07:17, riju_ wrote: > On 2016/05/24 ...
4 years, 7 months ago (2016-05-25 15:40:22 UTC) #19
Ilya Sherman
histograms.xml lgtm
4 years, 7 months ago (2016-05-25 17:15:58 UTC) #20
riju_
hi Tim, fixed the re entrancy issue you pointed out. PTAL. https://codereview.chromium.org/1942663003/diff/160001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): ...
4 years, 7 months ago (2016-05-26 13:21:02 UTC) #23
timvolodine
https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode69 third_party/WebKit/Source/modules/sensor/Sensor.cpp:69: updateState(SensorState::Active); is this correct? startUpdating is async, so it ...
4 years, 7 months ago (2016-05-26 15:49:02 UTC) #24
riju_
thanks tim, postTasked now. https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode69 third_party/WebKit/Source/modules/sensor/Sensor.cpp:69: updateState(SensorState::Active); On 2016/05/26 15:49:01, timvolodine ...
4 years, 7 months ago (2016-05-26 17:32:21 UTC) #25
timvolodine
lgtm % comments https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode69 third_party/WebKit/Source/modules/sensor/Sensor.cpp:69: updateState(SensorState::Active); On 2016/05/26 17:32:21, riju_ wrote: ...
4 years, 6 months ago (2016-05-27 18:40:57 UTC) #26
haraken
In terms of implementation, LGTM. https://codereview.chromium.org/1942663003/diff/280001/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h File third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h (right): https://codereview.chromium.org/1942663003/diff/280001/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h#newcode41 third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h:41: SensorErrorEvent(const AtomicString& eventType); Add ...
4 years, 6 months ago (2016-05-28 00:09:23 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942663003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942663003/320001
4 years, 6 months ago (2016-05-30 08:28:10 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-30 10:08:28 UTC) #32
riju_
Thanks Tim and haraken. https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp File third_party/WebKit/Source/modules/sensor/Sensor.cpp (right): https://codereview.chromium.org/1942663003/diff/260001/third_party/WebKit/Source/modules/sensor/Sensor.cpp#newcode69 third_party/WebKit/Source/modules/sensor/Sensor.cpp:69: updateState(SensorState::Active); On 2016/05/27 18:40:57, timvolodine ...
4 years, 6 months ago (2016-05-30 10:15:14 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942663003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942663003/320001
4 years, 6 months ago (2016-05-30 10:15:38 UTC) #36
commit-bot: I haz the power
Committed patchset #10 (id:320001)
4 years, 6 months ago (2016-05-30 10:19:46 UTC) #38
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/ea88054ae4e7cd154177bb23426271fc0d6906ab Cr-Commit-Position: refs/heads/master@{#396707}
4 years, 6 months ago (2016-05-30 10:21:41 UTC) #40
timvolodine
On 2016/05/30 10:21:41, commit-bot: I haz the power wrote: > Patchset 10 (id:??) landed as ...
4 years, 6 months ago (2016-05-31 13:59:49 UTC) #41
haraken
On 2016/05/31 13:59:49, timvolodine wrote: > On 2016/05/30 10:21:41, commit-bot: I haz the power wrote: ...
4 years, 6 months ago (2016-05-31 14:35:03 UTC) #42
timvolodine
On 2016/05/31 14:35:03, haraken wrote: > On 2016/05/31 13:59:49, timvolodine wrote: > > On 2016/05/30 ...
4 years, 6 months ago (2016-05-31 14:39:51 UTC) #43
sof
4 years, 5 months ago (2016-06-27 09:31:00 UTC) #45
Message was sent while issue was closed.
Just something noticed while looking over other code details.

https://codereview.chromium.org/1942663003/diff/320001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/sensor/Sensor.h (right):

https://codereview.chromium.org/1942663003/diff/320001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/sensor/Sensor.h:29: , public
PlatformEventController {
Where are the implementations of the pure virtual methods that
PlatformEventController declares?

Powered by Google App Engine
This is Rietveld 408576698