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

Issue 2460723003: Enable connection to Mojo services from Blink (Closed)

Created:
4 years, 1 month ago by blundell
Modified:
4 years ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable connection to Mojo services from Blink This CL enables connections to Mojo services from Blink; more specifically, from //third_party/WebKit/Source/modules, where dependencies on Chromium code are in general undesired (including on Mojo services' client libraries). To enable connecting to services without using the Service Manager's client library, this CL does the following: (1) Adds a method to Platform that binds the connection to the ServiceManager. (2) Builds a bare-bones ServiceConnector around this connection that supports connecting to Mojo services by name from Blink. (3) Ports TimeZoneMonitor to be hosted in the Device Service as an example of connecting to an interface that is hosted in a service other than //content/browser from Blink. ServiceConnector being "bare-bones" includes the facts that: - Unlike blink::InterfaceProvider, blink::ServiceConnector is currently thread-hostile. This should be easy to relax using similar mechanisms as InterfaceProviderImpl. - There is currently no API for obtaining an InterfaceProvider for a given service (or a thread-safe wrapper, per the above comment). Again, this should be easy to add. This CL also moves the definition of the device service name to mojom instead of C++ in order to facilitate using this constant from Blink. BUG=612341 TEST=http://crbug.com/288697#c12: load the page, change the system time zone, and then click "recheck" to ensure that the renderer picks up the new time zone. Don't reload the page, which is likely to give you a new renderer process, use the "recheck" link on the page. Committed: https://crrev.com/8e3745ac05d7918a91ff9efb02280a7c1443de5c Committed: https://crrev.com/32fc16c8f8cf5cba4a7bec4f6a18fcbdf32c5e3b Cr-Original-Commit-Position: refs/heads/master@{#439498} Cr-Commit-Position: refs/heads/master@{#440419}

Patch Set 1 #

Patch Set 2 : Nits #

Patch Set 3 : Add DEPS file #

Patch Set 4 : Include fix for ServiceManager #

Patch Set 5 : Add new ServiceManager fix #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase, incorporate service connector addition #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase, take into account ServiceContext change #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase #

Patch Set 12 : Fix build #

Total comments: 2

Patch Set 13 : Change how Blink connects to services #

Patch Set 14 : Rebase #

Patch Set 15 : Fix gn check #

Patch Set 16 : Self-review #

Total comments: 14

Patch Set 17 : Rebase #

Patch Set 18 : Response to reviews #

Total comments: 2

Patch Set 19 : Rebase #

Total comments: 4

Patch Set 20 : Rebase #

Patch Set 21 : Pass handle across boundary #

Patch Set 22 : Rebase #

