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

Issue 285333003: Support exposing Mojo services between render frames, render threads, and their respective hosts. (Closed)

Created:
6 years, 7 months ago by Sam McNally
Modified:
6 years, 6 months ago
CC:
darin (slow to review), Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Support exposing Mojo services between render frames, render threads, and their respective hosts. This introduces ServiceRegistry as an abstraction around providing services to and accessing services from a remote peer. In particular, this adds peered service registries to RenderProcessHost and RenderThread, and to RenderFrameHost and RenderFrame - the RenderFrame setup is implemented using the RenderProcessHost/RenderThread ServiceRegistry pair. This replaces the existing WebUI handle setup by adding a webUI controller service to the frame host registry and a corresponding request for the webUI controller service to the frame registry. BUG=386155 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279557 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279623

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : rebase #

Patch Set 4 : Fix GN build? #

Patch Set 5 : rebase #

Patch Set 6 : Fix Android build? #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Patch Set 9 : IInterfaceProvider #

Patch Set 10 : Fix gn #

Total comments: 6

Patch Set 11 : InterfaceRequest in RenderFrameSetup #

Total comments: 6

Patch Set 12 : address comments #

Patch Set 13 : rebase #

Patch Set 14 : fix compile #

Patch Set 15 : fix tests #

Patch Set 16 : rebase #

Patch Set 17 : handle the case where handles arrive before the RenderFrame is ready #

Total comments: 10

Patch Set 18 : address comments #

Total comments: 12

Patch Set 19 : address comments #

Patch Set 20 : rebase #

Patch Set 21 : #

Patch Set 22 : Fix GN? #

Patch Set 23 : Fix GN build attempt 2 #

Patch Set 24 : Fix content_*.gypi dependencies #

Total comments: 4

