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

Issue 13866007: WebKit & WebCore part of the device motion implementation using the platform layer. (Closed)

Created:
7 years, 8 months ago by timvolodine
Modified:
7 years, 4 months ago
CC:
blink-reviews, abarth_chromum.org, Miguel Garcia, bulach
Base URL:
https://chromium.googlesource.com/chromium/blink.git@devicemotion-webcore
Visibility:
Public.

Description

This patch contains both WebCore and WebKit parts for the device motion implementation. Webcore: refactoring of device motion to make it simpler and follow the platform-based approach. The controller classes are now singletons and do not use clients anymore. The start/stop client methods and lastDevice{Motion,Orientation}Data are implemented in the platform-specific (i.e. WebCore/platform) part of the code. WebKit: device motion implementation using the platform layer. The calls from WebCore go to a special 'pump' singleton class which reads the motion data via the platform layer and fires the events with a certain frequency. BUG=135804

Patch Set 1 #

Patch Set 2 : added new LICENSE header #

Total comments: 86

Patch Set 3 : fixed comments from Peter and Eric, made the DeviceMotionController supplement of page instead of s… #

Patch Set 4 : added unregister in destructor of DeviceMotionController #

Total comments: 46

Patch Set 5 : fixed Peter's comments #

Total comments: 20

Patch Set 6 : fixed next round of comments by Peter #

Total comments: 36

