Reland "lacros: gnubby support for LaCrOS (hid_manager)"
This is a reland of 95cff9e7 What was broken in the first CL: device_unittests failed because of: -NintendoDataFetcherTest.AddAndRemoveSwitchPro -NintendoDataFetcherTest.UnsupportedDeviceIsIgnored services_unittests failed because of: -HidManagerTest.TestHidConnectionInterface -HidManagerTest.GetDevicesAndSetClient -HidManagerTest.GetDevicesOnly The unit test failed because the mock_hid_service is set in the unittest code but we din't bind it in the device service. In this CL, I add IsHidServiceTesting to check the testing status. It would bind the mock_hid_service when the HidService instance is set by SetHidServiceForTesting(). Original change's description: > lacros: gnubby support for LaCrOS (hid_manager) > > Because Gnubby and power gnubby in chromium would be considered as > HID devices, and this CL would enable HID devices support for LaCrOS. > > Before this CL: Lacros would try to access /dev/hidraw*, but the > permission of it is root:hidraw 660, and lacros is running in chronos > user permission. By the way, CrOS it is using dbus to access the > permission_broker, and permission_broker would access these files for CrOS. > > In this CL: Open a HidManager mojo between ash-chrome service and lacros service. > Lacros would use AddReceiver to add a receiver to ash-chrome's HidManager. > And the HidManager on ash-chrome would use permission_broker to access > /dev/hidraw* files. In this solution, we wouldn't need to compile the > permission_broker into lacros. > > BUG=chromium:1109621 > TEST=tested gnubby manually on soraka > > Change-Id: I18cfe9b5e93e260b9347df4b57ebe12a621f44a8 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2319089 > Commit-Queue: joe Chou <yich@google.com> > Reviewed-by: Greg Kerr <kerrnel@chromium.org> > Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org> > Reviewed-by: Reilly Grant <reillyg@chromium.org> > Reviewed-by: Scott Violet <sky@chromium.org> > Reviewed-by: Erik Chen <erikchen@chromium.org> > Cr-Commit-Position: refs/heads/master@{#800003} Bug: chromium:1109621 Change-Id: I15e77c7e7ccf8ea26bef6f7c65f36c5cafbf743c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367572Reviewed-by:Scott Violet <sky@chromium.org> Reviewed-by:
Jorge Lucangeli Obes <jorgelo@chromium.org> Reviewed-by:
Greg Kerr <kerrnel@chromium.org> Reviewed-by:
Erik Chen <erikchen@chromium.org> Reviewed-by:
Reilly Grant <reillyg@chromium.org> Auto-Submit: joe Chou <yich@google.com> Commit-Queue: joe Chou <yich@google.com> Cr-Commit-Position: refs/heads/master@{#803638}
Showing
Please register or sign in to comment