|
Gamepad API: add support for connection events
Co-authored with Brandon Jones.
This CL continues the work of updating the Gamepad API to latest spec.
IPC's added for connected and disconnected events. The connection state
is observed by GamepadProvider together with polling. The other option
would be to add logic to each platform fetcher. Doing it in GamepadProvider
avoids duplicated logic and I think it is a bit simpler and more consistent
with the polling base nature of the gamepad implementation.
Extra care has been taken to make it consistent with the policy of not
exposing gamepad data to the page before a user gesture is observed.
When a new renderer starts listening it will not get any events until
we see a user gesture. When we see it we notify it about all the connected
pads.
BUG= 344556
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+540 lines, -44 lines) |
Patch |
|
A |
content/browser/gamepad/gamepad_consumer.h
|
View
|
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/gamepad/gamepad_provider.h
|
View
|
|
4 chunks |
+30 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/gamepad/gamepad_provider.cc
|
View
|
|
9 chunks |
+105 lines, -10 lines |
0 comments
|
Download
|
|
M |
content/browser/gamepad/gamepad_service.h
|
View
|
|
4 chunks |
+30 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/gamepad/gamepad_service.cc
|
View
|
|
3 chunks |
+60 lines, -11 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/gamepad_browser_message_filter.h
|
View
|
|
2 chunks |
+13 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/gamepad_browser_message_filter.cc
|
View
|
|
3 chunks |
+19 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/pepper/pepper_gamepad_host.h
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/pepper/pepper_gamepad_host.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/render_process_host_impl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A |
content/common/gamepad_connection_event_message_params.h
|
View
|
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
|
A |
content/common/gamepad_connection_event_message_params.cc
|
View
|
|
1 chunk |
+65 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/common/gamepad_messages.h
|
View
|
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/content_browser.gypi
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
|
content/content_common.gypi
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/gamepad_shared_memory_reader.h
|
View
|
|
1 chunk |
+31 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/renderer/gamepad_shared_memory_reader.cc
|
View
|
|
4 chunks |
+78 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/renderer/render_thread_impl.h
|
View
|
|
3 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
content/renderer/render_thread_impl.cc
|
View
|
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/renderer/renderer_webkitplatformsupport_impl.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/renderer_webkitplatformsupport_impl.cc
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
Total messages: 2 (0 generated)
|