Modern IDB: More WK2 IPC Scaffolding.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Feb 2016 19:21:59 +0000 (19:21 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Feb 2016 19:21:59 +0000 (19:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154317

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.

Source/WebCore:

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::IDBCursorInfo):
* Modules/indexeddb/shared/IDBCursorInfo.h:
(WebCore::IDBCursorInfo::decode):
* Modules/indexeddb/shared/IDBError.h:
(WebCore::IDBError::decode):
* Modules/indexeddb/shared/IDBIndexInfo.h:
(WebCore::IDBIndexInfo::decode):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
(WebCore::IDBObjectStoreInfo::decode):
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::decode):
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:
(WebCore::IDBResourceIdentifier::decode):
* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::IDBResultData):
* Modules/indexeddb/shared/IDBResultData.h:
(WebCore::IDBResultData::decode):
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::IDBTransactionInfo):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::decode):
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* CMakeLists.txt:
* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Added.

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::didDeleteDatabase):
(WebKit::WebIDBConnectionToServer::didOpenDatabase):
(WebKit::WebIDBConnectionToServer::didAbortTransaction):
(WebKit::WebIDBConnectionToServer::didCommitTransaction):
(WebKit::WebIDBConnectionToServer::didCreateObjectStore):
(WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
(WebKit::WebIDBConnectionToServer::didClearObjectStore):
(WebKit::WebIDBConnectionToServer::didCreateIndex):
(WebKit::WebIDBConnectionToServer::didDeleteIndex):
(WebKit::WebIDBConnectionToServer::didPutOrAdd):
(WebKit::WebIDBConnectionToServer::didGetRecord):
(WebKit::WebIDBConnectionToServer::didGetCount):
(WebKit::WebIDBConnectionToServer::didDeleteRecord):
(WebKit::WebIDBConnectionToServer::didOpenCursor):
(WebKit::WebIDBConnectionToServer::didIterateCursor):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196705 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBError.h
Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h
Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp
Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.h
Source/WebCore/Modules/indexeddb/shared/IDBResultData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBResultData.h
Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h
Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in [new file with mode: 0644]
Source/WebKit2/DerivedSources.make
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in [new file with mode: 0644]

index a52c31c..02e9142 100644 (file)
@@ -1,3 +1,40 @@
+2016-02-17  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: More WK2 IPC Scaffolding.
+        https://bugs.webkit.org/show_bug.cgi?id=154317
+
+        Reviewed by Alex Christensen.
+
+        No change in behavior yet; Just laying the groundwork.
+
+        * Modules/indexeddb/shared/IDBCursorInfo.cpp:
+        (WebCore::IDBCursorInfo::IDBCursorInfo):
+        * Modules/indexeddb/shared/IDBCursorInfo.h:
+        (WebCore::IDBCursorInfo::decode):
+        * Modules/indexeddb/shared/IDBError.h:
+        (WebCore::IDBError::decode):
+        * Modules/indexeddb/shared/IDBIndexInfo.h:
+        (WebCore::IDBIndexInfo::decode):
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+        (WebCore::IDBObjectStoreInfo::decode):
+        * Modules/indexeddb/shared/IDBRequestData.cpp:
+        (WebCore::IDBRequestData::IDBRequestData):
+        * Modules/indexeddb/shared/IDBRequestData.h:
+        (WebCore::IDBRequestData::decode):
+        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
+        (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
+        * Modules/indexeddb/shared/IDBResourceIdentifier.h:
+        (WebCore::IDBResourceIdentifier::decode):
+        * Modules/indexeddb/shared/IDBResultData.cpp:
+        (WebCore::IDBResultData::IDBResultData):
+        * Modules/indexeddb/shared/IDBResultData.h:
+        (WebCore::IDBResultData::decode):
+        * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
+        (WebCore::IDBTransactionInfo::IDBTransactionInfo):
+        * Modules/indexeddb/shared/IDBTransactionInfo.h:
+        (WebCore::IDBTransactionInfo::decode):
+        * WebCore.xcodeproj/project.pbxproj:
+
 2016-02-17  Eric Carlson  <eric.carlson@apple.com>
 
         [Win] Allow ports to disable automatic text track selection
index 0e15533..0eb9414 100644 (file)
@@ -43,6 +43,10 @@ IDBCursorInfo IDBCursorInfo::indexCursor(IDBClient::IDBTransaction& transaction,
     return { transaction, objectStoreIdentifier, indexIdentifier, range, direction, type };
 }
 
+IDBCursorInfo::IDBCursorInfo()
+{
+}
+
 IDBCursorInfo::IDBCursorInfo(IDBClient::IDBTransaction& transaction, uint64_t objectStoreIdentifier, const IDBKeyRangeData& range, IndexedDB::CursorDirection direction, IndexedDB::CursorType type)
     : m_cursorIdentifier(transaction.serverConnection())
     , m_transactionIdentifier(transaction.info().identifier())
index 401e508..d1a4919 100644 (file)
@@ -69,6 +69,10 @@ public:
 
     IDBCursorInfo isolatedCopy() const;
 
+    WEBCORE_EXPORT IDBCursorInfo();
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBCursorInfo&);
+
 private:
     IDBCursorInfo(IDBClient::IDBTransaction&, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
     IDBCursorInfo(IDBClient::IDBTransaction&, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
@@ -87,6 +91,11 @@ private:
     IndexedDB::CursorType m_type;
 };
 
+template<class Decoder> bool IDBCursorInfo::decode(Decoder&, IDBCursorInfo&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 211d19d..0ffd08a 100644 (file)
@@ -49,11 +49,19 @@ public:
 
     IDBError isolatedCopy() const;
 
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBError&);
+
 private:
     ExceptionCode m_code { IDBDatabaseException::NoError };
     String m_message;
 };
 
+template<class Decoder> bool IDBError::decode(Decoder&, IDBError&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 7fc56d2..f2a3ba2 100644 (file)
@@ -47,6 +47,9 @@ public:
     bool unique() const { return m_unique; }
     bool multiEntry() const { return m_multiEntry; }
 
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBIndexInfo&);
+
 #ifndef NDEBUG
     String loggingString(int indent = 0) const;
 #endif
@@ -60,6 +63,11 @@ private:
     bool m_multiEntry { false };
 };
 
