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

Issue 286793002: [DeviceLight] Add renderer+common parts (Closed)

Created:
6 years, 7 months ago by riju_
Modified:
6 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, Michael van Ouwerkerk, riju_, timvolodine
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[DeviceLight] Add renderer+common parts Adding the Renderer and Common part in the content side for the DeviceLight API. Add Unit tests for deviceLight pump Add DeviceLight support in renderer_webkitplatformsupport_impl.h|cc The default polling time interval of DeviceLightEventPump is right now set as of 200 milliseconds. (device motion/orientation = 50ms) In Firefox (Android) implementation, DeviceLight's frequency of update is set as SensorManager.SENSOR_DELAY_NORMAL which in Android parlance translates to 200 milliseconds delay which is 5 times a second. Ofcourse the delay is only a suggested delay, system typically uses a smaller delay. BUG=336424 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=280306

Patch Set 1 #

Patch Set 2 : Rebased #

Total comments: 1

Patch Set 3 : Address Tim's comments #

Total comments: 16

Patch Set 4 : Fix Tim's comments #

Patch Set 5 : Try fixing for windows build #

Total comments: 13

Patch Set 6 : Work on Tim's comments #

Total comments: 21

Patch Set 7 : fix jochen's comments #

Total comments: 4

Patch Set 8 : POD class should be struct #

Patch Set 9 : dcheng's comments #

Total comments: 2

Patch Set 10 : remove valueIsUpdated #

Total comments: 10

Patch Set 11 : Fix dcheng's + Tim's comments #

Patch Set 12 : rebase #

Total comments: 8

