Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 135804 DeviceMotionEvent is not supported in Chrome, but supported in Browser
Starred by 34 users Project Member Reported by bugdroid1@chromium.org, Jul 4 2012 Back to list
Status: Fixed
Owner:
Closed: Oct 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature
M-X

Blocking:
issue 196645
issue 234259



Sign in to add a comment
Originally reported in http://b.corp.google.com/6483039

(Posted on May 11 2012 19:10 GMT by srikanth)

From http://code.google.com/p/chromium/issues/detail?id=124841. Needed for the Chrome Mobile experiments. While this may not make it in by FactoryROM we should evaluate the feasibility for v1. 

 
----

Chrome Version: 18.0.1025.133
Application Version: 0.18.4409.2396
URLs (if applicable): http://jsconsole.com/?window.DeviceMotionEvent

Build number: Galaxy Nexus 4.0.4

Behavior in Android Browser (if applicable):
Supported.

Steps to reproduce:
Go to http://www.html5rocks.com/en/tutorials/device/orientation/devicemotionsample.html

Expected result: It works as in Android Browser.

Actual result: window.DeviceMotionEvent not implemented in Chrome
 
Project Member Comment 1 by bugdroid1@chromium.org, Jul 4 2012
Cc: hwennborg@chromium.org
(Posted on May 14 2012 11:15 GMT by jknotten)

Hans, what is the status of DeviceMotion in Chrome upstream?
Project Member Comment 2 by bugdroid1@chromium.org, Jul 4 2012
(Posted on May 14 2012 11:57 GMT by hwennborg)

The status is that it's not implemented.

It's on my list of things to do "after speech", but if someone else wants to do it, that would work too.
Project Member Comment 3 by bugdroid1@chromium.org, Jul 4 2012
(Posted on May 14 2012 13:05 GMT by srikanth)

What is the effort involved?
Project Member Comment 4 by bugdroid1@chromium.org, Jul 4 2012
(Posted on May 14 2012 13:14 GMT by hwennborg)

Four weeks maybe (though estimates are hard..)

It would need full WebKit plumbing, and we'd need to figure out how to reuse the current device_orientation::ProviderImpl class, or write a new one (the tricky thing is that DeviceMotion events shall fire at a set interval, whereas DeviceOrientation events fire when the orientation changes above some threshold), and then hooking it up to the actual provider on the Android side.
Project Member Comment 5 by bugdroid1@chromium.org, Jul 4 2012
(Posted on May 15 2012 13:57 GMT by srikanth)

That is the default position. 

petele@ / vinodkr@ - we need to adjust Chrome experiments accordingly.
Project Member Comment 6 by bugdroid1@chromium.org, Jul 4 2012
(Posted on May 15 2012 13:49 GMT by satish)

Estimating webkit API work is unreliable and it can take a lot longer than originally planned (happened in most of the APIs we have implemented so far). Given that v1 is from the m18 branch we can't really cherrypick the thousands of lines of new code that this API will require, instead have to reimplement it for m18. Lets implement it as part of Chrome for Android-future and not add features between factory ROM and v1.
Project Member Comment 7 by bugdroid1@chromium.org, Jul 4 2012
Cc: jknotten@chromium.org
(Posted on May 15 2012 13:58 GMT by srikanth)
Project Member Comment 8 by bugdroid1@chromium.org, Jul 4 2012
Cc: srikanth@chromium.org vinodkr@chromium.org
Project Member Comment 9 by bugdroid1@chromium.org, Jul 10 2012
Cc: petele@google.com
Labels: Feature-OSIntegration
Status: Available
Labels: -Restrict-View-Google
Cc: petele@chromium.org
Issue 124841 has been merged into this issue.
Cc: -petele@google.com -hwennborg@chromium.org
Labels: WebKit-WebApps
Labels: MobileOWP
Owner: timvolod...@chromium.org
Status: Started
related CL regarding chrome side implementation uploaded by Hans
http://codereview.chromium.org/10827415/
which seems to depend on some webkit side classes, discussed in
https://bugs.webkit.org/show_bug.cgi?id=89197
none of the code is checked in, need to figure out what can/should be reused..

