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

Issue 1210643002: Update navigator.services API to use the new services.onconnect event [2/3]. (Closed)

Created:
5 years, 6 months ago by Marijn Kruisselbrink
Modified:
5 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, michaeln, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@serviceport
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update navigator.services API to use the new services.onconnect event [2/3]. This is part of a series of patches to change the service side API from a global oncrossoriginconnect event to a new navigator.services.onconnect event. This patch builds on https://codereview.chromium.org/1221503003 to setup a mojo service in the worker thread in the renderer which is used to dispatch the new event to blink. [1/3] https://codereview.chromium.org/1210633002 Adds new event to blink. [2/3] This patch [3/3] https://codereview.chromium.org/1205783004 Removes old event from blink and adds some tests specific to the new event. BUG=426458 Committed: https://crrev.com/ef0b94c53140a46f65c8233c7833b0bacd789792 Cr-Commit-Position: refs/heads/master@{#339347}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : mojo events #

Patch Set 4 : update to match blink code #

Patch Set 5 : decouple renderer side code more #

Total comments: 4

Patch Set 6 : properly close connections when a worker is stopped #

Total comments: 9

Patch Set 7 : rebase #

Patch Set 8 : rename ConnectCallbacks #

Patch Set 9 : rebase #

Patch Set 10 : don't try to have a generic OnMojoConnectionError template #

Total comments: 2

Patch Set 11 : properly run error callbacks when worker is stopped #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -83 lines) Patch
M content/browser/navigator_connect/navigator_connect_service_worker_service_factory.h View 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc View 1 3 chunks +10 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 4 5 6 7 8 9 7 chunks +26 lines, -11 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +56 lines, -32 lines 0 comments Download
A content/child/navigator_connect/service_port_dispatcher_impl.h View 1 2 3 4 5 1 chunk +55 lines, -0 lines 0 comments Download
A content/child/navigator_connect/service_port_dispatcher_impl.cc View 1 2 3 4 5 6 7 1 chunk +78 lines, -0 lines 0 comments Download
M content/common/service_port_service.mojom View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 5 2 chunks +0 lines, -6 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -4 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 5 6 7 8 7 chunks +8 lines, -22 lines 0 comments Download

Messages

Total messages: 20 (5 generated)
michaeln
https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode938 content/browser/service_worker/service_worker_version.cc:938: service_port_dispatcher_->Connect( What happens to service_port_dispatcher_ when the embedded instance ...
5 years, 5 months ago (2015-07-07 22:13:17 UTC) #2
Marijn Kruisselbrink
https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode938 content/browser/service_worker/service_worker_version.cc:938: service_port_dispatcher_->Connect( On 2015/07/07 at 22:13:17, michaeln wrote: > What ...
5 years, 5 months ago (2015-07-07 23:58:42 UTC) #3
iclelland
https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode929 content/browser/service_worker/service_worker_version.cc:929: embedded_worker_->GetServiceRegistry()->ConnectToRemoteService( This looks to me like it has the ...
5 years, 5 months ago (2015-07-08 02:59:30 UTC) #5
iclelland
On 2015/07/08 02:59:30, iclelland wrote: > https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc > File content/browser/service_worker/service_worker_version.cc (right): > > https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode929 > ...
5 years, 5 months ago (2015-07-08 03:00:51 UTC) #6
Marijn Kruisselbrink
On 2015/07/08 at 02:59:30, iclelland wrote: > https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc > File content/browser/service_worker/service_worker_version.cc (right): > > https://codereview.chromium.org/1210643002/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode929 ...
5 years, 5 months ago (2015-07-08 16:55:06 UTC) #7
Marijn Kruisselbrink
I think I addressed the lifetime issues around the ServicePortDispatcher connection. The ServicePortDispatcherImpl in the ...
5 years, 5 months ago (2015-07-14 17:40:25 UTC) #8
michaeln
Idk if this is really an improvement. There's more code and the new code is ...
5 years, 5 months ago (2015-07-15 02:47:26 UTC) #9
Marijn Kruisselbrink
On 2015/07/15 at 02:47:26, michaeln wrote: > Idk if this is really an improvement. There's ...
5 years, 5 months ago (2015-07-15 20:49:40 UTC) #10
michaeln
lgtm (again thanx for you patience and taking the time to learn me some mojo) ...
5 years, 5 months ago (2015-07-16 22:23:47 UTC) #11
Marijn Kruisselbrink
https://codereview.chromium.org/1210643002/diff/180001/content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc File content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc (right): https://codereview.chromium.org/1210643002/diff/180001/content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc#newcode174 content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc:174: active_version->DispatchServicePortConnectEvent( On 2015/07/16 at 22:23:46, michaeln wrote: > Generalizing ...
5 years, 5 months ago (2015-07-17 00:04:23 UTC) #12
Marijn Kruisselbrink
+tsepez for mojom/IPC owners
5 years, 5 months ago (2015-07-17 17:07:28 UTC) #14
Tom Sepez
lgtm
5 years, 5 months ago (2015-07-17 21:36:38 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1210643002/200001
5 years, 5 months ago (2015-07-17 22:32:04 UTC) #18
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 5 months ago (2015-07-17 22:45:15 UTC) #19
commit-bot: I haz the power
5 years, 5 months ago (2015-07-17 22:46:11 UTC) #20
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/ef0b94c53140a46f65c8233c7833b0bacd789792
Cr-Commit-Position: refs/heads/master@{#339347}

Powered by Google App Engine
This is Rietveld 408576698