New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612330 link

Starred by 12 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Task

Blocked on: View detail
issue 694998
issue 773463

Blocking:
issue 598069
issue 612328



Sign in to add a comment

Content Modularization Project: Gamepad Service

Project Member Reported by jam@chromium.org, May 16 2016

Issue description

Tracking bug for the gamepad part of the Content Modularization Project. The end goal should be to have a self-contained service. As part of getting rid (or greatly reducing) content/, this code should move out of content/. Most likely to device/gamepad to be consistent with what's being done for other device related APIs.
 

Comment 1 by jam@chromium.org, May 16 2016

Strawman proposal, following other services that we're extracting from content:
-convert IPCs to mojo
-eliminate the dependencies in this code on other code in content/
-move remaining code in content/browser/gamepad to device/gamepad
One possible wrinkle with this one is the unusual use of shared memory to have the browser only write once and have all the renderers read from the same one simultaneously. (I'm not saying it's a blocker/problem, just that it might require a bit of extra planning.)

Comment 3 by jam@chromium.org, May 17 2016

Blocking: -598073 598069

Comment 4 by jam@chromium.org, May 17 2016

Scott: Mojo's shared buffer has the ability to send read-only handles to shared memory. This should help with above?

See
https://www.chromium.org/developers/design-documents/mojo#TOC-Shared-Buffer
and
https://code.google.com/p/chromium/codesearch#chromium/src/mojo/public/c/system/buffer.h&rcl=1463411924&l=71
Ah, ok should be fine. (I guess we might want to reconsider if it's necessary also or if we can just use a mojo multicast.)

Comment 6 by jam@chromium.org, May 17 2016

For multicast, Mojo doesn't have such a concept. We could implement it manually, just like we could with chrome IPC. The drawback would be that we'd be waking up all the renderers each time the gamepad values change, which seems like something we'd want to avoid?
I presume it's not a layering violation to have code within devices/ depend on other code within devices/? I've got some speculative code that has gamepad interfaces implemented within what will soon be devices/vr/.

Also, when you say "For multicast, Mojo doesn't have such a concept" you mean Mojo doesn't support multicast? If so the manual implementation seems to be having each renderer create a GamepadServiceClient (presentation.mojom does this), have the GamepadService maintain a list of all active clients, and for each multicast message sending a message to each client separately, correct? 
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 7 2016

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

commit b9bb4c42d6b19a7d7131af942d3769c54e89981c
Author: bajones <bajones@chromium.org>
Date: Thu Jul 07 00:10:51 2016

Migrating majority of gamepad from content/browser/ to device/

BUG=612330

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

[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/BUILD.gn
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/DEPS
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/android/browser_jni_registrar.cc
[delete] https://crrev.com/d1e1331024f9e1fa5c633c0d29d6339c8e9fbe83/content/browser/gamepad/gamepad_consumer.h
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_service.cc
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_service.h
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_service_test_helpers.cc
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_service_test_helpers.h
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_service_unittest.cc
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_shared_buffer_impl.cc
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/gamepad/gamepad_shared_buffer_impl.h
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/renderer_host/gamepad_browser_message_filter.h
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/renderer_host/pepper/pepper_gamepad_host.h
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/content_browser.gypi
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/content_common.gypi
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/content_jni.gypi
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/content_tests.gypi
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/public/android/BUILD.gn
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/renderer/gamepad_shared_memory_reader.cc
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/content/test/BUILD.gn
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/BUILD.gn
[modify] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/device_tests.gyp
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/BUILD.gn
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/DEPS
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/OWNERS
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadDevice.java
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadList.java
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadMappings.java
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad.gyp
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_consumer.cc
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_consumer.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_data_fetcher.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_data_fetcher.h
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_export.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_android.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_android.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_linux.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_linux.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_mac.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_mac.mm
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_win.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_platform_data_fetcher_win.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_provider.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_provider.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_provider_unittest.cc
[add] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_shared_buffer.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_standard_mappings.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_standard_mappings.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_standard_mappings_linux.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_standard_mappings_mac.mm
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_standard_mappings_win.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_test_helpers.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_test_helpers.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_user_gesture.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/gamepad_user_gesture.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/raw_input_data_fetcher_win.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/raw_input_data_fetcher_win.h
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/xbox_data_fetcher_mac.cc
[rename] https://crrev.com/b9bb4c42d6b19a7d7131af942d3769c54e89981c/device/gamepad/xbox_data_fetcher_mac.h

woohoo, the change landed :) Once this has gone into a canary build, can we also merge it into M53 for ARC++ Gamepad support?
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 7 2016

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

commit 3fd0432005a1a370ed273077aec593acd1aa963c
Author: mostynb <mostynb@opera.com>
Date: Thu Jul 07 17:39:24 2016

gyp: don't build gamepad_platform_data_fetcher_linux.cc when udev is disabled

Fixup after https://codereview.chromium.org/2081583002

BUG=612330

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

[modify] https://crrev.com/3fd0432005a1a370ed273077aec593acd1aa963c/device/gamepad/gamepad.gyp

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 7 2016

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

commit 67b3938316821d5ccd3d41b2c002f99b1dd125c1
Author: nhiroki <nhiroki@chromium.org>
Date: Thu Jul 07 17:43:30 2016

Gamepad: Fix GYP build on Linux

GN config on Linux has a dependency on //device/udev_linux when use_udev==1, but
GYP config does not have the equivalent. This is failing GYP build on Linux.

This gyp file was changed in
https://codereview.chromium.org/2081583002

BUG=612330

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

[modify] https://crrev.com/67b3938316821d5ccd3d41b2c002f99b1dd125c1/device/gamepad/gamepad.gyp

Labels: Merge-Request-53
Status: Started (was: Available)
I'll request the merge, though there's a couple of follow up patches that will need to go along with it to fix a couple of dependencies I missed on the first pass.

Comment 13 by dimu@google.com, Jul 7 2016

Labels: -Merge-Request-53 Merge-Review-53 Hotlist-Merge-Review
[Automated comment] DEPS changes referenced in bugdroid comments, needs manual review.
Before we approve merge to M53, Could you please confirm whether this change is baked/verified in Canary and safe to merge?

Also is this change applicable to all OS or any specific OS?
The change has baked in Canary for a bit at this point and doesn't seem to be causing any problems. It affects all OSes.
Labels: -Merge-Review-53 Merge-Approved-53 OS-All
Approving merge to M53 branch 2785 based on comment #15. Could you please merge this once Change is baked enough in canary probably tomorrow?
Friendly ping on Merge to M53 branch 2785 if things are looking good in Canary.
Sorry, I'm OOO til Monday. If someone else wants to merge this before then be my guest
No worries, Please merge your change to M53 branch 2785 before 5:00 PM PDT Monday (07/25) so it gets picked for next week M53 Dev release. Thank you.
Project Member

Comment 20 by sheriffbot@chromium.org, Jul 23 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: nyerramilli@chromium.org
bajones@, could you please merge this to M53 branch 2785 ASAP. Thank you.
Please merge your change to M53 branch 2785 before 5:00 PM PDT today (Monday) so we can pick up for last M53 Dev release tomorrow. Thank you.
Project Member

Comment 23 by bugdroid1@chromium.org, Jul 25 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5468887d9518dd5792c6e2a928372b8833f0fd6f

commit 5468887d9518dd5792c6e2a928372b8833f0fd6f
Author: Brandon Jones <bajones@chromium.org>
Date: Mon Jul 25 18:34:31 2016

Migrating majority of gamepad from content/browser/ to device/

BUG=612330

Review-Url: https://codereview.chromium.org/2081583002
Cr-Commit-Position: refs/heads/master@{#403998}
(cherry picked from commit b9bb4c42d6b19a7d7131af942d3769c54e89981c)

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

Cr-Commit-Position: refs/branch-heads/2785@{#334}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/BUILD.gn
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/DEPS
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/android/browser_jni_registrar.cc
[delete] https://crrev.com/dcd8f0f911957e45232d22e85cac0e381dc26d35/content/browser/gamepad/gamepad_consumer.h
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_service.cc
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_service.h
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_service_test_helpers.cc
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_service_test_helpers.h
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_service_unittest.cc
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_shared_buffer_impl.cc
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/gamepad/gamepad_shared_buffer_impl.h
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/renderer_host/gamepad_browser_message_filter.h
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/renderer_host/pepper/pepper_gamepad_host.h
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/content_browser.gypi
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/content_common.gypi
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/content_jni.gypi
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/content_tests.gypi
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/public/android/BUILD.gn
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/renderer/gamepad_shared_memory_reader.cc
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/content/test/BUILD.gn
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/BUILD.gn
[modify] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/device_tests.gyp
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/BUILD.gn
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/DEPS
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/OWNERS
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadDevice.java
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadList.java
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/android/java/src/org/chromium/device/gamepad/GamepadMappings.java
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad.gyp
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_consumer.cc
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_consumer.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_data_fetcher.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_data_fetcher.h
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_export.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_android.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_android.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_linux.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_linux.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_mac.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_mac.mm
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_win.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_platform_data_fetcher_win.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_provider.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_provider.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_provider_unittest.cc
[add] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_shared_buffer.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_standard_mappings.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_standard_mappings.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_standard_mappings_linux.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_standard_mappings_mac.mm
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_standard_mappings_win.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_test_helpers.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_test_helpers.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_user_gesture.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/gamepad_user_gesture.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/raw_input_data_fetcher_win.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/raw_input_data_fetcher_win.h
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/xbox_data_fetcher_mac.cc
[rename] https://crrev.com/5468887d9518dd5792c6e2a928372b8833f0fd6f/device/gamepad/xbox_data_fetcher_mac.h

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 25 2016

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

commit 2badd6ea546f019b0e61ba142189e44492be904c
Author: Brandon Jones <bajones@chromium.org>
Date: Mon Jul 25 18:41:29 2016

gyp: don't build gamepad_platform_data_fetcher_linux.cc when udev is disabled

Fixup after https://codereview.chromium.org/2081583002

BUG=612330

Review-Url: https://codereview.chromium.org/2125223003
Cr-Commit-Position: refs/heads/master@{#404168}
(cherry picked from commit 3fd0432005a1a370ed273077aec593acd1aa963c)

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

Cr-Commit-Position: refs/branch-heads/2785@{#335}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/2badd6ea546f019b0e61ba142189e44492be904c/device/gamepad/gamepad.gyp

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 25 2016

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

commit b0a840ef9f1a53c8b655313fda9c06d4f91f2737
Author: Brandon Jones <bajones@chromium.org>
Date: Mon Jul 25 18:46:14 2016

Gamepad: Fix GYP build on Linux

GN config on Linux has a dependency on //device/udev_linux when use_udev==1, but
GYP config does not have the equivalent. This is failing GYP build on Linux.

This gyp file was changed in
https://codereview.chromium.org/2081583002

BUG=612330

Review-Url: https://codereview.chromium.org/2132453002
Cr-Commit-Position: refs/heads/master@{#404173}
(cherry picked from commit 67b3938316821d5ccd3d41b2c002f99b1dd125c1)

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

Cr-Commit-Position: refs/branch-heads/2785@{#336}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/b0a840ef9f1a53c8b655313fda9c06d4f91f2737/device/gamepad/gamepad.gyp

Okay, merge to is done M53 branch is done!
Components: Blink>GamepadAPI
Cc: blundell@chromium.org
What's left to be done here? It looks like there's still gamepad code in //content.
The main thing left to do is convert the IPC calls to Mojo and make sure that all the shared memory code can migrate cleanly. (I recall that was a sticking point for the move that's already been done, but can't recall the exact reason why off the top of my head.)

I have every intention of doing this, but I've also got other pressing deadlines to attend to so I may not be able to address it for a while. 
Gotcha, thanks.
Hi bajones@, I'm highly interested in having design docs for all the remaining Device Service work ASAP to estimate the amount of work involved. Would you be able to do the design doc for gamepad in the next week or so, or should I take an initial crack at it (i.e., just the design doc part, it's OK if the technical work lags behind)? 


Owner: blundell@chromium.org
After discussion with bajones@, I'm going to take over this bug.
Project Member

Comment 33 by bugdroid1@chromium.org, Nov 22 2016

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

commit 303e0f93e55f92b45c5fcea420379c0802583f36
Author: ke.he <ke.he@intel.com>
Date: Tue Nov 22 04:38:13 2016

Add struct_traits and typemap for blink::WebGamepad

This is the prepare patch for Mojo-ification of Gamepad.
The original GamepadMsg_GamepadConnected/Disconnected messages use the
blink::WebGamepad as parameter, so before we convert above messages to mojo
interface, we have to add the typemap and struct_traits for struct
blink::WebGamepad first.

Unittest of this new-added typemap and struct_traits are added into gn target
device_unittests.

BUG=612330

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

[modify] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/BUILD.gn
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/BUILD.gn
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/OWNERS
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/gamepad.mojom
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/gamepad.typemap
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/gamepad_struct_traits.cc
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/gamepad_struct_traits.h
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/gamepad_struct_traits_test.mojom
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/gamepad_struct_traits_unittest.cc
[add] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/device/gamepad/public/interfaces/typemaps.gni
[modify] https://crrev.com/303e0f93e55f92b45c5fcea420379c0802583f36/mojo/public/tools/bindings/chromium_bindings_configuration.gni

Project Member

Comment 34 by bugdroid1@chromium.org, Dec 9 2016

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

commit 0bb26d507b0a3ee05b01784841b850e22e58eec5
Author: ke.he <ke.he@intel.com>
Date: Fri Dec 09 05:30:50 2016

Convert Gamepad IPC messages into mojo interface.

This patch is a subtask of "Decoupling Gamepad from //content".

The Gamepad IPC messages are converted into mojo interfaces, so the
GamepadBrowserMessageFilter doesn't need to extend BrowserMessageFilter anymore
so we renamed it as GamepadMonitor.
GamepadMonitor still extend GamepadConsumer interface. Each RenderProcessHost
owns one GamepadMonitor. GamepadMonitor instance is created by "StrongBinding"
and will be registered into the "ConsumerSet" of GamepadService.
The base::SharedMemory handle are wrapped into mojo::SharedMemoryHandle and
passed as parameter of mojo interface from Browser to Renderer, Renderer Process
unwrap it to get the real shared memory contents.
Note that to obtain a new SharedMemoryHandle to wrap in a Mojo handle we simply
clone the existing one. While it's not obvious, this is functionally equivalent
to the old approach of passing the peer handle: when the renderer unwraps the
Mojo handle that it obtained into a base::SharedMemoryHandle, it fills in that
handle with its own process ID.

BUG=612330

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

[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/browser/BUILD.gn
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/browser/gamepad/gamepad_service.cc
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/browser/gamepad/gamepad_service.h
[delete] https://crrev.com/feae988cc92320f9f7d8f0d9a5fa5056d11e3f69/content/browser/renderer_host/gamepad_browser_message_filter.cc
[delete] https://crrev.com/feae988cc92320f9f7d8f0d9a5fa5056d11e3f69/content/browser/renderer_host/gamepad_browser_message_filter.h
[add] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/browser/renderer_host/gamepad_monitor.cc
[add] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/browser/renderer_host/gamepad_monitor.h
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/common/BUILD.gn
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/common/content_message_generator.h
[delete] https://crrev.com/feae988cc92320f9f7d8f0d9a5fa5056d11e3f69/content/common/gamepad_messages.h
[delete] https://crrev.com/feae988cc92320f9f7d8f0d9a5fa5056d11e3f69/content/common/gamepad_param_traits.cc
[delete] https://crrev.com/feae988cc92320f9f7d8f0d9a5fa5056d11e3f69/content/common/gamepad_param_traits.h
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/renderer/BUILD.gn
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/renderer/DEPS
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/renderer/gamepad_shared_memory_reader.cc
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/content/renderer/gamepad_shared_memory_reader.h
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/device/gamepad/gamepad_provider.cc
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/device/gamepad/gamepad_provider.h
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/device/gamepad/public/interfaces/gamepad.mojom
[modify] https://crrev.com/0bb26d507b0a3ee05b01784841b850e22e58eec5/tools/ipc_fuzzer/fuzzer/fuzzer.cc

Project Member

Comment 35 by bugdroid1@chromium.org, Dec 10 2016

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

commit bee6a64bd524847e541f6ef11c73c0328094b9d3
Author: ke.he <ke.he@intel.com>
Date: Sat Dec 10 01:56:19 2016

Move gamepad_service out of content/ and into device/

This patch is a subtask of "Decoupling Gamepad from //content".

In this patch the GamepadService, GamepadServiceUnittest, GamepadMonitor and
GamepadSharedBuffer are moved out of content/browser/gamepad or render_host,
and into device/gamepad/.

The file //content/common/gamepad_hardware_buffer.h is removed, we move the
definition of GamepadHardwareBuffer into gamepad_shared_memory.h, and change
its definition by using generic SharedMemorySeqLockBuffer<blink::WebGamepads>.

In the unittest of GamepadProvider, we don't pass a MockSharedMemoryBuffer
(which has no seqlock controls) anymore. GamepadProvider will create a
SharedMemoryBuffer by default in its constructor, so we add the seqlock-read
accordingly in its unittest.

Based on a patch by bajones@chromium.org.

BUG = 612330

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

[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/browser/BUILD.gn
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/browser/browser_main_loop.cc
[delete] https://crrev.com/2fd351656a3ff6bd5a7ab51b0ce32cbd33e31e02/content/browser/gamepad/OWNERS
[delete] https://crrev.com/2fd351656a3ff6bd5a7ab51b0ce32cbd33e31e02/content/browser/gamepad/gamepad_service_test_helpers.cc
[delete] https://crrev.com/2fd351656a3ff6bd5a7ab51b0ce32cbd33e31e02/content/browser/gamepad/gamepad_service_test_helpers.h
[delete] https://crrev.com/2fd351656a3ff6bd5a7ab51b0ce32cbd33e31e02/content/browser/gamepad/gamepad_shared_buffer_impl.cc
[delete] https://crrev.com/2fd351656a3ff6bd5a7ab51b0ce32cbd33e31e02/content/browser/gamepad/gamepad_shared_buffer_impl.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/browser/renderer_host/pepper/pepper_gamepad_host.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/browser/renderer_host/pepper/pepper_gamepad_host.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/common/BUILD.gn
[delete] https://crrev.com/2fd351656a3ff6bd5a7ab51b0ce32cbd33e31e02/content/common/gamepad_hardware_buffer.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/renderer/gamepad_shared_memory_reader.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/renderer/gamepad_shared_memory_reader.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/content/test/BUILD.gn
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/BUILD.gn
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/BUILD.gn
[rename] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_monitor.cc
[rename] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_monitor.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_provider.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_provider.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_provider_unittest.cc
[rename] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_service.cc
[rename] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_service.h
[rename] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_service_unittest.cc
[add] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_shared_buffer.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_shared_buffer.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_test_helpers.cc
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/gamepad_test_helpers.h
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/device/gamepad/public/interfaces/gamepad.mojom
[modify] https://crrev.com/bee6a64bd524847e541f6ef11c73c0328094b9d3/ppapi/shared_impl/ppb_gamepad_shared.h

Labels: DeviceService
Cc: roc...@chromium.org
Owner: wangjimmy@chromium.org
Hi blundell,
I'm an intern on Mojo. I discussed with rockot and we decided this would be a good starting servicification bug for me to help with. I'll be moving the GamepadMonitor interface into Device Service.
Cc: ke...@intel.com
Hi,

Sounds good! Ke He has been doing work in this area. He has an outstanding CL (https://codereview.chromium.org/2580693003/). Ke He, can you remind me what is blocking that CL from landing? Did you have any other work in progress here? It should work fine to transition Gamepad work to Jimmy, as there's more than enough Device Service work to go around :).

I also recently did analysis on the project of servicifying Gamepad. I'll flesh out the bugtree with my findings by the end of this week, and we can touch base next week to go through the project in detail.

Comment 39 by ke...@intel.com, Feb 22 2017

Hi, Colin, Hi, Jimmy, welcome:)
My pending CL is "Decouple and move Gamepad impl in //content/renderer/ into Blink".
I met two blocking issues in that CL.
1): "GamepadSharedMemoryReader uses Chromium synchronization primitives, which are not allowed in //third_party/WebKit/Source/modules.", See crbug 676328.
2): Layout-test is breaked. Because in my CL, the RendererBlinkPlatformImpl::platform_event_observers_ are not used by Gamepad anymore, but it is still useful for layout-tests.

I think my CL is about Renderer side, it is parallel with "moving the gamepadMonitor interface into Device Service", so Jimmy can move on.
Blockedon: 694998
Thanks, Ke He! Agreed that that work is for Blink Onion Soup and orthogonal to servicification.

Jimmy, I filled in the bugtree here based on the recent analysis that I did.
Cc: wangjimmy@chromium.org
Owner: ----
Status: Available (was: Started)
Update: We need to figure out the relationship between Gamepad and VR. VR is not going to go into the Device Service, but has a tight dependency on Gamepad. Does this mean that Gamepad should also not go into the Device Service? See https://bugs.chromium.org/p/chromium/issues/detail?id=689437#c7 for more context.
Re: c#43, note that it wouldn't be problematic technically to have Gamepad live outside of the Device Service, as Gamepad doesn't have dependencies on any other device features (besides //device/base/synchronization, which is fine).

Comment 45 by bajones@google.com, Sep 29 2017

FWIW we're refactoring the VR API and as part of it we plan or breaking the dependency with the gamepad API in favor of a more purpose-built and action-based API.
Hey Brandon,

This is really good information to have, thanks! Am I understanding correctly that by "breaking the dependency with the gamepad API" you mean that the VR implementation will no longer depend on //device/gamepad at all once your refactoring is complete? Do you have a design doc/tracking bug/etc? Thanks!
No design doc at this point, aside from the spec/explainer discussions around the upcoming API change. I've filed a tracking bug, though: #773463
Blockedon: 773463
Components: Internals>Services>Device
Labels: Type-Task
Migrating S13N meta bugs to Type=Task, so that they can be distinguished from technical work.
Components: Internals>Services
Hi Brandon, I'd like to have someone start on crbug.com/689437 (moving VR entirely out of //device). However, before doing so I wanted to confirm: Is the definitive plan that VR will no longer depend on //device/gamepad in the future? If so, do you have an idea of a rough timeframe for dropping the dependence? Thanks!

Comment 53 by donna...@intel.com, Feb 28 2018

Cc: donna...@intel.com
Owner: oksamyt@chromium.org
Status: Started (was: Available)
oksamyt@: I'm glad that you're interested! As you can see from the above discussion, s13n of Gamepad and VR is in kind of a messy and ambiguous state :P. Do you have concrete technical plans here? Thanks!
Hello Colin,
I would like to provide some context:
Initially I was going to attempt moving files from content/renderer/device_sensors/ to third_party/blink/renderer/modules/device_orientation/, which looked like a fairly focused task (that would allow me to get familiar with mojo and layers). Then I discovered dependencies between GamepadSharedMemoryReader, PlatformEventObserver and DeviceSensorEventPump, so looks like GamepadSharedMemoryReader needs to be moved to blink first. The patch that does that move (https://crrev.com/2580693003) was blocked on layout tests. Reilly and Matt have been helping me to understand how to resolve the issue with tests, but I am still in the process of learning what the different parts are and how they are related. I will share some notes describing the approaches and options soon. No plans to change anything VR-related.
Thanks!
Thanks, that makes sense! So at this time, you're looking at completing the renderer-side work for Gamepad (i.e., the Blink Onion Soup work that Ke He had started and described in c#39 above). As you've noted, that's orthogonal to the relationship between Gamepad and VR.
Project Member

Comment 59 by bugdroid1@chromium.org, Jun 1 2018

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

commit bdb4a42cda67aad4c162352f9d51325d4e48be7d
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Fri Jun 01 16:35:27 2018

Replace deprecated RunLoop method call

This change replaces
base::RunLoop::QuitCurrentWhenIdleClosureDeprecated() call with a
call to loop.QuitWhenIdleClosure() call on a local RunLoop instance.

Bug: 612330
Change-Id: Ia0580db3a365fad393b682c2e7129a44eb8e2760
Reviewed-on: https://chromium-review.googlesource.com/1081492
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563674}
[modify] https://crrev.com/bdb4a42cda67aad4c162352f9d51325d4e48be7d/content/renderer/device_sensors/device_motion_event_pump_unittest.cc

Project Member

Comment 60 by bugdroid1@chromium.org, Jun 5 2018

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

commit 87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Tue Jun 05 19:40:38 2018

Remove RenderThread parameter from platform even observer classes.

This removes the RenderThread parameter from DeviceMotionEventPump,
DeviceOrientationEventPump, and GamepadSharedMemoryReader, since it's
no longer used by anything.

Bug: 612330
Change-Id: I70ce28a0ce519ee3b7e030abbdf1411b32cf30c9
Reviewed-on: https://chromium-review.googlesource.com/1081935
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564617}
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/public/renderer/renderer_gamepad_provider.h
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_motion_event_pump.cc
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_motion_event_pump.h
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_orientation_event_pump.cc
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_orientation_event_pump.h
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/device_sensors/device_sensor_event_pump.h
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/gamepad_shared_memory_reader.cc
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/gamepad_shared_memory_reader.h
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/87c1f57d8aac9e0f58db05cfb08f3fd4dfc6c3e8/content/shell/renderer/layout_test/blink_test_runner.cc

Project Member

Comment 62 by bugdroid1@chromium.org, Jun 7 2018

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

commit f26eb00749346be2481db8e87fcf17b72432bccc
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Thu Jun 07 03:46:14 2018

Add a LocalFrame* parameter to AddController

This change adds a LocalFrame* parameter to
PlatformEventDispatcher::AddController() and
PlatformEventDispatcher::StartListening(). The frame will be later
passed to Device*EventPump constructors and used to get the interface
provider in SendStartMessage().

Bug: 612330
Change-Id: If3effab5f9d36517e4b5b4165b07ff308e6b2bfd
Reviewed-on: https://chromium-review.googlesource.com/1081432
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565170}
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/core/frame/platform_event_controller.h
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/core/frame/platform_event_dispatcher.cc
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/core/frame/platform_event_dispatcher.h
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/battery/battery_dispatcher.cc
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/battery/battery_dispatcher.h
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/device_orientation/device_motion_dispatcher.cc
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/device_orientation/device_motion_dispatcher.h
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/device_orientation/device_orientation_dispatcher.cc
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/device_orientation/device_orientation_dispatcher.h
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/gamepad/gamepad_dispatcher.cc
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/gamepad/gamepad_dispatcher.h
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/screen_orientation/screen_orientation_dispatcher.cc
[modify] https://crrev.com/f26eb00749346be2481db8e87fcf17b72432bccc/third_party/blink/renderer/modules/screen_orientation/screen_orientation_dispatcher.h

Project Member

Comment 63 by bugdroid1@chromium.org, Jun 11 2018

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

commit f7b2d117b38324953e933b52317bbf64f7110d51
Author: Robbie McElrath <rmcelrath@chromium.org>
Date: Mon Jun 11 22:35:45 2018

Replace MockGamepadProvider with mock mojo implementation in tests.

This deletes MockGamepadProvider, and updates GamepadController to
implement the GamepadMonitor mojo interface. This lets us use the real
GamepadSharedMemoryReader in layout tests, which connects to the
GamepadController mock implementation.

Bug: 612330
Change-Id: Id1960596ebb580d13be1083ee15c4610cb23651e
Reviewed-on: https://chromium-review.googlesource.com/1088227
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566177}
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/public/test/layouttest_support.h
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/renderer/layout_test/blink_test_runner.cc
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/renderer/layout_test/blink_test_runner.h
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/BUILD.gn
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/DEPS
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/gamepad_controller.cc
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/gamepad_controller.h
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/test_interfaces.cc
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/test_interfaces.h
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/shell/test_runner/web_test_delegate.h
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/content/test/layouttest_support.cc
[delete] https://crrev.com/215ccf9c94a15d2ceaf82871a256c7dba535a301/third_party/WebKit/LayoutTests/gamepad/gamepad-api-expected.txt
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/gamepad/gamepad-api.html
[delete] https://crrev.com/215ccf9c94a15d2ceaf82871a256c7dba535a301/third_party/WebKit/LayoutTests/gamepad/gamepad-polling-access-expected.txt
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/gamepad/gamepad-polling-access.html
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/gamepad/gamepad-vibration.html
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/gamepad/multiple-event-listeners.html
[add] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/gamepad/resources/gamepad-helpers.js
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/user-activation-v2/full-screen-gamepad-expected.txt
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/user-activation-v2/full-screen-gamepad.html
[modify] https://crrev.com/f7b2d117b38324953e933b52317bbf64f7110d51/third_party/WebKit/LayoutTests/virtual/user-activation-v2/user-activation-v2/full-screen-gamepad-expected.txt

Project Member

Comment 64 by bugdroid1@chromium.org, Jun 14 2018

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

commit 46c552e5c54966ef0c91e92044b2e6232a0f8821
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Thu Jun 14 02:06:27 2018

Decouple GamepadSharedMemoryReader from RendererGamepadProvider

This change prepares GamepadSharedMemoryReader for the move to blink
by removing its inheritance from RendererGamepadProvider and moving
listener-related logic to GamepadSharedMemeoryReader.
Since the GamepadSharedMemoryReader instance can no longer be stored
in RendererBlinkPlatformImpl::platform_event_observers_, a separate
variable has been added temporarily that will be moved to
GamepadDispatcher along with the logic when the
GamepadSharedMemoryReader class is moved to blink.

Bug: 612330
Change-Id: I4a6e2dd1af5afb52f7f6a980eb8aace7642426ac
Reviewed-on: https://chromium-review.googlesource.com/1096349
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567091}
[modify] https://crrev.com/46c552e5c54966ef0c91e92044b2e6232a0f8821/content/renderer/gamepad_shared_memory_reader.cc
[modify] https://crrev.com/46c552e5c54966ef0c91e92044b2e6232a0f8821/content/renderer/gamepad_shared_memory_reader.h
[modify] https://crrev.com/46c552e5c54966ef0c91e92044b2e6232a0f8821/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/46c552e5c54966ef0c91e92044b2e6232a0f8821/content/renderer/renderer_blink_platform_impl.h

Project Member

Comment 65 by bugdroid1@chromium.org, Jun 18 2018

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

commit 19de023d406fad43277cb4007154d8ac700baf93
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Mon Jun 18 20:50:54 2018

Create a shared component for gamepad_mojom_traits.{h,cc}

This change moves gamepad_mojom_traits to device/gamepad/public/cpp and
creates a shared component for them to be specified as a dependency in
gamepad.typemap. This will enable GamepadSharedMemoryReader to depend on
the traits after the move to blink.

Bug: 612330
Change-Id: I688a981313ec90a8c5bf909b0df4bb3e1f711388
Reviewed-on: https://chromium-review.googlesource.com/1103612
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568154}
[modify] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/cpp/BUILD.gn
[add] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/cpp/OWNERS
[rename] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/cpp/gamepad.typemap
[rename] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/cpp/gamepad_mojom_traits.cc
[rename] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/cpp/gamepad_mojom_traits.h
[rename] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/cpp/typemaps.gni
[modify] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/mojom/BUILD.gn
[modify] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/device/gamepad/public/mojom/OWNERS
[modify] https://crrev.com/19de023d406fad43277cb4007154d8ac700baf93/mojo/public/tools/bindings/chromium_bindings_configuration.gni

Project Member

Comment 66 by bugdroid1@chromium.org, Jul 16

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

commit 11651852d80d2dad5ace8c81e2e5a6d2b9230c1b
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Mon Jul 16 20:07:50 2018

Move GamepadSharedMemoryReader to blink

This change moves the GamepadSharedMemoryReader class to
third_party/blink/renderer/modules/gamepad. Its instance is now
created in relevant Device*Dispatcher methods with a LocalFrame*
passed to be used for Mojo interface creation.
Since the GamepadMonitor interface request is now made on a frame, its
registration was moved to RenderFrameHost and
content_browser_manifest.json was updated accordingly.

Blink-related updates:
- DISALLOW_COPY_AND_ASSIGN -> WTF_MAKE_NONCOPYABLE

Bug: 612330
Change-Id: Ie3821f1bc75e4b4086f69db0eaf7cf88d65716a8
Reviewed-on: https://chromium-review.googlesource.com/1101841
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575397}
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/renderer/BUILD.gn
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/renderer/renderer_blink_platform_impl.h
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/content/shell/test_runner/gamepad_controller.cc
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/mojo/public/tools/bindings/blink_bindings_configuration.gni
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/renderer/modules/gamepad/BUILD.gn
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/renderer/modules/gamepad/DEPS
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/renderer/modules/gamepad/gamepad_dispatcher.cc
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/renderer/modules/gamepad/gamepad_dispatcher.h
[rename] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/renderer/modules/gamepad/gamepad_shared_memory_reader.cc
[rename] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/renderer/modules/gamepad/gamepad_shared_memory_reader.h
[modify] https://crrev.com/11651852d80d2dad5ace8c81e2e5a6d2b9230c1b/third_party/blink/tools/audit_non_blink_usage.py