+template<class Decoder> bool IDBIndexInfo::decode(Decoder&, IDBIndexInfo&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 2498d85..26709a3 100644 (file)
@@ -62,6 +62,9 @@ public:
     void deleteIndex(const String& indexName);
     void deleteIndex(uint64_t indexIdentifier);
 
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBObjectStoreInfo&);
+
 #ifndef NDEBUG
     String loggingString(int indent = 0) const;
 #endif
@@ -77,6 +80,11 @@ private:
 
 };
 
+template<class Decoder> bool IDBObjectStoreInfo::decode(Decoder&, IDBObjectStoreInfo&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index c11217d..accaa14 100644 (file)
 
 namespace WebCore {
 
+IDBRequestData::IDBRequestData()
+{
+}
+
 IDBRequestData::IDBRequestData(const IDBClient::IDBConnectionToServer& connection, const IDBClient::IDBOpenDBRequest& request)
     : m_serverConnectionIdentifier(connection.identifier())
     , m_requestIdentifier(std::make_unique<IDBResourceIdentifier>(connection, request))
index 3e1312c..6f4962b 100644 (file)
@@ -67,6 +67,11 @@ public:
 
     IDBRequestData isolatedCopy();
 
+    WEBCORE_EXPORT IDBRequestData();
+
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBRequestData&);
+
 private:
     uint64_t m_serverConnectionIdentifier { 0 };
     std::unique_ptr<IDBResourceIdentifier> m_requestIdentifier;
@@ -82,6 +87,11 @@ private:
     IndexedDB::RequestType m_requestType { IndexedDB::RequestType::Other };
 };
 
+template<class Decoder> bool IDBRequestData::decode(Decoder&, IDBRequestData&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 0b1b46b..26c6e6c 100644 (file)
@@ -49,6 +49,10 @@ static uint64_t nextServerResourceNumber()
     return currentNumber += 2;
 }
 
+IDBResourceIdentifier::IDBResourceIdentifier()
+{
+}
+
 IDBResourceIdentifier::IDBResourceIdentifier(uint64_t connectionIdentifier, uint64_t resourceIdentifier)
     : m_idbConnectionIdentifier(connectionIdentifier)
     , m_resourceNumber(resourceIdentifier)
index d2e146c..278bff2 100644 (file)
@@ -76,8 +76,12 @@ public:
     String loggingString() const;
 #endif
 
+    WEBCORE_EXPORT IDBResourceIdentifier();
+
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBResourceIdentifier&);
+
 private:
-    IDBResourceIdentifier() = delete;
     IDBResourceIdentifier(uint64_t connectionIdentifier, uint64_t resourceIdentifier);
     uint64_t m_idbConnectionIdentifier { 0 };
     uint64_t m_resourceNumber { 0 };
@@ -114,6 +118,11 @@ struct IDBResourceIdentifierHashTraits : WTF::CustomHashTraits<IDBResourceIdenti
     }
 };
 