Patch Set 25 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -303 lines) Patch
M chrome/browser/ui/webui/mojo_web_ui_controller.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/mojo_web_ui_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +13 lines, -6 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M content/app/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +17 lines, -0 lines 0 comments Download
M content/browser/mojo/mojo_application_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -25 lines 0 comments Download
M content/browser/mojo/mojo_application_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +2 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +6 lines, -15 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +10 lines, -13 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +0 lines, -23 lines 0 comments Download
M content/browser/webui/web_ui_mojo_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +26 lines, -4 lines 0 comments Download
M content/child/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/child/child_thread.h View 1 2 3 4 5 6 7 5 chunks +6 lines, -13 lines 0 comments Download
M content/child/child_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +1 line, -10 lines 0 comments Download
M content/child/mojo/mojo_application.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -12 lines 0 comments Download
M content/child/mojo/mojo_application.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -5 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -1 line 0 comments Download
M content/common/mojo/mojo_service_names.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -18 lines 0 comments Download
M content/common/mojo/mojo_service_names.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -13 lines 0 comments Download
A content/common/mojo/service_registry_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +61 lines, -0 lines 0 comments Download
A content/common/mojo/service_registry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +78 lines, -0 lines 0 comments Download
A content/common/render_frame_setup.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +14 lines, -0 lines 0 comments Download
D content/common/web_ui_setup.mojom View 1 chunk +0 lines, -16 lines 0 comments Download
M content/content_app.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +5 lines, -2 lines 0 comments Download
M content/content_common_mojo_bindings.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/content_gpu.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_plugin.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_ppapi_plugin.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +1 line, -3 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_utility.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/content_worker.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
M content/gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/plugin/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/ppapi_plugin/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/render_frame_host.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/browser/render_view_host.h View 1 chunk +0 lines, -3 lines 0 comments Download
A content/public/common/service_registry.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +73 lines, -0 lines 0 comments Download
M content/public/renderer/render_frame.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/renderer/render_thread.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/mock_render_thread.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/mock_render_thread.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +11 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +6 lines, -7 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 8 chunks +60 lines, -15 lines 0 comments Download
M content/renderer/web_ui_mojo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +6 lines, -2 lines 0 comments Download
D content/renderer/web_ui_setup_impl.h View 1 chunk +0 lines, -32 lines 0 comments Download
D content/renderer/web_ui_setup_impl.cc View 1 chunk +0 lines, -33 lines 0 comments Download
M content/utility/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download
M content/worker/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
Sam McNally
6 years, 7 months ago (2014-05-23 00:25:30 UTC) #1
koz (OOO until 15th September)
This lg at a high level. I haven't had a super fine go over the ...
6 years, 7 months ago (2014-05-23 00:37:18 UTC) #2
Sam McNally
+darin
6 years, 7 months ago (2014-05-25 23:46:53 UTC) #3
koz (OOO until 15th September)
lgtm
6 years, 7 months ago (2014-05-26 00:54:26 UTC) #4
Sam McNally
This should be ready to take another look at now.
6 years, 6 months ago (2014-06-12 02:47:07 UTC) #5
darin (slow to review)
Had you considered pushing the frame-specific InterfaceProvider down to the renderer process upon creating of ...
6 years, 6 months ago (2014-06-12 05:27:13 UTC) #6
Sam McNally
On 2014/06/12 05:27:13, darin wrote: > Had you considered pushing the frame-specific InterfaceProvider down to ...
6 years, 6 months ago (2014-06-12 08:56:40 UTC) #7
darin (slow to review)
https://codereview.chromium.org/285333003/diff/880001/chrome/browser/ui/webui/mojo_web_ui_controller.cc File chrome/browser/ui/webui/mojo_web_ui_controller.cc (right): https://codereview.chromium.org/285333003/diff/880001/chrome/browser/ui/webui/mojo_web_ui_controller.cc#newcode27 chrome/browser/ui/webui/mojo_web_ui_controller.cc:27: render_view_host->GetProcess()->ActivateMojo(); I don't think we want to call ActivateMojo() ...
6 years, 6 months ago (2014-06-18 00:09:29 UTC) #8
Sam McNally
https://codereview.chromium.org/285333003/diff/880001/chrome/browser/ui/webui/mojo_web_ui_controller.cc File chrome/browser/ui/webui/mojo_web_ui_controller.cc (right): https://codereview.chromium.org/285333003/diff/880001/chrome/browser/ui/webui/mojo_web_ui_controller.cc#newcode27 chrome/browser/ui/webui/mojo_web_ui_controller.cc:27: render_view_host->GetProcess()->ActivateMojo(); On 2014/06/18 00:09:28, darin wrote: > I don't ...
6 years, 6 months ago (2014-06-18 01:31:41 UTC) #9
darin (slow to review)
LGTM w/ nits: https://codereview.chromium.org/285333003/diff/900001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/285333003/diff/900001/content/browser/frame_host/render_frame_host_impl.cc#newcode171 content/browser/frame_host/render_frame_host_impl.cc:171: setup->GetServiceProvider(routing_id_, mojo::Get(&service_provider)); nit: It might read ...
6 years, 6 months ago (2014-06-21 04:33:35 UTC) #10
Sam McNally
https://codereview.chromium.org/285333003/diff/900001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/285333003/diff/900001/content/browser/frame_host/render_frame_host_impl.cc#newcode171 content/browser/frame_host/render_frame_host_impl.cc:171: setup->GetServiceProvider(routing_id_, mojo::Get(&service_provider)); On 2014/06/21 04:33:35, darin wrote: > nit: ...
6 years, 6 months ago (2014-06-24 04:00:29 UTC) #11
Sam McNally
The CQ bit was checked by sammc@chromium.org
6 years, 6 months ago (2014-06-24 07:48:40 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sammc@chromium.org/285333003/1040001
6 years, 6 months ago (2014-06-24 07:49:52 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 6 months ago (2014-06-24 10:26:58 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-24 11:04:02 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/21302)
6 years, 6 months ago (2014-06-24 11:04:04 UTC) #16
Sam McNally
The CQ bit was checked by sammc@chromium.org
6 years, 6 months ago (2014-06-24 22:48:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sammc@chromium.org/285333003/1040001
6 years, 6 months ago (2014-06-24 22:50:54 UTC) #18
commit-bot: I haz the power
Change committed as 279557
6 years, 6 months ago (2014-06-25 00:20:21 UTC) #19
Sam McNally
The CQ bit was checked by sammc@chromium.org
6 years, 6 months ago (2014-06-25 00:55:25 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sammc@chromium.org/285333003/1080001
6 years, 6 months ago (2014-06-25 00:58:36 UTC) #21
raymes
https://codereview.chromium.org/285333003/diff/1080001/content/common/mojo/service_registry_impl.cc File content/common/mojo/service_registry_impl.cc (right): https://codereview.chromium.org/285333003/diff/1080001/content/common/mojo/service_registry_impl.cc#newcode29 content/common/mojo/service_registry_impl.cc:29: return; Should this ever happen in normal execution? https://codereview.chromium.org/285333003/diff/1080001/content/common/mojo/service_registry_impl.cc#newcode49 ...
6 years, 6 months ago (2014-06-25 01:43:30 UTC) #22
Sam McNally
The CQ bit was unchecked by sammc@chromium.org
6 years, 6 months ago (2014-06-25 01:49:22 UTC) #23
Sam McNally
https://codereview.chromium.org/285333003/diff/1080001/content/common/mojo/service_registry_impl.cc File content/common/mojo/service_registry_impl.cc (right): https://codereview.chromium.org/285333003/diff/1080001/content/common/mojo/service_registry_impl.cc#newcode29 content/common/mojo/service_registry_impl.cc:29: return; On 2014/06/25 01:43:30, raymes wrote: > Should this ...
6 years, 6 months ago (2014-06-25 02:36:11 UTC) #24
Sam McNally
The CQ bit was checked by sammc@chromium.org
6 years, 6 months ago (2014-06-25 02:37:11 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sammc@chromium.org/285333003/1100001
6 years, 6 months ago (2014-06-25 02:39:53 UTC) #26
commit-bot: I haz the power
6 years, 6 months ago (2014-06-25 06:09:36 UTC) #27
Message was sent while issue was closed.
Change committed as 279623

Powered by Google App Engine
This is Rietveld 408576698