New issue
Advanced search Search tips

Issue 721427 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocked on:
issue 795286
issue 733707
issue 798409

Blocking:
issue 224849
issue 612322


Participants' hotlists:
Sensors


Sign in to add a comment

Refactor //content/renderer/device_sensors/ to depend on //device/generic_sensor/ instead of //device/sensors/

Project Member Reported by juncai@chromium.org, May 11 2017

Issue description

The //device/generic_sensor/ already provides almost all of the sensors needed to implement DeviceOrientation Event, DeviceOrientationAbsolute Event, and DeviceMotion Event (https://www.w3.org/TR/orientation-event/). So //content/renderer/device_sensors can be refactored to depend on //device/generic_sensor, and //device/sensors/ can be removed. Some steps are listed as following:
1. Add RELATIVE_ORIENTATION sensor type to //device/generic_sensor/
2. Refactor DeviceMotionEventPump and DeviceOrientationEventPump
 

Comment 1 by juncai@chromium.org, May 11 2017

Components: Blink>Sensor
Components: -Blink>Sensor Blink>Sensor>DeviceOrientation
Project Member

Comment 3 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52b6764cf200aea49a5c09e221eb612394aabba7

commit 52b6764cf200aea49a5c09e221eb612394aabba7
Author: juncai <juncai@chromium.org>
Date: Sat May 13 01:45:05 2017

[Device Service] Add RELATIVE_ORIENTATION sensor type to //device/generic_sensor

This is one of the CLs that make //content/renderer/device_sensors
depend on //device/generic_sensor/public instead of
//device/sensors/public. In order to do that, //device/generic_sensor
needs to support RELATIVE_ORIENTATION sensor type since it is used by
device orientation event.

This CL adds RELATIVE_ORIENTATION sensor implementation on Android to
//device/generic_sensor.

BUG= 721427 