+template<class Decoder> bool IDBResourceIdentifier::decode(Decoder&, IDBResourceIdentifier&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 namespace WTF {
index 302eee7..19e1464 100644 (file)
 
 namespace WebCore {
 
+IDBResultData::IDBResultData()
+{
+}
+
 IDBResultData::IDBResultData(const IDBResourceIdentifier& requestIdentifier)
     : m_requestIdentifier(requestIdentifier)
 {
index 67ad70b..9051f53 100644 (file)
@@ -98,11 +98,15 @@ public:
 
     const IDBGetResult& getResult() const;
 
+    WEBCORE_EXPORT IDBResultData();
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBResultData&);
+
 private:
     IDBResultData(const IDBResourceIdentifier&);
     IDBResultData(IDBResultType, const IDBResourceIdentifier&);
 
-    IDBResultType m_type;
+    IDBResultType m_type { IDBResultType::Error };
     IDBResourceIdentifier m_requestIdentifier;
 
     IDBError m_error;
@@ -114,6 +118,11 @@ private:
     uint64_t m_resultInteger { 0 };
 };
 
+template<class Decoder> bool IDBResultData::decode(Decoder&, IDBResultData&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index fe5aee8..f448e95 100644 (file)
 
 namespace WebCore {
 
+IDBTransactionInfo::IDBTransactionInfo()
+{
+}
+
 IDBTransactionInfo::IDBTransactionInfo(const IDBResourceIdentifier& identifier)
     : m_identifier(identifier)
 {
index ed8a384..87a26a3 100644 (file)
@@ -61,6 +61,10 @@ public:
 
     IDBDatabaseInfo* originalDatabaseInfo() const { return m_originalDatabaseInfo.get(); }
 
+    WEBCORE_EXPORT IDBTransactionInfo();
+    template<class Encoder> void encode(Encoder&) const;
+    template<class Decoder> static bool decode(Decoder&, IDBTransactionInfo&);
+
 #ifndef NDEBUG
     String loggingString() const;
 #endif
@@ -76,6 +80,11 @@ private:
     std::unique_ptr<IDBDatabaseInfo> m_originalDatabaseInfo;
 };
 
+template<class Decoder> bool IDBTransactionInfo::decode(Decoder&, IDBTransactionInfo&)
+{
+    return false;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 096c705..aa6770a 100644 (file)
                517138F71BF128BB000D5F01 /* IndexValueStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517138F51BF12262000D5F01 /* IndexValueStore.cpp */; };
                517138F81BF128BB000D5F01 /* IndexValueStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 517138F61BF12262000D5F01 /* IndexValueStore.h */; };
                517138FB1BF3ADF4000D5F01 /* IDBCursorInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517138F91BF3ADAC000D5F01 /* IDBCursorInfo.cpp */; };
-               517138FC1BF3ADF4000D5F01 /* IDBCursorInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 517138FA1BF3ADAC000D5F01 /* IDBCursorInfo.h */; };
+               517138FC1BF3ADF4000D5F01 /* IDBCursorInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 517138FA1BF3ADAC000D5F01 /* IDBCursorInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                517139051BF64DEC000D5F01 /* MemoryObjectStoreCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517139031BF64DE3000D5F01 /* MemoryObjectStoreCursor.cpp */; };
                517139061BF64DEC000D5F01 /* MemoryObjectStoreCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 517139041BF64DE3000D5F01 /* MemoryObjectStoreCursor.h */; };
                517139071BF64DEF000D5F01 /* MemoryCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517139011BF64DE3000D5F01 /* MemoryCursor.cpp */; };
                51CBFC990D10E483002DBF51 /* CachedFramePlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D0C5160DAA90B7003B3831 /* JSStorageCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D0C5150DAA90B7003B3831 /* JSStorageCustom.cpp */; };
                51D7236C1BB6174900478CA3 /* IDBResultData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7236A1BB60BFE00478CA3 /* IDBResultData.cpp */; };
-               51D7236D1BB6174900478CA3 /* IDBResultData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7236B1BB60BFE00478CA3 /* IDBResultData.h */; };
+               51D7236D1BB6174900478CA3 /* IDBResultData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7236B1BB60BFE00478CA3 /* IDBResultData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D7EFEA1BDE8F8C00E93E10 /* ThreadSafeDataBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 511FAEA91BDC989A00B4AFE4 /* ThreadSafeDataBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D7EFEC1BDEFA5100E93E10 /* TransactionOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7EFEB1BDEFA4700E93E10 /* TransactionOperation.cpp */; };
                51DCE8020CAC9F1C00488358 /* JSSQLResultSetRowListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51DCE8010CAC9F1C00488358 /* JSSQLResultSetRowListCustom.cpp */; };
