SW: Implement "Update Registration State" algorithm (unused for now)
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Nov 2017 04:36:20 +0000 (04:36 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Nov 2017 04:36:20 +0000 (04:36 +0000)
commit212d43f00d38a71ec4d27fbc0a1b3887bf34fcbd
tree0143005df3e2a55b1f8a12db68bfafad045a2082
parentf20b1b5d32636f90a3fb63f338220bf0774b4f46
SW: Implement "Update Registration State" algorithm (unused for now)
https://bugs.webkit.org/show_bug.cgi?id=179186

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (No behavior change yet).

This algorithm is very simple, and this patch plumbs it through.
But it's not useful to start using this algorithm without "Update Worker State" also.
So to keep this patch small, it's unused for now. Will be used in the next patch.

* WebCore.xcodeproj/project.pbxproj:

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::updateStateFromServer):
* workers/service/ServiceWorkerRegistration.h:

* workers/service/ServiceWorkerTypes.h: Copied from Source/WebCore/workers/service/server/SWServerRegistration.cpp.

* workers/service/server/SWClientConnection.cpp:
(WebCore::SWClientConnection::addServiceWorkerRegistration):
(WebCore::SWClientConnection::removeServiceWorkerRegistration):
(WebCore::SWClientConnection::updateRegistrationState):
* workers/service/server/SWClientConnection.h:

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::Connection::addServiceWorkerRegistrationInServer):
(WebCore::SWServer::Connection::removeServiceWorkerRegistrationInServer):
(WebCore::SWServer::addClientServiceWorkerRegistration):
(WebCore::SWServer::removeClientServiceWorkerRegistration):
* workers/service/server/SWServer.h:
(WebCore::SWServer::getConnection):

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::runRegisterJob):

* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::SWServerRegistration):
(WebCore::SWServerRegistration::updateRegistrationState):
(WebCore::SWServerRegistration::addClientServiceWorkerRegistration):
(WebCore::SWServerRegistration::removeClientServiceWorkerRegistration):
* workers/service/server/SWServerRegistration.h:

Source/WebKit:

* Scripts/webkit/messages.py:
(headers_for_type):

* Shared/WebCoreArgumentCoders.h:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::updateRegistrationStateInClient):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:

* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::addServiceWorkerRegistrationInServer):
(WebKit::WebSWClientConnection::removeServiceWorkerRegistrationInServer):
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWClientConnection.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/workers/service/ServiceWorkerContainer.cpp
Source/WebCore/workers/service/ServiceWorkerRegistration.cpp
Source/WebCore/workers/service/ServiceWorkerRegistration.h
Source/WebCore/workers/service/ServiceWorkerTypes.h [new file with mode: 0644]
Source/WebCore/workers/service/server/SWClientConnection.cpp
Source/WebCore/workers/service/server/SWClientConnection.h
Source/WebCore/workers/service/server/SWServer.cpp
Source/WebCore/workers/service/server/SWServer.h
Source/WebCore/workers/service/server/SWServerJobQueue.cpp
Source/WebCore/workers/service/server/SWServerRegistration.cpp
Source/WebCore/workers/service/server/SWServerRegistration.h
Source/WebKit/ChangeLog
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp
Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h
Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in
Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp
Source/WebKit/WebProcess/Storage/WebSWClientConnection.h
Source/WebKit/WebProcess/Storage/WebSWClientConnection.messages.in