Comment 18 by vli@chromium.org, Nov 26 2012
Labels: ImportantForMobile
Comment 19 by vinodkr@google.com, Feb 18 2013
Labels: Mstone-27
Project Member Comment 20 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -Feature-OSIntegration -WebKit-WebApps -Mstone-27 Cr-Content Cr-UI-OSIntegration Cr-Content-WebApps M-27
browser java-side patch:
https://codereview.chromium.org/12771008/

Labels: -M-27 M-X
We are continuing to track work on this but not yet at  point where we can pin down a milestone yet. 
Comment 23 by lar...@gmail.com, Mar 19 2013
Question:  on the N9 (qt) this was done fairly fast in our team (I think in a matter of a few days including testing).  What is preventing this from getting done?  (just curious)

Looking forward to seeing this very valuable feature for webapps based games asap :)
Project Member Comment 24 by bugdroid1@chromium.org, Mar 26 2013
Project Member Comment 25 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Blocking: chromium:234259
Blocking: chromium:196645
Project Member Comment 28 by bugdroid1@chromium.org, Apr 23 2013
------------------------------------------------------------------------
r195840 | timvolodine@chromium.org | 2013-04-23T17:53:53.332632Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java?r1=195840&r2=195839&pathrev=195840

Java-side sensor polling getHandler() method simplification as per joth's comment.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/14352008
------------------------------------------------------------------------
Project Member Comment 29 by bugdroid1@chromium.org, Apr 26 2013
------------------------------------------------------------------------
r149213 | peter@chromium.org | 2013-04-26T17:29:59.512662Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionData.cpp?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceRotationRate.cpp?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceRotationRate.idl?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionController.h?r1=149213&r2=149212&pathrev=149213
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionClient.h?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceRotationRate.cpp?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionEvent.h?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionController.h?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceAcceleration.h?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionData.h?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionEvent.idl?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionController.cpp?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceAcceleration.h?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionEvent.h?r1=149213&r2=149212&pathrev=149213
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp?r1=149213&r2=149212&pathrev=149213
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceAcceleration.idl?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionData.h?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceRotationRate.h?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionEvent.cpp?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionController.cpp?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceAcceleration.cpp?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceAcceleration.idl?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceRotationRate.h?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionEvent.idl?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionData.cpp?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceRotationRate.idl?r1=149213&r2=149212&pathrev=149213
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceAcceleration.cpp?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionEvent.cpp?r1=149213&r2=149212&pathrev=149213
   D http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/DeviceMotionClient.h?r1=149213&r2=149212&pathrev=149213

Move DeviceMotion related classes from core/dom to modules/device_orientation.

BUG= 135804 

Review URL: https://codereview.chromium.org/14472006

Patch from Tim Volodine <timvolodine@chromium.org>.
------------------------------------------------------------------------
Project Member Comment 30 by bugdroid1@chromium.org, May 31 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=151544

------------------------------------------------------------------------
r151544 | timvolodine@chromium.org | 2013-05-31T11:58:45.734640Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionData.h?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/Source/Platform/chromium/public/WebDeviceMotionData.h?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/DOMWindow.cpp?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionController.cpp?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionDispatcher.cpp?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionController.h?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/Source/Platform/chromium/public/WebDeviceMotionListener.h?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionDispatcher.h?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebDeviceMotionData.h?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/chromium/support/WebDeviceMotionData.cpp?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/Platform.h?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/Platform/Platform.gypi?r1=151544&r2=151543&pathrev=151544
   A http://src.chromium.org/viewvc/blink/trunk/public/platform/WebDeviceMotionListener.h?r1=151544&r2=151543&pathrev=151544
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/device_orientation/DeviceMotionData.cpp?r1=151544&r2=151543&pathrev=151544

