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

Issue 1371793004: Provide the DeviceManager service to the renderer directly, no app. (Closed)

Created:
5 years, 2 months ago by Reilly Grant (use Gerrit)
Modified:
5 years, 2 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@interface_permission
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Provide the DeviceManager service to the renderer directly, no app. The Mojo app model forces us to create a new thread on which to run the device manager. Inside Chrome this then means that we have to post tasks to the UI thread in order to use the UsbService instance it is implemented with. This patch removes the devices app from Chrome, instead registering a factory function for DeviceManagers directly with the RenderFrameHost. DeviceManagerImpl can then live on the UI thread which greatly simplfies its implementation. Otherwise we would have to implement similar thread hopping in DeviceImpl and that would be a lot of unnecessary code. Committed: https://crrev.com/869af1c5170c48b8987b7ce4e2c70c9b37f9beb7 Cr-Commit-Position: refs/heads/master@{#352222}

Patch Set 1 #

Patch Set 2 : Fix header inclusion in chrome_content_browser_client.cc. #

Total comments: 10

Patch Set 3 : Addresses rockot@'s feedback. #

Total comments: 1

Patch Set 4 : Fix headers. #

Patch Set 5 : Fix chrome_browser.gypi. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -200 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/DEPS View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 5 chunks +18 lines, -17 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/usb/web_usb_client_impl.h View 2 chunks +3 lines, -4 lines 0 comments Download
M content/renderer/usb/web_usb_client_impl.cc View 4 chunks +7 lines, -10 lines 0 comments Download
M device/devices_app/devices_app.h View 1 2 3 chunks +1 line, -7 lines 0 comments Download
M device/devices_app/devices_app.cc View 2 chunks +5 lines, -12 lines 0 comments Download
M device/devices_app/public/cpp/devices_app_factory.h View 2 chunks +1 line, -11 lines 0 comments Download
M device/devices_app/public/cpp/devices_app_factory.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M device/devices_app/usb/device_manager_impl.h View 1 2 7 chunks +16 lines, -16 lines 0 comments Download
M device/devices_app/usb/device_manager_impl.cc View 1 2 6 chunks +29 lines, -110 lines 0 comments Download
M device/devices_app/usb/device_manager_impl_unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 26 (10 generated)
Reilly Grant (use Gerrit)
rockot@ for a general review before I add other OWNERS.
5 years, 2 months ago (2015-09-26 00:06:04 UTC) #3
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1371793004/diff/20001/chrome/browser/DEPS File chrome/browser/DEPS (right): https://codereview.chromium.org/1371793004/diff/20001/chrome/browser/DEPS#newcode122 chrome/browser/DEPS:122: "+device/devices_app/public", no longer used, right? https://codereview.chromium.org/1371793004/diff/20001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): ...
5 years, 2 months ago (2015-09-28 22:23:14 UTC) #4
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1371793004/diff/20001/chrome/browser/DEPS File chrome/browser/DEPS (right): https://codereview.chromium.org/1371793004/diff/20001/chrome/browser/DEPS#newcode122 chrome/browser/DEPS:122: "+device/devices_app/public", On 2015/09/28 22:23:14, Ken Rockot wrote: > no ...
5 years, 2 months ago (2015-09-28 23:32:00 UTC) #5
Ken Rockot(use gerrit already)
lgtm
5 years, 2 months ago (2015-09-28 23:35:30 UTC) #6
Reilly Grant (use Gerrit)
thestig@, please review //chrome/browser/DEPS. kinuko@, please review //content.
5 years, 2 months ago (2015-09-28 23:45:03 UTC) #8
Lei Zhang
On 2015/09/28 23:45:03, Reilly Grant wrote: > thestig@, please review //chrome/browser/DEPS. lgtm, but android bots ...
5 years, 2 months ago (2015-09-29 00:20:33 UTC) #9
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1371793004/diff/40001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1371793004/diff/40001/chrome/browser/chrome_content_browser_client.cc#newcode627 chrome/browser/chrome_content_browser_client.cc:627: mojo::InterfaceRequest<device::usb::DeviceManager> request) { you should include "device/usb/public/interfaces/device_manager.mojom" regardless of ...
5 years, 2 months ago (2015-09-29 00:22:53 UTC) #10
Reilly Grant (use Gerrit)
jam@, please take a look at //content instead because you're more familiar with Mojo.
5 years, 2 months ago (2015-09-29 20:12:43 UTC) #14
Reilly Grant (use Gerrit)
On 2015/09/29 20:12:43, Reilly Grant wrote: > jam@, please take a look at //content instead ...
5 years, 2 months ago (2015-10-01 18:18:43 UTC) #15
jam
lgtm
5 years, 2 months ago (2015-10-02 17:32:50 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371793004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371793004/80001
5 years, 2 months ago (2015-10-02 17:37:06 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/77186)
5 years, 2 months ago (2015-10-02 21:13:48 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371793004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371793004/80001
5 years, 2 months ago (2015-10-02 23:20:17 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 2 months ago (2015-10-03 01:54:04 UTC) #24
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/869af1c5170c48b8987b7ce4e2c70c9b37f9beb7 Cr-Commit-Position: refs/heads/master@{#352222}
5 years, 2 months ago (2015-10-03 01:54:59 UTC) #25
Finnur
5 years, 2 months ago (2015-10-05 10:18:03 UTC) #26
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/1382383002/ by finnur@chromium.org.

The reason for reverting is: It is causing a number of layout tests to fail with
error:

01:16:18.824 21620  
[4:4:1005/011618:1968830910:ERROR:web_usb_client_impl.cc(72)] Device manager
connection failed.

See for example:
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.6/builds/...
.

Powered by Google App Engine
This is Rietveld 408576698