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

Issue 180843003: Start to implement FetchEvent for ServiceWorker (Closed)

Created:
6 years, 10 months ago by falken
Modified:
6 years, 9 months ago
CC:
blink-reviews, jsbell+serviceworker_chromium.org, dglazkov+blink, jamesr, alecflett+watch_chromium.org, abarth-chromium, nhiroki, michaeln
Visibility:
Public.

Description

Start to implement FetchEvent for ServiceWorker Now a service worker can handle a fetch event and call event.respondWith to pass a response back. Currently dispatching the event and receiving the response is not hooked up in Chromium side. The plan is to use the Response object from the service worker's script to create a ServiceWorkerFetchResponse that is sent in an IPC message back to the browser. No test is added. It will be tested in ServiceWorkerVersionBrowserTest once hooked up in Chrome (I've done this locally). Testing Response in a layout test would be ideal but we currently don't have a way to do a layout test in the service worker's context. BUG=342301 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168073

Patch Set 1 #

Total comments: 16

Patch Set 2 : review comments, restrict scope to modules/ #

Patch Set 3 : sync and some minor fixes #

Patch Set 4 : really sync #

Patch Set 5 : upload ResponseInit.h, fix win build and whitespace #

Patch Set 6 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+428 lines, -3 lines) Patch
M Source/modules/modules.gypi View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/FetchEvent.h View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/FetchEvent.cpp View 1 chunk +46 lines, -0 lines 0 comments Download
A + Source/modules/serviceworkers/FetchEvent.idl View 1 chunk +3 lines, -2 lines 0 comments Download
A Source/modules/serviceworkers/RespondWithObserver.h View 1 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/RespondWithObserver.cpp View 1 1 chunk +122 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/Response.h View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/Response.cpp View 1 1 chunk +44 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/Response.idl View 1 1 chunk +23 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/ResponseInit.h View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeClientImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeClientImpl.cpp View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
falken
kinuko@: Could you take a look please? The corresponding Chrome-side change is: https://codereview.chromium.org/178343011/
6 years, 10 months ago (2014-02-26 03:22:23 UTC) #1
kinuko
https://codereview.chromium.org/180843003/diff/1/Source/modules/serviceworkers/RespondWithObserver.cpp File Source/modules/serviceworkers/RespondWithObserver.cpp (right): https://codereview.chromium.org/180843003/diff/1/Source/modules/serviceworkers/RespondWithObserver.cpp#newcode25 Source/modules/serviceworkers/RespondWithObserver.cpp:25: }; (these promise-waiter functions could be probably generalized a ...
6 years, 10 months ago (2014-02-26 05:42:49 UTC) #2
falken
Thanks! PTAL. I decided to take your original suggestion and move the web/ stuff to ...
6 years, 9 months ago (2014-02-27 06:45:09 UTC) #3
kinuko
Ok, I think this lgtm. Thanks,
6 years, 9 months ago (2014-02-27 06:54:15 UTC) #4
falken
The CQ bit was checked by falken@chromium.org
6 years, 9 months ago (2014-02-27 06:59:20 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/180843003/40001
6 years, 9 months ago (2014-02-27 06:59:33 UTC) #6
falken
The CQ bit was unchecked by falken@chromium.org
6 years, 9 months ago (2014-02-27 07:13:30 UTC) #7
falken
jochen@: can you give an OWNER review for web/ please? It's just a skeleton for ...
6 years, 9 months ago (2014-02-27 07:16:21 UTC) #8
falken
Kinuko-san, my previous patch was missing ResponseInit.h, sorry. I uploaded a new patch that includes ...
6 years, 9 months ago (2014-02-27 11:49:46 UTC) #9
kinuko
On 2014/02/27 11:49:46, falken wrote: > Kinuko-san, my previous patch was missing ResponseInit.h, sorry. I ...
6 years, 9 months ago (2014-02-27 12:03:03 UTC) #10
jochen (gone - plz use gerrit)
lgtm
6 years, 9 months ago (2014-02-27 14:16:47 UTC) #11
falken
The CQ bit was checked by falken@chromium.org
6 years, 9 months ago (2014-02-27 14:20:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/180843003/120001
6 years, 9 months ago (2014-02-27 14:20:47 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-27 14:20:52 UTC) #14
commit-bot: I haz the power
Failed to apply patch for Source/modules/modules.gypi: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-02-27 14:20:59 UTC) #15
falken
The CQ bit was checked by falken@chromium.org
6 years, 9 months ago (2014-02-27 14:48:20 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/180843003/140001
6 years, 9 months ago (2014-02-27 14:48:39 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-27 18:27:24 UTC) #18
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=14445
6 years, 9 months ago (2014-02-27 18:27:25 UTC) #19
alecflett
The CQ bit was checked by alecflett@chromium.org
6 years, 9 months ago (2014-02-27 18:36:28 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/180843003/140001
6 years, 9 months ago (2014-02-27 18:36:43 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-28 00:12:52 UTC) #22
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=14490
6 years, 9 months ago (2014-02-28 00:12:53 UTC) #23
falken
The CQ bit was checked by falken@chromium.org
6 years, 9 months ago (2014-02-28 00:27:36 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/180843003/140001
6 years, 9 months ago (2014-02-28 00:28:01 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/180843003/140001
6 years, 9 months ago (2014-02-28 01:12:09 UTC) #26
commit-bot: I haz the power
6 years, 9 months ago (2014-02-28 01:42:46 UTC) #27
Message was sent while issue was closed.
Change committed as 168073

Powered by Google App Engine
This is Rietveld 408576698