Implement the Blink part of the Device Motion API.
The implementation uses the Platform layer approach with push semantics, i.e. Blink registers a listener to receive updates when new motion data is available. This patch contains changes to both the device_orientation module and the WebKit plumbing.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/14460010
------------------------------------------------------------------------
Project Member Comment 31 by bugdroid1@chromium.org, Jun 13 2013
------------------------------------------------------------------------
r206091 | timvolodine@chromium.org | 2013-06-13T16:38:39.161128Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/android/javatests/src/org/chromium/content/browser/DeviceMotionAndOrientationTest.java?r1=206091&r2=206090&pathrev=206091
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_impl_android.cc?r1=206091&r2=206090&pathrev=206091
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_impl_android.h?r1=206091&r2=206090&pathrev=206091
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/android/java/src/org/chromium/content/browser/DeviceMotionAndOrientation.java?r1=206091&r2=206090&pathrev=206091

Additions to the Android java-side Device Motion/Orientation fetching

A number of small modifications/improvements:
- add a getNumberActiveMotionSensors() to determine how many sensors could actually be activated for device motion
- make sure that the orientation events are only fired when the appropriate sensors change
- rename mAccelerationVector to mAccelerationIncludingGravityVector

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/15817019
------------------------------------------------------------------------
Project Member Comment 32 by bugdroid1@chromium.org, Jun 28 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153190

------------------------------------------------------------------------
r153190 | timvolodine@chromium.org | 2013-06-28T04:02:19.282048Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/platform/WebDeviceMotionData.h?r1=153190&r2=153189&pathrev=153190

Add allAvailableSensorsActive field to the WebDeviceMotionData.

This field is needed to determine whether the data stored in WebDeviceMotionData is complete, i.e. no more data can be provided because the data from all available sensors has been received.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/18031010
------------------------------------------------------------------------
Project Member Comment 34 by bugdroid1@chromium.org, Jul 11 2013
------------------------------------------------------------------------
r211043 | timvolodine@chromium.org | 2013-07-11T08:00:57.448989Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/common/device_motion_hardware_buffer.h?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/device_motion_browser_message_filter.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/common/one_writer_seqlock.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/device_motion_browser_message_filter.h?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/common/one_writer_seqlock.h?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/device_orientation?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider.h?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/gamepad_hardware_buffer.h?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_browser.gypi?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_service.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/common/shared_memory_seqlock_buffer.h?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/browser_main_loop.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_service.h?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/device_motion_messages.h?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_common.gypi?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/device_orientation/device_motion_event_pump_unittest.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/device_orientation/device_motion_event_pump.cc?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.h?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/shared_memory_seqlock_reader.cc?r1=211043&r2=211042&pathrev=211043
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/common/gamepad_seqlock.cc?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/device_orientation/device_motion_event_pump.h?r1=211043&r2=211042&pathrev=211043
   D http://src.chromium.org/viewvc/chrome/trunk/src/content/common/gamepad_seqlock.h?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/device_orientation/OWNERS?r1=211043&r2=211042&pathrev=211043
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/shared_memory_seqlock_reader.h?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_process_host_impl.cc?r1=211043&r2=211042&pathrev=211043
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_renderer.gypi?r1=211043&r2=211042&pathrev=211043

Implement the content/renderer and content/browser part of the Device Motion API.
This patch has a partial implementation of provider and does not include any device motion fetchers.

The patch features:
- chromium-side event pump
- shared memory reader and buffer representation
- IPC messages and filters for shared memory communication
- service class to keep track of listening renderers

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/14678012
------------------------------------------------------------------------
Project Member Comment 35 by bugdroid1@chromium.org, Jul 13 2013
------------------------------------------------------------------------
r211516 | timvolodine@chromium.org | 2013-07-13T03:03:35.534347Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_process_host_impl.cc?r1=211516&r2=211515&pathrev=211516
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/app/generated_resources.grd?r1=211516&r2=211515&pathrev=211516
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/about_flags.cc?r1=211516&r2=211515&pathrev=211516