index 7766f32..2af27b6 100644 (file)
@@ -643,6 +643,7 @@ set(WebKit2_MESSAGES_IN_FILES
     DatabaseProcess/DatabaseToWebProcessConnection.messages.in
 
     DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in
+    DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in
 
     NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in
 
@@ -695,6 +696,7 @@ set(WebKit2_MESSAGES_IN_FILES
 
     WebProcess/Cookies/WebCookieManager.messages.in
 
+    WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
     WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in
 
     WebProcess/FullScreen/WebFullScreenManager.messages.in
index 82f96d8..1c29d22 100644 (file)
@@ -1,3 +1,59 @@
+2016-02-17  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: More WK2 IPC Scaffolding.
+        https://bugs.webkit.org/show_bug.cgi?id=154317
+
+        Reviewed by Alex Christensen.
+
+        No change in behavior yet; Just laying the groundwork.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebKit2.xcodeproj/project.pbxproj:
+
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
+        (WebKit::WebIDBConnectionToClient::deleteDatabase):
+        (WebKit::WebIDBConnectionToClient::openDatabase):
+        (WebKit::WebIDBConnectionToClient::abortTransaction):
+        (WebKit::WebIDBConnectionToClient::commitTransaction):
+        (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
+        (WebKit::WebIDBConnectionToClient::createObjectStore):
+        (WebKit::WebIDBConnectionToClient::deleteObjectStore):
+        (WebKit::WebIDBConnectionToClient::clearObjectStore):
+        (WebKit::WebIDBConnectionToClient::createIndex):
+        (WebKit::WebIDBConnectionToClient::deleteIndex):
+        (WebKit::WebIDBConnectionToClient::putOrAdd):
+        (WebKit::WebIDBConnectionToClient::getRecord):
+        (WebKit::WebIDBConnectionToClient::getCount):
+        (WebKit::WebIDBConnectionToClient::deleteRecord):
+        (WebKit::WebIDBConnectionToClient::openCursor):
+        (WebKit::WebIDBConnectionToClient::iterateCursor):
+        (WebKit::WebIDBConnectionToClient::establishTransaction):
+        (WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
+        (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
+        (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
+        * DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Added.
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::didDeleteDatabase):
+        (WebKit::WebIDBConnectionToServer::didOpenDatabase):
+        (WebKit::WebIDBConnectionToServer::didAbortTransaction):
+        (WebKit::WebIDBConnectionToServer::didCommitTransaction):
+        (WebKit::WebIDBConnectionToServer::didCreateObjectStore):
+        (WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
+        (WebKit::WebIDBConnectionToServer::didClearObjectStore):
+        (WebKit::WebIDBConnectionToServer::didCreateIndex):
+        (WebKit::WebIDBConnectionToServer::didDeleteIndex):
+        (WebKit::WebIDBConnectionToServer::didPutOrAdd):
+        (WebKit::WebIDBConnectionToServer::didGetRecord):
+        (WebKit::WebIDBConnectionToServer::didGetCount):
+        (WebKit::WebIDBConnectionToServer::didDeleteRecord):
+        (WebKit::WebIDBConnectionToServer::didOpenCursor):
+        (WebKit::WebIDBConnectionToServer::didIterateCursor):
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Added.
+
 2016-02-17  Alex Christensen  <achristensen@webkit.org>
 
         CMake build fix after r196698.
index 1beba39..f492c6d 100644 (file)
@@ -134,6 +134,86 @@ void WebIDBConnectionToClient::notifyOpenDBRequestBlocked(const WebCore::IDBReso
 {
 }
 
+void WebIDBConnectionToClient::deleteDatabase(const IDBRequestData&)
+{
+}
+
+void WebIDBConnectionToClient::openDatabase(const IDBRequestData&)
+{
+}
+
+void WebIDBConnectionToClient::abortTransaction(const IDBResourceIdentifier&)
+{
+}
+
+void WebIDBConnectionToClient::commitTransaction(const IDBResourceIdentifier&)
+{
+}
+
+void WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction(const IDBResourceIdentifier&)
+{
+}
+
+void WebIDBConnectionToClient::createObjectStore(const IDBRequestData&, const IDBObjectStoreInfo&)
+{
+}
+
+void WebIDBConnectionToClient::deleteObjectStore(const IDBRequestData&, const String&)
+{
+}
+
+void WebIDBConnectionToClient::clearObjectStore(const IDBRequestData&, uint64_t)
+{
+}
+
+void WebIDBConnectionToClient::createIndex(const IDBRequestData&, const IDBIndexInfo&)
+{
+}
+
+void WebIDBConnectionToClient::deleteIndex(const IDBRequestData&, uint64_t, const String&)
+{
+}
+
+void WebIDBConnectionToClient::putOrAdd(const IDBRequestData&, const IDBKeyData&, const IPC::DataReference&, bool)
+{
+}
+
+void WebIDBConnectionToClient::getRecord(const IDBRequestData&, const IDBKeyRangeData&)
+{
+}
+
+void WebIDBConnectionToClient::getCount(const IDBRequestData&, const IDBKeyRangeData&)
+{
+}
+
+void WebIDBConnectionToClient::deleteRecord(const IDBRequestData&, const IDBKeyRangeData&)
+{
+}
+
+void WebIDBConnectionToClient::openCursor(const IDBRequestData&, const IDBCursorInfo&)
+{
+}
+
+void WebIDBConnectionToClient::iterateCursor(const IDBRequestData&, const IDBKeyData&, unsigned long)
+{
+}
+
+void WebIDBConnectionToClient::establishTransaction(uint64_t, const IDBTransactionInfo&)
+{
+}
+
+void WebIDBConnectionToClient::databaseConnectionClosed(uint64_t)
+{
+}
+
+void WebIDBConnectionToClient::abortOpenAndUpgradeNeeded(uint64_t, const IDBResourceIdentifier&)
+{
+}
+
+void WebIDBConnectionToClient::didFireVersionChangeEvent(uint64_t, const IDBResourceIdentifier&)
+{
+}
+
 } // namespace WebKit
 
 #endif // ENABLE(INDEXED_DATABASE)
index 64e5d01..0e75d1d 100644 (file)
 #include "MessageSender.h"
 #include <WebCore/IDBConnectionToClient.h>
 
+namespace WebCore {
+class IDBCursorInfo;
+class IDBIndexInfo;
+class IDBObjectStoreInfo;
+class IDBRequestData;
+class IDBTransactionInfo;
+class SerializedScriptValue;
+}
+
 namespace WebKit {
 
 class WebIDBConnectionToClient final : public WebCore::IDBServer::IDBConnectionToClientDelegate, public IPC::MessageSender, public RefCounted<WebIDBConnectionToClient> {
@@ -44,6 +53,7 @@ public:
     virtual uint64_t identifier() const override final { return m_identifier; }
     virtual uint64_t messageSenderDestinationID() override final { return m_identifier; }
 
+    // IDBConnectionToClientDelegate
     virtual void didDeleteDatabase(const WebCore::IDBResultData&) override final;
     virtual void didOpenDatabase(const WebCore::IDBResultData&) override final;
     virtual void didAbortTransaction(const WebCore::IDBResourceIdentifier& transactionIdentifier, const WebCore::IDBError&) override final;
@@ -67,12 +77,37 @@ public:
     virtual void ref() override { RefCounted<WebIDBConnectionToClient>::ref(); }
     virtual void deref() override { RefCounted<WebIDBConnectionToClient>::deref(); }
 
+    // Messages received from WebProcess
+    void deleteDatabase(const WebCore::IDBRequestData&);
+    void openDatabase(const WebCore::IDBRequestData&);
+    void abortTransaction(const WebCore::IDBResourceIdentifier&);
+    void commitTransaction(const WebCore::IDBResourceIdentifier&);
+    void didFinishHandlingVersionChangeTransaction(const WebCore::IDBResourceIdentifier&);
+    void createObjectStore(const WebCore::IDBRequestData&, const WebCore::IDBObjectStoreInfo&);
+    void deleteObjectStore(const WebCore::IDBRequestData&, const String& objectStoreName);
+    void clearObjectStore(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier);
+    void createIndex(const WebCore::IDBRequestData&, const WebCore::IDBIndexInfo&);
+    void deleteIndex(const WebCore::IDBRequestData&, uint64_t objectStoreIdentifier, const String& indexName);
+    void putOrAdd(const WebCore::IDBRequestData&, const WebCore::IDBKeyData&, const IPC::DataReference& value, bool overwriteEnabled);
+    void getRecord(const WebCore::IDBRequestData&, const WebCore::IDBKeyRangeData&);
+    void getCount(const WebCore::IDBRequestData&, const WebCore::IDBKeyRangeData&);
+    void deleteRecord(const WebCore::IDBRequestData&, const WebCore::IDBKeyRangeData&);
+    void openCursor(const WebCore::IDBRequestData&, const WebCore::IDBCursorInfo&);
+    void iterateCursor(const WebCore::IDBRequestData&, const WebCore::IDBKeyData&, unsigned long count);
+
+    void establishTransaction(uint64_t databaseConnectionIdentifier, const WebCore::IDBTransactionInfo&);
+    void databaseConnectionClosed(uint64_t databaseConnectionIdentifier);
+    void abortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& transactionIdentifier);
+    void didFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, const WebCore::IDBResourceIdentifier& requestIdentifier);
+
     void disconnectedFromWebProcess();
 
 private:
     WebIDBConnectionToClient(DatabaseToWebProcessConnection&, uint64_t serverConnectionIdentifier);
 
     virtual IPC::Connection* messageSenderConnection() override final;
+    void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&);
+
     Ref<DatabaseToWebProcessConnection> m_connection;
 
     uint64_t m_identifier;
diff --git a/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in b/Source/WebKit2/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in
new file mode 100644 (file)
index 0000000..802e67b
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright (C) 2016 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#if ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
+
+messages -> WebIDBConnectionToClient {
+    DeleteDatabase(WebCore::IDBRequestData requestData)
+    OpenDatabase(WebCore::IDBRequestData requestData);
+    AbortTransaction(WebCore::IDBResourceIdentifier transactionIdentifier);
+    CommitTransaction(WebCore::IDBResourceIdentifier transactionIdentifier);
+    DidFinishHandlingVersionChangeTransaction(WebCore::IDBResourceIdentifier transactionIdentifier);
+    CreateObjectStore(WebCore::IDBRequestData requestData, WebCore::IDBObjectStoreInfo info);
+    DeleteObjectStore(WebCore::IDBRequestData requestData, String objectStoreName);
+    ClearObjectStore(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier);
+    CreateIndex(WebCore::IDBRequestData requestData, WebCore::IDBIndexInfo info);
+    DeleteIndex(WebCore::IDBRequestData requestData, uint64_t objectStoreIdentifier, String indexName);
+    PutOrAdd(WebCore::IDBRequestData requestData, WebCore::IDBKeyData key, IPC::DataReference value, bool overwriteEnabled);
+    GetRecord(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
+    GetCount(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
+    DeleteRecord(WebCore::IDBRequestData requestData, struct WebCore::IDBKeyRangeData range);
+    OpenCursor(WebCore::IDBRequestData requestData, WebCore::IDBCursorInfo info);
+    IterateCursor(WebCore::IDBRequestData requestData, WebCore::IDBKeyData key, uint32_t count);
+
+    EstablishTransaction(uint64_t databaseConnectionIdentifier, WebCore::IDBTransactionInfo info);
+    DatabaseConnectionClosed(uint64_t databaseConnectionIdentifier);
+    AbortOpenAndUpgradeNeeded(uint64_t databaseConnectionIdentifier, WebCore::IDBResourceIdentifier transactionIdentifier);
+    DidFireVersionChangeEvent(uint64_t databaseConnectionIdentifier, WebCore::IDBResourceIdentifier requestIdentifier);
+}
+
+#endif // ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
index 204435b..5c5791d 100644 (file)
@@ -115,6 +115,8 @@ MESSAGE_RECEIVERS = \
     WebFullScreenManagerProxy \
     WebGeolocationManager \
     WebGeolocationManagerProxy \
+    WebIDBConnectionToClient \
+    WebIDBConnectionToServer \
     WebIDBServerConnection \
     WebIconDatabase \
     WebIconDatabaseProxy \
index 4af964a..4c6ec55 100644 (file)
                51032F1E180F791700961BB7 /* DatabaseToWebProcessConnectionMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51032F1C180F791700961BB7 /* DatabaseToWebProcessConnectionMessages.h */; };
                5105236F1C739D42007993CB /* WebIDBConnectionToClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5105236D1C7393E9007993CB /* WebIDBConnectionToClient.cpp */; };
                510523701C739D42007993CB /* WebIDBConnectionToClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5105236E1C7393E9007993CB /* WebIDBConnectionToClient.h */; };
+               510523741C73D38B007993CB /* WebIDBConnectionToServerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 510523731C73D37B007993CB /* WebIDBConnectionToServerMessages.h */; };
+               510523751C73D38F007993CB /* WebIDBConnectionToServerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510523721C73D37B007993CB /* WebIDBConnectionToServerMessageReceiver.cpp */; };
+               510523791C73DA77007993CB /* WebIDBConnectionToClientMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510523771C73DA70007993CB /* WebIDBConnectionToClientMessageReceiver.cpp */; };
+               5105237A1C73DA77007993CB /* WebIDBConnectionToClientMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 510523781C73DA70007993CB /* WebIDBConnectionToClientMessages.h */; };
                51064D35189781C4004B2FEB /* SQLiteIDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51064D33189781C4004B2FEB /* SQLiteIDBCursor.cpp */; };
                51064D36189781C4004B2FEB /* SQLiteIDBCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51064D34189781C4004B2FEB /* SQLiteIDBCursor.h */; };
                5106D7C218BDBE73000AB166 /* ContextMenuContextData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5106D7BF18BDBE73000AB166 /* ContextMenuContextData.cpp */; };
                51032F1C180F791700961BB7 /* DatabaseToWebProcessConnectionMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseToWebProcessConnectionMessages.h; sourceTree = "<group>"; };
                5105236D1C7393E9007993CB /* WebIDBConnectionToClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIDBConnectionToClient.cpp; sourceTree = "<group>"; };
                5105236E1C7393E9007993CB /* WebIDBConnectionToClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIDBConnectionToClient.h; sourceTree = "<group>"; };
+               510523711C73D22B007993CB /* WebIDBConnectionToServer.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebIDBConnectionToServer.messages.in; sourceTree = "<group>"; };
+               510523721C73D37B007993CB /* WebIDBConnectionToServerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIDBConnectionToServerMessageReceiver.cpp; sourceTree = "<group>"; };
+               510523731C73D37B007993CB /* WebIDBConnectionToServerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIDBConnectionToServerMessages.h; sourceTree = "<group>"; };
+               510523761C73D9F6007993CB /* WebIDBConnectionToClient.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebIDBConnectionToClient.messages.in; sourceTree = "<group>"; };
+               510523771C73DA70007993CB /* WebIDBConnectionToClientMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIDBConnectionToClientMessageReceiver.cpp; sourceTree = "<group>"; };
+               510523781C73DA70007993CB /* WebIDBConnectionToClientMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIDBConnectionToClientMessages.h; sourceTree = "<group>"; };
                5105B0D4162F7A7A00E27709 /* NetworkProcessConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkProcessConnection.cpp; path = Network/NetworkProcessConnection.cpp; sourceTree = "<group>"; };
                5105B0D5162F7A7A00E27709 /* NetworkProcessConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessConnection.h; path = Network/NetworkProcessConnection.h; sourceTree = "<group>"; };
                5105B0F31630872E00E27709 /* NetworkProcessProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = NetworkProcessProxy.messages.in; sourceTree = "<group>"; };
                        children = (
                                514129911C6428100059E714 /* WebIDBConnectionToServer.cpp */,
                                514129921C6428100059E714 /* WebIDBConnectionToServer.h */,
