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

Issue 596559 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocking:
issue 597053
issue 600895



Sign in to add a comment

Access to RenderFrameHost's ServiceRegistry from Blink

Project Member Reported by reillyg@chromium.org, Mar 21 2016

Issue description

To facilitate the conversion of Blink modules to the Onion Soup model and Mojo services it is necessary to request services from the RenderFrameHost's ServiceRegistry from inside Blink.

This is currently only possible from //content by calling RenderFrame::GetServiceRegistry(). The RenderProcessHost's ServiceRegistry, in contrast, is available through Platform::connectToRemoteService().

Mojo services such as the USB DeviceManager are registered on a per-frame basis because of permissions checks that depend on knowing the URL the frame is currently navigated to. Thus, switching to registering the service process-wide is not an option.
 

Comment 1 by ortuno@chromium.org, Mar 21 2016

Cc: mcasas@chromium.org

Comment 2 by yzshen@chromium.org, Mar 21 2016

Cc: roc...@chromium.org

Comment 3 by ortuno@chromium.org, Mar 21 2016

Cc: haraken@chromium.org
Cc: dcheng@chromium.org
I'd like to solve this by introducing a virtual interface in blink Platform called ServiceRegistry.

Steps:

1. Introduce ServiceRegistry virtual interface.
2. Get rid of Platform::connectToRemoteService and have Platform::current()->serviceRegistry() which was an instance of this class.
3. Pass an instance into WebFrame::create() in content, store it in the LocalFrame inside core/ so both core/ and modules can access the service registry.

dcheng@, Is that okay with you? We could just add a connectToRemoteService method to WebFrameClient which would be an analog to Platform::connectToRemoteService, but I'd rather we created a primitive in blink platform around the service registry instead of having two different sets of methods on different interfaces.

Comment 5 by sa...@chromium.org, Mar 22 2016

Cc: sa...@chromium.org

Comment 6 by dcheng@chromium.org, Mar 22 2016

#4: yeah, I like the ServiceRegistry virtual interface proposal.

Comment 7 by ortuno@chromium.org, Mar 22 2016

Blocking: 597053

Comment 8 by sa...@chromium.org, Mar 23 2016

Cc: -sa...@chromium.org
Owner: sa...@chromium.org
Status: Assigned (was: Untriaged)
Blocking: 600895
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 6 2016

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

commit bebeb608346c93d77f496c47cf0df62da80c517e
Author: sammc <sammc@chromium.org>
Date: Wed Apr 06 06:42:55 2016

Add blink::ServiceRegistry and expose it from LocalFrame and Platform.

BUG= 596559 

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

Cr-Commit-Position: refs/heads/master@{#385388}

[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/content_renderer.gypi
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/public/test/render_view_test.cc
[add] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/mojo/blink_service_registry_impl.cc
[add] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/mojo/blink_service_registry_impl.h
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/render_frame_impl.h
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/content/renderer/renderer_blink_platform_impl.h
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/platform/exported/Platform.cpp
[add] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/platform/exported/ServiceRegistry.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/public/blink_headers.gypi
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/public/platform/Platform.h
[add] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/public/platform/ServiceRegistry.h
[modify] https://crrev.com/bebeb608346c93d77f496c47cf0df62da80c517e/third_party/WebKit/public/web/WebFrameClient.h

sammc@: I can access the RenderFrameHost registry
after rebasing with #10 (https://crrev.com/1794553002),
so I'd say this issue is Fixed.

Comment 12 by sa...@chromium.org, Apr 11 2016

Status: Fixed (was: Assigned)

Comment 13 by tkent@chromium.org, Jun 23 2016

Components: -Blink>Architecture Blink>Internals
Renaming Blink>Architecture to Blink>Internals

Sign in to add a comment