Add device motion enable switch to about:flags in Chrome for Android.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/17370006
------------------------------------------------------------------------
Project Member Comment 36 by bugdroid1@chromium.org, Jul 13 2013
------------------------------------------------------------------------
r211539 | timvolodine@chromium.org | 2013-07-13T04:23:00.390911Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_orientation_android.cc?r1=211539&r2=211538&pathrev=211539
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_orientation_android.h?r1=211539&r2=211538&pathrev=211539
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_shared_memory_android.cc?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/OWNERS?r1=211539&r2=211538&pathrev=211539
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_impl_android_unittest.cc?r1=211539&r2=211538&pathrev=211539
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_shared_memory.h?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_impl_android.cc?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/provider.cc?r1=211539&r2=211538&pathrev=211539
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_shared_memory_default.cc?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_impl_android.h?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider.cc?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider.h?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=211539&r2=211538&pathrev=211539
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_browser.gypi?r1=211539&r2=211538&pathrev=211539

Implement Android shared memory data fetcher for Device Motion.

This CL implements the shared memory data fetcher for devices running on Android. The data fetchers acquires data from sensors (e.g. accelerometer, gyroscope) and puts it into a shared memory buffer. Because the sensor data is push-based on Android there is no need for an extra polling thread to fetch the data at regular intervals.

This CL features:
- interface for shared memory data fetchers for Device Motion.
- implementation of the Android shared memory data fetcher.
- unit tests for the Android shared memory data fetcher.
- implementation of the empty data fetcher for other platforms.
- modification of the existing Android data fetcher to be a singleton, such that it is compatible with the current Device Orientation implementation.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/18572014
------------------------------------------------------------------------
Project Member Comment 37 by bugdroid1@chromium.org, Jul 17 2013
------------------------------------------------------------------------
r212084 | timvolodine@chromium.org | 2013-07-17T17:46:08.917208Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.h?r1=212084&r2=212083&pathrev=212084
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/test/layouttest_support.h?r1=212084&r2=212083&pathrev=212084
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/test/layouttest_support.cc?r1=212084&r2=212083&pathrev=212084
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/shell/renderer/webkit_test_runner.cc?r1=212084&r2=212083&pathrev=212084
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/shell/renderer/webkit_test_runner.h?r1=212084&r2=212083&pathrev=212084
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_webkitplatformsupport_impl.cc?r1=212084&r2=212083&pathrev=212084

Add plumbing for platform based Device Motion testing.

This CL implements injection of a mock WebDeviceMotionData into the Platform for testing purposes. Once the mock WebDeviceMotionData is set it will be returned as a one-shot event once Blink registers its DeviceMotionListener through the platform using setDeviceMotionListener method.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/5222955109842944
------------------------------------------------------------------------
Project Member Comment 38 by bugdroid1@chromium.org, Jul 18 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=154502

------------------------------------------------------------------------
r154502 | timvolodine@chromium.org | 2013-07-18T18:39:04.426758Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/DeviceMotion/add-listener-from-callback-expected.txt?r1=154502&r2=154501&pathrev=154502
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/DeviceMotion/script-tests/add-listener-from-callback.js?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/RuntimeEnabledFeatures.in?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/DeviceMotion/window-property-expected.txt?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/Window/window-properties-device-orientation-expected.txt?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/public/testing/WebTestDelegate.h?r1=154502&r2=154501&pathrev=154502
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/DeviceMotion/add-listener-from-callback.html?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/webexposed/global-constructors-listing-expected.txt?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/DeviceMotion/create-event-expected.txt?r1=154502&r2=154501&pathrev=154502
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp?r1=154502&r2=154501&pathrev=154502

Blink-side Device Motion API testing.