+                               510523711C73D22B007993CB /* WebIDBConnectionToServer.messages.in */,
                                51E351F1180F5C7500E53BE9 /* WebIDBFactoryBackend.cpp */,
                                51E351F2180F5C7500E53BE9 /* WebIDBFactoryBackend.h */,
                                51290990183ACEAF005522A6 /* WebIDBServerConnection.cpp */,
                                515E773218402D510007203F /* UniqueIDBDatabaseIdentifier.h */,
                                5105236D1C7393E9007993CB /* WebIDBConnectionToClient.cpp */,
                                5105236E1C7393E9007993CB /* WebIDBConnectionToClient.h */,
+                               510523761C73D9F6007993CB /* WebIDBConnectionToClient.messages.in */,
                        );
                        path = IndexedDB;
                        sourceTree = "<group>";
                                51D02F67132EC73700BEAA96 /* WebIconDatabaseMessages.h */,
                                51D02F68132EC73700BEAA96 /* WebIconDatabaseProxyMessageReceiver.cpp */,
                                51D02F69132EC73700BEAA96 /* WebIconDatabaseProxyMessages.h */,
+                               510523771C73DA70007993CB /* WebIDBConnectionToClientMessageReceiver.cpp */,
+                               510523781C73DA70007993CB /* WebIDBConnectionToClientMessages.h */,
+                               510523721C73D37B007993CB /* WebIDBConnectionToServerMessageReceiver.cpp */,
+                               510523731C73D37B007993CB /* WebIDBConnectionToServerMessages.h */,
                                51C96116183D294700D2002E /* WebIDBServerConnectionMessageReceiver.cpp */,
                                51C96117183D294700D2002E /* WebIDBServerConnectionMessages.h */,
                                1C8E2A311277852400BC7BD0 /* WebInspectorMessageReceiver.cpp */,
                                1A5704F21BE0174000874AF1 /* _WKElementInfo.h in Headers */,
                                1AD01BC91905D37E00C9C45F /* _WKErrorRecoveryAttempting.h in Headers */,
                                005D158F18E4C4EB00734619 /* _WKFindDelegate.h in Headers */,
