|
|
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
Total comments: 16
|
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
|
Total messages: 27 (0 generated)
|