In this testing approach we inject a mock device motion data object
into platform and catch the 'ondevicemotion' event in Javascript, 
with that same data.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/16020003
------------------------------------------------------------------------
Project Member Comment 39 by bugdroid1@chromium.org, Jul 31 2013
------------------------------------------------------------------------
r214538 | timvolodine@chromium.org | 2013-07-31T03:27:21.540124Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_shared_memory_android.cc?r1=214538&r2=214537&pathrev=214538
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_shared_memory.h?r1=214538&r2=214537&pathrev=214538
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/data_fetcher_shared_memory_default.cc?r1=214538&r2=214537&pathrev=214538
   A http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider_unittest.cc?r1=214538&r2=214537&pathrev=214538
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider.cc?r1=214538&r2=214537&pathrev=214538
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/device_orientation/device_motion_provider.h?r1=214538&r2=214537&pathrev=214538
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content_tests.gypi?r1=214538&r2=214537&pathrev=214538

Implement PollingThread for Device Motion.

On some platforms data fetchers are poll-based (e.g. mac), so it requires a polling thread to fetch data.
This CL includes:
- implementation of a provider for device motion with a polling thread.
- unit test for provider
- make sure to call Stop* in fetcher destructors only when started.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/19833005
------------------------------------------------------------------------
Project Member Comment 40 by bugdroid1@chromium.org, Aug 2 2013
------------------------------------------------------------------------
r215215 | timvolodine@chromium.org | 2013-08-02T04:44:01.772021Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/common/content_switches.h?r1=215215&r2=215214&pathrev=215215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_process_host_impl.cc?r1=215215&r2=215214&pathrev=215215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/runtime_features.cc?r1=215215&r2=215214&pathrev=215215
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/common/content_switches.cc?r1=215215&r2=215214&pathrev=215215

Enable Device Motion on Android by default.

This CL:
- enables Device Motion by default on the Android platform.
- adds a disable-device-motion flag.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/21591002
------------------------------------------------------------------------
Project Member Comment 41 by bugdroid1@chromium.org, Sep 19 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=158031

------------------------------------------------------------------------
r158031 | timvolodine@chromium.org | 2013-09-19T15:14:50.586179Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/RuntimeEnabledFeatures.in?r1=158031&r2=158030&pathrev=158031
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/virtual/stable/webexposed/global-constructors-listing-expected.txt?r1=158031&r2=158030&pathrev=158031

Enable Device Motion API in Blink by default.

We are now ready to enable Device Motion API for
all platforms. This patch sets DeviceMotion status
to stable.

For the corresponding patch to enable Device Motion
API on the Chromium side see:
https://codereview.chromium.org/24220002/

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/23578042
------------------------------------------------------------------------
Project Member Comment 42 by bugdroid1@chromium.org, Sep 19 2013
------------------------------------------------------------------------
r224164 | timvolodine@chromium.org | 2013-09-19T18:07:57.508604Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/renderer_host/render_process_host_impl.cc?r1=224164&r2=224163&pathrev=224164
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/app/generated_resources.grd?r1=224164&r2=224163&pathrev=224164
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/child/runtime_features.cc?r1=224164&r2=224163&pathrev=224164
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/common/content_switches.cc?r1=224164&r2=224163&pathrev=224164
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/public/common/content_switches.h?r1=224164&r2=224163&pathrev=224164
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/about_flags.cc?r1=224164&r2=224163&pathrev=224164

Enable Device Motion API on all platforms by default.

After this change the JavaScript expression 'window.DeviceMotionEvent'
will start evaluating to true on all platforms.

For Android, Windows and Mac devices with accelerometer and
gyroscope sensors events will start being delivered.
For devices without such sensors, and for other platforms
(e.g. Chrome OS, Linux) which do not have corresponding sensor
data fetcher implementations, we'll deliver a one-shot event
with all properties set the NULL, per the specification.

This patch also removes the obsolete 'enable-device-motion'
flag, instead the 'disable-device-motion' flag is available.

BUG= 135804 

Review URL: https://chromiumcodereview.appspot.com/24220002
------------------------------------------------------------------------
This can be closed right?
Comment 44 Deleted
Status: Assigned
yes, we now have implementation for Device Motion on Android, Windows and Mac platforms.

enabled by default on all supported platforms from M31.

Status: Fixed
Components: -UI>OSIntegration Internals>PlatformIntegration
Sign in to add a comment