Add scaffolding for IDBDatabaseBackends in Web and Database processes
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Oct 2013 18:30:00 +0000 (18:30 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Oct 2013 18:30:00 +0000 (18:30 +0000)
commit8acf66dd027633ea89158927b605e8d9e798db49
tree0b230f5f3a34919c447da4eb8f6eca35adf5a1ce
parentf6e85966e45ac145c206cd7ae290d84393c434f8
Add scaffolding for IDBDatabaseBackends in Web and Database processes
https://bugs.webkit.org/show_bug.cgi?id=122971

Reviewed by Tim Horton.

This patch:
- Adds a WebProcessIDBDatabaseBackend
- Adds a DatabaseProcessIDBDatabaseBackend
- Establishes the basic messaging between them
- Actually creates those backends as the result of an indexedDB.open() call from javascript

* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:
* Platform/Logging.h:

Hook up messaging so (Web/Database)ProcessIDBDatabaseBackends can message each other:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
(WebKit::DatabaseToWebProcessConnection::establishIDBDatabaseBackend):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
(WebKit::DatabaseToWebProcessConnection::connection):
* DatabaseProcess/DatabaseToWebProcessConnection.messages.in: Added.

DatabaseProcess side of an IDBDatabaseBackend:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.cpp:
(WebKit::DatabaseProcessIDBDatabaseBackend::DatabaseProcessIDBDatabaseBackend):
(WebKit::DatabaseProcessIDBDatabaseBackend::~DatabaseProcessIDBDatabaseBackend):
(WebKit::DatabaseProcessIDBDatabaseBackend::openConnection):
(WebKit::DatabaseProcessIDBDatabaseBackend::messageSenderConnection):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h: Added.
(WebKit::DatabaseProcessIDBDatabaseBackend::create):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.messages.in: Added.

WebProcess side of an IDBDatabaseBackend:
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp: Added.
(WebKit::generateBackendIdentifier):
(WebKit::WebProcessIDBDatabaseBackend::WebProcessIDBDatabaseBackend):
(WebKit::WebProcessIDBDatabaseBackend::~WebProcessIDBDatabaseBackend):
(WebKit::WebProcessIDBDatabaseBackend::openConnection):
(WebKit::WebProcessIDBDatabaseBackend::createObjectStore):
(WebKit::WebProcessIDBDatabaseBackend::deleteObjectStore):
(WebKit::WebProcessIDBDatabaseBackend::createTransaction):
(WebKit::WebProcessIDBDatabaseBackend::close):
(WebKit::WebProcessIDBDatabaseBackend::commit):
(WebKit::WebProcessIDBDatabaseBackend::abort):
(WebKit::WebProcessIDBDatabaseBackend::createIndex):
(WebKit::WebProcessIDBDatabaseBackend::deleteIndex):
(WebKit::WebProcessIDBDatabaseBackend::get):
(WebKit::WebProcessIDBDatabaseBackend::put):
(WebKit::WebProcessIDBDatabaseBackend::setIndexKeys):
(WebKit::WebProcessIDBDatabaseBackend::setIndexesReady):
(WebKit::WebProcessIDBDatabaseBackend::openCursor):
(WebKit::WebProcessIDBDatabaseBackend::count):
(WebKit::WebProcessIDBDatabaseBackend::deleteRange):
(WebKit::WebProcessIDBDatabaseBackend::clear):
(WebKit::WebProcessIDBDatabaseBackend::messageSenderConnection):
(WebKit::WebProcessIDBDatabaseBackend::establishDatabaseProcessBackend):
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h: Added.
(WebKit::WebProcessIDBDatabaseBackend::create):

Basic shared utilities that multiple processes will need going forward:
* Shared/Databases/IndexedDB/IDBUtilities.cpp:
(WebKit::uniqueDatabaseIdentifier):
* Shared/Databases/IndexedDB/IDBUtilities.h:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::sharedDatabaseBackendMap):
(WebKit::WebIDBFactoryBackend::open): Actually establish an IDBDatabaseBackend in the DatabaseProcess
  when indexedDB.open() is called, even if it does nothing for now.

* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.cpp
Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.h
Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.messages.in [new file with mode: 0644]
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.cpp [new file with mode: 0644]
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h [new file with mode: 0644]
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.messages.in [new file with mode: 0644]
Source/WebKit2/DerivedSources.make
Source/WebKit2/Platform/Logging.h
Source/WebKit2/Shared/Databases/IndexedDB/IDBUtilities.cpp [new file with mode: 0644]
Source/WebKit2/Shared/Databases/IndexedDB/IDBUtilities.h [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h [new file with mode: 0644]
Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.cpp
Source/WebKit2/WebProcess/Databases/WebToDatabaseProcessConnection.h