+                               510523741C73D38B007993CB /* WebIDBConnectionToServerMessages.h in Headers */,
                                2DEAC5CF1AC368BB00A195D8 /* _WKFindOptions.h in Headers */,
                                2E7A944A1BBD97C300945547 /* _WKFocusedElementInfo.h in Headers */,
                                2E0B8A7A1BC59A590044B32D /* _WKFormDelegate.h in Headers */,
                                BCF4DE25168FA44800C94AFC /* WebContextSupplement.h in Headers */,
                                330934501315B94D0097A7BC /* WebCookieManager.h in Headers */,
                                330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */,
+                               5105237A1C73DA77007993CB /* WebIDBConnectionToClientMessages.h in Headers */,
                                330934561315B9750097A7BC /* WebCookieManagerProxy.h in Headers */,
                                33AA1067131F060000D4A575 /* WebCookieManagerProxyClient.h in Headers */,
                                3309344A1315B9220097A7BC /* WebCookieManagerProxyMessages.h in Headers */,
                                1AE00D6B18327C1200087DD7 /* StringReference.cpp in Sources */,
                                296BD85E15019BC30071F424 /* StringUtilities.mm in Sources */,
                                1ZZ417EF12C00D87002BE67B /* TextCheckerCompletion.cpp in Sources */,