Review-Url: https://codereview.chromium.org/2847253002
Cr-Commit-Position: refs/heads/master@{#471533}

[modify] https://crrev.com/52b6764cf200aea49a5c09e221eb612394aabba7/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorProvider.java
[modify] https://crrev.com/52b6764cf200aea49a5c09e221eb612394aabba7/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java
[modify] https://crrev.com/52b6764cf200aea49a5c09e221eb612394aabba7/device/generic_sensor/platform_sensor_provider_unittest.cc
[modify] https://crrev.com/52b6764cf200aea49a5c09e221eb612394aabba7/device/generic_sensor/public/cpp/sensor_reading.h
[modify] https://crrev.com/52b6764cf200aea49a5c09e221eb612394aabba7/device/generic_sensor/public/interfaces/sensor.mojom

Project Member

Comment 4 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94de540ef9694dd6d2680dc6da1375e982d7577e

commit 94de540ef9694dd6d2680dc6da1375e982d7577e
Author: juncai <juncai@chromium.org>
Date: Sat May 13 05:45:37 2017

[Device Service] Add ACCELEROMETER implementation on Mac to //device/generic_sensor

At //device/sensors, DeviceOrientation Event is implemented on Mac using
sudden motion sensor, and it is a kind of ACCELEROMETER. And
//device/generic_sensor has ACCELEROMETER sensor type, but the Mac
implementation is missing. In order to make //content/renderer/device_sensors
depend on //device/generic_sensor instead of //device/sensors, this CL adds
ACCELEROMETER sensor implementation to //device/generic_sensor on Mac.

BUG= 721427 ,  718460 

Review-Url: https://codereview.chromium.org/2880743003
Cr-Commit-Position: refs/heads/master@{#471567}

[modify] https://crrev.com/94de540ef9694dd6d2680dc6da1375e982d7577e/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/94de540ef9694dd6d2680dc6da1375e982d7577e/device/generic_sensor/DEPS
[add] https://crrev.com/94de540ef9694dd6d2680dc6da1375e982d7577e/device/generic_sensor/platform_sensor_accelerometer_mac.cc
[add] https://crrev.com/94de540ef9694dd6d2680dc6da1375e982d7577e/device/generic_sensor/platform_sensor_accelerometer_mac.h
[modify] https://crrev.com/94de540ef9694dd6d2680dc6da1375e982d7577e/device/generic_sensor/platform_sensor_provider_mac.cc

A related design doc to refactor //device/generic_sensor is at:
https://docs.google.com/document/d/1J6_frvCxmhf_oZIjKngFQmerYnsZ-ZRP3HL6Shm4gH8/edit
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cfe1d9c8f0f922771e19eb5d2566215b6e47371c

commit cfe1d9c8f0f922771e19eb5d2566215b6e47371c
Author: juncai <juncai@chromium.org>
Date: Tue Jun 13 18:39:04 2017

Add |notify_client_on_reading_change| flag to sensor configuration

This is a CL following the discussion from:
https://codereview.chromium.org/2896583005/diff/180001/content/renderer/device_sensors/device_motion_event_pump.cc

When the sensor client sets its own timer to read the shared memory,
and the sensor reporting mode is ON_CHANGE, the sensor client gets
unnecessary high frequency SensorClient::SensorReadingChanged() mojo
IPC calls. This CL adds a |notify_client_on_reading_change| flag to
sensor configuration to fix it.

BUG= 721427 

Review-Url: https://codereview.chromium.org/2927263002
Cr-Commit-Position: refs/heads/master@{#479074}

[modify] https://crrev.com/cfe1d9c8f0f922771e19eb5d2566215b6e47371c/device/generic_sensor/public/cpp/platform_sensor_configuration.h
[modify] https://crrev.com/cfe1d9c8f0f922771e19eb5d2566215b6e47371c/device/generic_sensor/public/cpp/sensor_struct_traits.cc
[modify] https://crrev.com/cfe1d9c8f0f922771e19eb5d2566215b6e47371c/device/generic_sensor/public/cpp/sensor_struct_traits.h
[modify] https://crrev.com/cfe1d9c8f0f922771e19eb5d2566215b6e47371c/device/generic_sensor/public/interfaces/sensor.mojom
[modify] https://crrev.com/cfe1d9c8f0f922771e19eb5d2566215b6e47371c/device/generic_sensor/sensor_impl.cc
[modify] https://crrev.com/cfe1d9c8f0f922771e19eb5d2566215b6e47371c/device/generic_sensor/sensor_impl.h

Comment 8 by juncai@chromium.org, Jun 15 2017

Labels: -Type-Bug Type-Feature

Comment 9 by juncai@chromium.org, Jun 15 2017

Blockedon: 733707
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/687e6a76c9d634404eb93643ab900596a77958fd

commit 687e6a76c9d634404eb93643ab900596a77958fd
Author: juncai <juncai@chromium.org>
Date: Tue Jun 20 20:25:43 2017

Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors

//device/generic_sensors already has all the sensors that can be used
to implement the DeviceOrientation event:
https://w3c.github.io/deviceorientation/spec-source-orientation.html

Currently, //content/renderer/device_sensors uses sensors from
//device/sensors as its backend, and this is one of the CLs that refactor
//content/renderer/device_sensors to use sensors from
//device/generic_sensor as the backend and removes //device/sensors.

This CL refactors DeviceMotionEvent to use sensors from //device/generic_sensor.

The issue page contains the design doc link for this change.

BUG= 721427 

Review-Url: https://codereview.chromium.org/2896583005
Cr-Commit-Position: refs/heads/master@{#480934}

[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/renderer/BUILD.gn
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/renderer/DEPS
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/test/BUILD.gn
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/test/DEPS
[add] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/device/generic_sensor/DEPS
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/device/generic_sensor/sensor_provider_impl.cc
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/services/device/device_service.cc
[modify] https://crrev.com/687e6a76c9d634404eb93643ab900596a77958fd/services/device/device_service.h

Project Member

Comment 11 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c7808a0bbdcae8ee38267ecebd008c9d501af057

commit c7808a0bbdcae8ee38267ecebd008c9d501af057
Author: juncai <juncai@chromium.org>
Date: Thu Jun 22 17:59:36 2017

Revert of Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors (patchset #13 id:240001 of https://codereview.chromium.org/2896583005/ )

Reason for revert:
Need to figure out some issues related to this CL on Android and Mac.

Original issue's description:
> Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors
>
> //device/generic_sensors already has all the sensors that can be used
> to implement the DeviceOrientation event:
> https://w3c.github.io/deviceorientation/spec-source-orientation.html
>
> Currently, //content/renderer/device_sensors uses sensors from
> //device/sensors as its backend, and this is one of the CLs that refactor
> //content/renderer/device_sensors to use sensors from
> //device/generic_sensor as the backend and removes //device/sensors.
>
> This CL refactors DeviceMotionEvent to use sensors from //device/generic_sensor.
>
> The issue page contains the design doc link for this change.
>
> BUG= 721427 
>
> Review-Url: https://codereview.chromium.org/2896583005
> Cr-Commit-Position: refs/heads/master@{#480934}
> Committed: https://chromium.googlesource.com/chromium/src/+/687e6a76c9d634404eb93643ab900596a77958fd

TBR=reillyg@chromium.org,timvolodine@chromium.org,jam@chromium.org,scheib@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 721427 

Review-Url: https://codereview.chromium.org/2948253002
Cr-Commit-Position: refs/heads/master@{#481599}

[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/renderer/BUILD.gn
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/renderer/DEPS
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/test/BUILD.gn
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/test/DEPS
[delete] https://crrev.com/002beb1467025c68b055d5a726e537adb5ded4d6/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/device/generic_sensor/DEPS
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/device/generic_sensor/sensor_provider_impl.cc
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/services/device/device_service.cc
[modify] https://crrev.com/c7808a0bbdcae8ee38267ecebd008c9d501af057/services/device/device_service.h

Project Member

Comment 12 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/33f72bfe8b9364e82990f92befa041a08d465d3c

commit 33f72bfe8b9364e82990f92befa041a08d465d3c
Author: juncai <juncai@chromium.org>
Date: Fri Jun 23 02:36:02 2017

Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors

//device/generic_sensors already has all the sensors that can be used
to implement the DeviceOrientation event:
https://w3c.github.io/deviceorientation/spec-source-orientation.html

Currently, //content/renderer/device_sensors uses sensors from
//device/sensors as its backend, and this is one of the CLs that refactor
//content/renderer/device_sensors to use sensors from
//device/generic_sensor as the backend and removes //device/sensors.

This CL refactors DeviceMotionEvent to use sensors from //device/generic_sensor.

The issue page contains the design doc link for this change.

BUG= 721427 

Review-Url: https://codereview.chromium.org/2896583005
Cr-Original-Commit-Position: refs/heads/master@{#480934}
Committed: https://chromium.googlesource.com/chromium/src/+/687e6a76c9d634404eb93643ab900596a77958fd
Review-Url: https://codereview.chromium.org/2896583005
Cr-Commit-Position: refs/heads/master@{#481791}

[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/renderer/BUILD.gn
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/renderer/DEPS
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/test/BUILD.gn
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/test/DEPS
[add] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/device/generic_sensor/DEPS
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/device/generic_sensor/platform_sensor_provider_android.cc
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/device/generic_sensor/sensor_provider_impl.cc
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/services/device/device_service.cc
[modify] https://crrev.com/33f72bfe8b9364e82990f92befa041a08d465d3c/services/device/device_service.h

Project Member

Comment 13 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56acd30f49c6817b8f1dfd1f25255bf6f89460e5

commit 56acd30f49c6817b8f1dfd1f25255bf6f89460e5
Author: juncai <juncai@chromium.org>
Date: Fri Jun 23 17:36:05 2017

Revert of Reland: Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors (patchset #14 id:260001 of https://codereview.chromium.org/2896583005/ )

Reason for revert:
Need to figure out some issues related to this CL on Windows.

To reland, need to add tests on Android and Mac, and fix the issue on Windows.

Original issue's description:
> Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors
>
> //device/generic_sensors already has all the sensors that can be used
> to implement the DeviceOrientation event:
> https://w3c.github.io/deviceorientation/spec-source-orientation.html
>
> Currently, //content/renderer/device_sensors uses sensors from
> //device/sensors as its backend, and this is one of the CLs that refactor
> //content/renderer/device_sensors to use sensors from
> //device/generic_sensor as the backend and removes //device/sensors.
>
> This CL refactors DeviceMotionEvent to use sensors from //device/generic_sensor.
>
> The issue page contains the design doc link for this change.
>
> BUG= 721427 
>
> Review-Url: https://codereview.chromium.org/2896583005
> Cr-Original-Commit-Position: refs/heads/master@{#480934}
> Committed: https://chromium.googlesource.com/chromium/src/+/687e6a76c9d634404eb93643ab900596a77958fd
> Review-Url: https://codereview.chromium.org/2896583005
> Cr-Commit-Position: refs/heads/master@{#481791}
> Committed: https://chromium.googlesource.com/chromium/src/+/33f72bfe8b9364e82990f92befa041a08d465d3c

TBR=reillyg@chromium.org,timvolodine@chromium.org,jam@chromium.org,scheib@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 721427 

Review-Url: https://codereview.chromium.org/2953263002
Cr-Commit-Position: refs/heads/master@{#481945}

[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/renderer/BUILD.gn
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/renderer/DEPS
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/test/BUILD.gn
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/test/DEPS
[delete] https://crrev.com/9a6cc80b32bb5522fe262e1f60a9995dabf9dcbb/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/device/generic_sensor/DEPS
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/device/generic_sensor/platform_sensor_provider_android.cc
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/device/generic_sensor/sensor_provider_impl.cc
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/services/device/device_service.cc
[modify] https://crrev.com/56acd30f49c6817b8f1dfd1f25255bf6f89460e5/services/device/device_service.h

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fba28538a586e30b97ae1938765150fb910e3fdb

commit fba28538a586e30b97ae1938765150fb910e3fdb
Author: Jun Cai <juncai@chromium.org>
Date: Mon Aug 07 19:33:07 2017

Refactor DeviceMotionEventPump to use //services/device/generic_sensor instead of //device/sensors

The initial upload patch of this CL is the same as:
https://codereview.chromium.org/2896583005/#ps240001
The latest patch of this CL contains the fix for issue 735420
(This issue was reported on Mac, but it can happen on other
platforms, so the fix is not only for Mac, it is also for
other platforms).

//services/device/generic_sensors already has all the sensors that can
be used to implement the DeviceOrientation event:
https://w3c.github.io/deviceorientation/spec-source-orientation.html

Currently, //content/renderer/device_sensors uses sensors from
//device/sensors as its backend, and this is one of the CLs that
refactor
//content/renderer/device_sensors to use sensors from
//services/device/generic_sensor as the backend and removes
//device/sensors.

This CL refactors DeviceMotionEvent to use sensors from
//services/device/generic_sensor.

The  issue 721427  page contains the design doc link for this change.

Bug:  721427 , 735420
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I61c43fd0fd650aa0e41ff076c500b6cefe380909
Reviewed-on: https://chromium-review.googlesource.com/550921
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492381}
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/renderer/BUILD.gn
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/test/BUILD.gn
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/test/DEPS
[add] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/services/device/device_service.cc
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/services/device/device_service.h
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/services/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/services/device/generic_sensor/DEPS
[modify] https://crrev.com/fba28538a586e30b97ae1938765150fb910e3fdb/services/device/generic_sensor/sensor_provider_impl.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Aug 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1939cfafdc9f95a41985c2c482c255dedc857397

commit 1939cfafdc9f95a41985c2c482c255dedc857397
Author: Jun Cai <juncai@chromium.org>
Date: Tue Aug 08 13:00:50 2017

Revert "Refactor DeviceMotionEventPump to use //services/device/generic_sensor instead of //device/sensors"

This reverts commit fba28538a586e30b97ae1938765150fb910e3fdb.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Refactor DeviceMotionEventPump to use //services/device/generic_sensor instead of //device/sensors
> 
> The initial upload patch of this CL is the same as:
> https://codereview.chromium.org/2896583005/#ps240001
> The latest patch of this CL contains the fix for issue 735420
> (This issue was reported on Mac, but it can happen on other
> platforms, so the fix is not only for Mac, it is also for
> other platforms).
> 
> //services/device/generic_sensors already has all the sensors that can
> be used to implement the DeviceOrientation event:
> https://w3c.github.io/deviceorientation/spec-source-orientation.html
> 
> Currently, //content/renderer/device_sensors uses sensors from
> //device/sensors as its backend, and this is one of the CLs that
> refactor
> //content/renderer/device_sensors to use sensors from
> //services/device/generic_sensor as the backend and removes
> //device/sensors.
> 
> This CL refactors DeviceMotionEvent to use sensors from
> //services/device/generic_sensor.
> 
> The  issue 721427  page contains the design doc link for this change.
> 
> Bug:  721427 , 735420
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
> Change-Id: I61c43fd0fd650aa0e41ff076c500b6cefe380909
> Reviewed-on: https://chromium-review.googlesource.com/550921
> Reviewed-by: Tim Volodine <timvolodine@chromium.org>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Jun Cai <juncai@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#492381}

TBR=jam@chromium.org,reillyg@chromium.org,timvolodine@chromium.org,juncai@chromium.org

Change-Id: Idcd067caa0335a5f1c5da9b3b96d8b8242ffa717
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  721427 , 735420
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Reviewed-on: https://chromium-review.googlesource.com/605787
Reviewed-by: Jun Cai <juncai@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492604}
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/renderer/BUILD.gn
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/test/BUILD.gn
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/test/DEPS
[delete] https://crrev.com/6789f8394598093d031c06f1c0ffd7916edda362/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/services/device/device_service.cc
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/services/device/device_service.h
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/services/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/services/device/generic_sensor/DEPS
[modify] https://crrev.com/1939cfafdc9f95a41985c2c482c255dedc857397/services/device/generic_sensor/sensor_provider_impl.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Aug 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/339480b39644cb3c98c57a69d183f04acdd5d2c5

commit 339480b39644cb3c98c57a69d183f04acdd5d2c5
Author: Jun Cai <juncai@chromium.org>
Date: Mon Aug 14 19:24:07 2017

Reland of Refactor DeviceMotionEventPump to use //services/device/generic_sensor instead of //device/sensors

The initial upload patch of this CL is the same as:
https://chromium-review.googlesource.com/c/550921

The latest patch of this CL contains the fix for  issue 753263 .

TBR=reillyg@chromium.org, timvolodine@chromium.org

Bug:  721427 , 735420,  753263 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: If5f1d9ba33eabfc9c80858276daad8d5d08df435
Reviewed-on: https://chromium-review.googlesource.com/606611
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Jun Cai <juncai@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494130}
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/renderer/BUILD.gn
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/test/BUILD.gn
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/test/DEPS
[add] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/services/device/device_service.cc
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/services/device/device_service.h
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/services/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/services/device/generic_sensor/DEPS
[modify] https://crrev.com/339480b39644cb3c98c57a69d183f04acdd5d2c5/services/device/generic_sensor/sensor_provider_impl.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0

commit 1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0
Author: Jun Cai <juncai@chromium.org>
Date: Wed Aug 16 15:07:03 2017

Revert "Reland of Refactor DeviceMotionEventPump to use //services/device/generic_sensor instead of //device/sensors"

This reverts commit 339480b39644cb3c98c57a69d183f04acdd5d2c5.

Reason for revert:
https://bugs.chromium.org/p/chromium/issues/detail?id=753263

Original change's description:
> Reland of Refactor DeviceMotionEventPump to use //services/device/generic_sensor instead of //device/sensors
> 
> The initial upload patch of this CL is the same as:
> https://chromium-review.googlesource.com/c/550921
> 
> The latest patch of this CL contains the fix for  issue 753263 .
> 
> TBR=reillyg@chromium.org, timvolodine@chromium.org
> 
> Bug:  721427 , 735420,  753263 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
> Change-Id: If5f1d9ba33eabfc9c80858276daad8d5d08df435
> Reviewed-on: https://chromium-review.googlesource.com/606611
> Commit-Queue: Jun Cai <juncai@chromium.org>
> Reviewed-by: Jun Cai <juncai@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#494130}

TBR=jam@chromium.org,reillyg@chromium.org,timvolodine@chromium.org,juncai@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  721427 , 735420,  753263 
Change-Id: I7d88ee2b6121c76cfb2520d816c52ce07387c6f5
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Reviewed-on: https://chromium-review.googlesource.com/616820
Reviewed-by: Jun Cai <juncai@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494785}
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/renderer/BUILD.gn
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/test/BUILD.gn
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/test/DEPS
[delete] https://crrev.com/337a87dc2c9e67d0185d0058f7c466d5f1448d41/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/services/device/device_service.cc
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/services/device/device_service.h
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/services/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/services/device/generic_sensor/DEPS
[modify] https://crrev.com/1f1b44798411b0e4b0febc57bf4eb62f0f40ffe0/services/device/generic_sensor/sensor_provider_impl.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f

commit 4cd3f707add7024916ab41cf0b681f7f7d0d8c1f
Author: Jun Cai <juncai@chromium.org>
Date: Fri Aug 25 00:29:39 2017

Refactor DeviceMotionEventPump to use generic sensor instead of sensors

The initial upload patch of this CL is the same as:
https://chromium-review.googlesource.com/c/606611

The latest patch of this CL contains the fix for  issue 753263 , 753679,
which is caused by RenderFrame not being valid when it is accessed.
So instead of passing the |render_frame| to DeviceMotionEventPump's
constructor, DeviceMotionEventPump::SendStartMessage gets the
|render_frame| from |web_frame| when needed. This will make sure the
|render_frame| is valid when it is needed.

TBR=jam@chromium.org, timvolodine@chromium.org

Bug:  721427 , 735420,  753263 , 753679
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I6bf90580ce9ced8b26383ebf45ee27f9cfb4d867
Reviewed-on: https://chromium-review.googlesource.com/618162
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497254}
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/chrome/browser/generic_sensor/sensor_permission_context.cc
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/renderer/BUILD.gn
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/test/BUILD.gn
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/test/DEPS
[add] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/content/test/data/device_sensors/device_motion_test.html
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/services/device/device_service.cc
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/services/device/device_service.h
[modify] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/services/device/generic_sensor/DEPS
[add] https://crrev.com/4cd3f707add7024916ab41cf0b681f7f7d0d8c1f/third_party/WebKit/LayoutTests/device_orientation/motion/detached-frame.html

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c77af928d4e250a5416fdcc48f60297d6fed6b64

commit c77af928d4e250a5416fdcc48f60297d6fed6b64
Author: Jun Cai <juncai@chromium.org>
Date: Tue Oct 17 20:02:32 2017

Refactor DeviceOrientationEventPump to use generic sensor as its backend

//services/device/generic_sensors already has all the sensors that can
be used to implement the DeviceOrientation event:
https://w3c.github.io/deviceorientation/spec-source-orientation.html

Currently, //content/renderer/device_sensors uses sensors from
//device/sensors as its backend, and this is one of the CLs that
refactor
//content/renderer/device_sensors to use sensors from
//services/device/generic_sensor as the backend.

This CL refactors DeviceOrientationEvent to use sensors from
//services/device/generic_sensor. This CL factors out common
functionality between the DeviceMotionEventPump and
DeviceOrientationEventPump into DeviceSensorEventPump which they now
share as the common base class.

The  issue 721427  page contains the design doc link for this change.

Bug:  721427 
Change-Id: I00140126495b31a03a335a7420370de613bfe9b1
Reviewed-on: https://chromium-review.googlesource.com/656139
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509496}
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_orientation_event_pump.cc
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_orientation_event_pump.h
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/device_sensors/device_sensor_event_pump.h
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/renderer/renderer_blink_platform_impl.cc
[add] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/content/test/data/device_sensors/device_orientation_fallback_to_absolute_test.html
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/services/device/device_service.cc
[modify] https://crrev.com/c77af928d4e250a5416fdcc48f60297d6fed6b64/services/device/device_service.h

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/453e9f6c58ccffda874156f0d6560a8ddd7372e0

commit 453e9f6c58ccffda874156f0d6560a8ddd7372e0
Author: Jun Cai <juncai@chromium.org>
Date: Wed Oct 18 15:16:15 2017

Revert "Refactor DeviceOrientationEventPump to use generic sensor as its backend"

This reverts commit c77af928d4e250a5416fdcc48f60297d6fed6b64.

Reason for revert:
https://bugs.chromium.org/p/chromium/issues/detail?id=775874

Original change's description:
> Refactor DeviceOrientationEventPump to use generic sensor as its backend
> 
> //services/device/generic_sensors already has all the sensors that can
> be used to implement the DeviceOrientation event:
> https://w3c.github.io/deviceorientation/spec-source-orientation.html
> 
> Currently, //content/renderer/device_sensors uses sensors from
> //device/sensors as its backend, and this is one of the CLs that
> refactor
> //content/renderer/device_sensors to use sensors from
> //services/device/generic_sensor as the backend.
> 
> This CL refactors DeviceOrientationEvent to use sensors from
> //services/device/generic_sensor. This CL factors out common
> functionality between the DeviceMotionEventPump and
> DeviceOrientationEventPump into DeviceSensorEventPump which they now
> share as the common base class.
> 
> The  issue 721427  page contains the design doc link for this change.
> 
> Bug:  721427 
> Change-Id: I00140126495b31a03a335a7420370de613bfe9b1
> Reviewed-on: https://chromium-review.googlesource.com/656139
> Commit-Queue: Jun Cai <juncai@chromium.org>
> Reviewed-by: Tim Volodine <timvolodine@chromium.org>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#509496}

TBR=jam@chromium.org,reillyg@chromium.org,timvolodine@chromium.org,juncai@chromium.org

Change-Id: Iad4a61d7986aa7ed979a289ba0ca3fed452cb140
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  721427 
Reviewed-on: https://chromium-review.googlesource.com/725680
Reviewed-by: Jun Cai <juncai@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509772}
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_orientation_event_pump.cc
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_orientation_event_pump.h
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/device_sensors/device_sensor_event_pump.h
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/content/renderer/renderer_blink_platform_impl.cc
[delete] https://crrev.com/26e771d2dd407e77f8b618d98ef66eb09fcb86fa/content/test/data/device_sensors/device_orientation_fallback_to_absolute_test.html
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/services/device/device_service.cc
[modify] https://crrev.com/453e9f6c58ccffda874156f0d6560a8ddd7372e0/services/device/device_service.h

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3bed76d75076e87da6a1a5bf84efe7b197fc502b

commit 3bed76d75076e87da6a1a5bf84efe7b197fc502b
Author: Jun Cai <juncai@chromium.org>
Date: Wed Oct 25 19:32:40 2017

Reland: Refactor DeviceOrientationEventPump to use generic sensor as its backend

The initial upload patch of this CL is the same as:
https://chromium-review.googlesource.com/c/chromium/src/+/656139
The above CL was reverted because of the issue 775874:
https://bugs.chromium.org/p/chromium/issues/detail?id=775874
Two CLs were landed to fix the above issue:
https://chromium-review.googlesource.com/c/chromium/src/+/727239
https://chromium-review.googlesource.com/c/chromium/src/+/730646

And no code change has been made to the following patches of this CL and it is
still the same as the above reverted CL.

TBR=jam@chromium.org, reillyg@chromium.org, timvolodine@chromium.org

Bug:  721427 , 775874
Change-Id: I9f64a97814644a467ec542b6293a6b44fc1b43c1
Reviewed-on: https://chromium-review.googlesource.com/726261
Reviewed-by: Jun Cai <juncai@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511553}
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_orientation_event_pump.cc
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_orientation_event_pump.h
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/device_sensors/device_sensor_event_pump.h
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/renderer/renderer_blink_platform_impl.cc
[add] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/content/test/data/device_sensors/device_orientation_fallback_to_absolute_test.html
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/services/device/device_service.cc
[modify] https://crrev.com/3bed76d75076e87da6a1a5bf84efe7b197fc502b/services/device/device_service.h

Components: Internals>Services>Device
Does any work remain?
Project Member

Comment 25 by bugdroid1@chromium.org, Dec 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89332cd3d92df4e1cfcda7d4ac4f2c74ad7a39d9

commit 89332cd3d92df4e1cfcda7d4ac4f2c74ad7a39d9
Author: Reilly Grant <reillyg@chromium.org>
Date: Sun Dec 10 18:41:29 2017

Remove device:sensors interfaces from device service manifest

The "device:sensors" interfaces have been removed from the device
service and replaced by the "device:generic_sensor" interface.

Bug:  721427 
Change-Id: I23164b54e09897c7bef3c6c57d37ac99b68acf06
Reviewed-on: https://chromium-review.googlesource.com/818488
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523026}
[modify] https://crrev.com/89332cd3d92df4e1cfcda7d4ac4f2c74ad7a39d9/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/89332cd3d92df4e1cfcda7d4ac4f2c74ad7a39d9/services/device/manifest.json

Cc: mlamouri@chromium.org
With the CL that landed in comment #21, the code auto-magically tries to find a RenderFrame based on the v8::Context, I'm not sure this is a very good practice especially for something that in Blink does not require any LocalFrame to be used. It would be great if the design could not depend on v8 or if it does, depend explicitly on it. As it happened, this was the root cause of breaking a feature, see  bug 794713 
Blockedon: 795286
Blockedon: 798409
Project Member

Comment 29 by bugdroid1@chromium.org, Jan 5 2018

Labels: merge-merged-3282
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fbeb6df58442b011d5ebccad251286dcb15dc9f7

commit fbeb6df58442b011d5ebccad251286dcb15dc9f7
Author: Reilly Grant <reillyg@chromium.org>
Date: Fri Jan 05 19:55:15 2018

[M-64] Revert DeviceOrientationEventPump refactoring

This patch reverts the following two changes in order to resolve
regressions introduced in M-64 which will be fixed on HEAD with other
changes:

"Reland: Refactor DeviceOrientationEventPump to use generic sensor as its backend"
https://chromium-review.googlesource.com/726261

"Return Sensor pipe in SensorInitParams"
https://chromium-review.googlesource.com/757283

This patch was tested by running all *Sensor* tests in unit_tests,
browser_tests, content_unittests, content_browsertests and
services_unittests, by verifying that "rotate to full screen"
works on youtube.com and by running the one-shot.html test from
 issue 799043 .

Bug:  721427 , 794713 , 798409 , 799043 
Change-Id: I2c0573578d6a333b62aa9fd53a57d08d94454783
Reviewed-on: https://chromium-review.googlesource.com/850822
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/branch-heads/3282@{#423}
Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840}
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/browser/generic_sensor/sensor_provider_proxy_impl.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/browser/generic_sensor/sensor_provider_proxy_impl.h
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/browser/generic_sensor_browsertest.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_orientation_event_pump.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_orientation_event_pump.h
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/device_sensors/device_sensor_event_pump.h
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/content/renderer/renderer_blink_platform_impl.cc
[delete] https://crrev.com/45377e18a2ec8f726df564835e9e8e8ccaeea6ec/content/test/data/device_sensors/device_orientation_fallback_to_absolute_test.html
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/services/device/device_service.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/services/device/device_service.h
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/services/device/generic_sensor/generic_sensor_service_unittest.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/services/device/generic_sensor/sensor_provider_impl.cc
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/services/device/generic_sensor/sensor_provider_impl.h
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/services/device/public/interfaces/sensor_provider.mojom
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
[modify] https://crrev.com/fbeb6df58442b011d5ebccad251286dcb15dc9f7/third_party/WebKit/Source/modules/sensor/SensorProxy.h

Blocking: 224849
Project Member

Comment 31 by bugdroid1@chromium.org, Mar 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41a779dedd4b383ae0175ffa3adc836e4b52298a

commit 41a779dedd4b383ae0175ffa3adc836e4b52298a
Author: Jun Cai <juncai@chromium.org>
Date: Fri Mar 02 22:08:51 2018

Remove //device/sensors directory

The DeviceOrientation event:
https://w3c.github.io/deviceorientation/spec-source-orientation.html
has been refactored to use //services/device/generic_sensor instead of
//device/sensors as its backend. So the //device/sensors directory is
unused and can be removed.

motion_data.* and orientation_data.* files have been moved from
//device/sensors/ to //services/device/public/cpp/generic_sensor/.

The  issue 721427  page contains the design doc link for this change.

Bug:  721427 
Change-Id: I74876efe6fc4aa586e8c5b391817b02f48864993
Reviewed-on: https://chromium-review.googlesource.com/667784
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540654}
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/chrome/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/chromecast/android/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/app/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/app/DEPS
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/browser/DEPS
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/content/browser/device_sensors/DEPS
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/public/android/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/DEPS
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/device_sensors/device_orientation_event_pump.h
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/shell/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/shell/android/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/shell/test_runner/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/shell/test_runner/DEPS
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/shell/test_runner/test_runner.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/shell/test_runner/test_runner_for_specific_view.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/test/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/test/DEPS
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/content/test/layouttest_support.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/device/BUILD.gn
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/BUILD.gn
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/DEPS
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/OWNERS
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/README.md
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/android/java/src/org/chromium/device/sensors/DeviceSensors.java
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/android/javatests/src/org/chromium/device/sensors/DeviceSensorsTest.java
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_android.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_base.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_base.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_base_unittest.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_chromeos.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_default.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_fuchsia.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_mac.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/data_fetcher_shared_memory_win.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/device_sensor_export.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/device_sensor_host.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/device_sensor_host.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/device_sensor_service.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/device_sensor_service.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/device_sensors_consts.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/cpp/BUILD.gn
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/cpp/device_motion_hardware_buffer.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/cpp/device_orientation_hardware_buffer.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/mojom/BUILD.gn
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/mojom/OWNERS
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/mojom/motion.mojom
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/public/mojom/orientation.mojom
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/sensor_manager_android.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/sensor_manager_android.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/sensor_manager_android_unittest.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/sensor_manager_chromeos.cc
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/sensor_manager_chromeos.h
[delete] https://crrev.com/97027229740c6be2712c4902376fd7e1fbaa6fd4/device/sensors/sensor_manager_chromeos_unittest.cc
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/generic_sensor/README.md
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/public/cpp/generic_sensor/BUILD.gn
[rename] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/public/cpp/generic_sensor/motion_data.cc
[rename] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/public/cpp/generic_sensor/motion_data.h
[rename] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/public/cpp/generic_sensor/orientation_data.cc
[rename] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/services/device/public/cpp/generic_sensor/orientation_data.h
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/third_party/WebKit/Source/modules/device_orientation/BUILD.gn
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/third_party/WebKit/Source/modules/device_orientation/DEPS
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionData.cpp
[modify] https://crrev.com/41a779dedd4b383ae0175ffa3adc836e4b52298a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationData.cpp

Status: Fixed (was: Started)

Sign in to add a comment