Owner: ----
Status: Available (was: Started)
Project Member

Comment 68 by bugdroid1@chromium.org, Aug 8

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

commit 96b546c462f9b740db165ece3d20f1899f211e9e
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Wed Aug 08 19:01:33 2018

Update gamepad_mojom_traits_unittests to use SerializeAndDeserialize

This change replaces the PassGamepad interface usage with
SerializeAndDeserialize() which is the modern and simpler way of testing
struct traits. Also, gamepad_mojom_traits_unittest.cc is moved to
//device/gamepad/public/cpp.

Bug: 612330
Change-Id: I9e8ebe3e8d62a08503d1aa24fdec39f9af280134
Reviewed-on: https://chromium-review.googlesource.com/1164404
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581645}
[modify] https://crrev.com/96b546c462f9b740db165ece3d20f1899f211e9e/device/BUILD.gn
[rename] https://crrev.com/96b546c462f9b740db165ece3d20f1899f211e9e/device/gamepad/public/cpp/gamepad_mojom_traits_unittest.cc
[modify] https://crrev.com/96b546c462f9b740db165ece3d20f1899f211e9e/device/gamepad/public/mojom/BUILD.gn
[delete] https://crrev.com/aadbf55bf7f3546ddbcb72dfa692263f43c447e5/device/gamepad/public/mojom/gamepad_mojom_traits_test.mojom

Cc: -roc...@chromium.org rockot@google.com

Sign in to add a comment