+                               510523751C73D38F007993CB /* WebIDBConnectionToServerMessageReceiver.cpp in Sources */,
                                2DA944AD1884E9BA00ED86DB /* TextCheckerIOS.mm in Sources */,
                                1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */,
                                1AAF263814687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm in Sources */,
                                7CCCC8FA1A5F50FD008FB0DA /* WebNavigationState.cpp in Sources */,
                                31A2EC48148997C200810D71 /* WebNotification.cpp in Sources */,
                                31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */,
+                               510523791C73DA77007993CB /* WebIDBConnectionToClientMessageReceiver.cpp in Sources */,
                                31312620148FF82C00BA2A39 /* WebNotificationManager.cpp in Sources */,
                                31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */,
                                31A2EC4A148997C200810D71 /* WebNotificationManagerProxy.cpp in Sources */,
index 5a44b00..9592cff 100644 (file)
 #include "WebProcess.h"
 #include "WebToDatabaseProcessConnection.h"
 #include <WebCore/IDBConnectionToServer.h>
+#include <WebCore/IDBCursorInfo.h>
+#include <WebCore/IDBError.h>
+#include <WebCore/IDBIndexInfo.h>
+#include <WebCore/IDBObjectStoreInfo.h>
 #include <WebCore/IDBOpenDBRequestImpl.h>
