Index: third_party/WebKit/Source/modules/indexeddb/IDBDatabaseProxy.h |
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseProxy.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseProxy.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3b8f7e9d732472669e0b4c00767a5be24e7f7e38 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseProxy.h |
@@ -0,0 +1,70 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef IDBDatabaseProxy_h |
+#define IDBDatabaseProxy_h |
+ |
+#include "Source/modules/indexeddb/indexed_db.mojom-blink.h" |
+#include "modules/indexeddb/IDBObjectStore.h" |
+#include "platform/heap/HeapAllocator.h" |
+ |
+namespace blink { |
+ |
+class IDBKey; |
+class IDBKeyPath; |
+class IDBKeyRange; |
+ |
+class IDBDatabaseProxy final { |
+public: |
+ static IDBDatabaseProxy* create(indexed_db::mojom::blink::DatabasePtr); |
+ |
+ void CreateObjectStore(int64_t transactionId, int64_t objectStoreId, const WTF::String& name, const IDBKeyPath&, bool autoIncrement); |
+ |
+ void Close(); |
+ |
+ void DeleteObjectStore(int64_t transactionId, int64_t objectStoreId); |
+ |
+ void CreateTransaction(int64_t id, const Vector<int64_t>& objectStoreIds, indexed_db::mojom::blink::TransactionMode); |
+ |
+ void VersionChangeIgnored(); |
+ |
+ void Abort(int64_t transactionId); |
+ |
+ void Commit(int64_t transactionId); |
+ |
+ void Get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, bool keyOnly, const indexed_db::mojom::blink::Database::GetCallback&); |
+ |
+ void GetAll(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, int64_t maxCount, bool keyOnly); |
+ |
+#if 0 |
+ void Put(int64_t transactionId, int64_t objectStoreId, Vector<int8_t> value, Vector<BlobInfoPtr>, IDBKey, PutMode, Vector<int64_t> indexIds, Vector<Vector<KeyPtr>> indexKeys); |
+#endif |
+ |
+ void DeleteRange(int64_t transactionId, int64_t objectStoreId, const IDBKeyRange*); |
+ |
+ void Clear(int64_t transactionId, int64_t objectStoreId); |
+ |
+ void CreateIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const WTF::String& name, const IDBKeyPath&, bool unique, bool multiEntry); |
+ |
+ void DeleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId); |
+ |
+ void SetIndexKeys(int64_t transactionId, int64_t objectStoreId, const IDBKey* primaryKey, const Vector<int64_t> indexIds, const HeapVector<IDBObjectStore::IndexKeys>&); |
+ |
+ void SetIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t> indexIds); |
+ |
+ void OpenCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, indexed_db::mojom::blink::CursorDirection, bool keyOnly, indexed_db::mojom::blink::TaskType); |
+ |
+ void Count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*); |
+ |
+ void AckReceivedBlobs(const Vector<WTF::String> uuids); |
+ |
+private: |
+ IDBDatabaseProxy(indexed_db::mojom::blink::DatabasePtr); |
+ |
+ indexed_db::mojom::blink::DatabasePtr m_database; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // IDBDatabaseProxy_h |