Patch Set 23 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -89 lines) Patch
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 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/DEPS 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/browser_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/browser_main_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +0 lines, -8 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +0 lines, -8 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 20 21 22 2 chunks +0 lines, -11 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 1 chunk +1 line, -0 lines 0 comments Download
M content/child/blink_platform_impl.h 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 +3 lines, -0 lines 0 comments Download
M content/child/blink_platform_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 3 chunks +16 lines, -5 lines 0 comments Download
M content/public/app/mojo/content_renderer_manifest.json 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 services/device/BUILD.gn View 1 chunk +8 lines, -0 lines 0 comments Download
A services/device/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M services/device/device_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -4 lines 0 comments Download
M services/device/device_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -0 lines 0 comments Download
M services/device/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
D services/device/public/cpp/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -10 lines 0 comments Download
D services/device/public/cpp/constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -14 lines 0 comments Download
D services/device/public/cpp/constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -11 lines 0 comments Download
A + services/device/public/interfaces/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
A services/device/public/interfaces/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A + services/device/public/interfaces/constants.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/time_zone_monitor/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/time_zone_monitor/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/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 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/ServiceConnector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +60 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/Platform.cpp 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 +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/DEPS 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 third_party/WebKit/public/platform/Platform.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 132 (95 generated)
blundell
Ken, Could you look over the whole CL? Thanks!
4 years, 1 month ago (2016-11-08 14:18:23 UTC) #42
Ken Rockot(use gerrit already)
LGTM I feel a weird about a time zone interface being in the device service. ...
4 years, 1 month ago (2016-11-08 18:53:44 UTC) #43
haraken
https://codereview.chromium.org/2460723003/diff/220001/third_party/WebKit/Source/modules/time_zone_monitor/DEPS File third_party/WebKit/Source/modules/time_zone_monitor/DEPS (right): https://codereview.chromium.org/2460723003/diff/220001/third_party/WebKit/Source/modules/time_zone_monitor/DEPS#newcode5 third_party/WebKit/Source/modules/time_zone_monitor/DEPS:5: "+services/service_manager/public/cpp/connector.h", I think it's better to reach consensus on ...
4 years, 1 month ago (2016-11-08 23:56:59 UTC) #45
blundell
On 2016/11/08 18:53:44, Ken Rockot wrote: > LGTM > > I feel a weird about ...
4 years, 1 month ago (2016-11-09 11:53:43 UTC) #46
blundell
https://codereview.chromium.org/2460723003/diff/220001/third_party/WebKit/Source/modules/time_zone_monitor/DEPS File third_party/WebKit/Source/modules/time_zone_monitor/DEPS (right): https://codereview.chromium.org/2460723003/diff/220001/third_party/WebKit/Source/modules/time_zone_monitor/DEPS#newcode5 third_party/WebKit/Source/modules/time_zone_monitor/DEPS:5: "+services/service_manager/public/cpp/connector.h", On 2016/11/08 23:56:59, haraken wrote: > > I ...
4 years, 1 month ago (2016-11-09 11:54:42 UTC) #47
Ken Rockot(use gerrit already)
On 2016/11/09 at 11:54:42, blundell wrote: > https://codereview.chromium.org/2460723003/diff/220001/third_party/WebKit/Source/modules/time_zone_monitor/DEPS > File third_party/WebKit/Source/modules/time_zone_monitor/DEPS (right): > > https://codereview.chromium.org/2460723003/diff/220001/third_party/WebKit/Source/modules/time_zone_monitor/DEPS#newcode5 ...
4 years, 1 month ago (2016-11-22 02:18:59 UTC) #48
blundell
On 2016/11/22 02:18:59, Ken Rockot wrote: > On 2016/11/09 at 11:54:42, blundell wrote: > > ...
4 years, 1 month ago (2016-11-22 16:32:53 UTC) #49
Ken Rockot(use gerrit already)
Looks nice, just one comment https://codereview.chromium.org/2460723003/diff/300001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/2460723003/diff/300001/content/child/blink_platform_impl.cc#newcode815 content/child/blink_platform_impl.cc:815: BlinkPlatformImpl::serviceConnector() { nit: maybe ...
4 years ago (2016-11-28 20:24:01 UTC) #69
esprehn
lgtm w/ nits fixed. https://codereview.chromium.org/2460723003/diff/300001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/2460723003/diff/300001/content/child/blink_platform_impl.cc#newcode822 content/child/blink_platform_impl.cc:822: ->GetServiceManagerConnection() Is there a reason ...
4 years ago (2016-12-02 02:23:15 UTC) #71
blundell
Thanks! Currently working through issues related to Device Service lifetime that this CL happened to ...
4 years ago (2016-12-05 17:06:02 UTC) #72
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2460723003/diff/300001/third_party/WebKit/Source/platform/ServiceConnector.h File third_party/WebKit/Source/platform/ServiceConnector.h (right): https://codereview.chromium.org/2460723003/diff/300001/third_party/WebKit/Source/platform/ServiceConnector.h#newcode1 third_party/WebKit/Source/platform/ServiceConnector.h:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years ago (2016-12-05 20:54:18 UTC) #73
haraken
LGTM
4 years ago (2016-12-06 00:00:05 UTC) #74
Noel Gordon
https://codereview.chromium.org/2460723003/diff/300001/third_party/WebKit/Source/platform/ServiceConnector.h File third_party/WebKit/Source/platform/ServiceConnector.h (right): https://codereview.chromium.org/2460723003/diff/300001/third_party/WebKit/Source/platform/ServiceConnector.h#newcode25 third_party/WebKit/Source/platform/ServiceConnector.h:25: mojo::InterfaceRequest<Interface> interfacePtr) { |interfacePtr| ?? Isn't the argument a ...
4 years ago (2016-12-07 07:09:26 UTC) #76
blundell
Hey Noel, Thanks for your comments! I'm delaying picking back up on this CL until ...
4 years ago (2016-12-08 14:47:06 UTC) #77
blundell
Thanks! Ken, could you take a final look over the CL? https://codereview.chromium.org/2460723003/diff/300001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): ...
4 years ago (2016-12-15 17:04:52 UTC) #80
blundell
jochen@: Can you review //content/browser? dcheng@: Can review //content/public/app/mojo? Thanks!
4 years ago (2016-12-16 14:13:25 UTC) #84
jochen (gone - plz use gerrit)
content/browser lgtm
4 years ago (2016-12-19 10:58:18 UTC) #85
dcheng
mojom and mojo manifest lgtm https://codereview.chromium.org/2460723003/diff/340001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/2460723003/diff/340001/content/child/blink_platform_impl.cc#newcode796 content/child/blink_platform_impl.cc:796: if (!ChildThreadImpl::current()) Is this ...
4 years ago (2016-12-19 11:13:21 UTC) #86
blundell
Thanks, everyone! Ken, I'm going to land this based on your earlier LGTM / "looks ...
4 years ago (2016-12-19 12:22:25 UTC) #87
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2460723003/340001
4 years ago (2016-12-19 12:23:23 UTC) #90
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/125101) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-19 12:24:58 UTC) #92
blundell
https://codereview.chromium.org/2460723003/diff/340001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/2460723003/diff/340001/content/child/blink_platform_impl.cc#newcode796 content/child/blink_platform_impl.cc:796: if (!ChildThreadImpl::current()) On 2016/12/19 11:13:21, dcheng wrote: > Is ...
4 years ago (2016-12-19 15:05:31 UTC) #93
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2460723003/360001
4 years ago (2016-12-19 15:14:13 UTC) #96
commit-bot: I haz the power
Committed patchset #19 (id:360001)
4 years ago (2016-12-19 17:38:06 UTC) #99
commit-bot: I haz the power
Patchset 19 (id:??) landed as https://crrev.com/8e3745ac05d7918a91ff9efb02280a7c1443de5c Cr-Commit-Position: refs/heads/master@{#439498}
4 years ago (2016-12-19 17:41:42 UTC) #101
jam
A revert of this CL (patchset #19 id:360001) has been created in https://codereview.chromium.org/2589493006/ by jam@chromium.org. ...
4 years ago (2016-12-19 18:28:41 UTC) #102
Sam McNally
https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h File third_party/WebKit/public/platform/Platform.h (right): https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h#newcode59 third_party/WebKit/public/platform/Platform.h:59: #include "services/service_manager/public/interfaces/connector.mojom-blink.h" We shouldn't exposing blink-variant mojoms outside blink.
4 years ago (2016-12-20 07:29:38 UTC) #104
blundell
https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h File third_party/WebKit/public/platform/Platform.h (right): https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h#newcode59 third_party/WebKit/public/platform/Platform.h:59: #include "services/service_manager/public/interfaces/connector.mojom-blink.h" On 2016/12/20 07:29:38, Sam McNally wrote: > ...
4 years ago (2016-12-20 07:39:43 UTC) #105
Sam McNally
https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h File third_party/WebKit/public/platform/Platform.h (right): https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h#newcode59 third_party/WebKit/public/platform/Platform.h:59: #include "services/service_manager/public/interfaces/connector.mojom-blink.h" On 2016/12/20 07:39:43, blundell wrote: > On ...
4 years ago (2016-12-20 08:57:18 UTC) #106
blundell
https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h File third_party/WebKit/public/platform/Platform.h (right): https://codereview.chromium.org/2460723003/diff/360001/third_party/WebKit/public/platform/Platform.h#newcode59 third_party/WebKit/public/platform/Platform.h:59: #include "services/service_manager/public/interfaces/connector.mojom-blink.h" On 2016/12/20 08:57:18, Sam McNally wrote: > ...
4 years ago (2016-12-20 09:01:57 UTC) #107
blundell
Hi Elliott, Could you have a look over the (small) diff between PS20 and PS21 ...
4 years ago (2016-12-20 16:09:32 UTC) #115
esprehn
lgtm
4 years ago (2016-12-21 18:39:44 UTC) #119
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2460723003/420001
4 years ago (2016-12-22 07:09:06 UTC) #122
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/127218) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-22 07:10:48 UTC) #124
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2460723003/440001
4 years ago (2016-12-22 12:59:41 UTC) #127
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years ago (2016-12-22 15:06:28 UTC) #130
commit-bot: I haz the power
4 years ago (2016-12-22 15:08:52 UTC) #132
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/32fc16c8f8cf5cba4a7bec4f6a18fcbdf32c5e3b
Cr-Commit-Position: refs/heads/master@{#440419}

Powered by Google App Engine
This is Rietveld 408576698