Patch Set 7 : fixed Eric's comments. #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+724 lines, -118 lines) Patch
M Source/Platform/chromium/public/Platform.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
A Source/Platform/chromium/public/WebDeviceMotionData.h View 1 2 3 4 5 6 1 chunk +98 lines, -0 lines 4 comments Download
A Source/Platform/chromium/public/WebDeviceMotionReader.h View 1 2 3 4 5 1 chunk +57 lines, -0 lines 0 comments Download
M Source/WebCore/WebCore.gypi View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M Source/WebCore/dom/DeviceMotionController.h View 1 2 3 4 5 2 chunks +53 lines, -41 lines 4 comments Download
M Source/WebCore/dom/DeviceMotionController.cpp View 1 2 3 4 5 6 5 chunks +81 lines, -35 lines 0 comments Download
M Source/WebCore/history/PageCache.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/WebCore/page/DOMWindow.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/page/DOMWindow.cpp View 1 2 3 chunks +6 lines, -3 lines 0 comments Download
M Source/WebCore/page/DeviceController.h View 1 2 3 chunks +20 lines, -27 lines 2 comments Download
M Source/WebCore/platform/PlatformDeviceMotion.h View 1 2 3 4 1 chunk +4 lines, -7 lines 0 comments Download
A Source/WebCore/platform/chromium/DeviceMotion.cpp View 1 2 3 4 1 chunk +53 lines, -0 lines 2 comments Download
A Source/WebCore/platform/chromium/support/WebDeviceMotionData.cpp View 1 2 3 4 5 6 1 chunk +121 lines, -0 lines 0 comments Download
A Source/WebCore/platform/chromium/support/WebDeviceMotionEventPump.h View 1 2 3 4 5 6 1 chunk +81 lines, -0 lines 0 comments Download
A Source/WebCore/platform/chromium/support/WebDeviceMotionEventPump.cpp View 1 2 3 4 5 6 1 chunk +134 lines, -0 lines 0 comments Download
M Source/WebKit/chromium/WebKit.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebKit/chromium/src/WebViewImpl.cpp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
timvolodine
7 years, 8 months ago (2013-04-09 12:50:58 UTC) #1
Peter Beverloo
First round of comments. Thank you, Tim!! https://codereview.chromium.org/13866007/diff/2001/Source/Platform/chromium/public/Platform.h File Source/Platform/chromium/public/Platform.h (right): https://codereview.chromium.org/13866007/diff/2001/Source/Platform/chromium/public/Platform.h#newcode514 Source/Platform/chromium/public/Platform.h:514: Please add ...
7 years, 8 months ago (2013-04-09 17:29:53 UTC) #2
timvolodine
Peter, thanks for the comments, they should be fixed in this next patch I have ...
7 years, 8 months ago (2013-04-10 19:06:12 UTC) #3
timvolodine
Eric, Peter, Can you spot any issues in this patch? Would appreciate your feedback. thanks, ...
7 years, 8 months ago (2013-04-16 15:25:32 UTC) #4
eseidel
This feels like something which could move to modules/ I'm not particularly familiar with this ...
7 years, 8 months ago (2013-04-17 01:51:16 UTC) #5
timvolodine
Thanks Eric, Peter said he'll have a further look, but if he is short on ...
7 years, 8 months ago (2013-04-17 17:47:25 UTC) #6
Peter Beverloo
Thanks Tim, this looks a lot better already! It's unfortunate that we need to provideDeviceMotionTo() ...
7 years, 8 months ago (2013-04-17 19:08:23 UTC) #7
eseidel
Supplement for what? abarth added a Supplement<T> class which I thought was lazy...
7 years, 8 months ago (2013-04-18 07:09:56 UTC) #8
timvolodine
thanks Peter! https://codereview.chromium.org/13866007/diff/15001/Source/Platform/chromium/public/Platform.h File Source/Platform/chromium/public/Platform.h (right): https://codereview.chromium.org/13866007/diff/15001/Source/Platform/chromium/public/Platform.h#newcode517 Source/Platform/chromium/public/Platform.h:517: // FIXME add WebDeviceOrientationReader* deviceOrientationReader() On 2013/04/17 ...
7 years, 8 months ago (2013-04-18 12:37:38 UTC) #9
Peter Beverloo
Eric: While this patch takes the Source/Platform/ approach, the DeviceMotionController is defined as a supplement ...
7 years, 8 months ago (2013-04-18 13:56:06 UTC) #10
timvolodine
https://codereview.chromium.org/13866007/diff/15001/Source/WebCore/dom/DeviceMotionController.cpp File Source/WebCore/dom/DeviceMotionController.cpp (right): https://codereview.chromium.org/13866007/diff/15001/Source/WebCore/dom/DeviceMotionController.cpp#newcode94 Source/WebCore/dom/DeviceMotionController.cpp:94: void DeviceMotionController::dispatchDeviceEvent(PassRefPtr<Event> prpEvent) On 2013/04/18 13:56:06, Peter Beverloo wrote: ...
7 years, 8 months ago (2013-04-18 14:55:37 UTC) #11
eseidel
https://codereview.chromium.org/13866007/diff/37001/Source/Platform/chromium/public/WebDeviceMotionData.h File Source/Platform/chromium/public/WebDeviceMotionData.h (right): https://codereview.chromium.org/13866007/diff/37001/Source/Platform/chromium/public/WebDeviceMotionData.h#newcode75 Source/Platform/chromium/public/WebDeviceMotionData.h:75: bool m_hasAccelerationX; If this object is at all size-sensitive, ...
7 years, 8 months ago (2013-04-23 15:21:24 UTC) #12
timvolodine
Eric, thanks for the quick reaction! https://codereview.chromium.org/13866007/diff/37001/Source/Platform/chromium/public/WebDeviceMotionData.h File Source/Platform/chromium/public/WebDeviceMotionData.h (right): https://codereview.chromium.org/13866007/diff/37001/Source/Platform/chromium/public/WebDeviceMotionData.h#newcode75 Source/Platform/chromium/public/WebDeviceMotionData.h:75: bool m_hasAccelerationX; On ...
7 years, 8 months ago (2013-04-23 18:10:40 UTC) #13
abarth-chromium
This CL has lots of problems. The existing device controller code is very bad and ...
7 years, 8 months ago (2013-04-23 21:36:26 UTC) #14
timvolodine
Adam, thanks for the comments. I'll create a new patch and move the relevant classes ...
7 years, 8 months ago (2013-04-24 12:36:02 UTC) #15
abarth-chromium
On 2013/04/24 12:36:02, timvolodine wrote: > As we are implementing a shared-memory approach we need ...
7 years, 8 months ago (2013-04-24 15:18:50 UTC) #16
abarth-chromium
I'm also very skeptical of holding RefPtr<DOMWindow>. That doesn't make any sense from an architectural ...
7 years, 8 months ago (2013-04-24 15:20:42 UTC) #17
timvolodine
On 2013/04/24 15:18:50, abarth wrote: > On 2013/04/24 12:36:02, timvolodine wrote: > > As we ...
7 years, 8 months ago (2013-04-24 15:29:42 UTC) #18
abarth-chromium
On 2013/04/24 15:29:42, timvolodine wrote: > It needs to be in the renderer process, so ...
7 years, 8 months ago (2013-04-24 16:28:46 UTC) #19
timvolodine
On 2013/04/24 16:28:46, abarth wrote: > On 2013/04/24 15:29:42, timvolodine wrote: > > It needs ...
7 years, 8 months ago (2013-04-24 17:49:01 UTC) #20
abarth-chromium
On 2013/04/24 17:49:01, timvolodine wrote: > If the pump is implemented in the content layer ...
7 years, 8 months ago (2013-04-24 17:56:14 UTC) #21
timvolodine
7 years, 4 months ago (2013-08-21 16:12:34 UTC) #22
this issue is obsolete and has been resolved/landed in
https://chromiumcodereview.appspot.com/14460010/.

closing.

Powered by Google App Engine
This is Rietveld 408576698