+#include <WebCore/IDBRequestData.h>
+#include <WebCore/IDBResourceIdentifier.h>
+#include <WebCore/IDBResultData.h>
+#include <WebCore/IDBTransactionInfo.h>
 
 using namespace WebCore;
 
@@ -157,6 +165,67 @@ void WebIDBConnectionToServer::didFireVersionChangeEvent(uint64_t databaseConnec
 {
 }
 
+void WebIDBConnectionToServer::didDeleteDatabase(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didOpenDatabase(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didAbortTransaction(const IDBResourceIdentifier&, const IDBError&)
+{
+}
+
+void WebIDBConnectionToServer::didCommitTransaction(const IDBResourceIdentifier&, const IDBError&)
+{
+}
+
+void WebIDBConnectionToServer::didCreateObjectStore(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didDeleteObjectStore(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didClearObjectStore(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didCreateIndex(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didDeleteIndex(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didPutOrAdd(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didGetRecord(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didGetCount(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didDeleteRecord(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didOpenCursor(const IDBResultData&)
+{
+}
+
+void WebIDBConnectionToServer::didIterateCursor(const IDBResultData&)
+{
+}
+
+
 } // namespace WebKit
 
 #endif // ENABLE(INDEXED_DATABASE)
index 8051b43..fd612a3 100644 (file)
@@ -43,6 +43,7 @@ public:
     virtual uint64_t identifier() const override final { return m_identifier; }
     virtual uint64_t messageSenderDestinationID() override final { return m_identifier; }
 
+    // IDBConnectionToServerDelegate
     virtual void deleteDatabase(WebCore::IDBRequestData&) override final;
     virtual void openDatabase(WebCore::IDBRequestData&) override final;
     virtual void abortTransaction(WebCore::IDBResourceIdentifier&) override final;
@@ -67,10 +68,28 @@ public:
     virtual void ref() override { RefCounted<WebIDBConnectionToServer>::ref(); }
     virtual void deref() override { RefCounted<WebIDBConnectionToServer>::deref(); }
 
+    // Messages received from DatabaseProcess
+    void didDeleteDatabase(const WebCore::IDBResultData&);
+    void didOpenDatabase(const WebCore::IDBResultData&);
+    void didAbortTransaction(const WebCore::IDBResourceIdentifier& transactionIdentifier, const WebCore::IDBError&);
+    void didCommitTransaction(const WebCore::IDBResourceIdentifier& transactionIdentifier, const WebCore::IDBError&);
+    void didCreateObjectStore(const WebCore::IDBResultData&);
+    void didDeleteObjectStore(const WebCore::IDBResultData&);
+    void didClearObjectStore(const WebCore::IDBResultData&);
+    void didCreateIndex(const WebCore::IDBResultData&);
+    void didDeleteIndex(const WebCore::IDBResultData&);
+    void didPutOrAdd(const WebCore::IDBResultData&);
+    void didGetRecord(const WebCore::IDBResultData&);
+    void didGetCount(const WebCore::IDBResultData&);
+    void didDeleteRecord(const WebCore::IDBResultData&);
+    void didOpenCursor(const WebCore::IDBResultData&);
+    void didIterateCursor(const WebCore::IDBResultData&);
+
 private:
     WebIDBConnectionToServer();
 
     virtual IPC::Connection* messageSenderConnection() override final;
+    void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&);
 
     uint64_t m_identifier;
     bool m_isOpenInServer { false };
diff --git a/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in b/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
new file mode 100644 (file)
index 0000000..a8a697a
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright (C) 2016 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#if ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
+
+messages -> WebIDBConnectionToServer {
+    DidDeleteDatabase(WebCore::IDBResultData result)
+    DidOpenDatabase(WebCore::IDBResultData result)
+    DidAbortTransaction(WebCore::IDBResourceIdentifier transactionIdentifier, WebCore::IDBError error)
+    DidCommitTransaction(WebCore::IDBResourceIdentifier transactionIdentifier, WebCore::IDBError error)
+    DidCreateObjectStore(WebCore::IDBResultData result)
+    DidDeleteObjectStore(WebCore::IDBResultData result)
+    DidClearObjectStore(WebCore::IDBResultData result)
+    DidCreateIndex(WebCore::IDBResultData result)
+    DidDeleteIndex(WebCore::IDBResultData result)
+    DidPutOrAdd(WebCore::IDBResultData result)
+    DidGetRecord(WebCore::IDBResultData result)
+    DidGetCount(WebCore::IDBResultData result)
+    DidDeleteRecord(WebCore::IDBResultData result)
+    DidOpenCursor(WebCore::IDBResultData result)
+    DidIterateCursor(WebCore::IDBResultData result)
+}
+
+#endif // ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)