Patch Set 13 : jochen's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -12 lines) Patch
M content/common/content_message_generator.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A content/common/device_sensors/device_light_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +23 lines, -0 lines 0 comments Download
A content/common/device_sensors/device_light_hardware_buffer.h View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
A + content/common/device_sensors/device_light_messages.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -11 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A content/renderer/device_sensors/device_light_event_pump.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +51 lines, -0 lines 0 comments Download
A content/renderer/device_sensors/device_light_event_pump.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +74 lines, -0 lines 0 comments Download
A content/renderer/device_sensors/device_light_event_pump_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +142 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +30 lines, -1 line 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
riju_
Hi Tim, I have split the monolithic CL [1]. This is the renderer+common part. Last ...
6 years, 7 months ago (2014-05-14 15:16:12 UTC) #1
timvolodine
yes I think we could use 200ms delay for the pump, maybe even less it ...
6 years, 7 months ago (2014-05-21 18:24:12 UTC) #2
riju_
Hi Tim : Please have a look.
6 years, 6 months ago (2014-06-02 15:33:15 UTC) #3
timvolodine
https://codereview.chromium.org/286793002/diff/40001/content/common/device_sensors/device_light_data.h File content/common/device_sensors/device_light_data.h (right): https://codereview.chromium.org/286793002/diff/40001/content/common/device_sensors/device_light_data.h#newcode13 content/common/device_sensors/device_light_data.h:13: memset(this, 0, sizeof(*this)); I would not inline and create ...
6 years, 6 months ago (2014-06-03 16:08:11 UTC) #4
riju_
hi Tim, forward declaration of DeviceLightData class in device_light_event_pump.h did not work for Windows build, ...
6 years, 6 months ago (2014-06-05 19:50:01 UTC) #5
timvolodine
just a few more comments, looks good for the rest.. https://codereview.chromium.org/286793002/diff/120001/content/common/device_sensors/device_light_hardware_buffer.h File content/common/device_sensors/device_light_hardware_buffer.h (right): https://codereview.chromium.org/286793002/diff/120001/content/common/device_sensors/device_light_hardware_buffer.h#newcode13 ...
6 years, 6 months ago (2014-06-11 15:30:07 UTC) #6
riju_
hi Tim, thanks for the comments. PTAL. https://codereview.chromium.org/286793002/diff/120001/content/common/device_sensors/device_light_hardware_buffer.h File content/common/device_sensors/device_light_hardware_buffer.h (right): https://codereview.chromium.org/286793002/diff/120001/content/common/device_sensors/device_light_hardware_buffer.h#newcode13 content/common/device_sensors/device_light_hardware_buffer.h:13: typedef SharedMemorySeqLockBuffer<DeviceLightData> ...
6 years, 6 months ago (2014-06-12 10:34:22 UTC) #7
riju_
+dcheng: ipc + content/common/*_message* +jochen: content owner
6 years, 6 months ago (2014-06-12 12:48:46 UTC) #8
jochen (gone - plz use gerrit)
how will you write layout tests for this? https://codereview.chromium.org/286793002/diff/140001/content/common/device_sensors/device_light_data.cc File content/common/device_sensors/device_light_data.cc (right): https://codereview.chromium.org/286793002/diff/140001/content/common/device_sensors/device_light_data.cc#newcode13 content/common/device_sensors/device_light_data.cc:13: memset(this, ...
6 years, 6 months ago (2014-06-12 14:33:51 UTC) #9
timvolodine
https://codereview.chromium.org/286793002/diff/120001/content/renderer/renderer_webkitplatformsupport_impl.cc File content/renderer/renderer_webkitplatformsupport_impl.cc (right): https://codereview.chromium.org/286793002/diff/120001/content/renderer/renderer_webkitplatformsupport_impl.cc#newcode151 content/renderer/renderer_webkitplatformsupport_impl.cc:151: double g_test_device_light_data; On 2014/06/12 10:34:22, riju_ wrote: > On ...
6 years, 6 months ago (2014-06-12 15:17:28 UTC) #10
timvolodine
https://codereview.chromium.org/286793002/diff/140001/content/common/device_sensors/device_light_data.h File content/common/device_sensors/device_light_data.h (right): https://codereview.chromium.org/286793002/diff/140001/content/common/device_sensors/device_light_data.h#newcode17 content/common/device_sensors/device_light_data.h:17: double value; On 2014/06/12 14:33:50, jochen traveling until Jun ...
6 years, 6 months ago (2014-06-12 15:25:28 UTC) #11
jochen (gone - plz use gerrit)
On 2014/06/12 15:17:28, timvolodine wrote: > https://codereview.chromium.org/286793002/diff/120001/content/renderer/renderer_webkitplatformsupport_impl.cc > File content/renderer/renderer_webkitplatformsupport_impl.cc (right): > > https://codereview.chromium.org/286793002/diff/120001/content/renderer/renderer_webkitplatformsupport_impl.cc#newcode151 > ...
6 years, 6 months ago (2014-06-13 16:07:11 UTC) #12
jochen (gone - plz use gerrit)
On 2014/06/13 16:07:11, jochen traveling until Jun 23 wrote: > On 2014/06/12 15:17:28, timvolodine wrote: ...
6 years, 6 months ago (2014-06-13 16:09:44 UTC) #13
dcheng
https://codereview.chromium.org/286793002/diff/160001/content/common/device_sensors/device_light_messages.h File content/common/device_sensors/device_light_messages.h (right): https://codereview.chromium.org/286793002/diff/160001/content/common/device_sensors/device_light_messages.h#newcode23 content/common/device_sensors/device_light_messages.h:23: base::SharedMemoryHandle /* handle */) Why use a shared memory ...
6 years, 6 months ago (2014-06-13 17:01:35 UTC) #14
riju_
hi jochen, thanks for the comments. just for context: [part 1] This CL. [part 2] ...
6 years, 6 months ago (2014-06-13 17:06:26 UTC) #15
riju_
https://codereview.chromium.org/286793002/diff/160001/content/common/device_sensors/device_light_messages.h File content/common/device_sensors/device_light_messages.h (right): https://codereview.chromium.org/286793002/diff/160001/content/common/device_sensors/device_light_messages.h#newcode23 content/common/device_sensors/device_light_messages.h:23: base::SharedMemoryHandle /* handle */) On 2014/06/13 17:01:34, dcheng wrote: ...
6 years, 6 months ago (2014-06-16 09:31:51 UTC) #16
riju_
https://codereview.chromium.org/286793002/diff/160001/content/renderer/renderer_webkitplatformsupport_impl.cc File content/renderer/renderer_webkitplatformsupport_impl.cc (right): https://codereview.chromium.org/286793002/diff/160001/content/renderer/renderer_webkitplatformsupport_impl.cc#newcode1097 content/renderer/renderer_webkitplatformsupport_impl.cc:1097: if (g_test_device_light_data == -1) { On 2014/06/13 17:01:34, dcheng ...
6 years, 6 months ago (2014-06-16 10:46:30 UTC) #17
dcheng
On 2014/06/16 at 09:31:51, rijubrata.bhaumik wrote: > https://codereview.chromium.org/286793002/diff/160001/content/common/device_sensors/device_light_messages.h > File content/common/device_sensors/device_light_messages.h (right): > > https://codereview.chromium.org/286793002/diff/160001/content/common/device_sensors/device_light_messages.h#newcode23 ...
6 years, 6 months ago (2014-06-16 17:14:08 UTC) #18
riju_
https://codereview.chromium.org/286793002/diff/220001/content/common/device_sensors/device_light_data.h File content/common/device_sensors/device_light_data.h (right): https://codereview.chromium.org/286793002/diff/220001/content/common/device_sensors/device_light_data.h#newcode20 content/common/device_sensors/device_light_data.h:20: bool valueIsUpdated; On 2014/06/16 17:14:08, dcheng wrote: > I ...
6 years, 6 months ago (2014-06-18 09:26:01 UTC) #19
dcheng
LGTM with nits addressed https://codereview.chromium.org/286793002/diff/240001/content/renderer/device_sensors/device_light_event_pump.cc File content/renderer/device_sensors/device_light_event_pump.cc (right): https://codereview.chromium.org/286793002/diff/240001/content/renderer/device_sensors/device_light_event_pump.cc#newcode16 content/renderer/device_sensors/device_light_event_pump.cc:16: : DeviceSensorEventPump(kDefaultLightPumpDelayMillis), Not for this ...
6 years, 6 months ago (2014-06-18 16:51:19 UTC) #20
timvolodine
https://codereview.chromium.org/286793002/diff/240001/content/renderer/device_sensors/device_light_event_pump.cc File content/renderer/device_sensors/device_light_event_pump.cc (right): https://codereview.chromium.org/286793002/diff/240001/content/renderer/device_sensors/device_light_event_pump.cc#newcode18 content/renderer/device_sensors/device_light_event_pump.cc:18: last_seen_data_(-1) { you probably also want to set to ...
6 years, 6 months ago (2014-06-18 17:38:36 UTC) #21
riju_
https://codereview.chromium.org/286793002/diff/240001/content/renderer/device_sensors/device_light_event_pump.cc File content/renderer/device_sensors/device_light_event_pump.cc (right): https://codereview.chromium.org/286793002/diff/240001/content/renderer/device_sensors/device_light_event_pump.cc#newcode16 content/renderer/device_sensors/device_light_event_pump.cc:16: : DeviceSensorEventPump(kDefaultLightPumpDelayMillis), On 2014/06/18 16:51:19, dcheng wrote: > Not ...
6 years, 6 months ago (2014-06-19 13:15:54 UTC) #22
timvolodine
lgtm thanks!
6 years, 6 months ago (2014-06-19 13:58:30 UTC) #23
riju_
jochen : friendly ping. any further comments for this CL ?
6 years, 6 months ago (2014-06-25 11:50:51 UTC) #24
jochen (gone - plz use gerrit)
https://codereview.chromium.org/286793002/diff/280001/content/common/device_sensors/device_light_data.h File content/common/device_sensors/device_light_data.h (right): https://codereview.chromium.org/286793002/diff/280001/content/common/device_sensors/device_light_data.h#newcode17 content/common/device_sensors/device_light_data.h:17: CONTENT_EXPORT DeviceLightData() : value(-1) {} no need for content ...
6 years, 6 months ago (2014-06-25 13:16:11 UTC) #25
riju_
https://codereview.chromium.org/286793002/diff/280001/content/common/device_sensors/device_light_data.h File content/common/device_sensors/device_light_data.h (right): https://codereview.chromium.org/286793002/diff/280001/content/common/device_sensors/device_light_data.h#newcode17 content/common/device_sensors/device_light_data.h:17: CONTENT_EXPORT DeviceLightData() : value(-1) {} On 2014/06/25 13:16:11, jochen ...
6 years, 6 months ago (2014-06-25 15:53:11 UTC) #26
jochen (gone - plz use gerrit)
lgtm
6 years, 6 months ago (2014-06-26 14:59:38 UTC) #27
riju_
The CQ bit was checked by rijubrata.bhaumik@intel.com
6 years, 5 months ago (2014-06-27 08:14:15 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rijubrata.bhaumik@intel.com/286793002/300001
6 years, 5 months ago (2014-06-27 08:15:47 UTC) #29
commit-bot: I haz the power
6 years, 5 months ago (2014-06-27 11:51:24 UTC) #30
Message was sent while issue was closed.
Change committed as 280306

Powered by Google App Engine
This is Rietveld 408576698