Index: content/browser/indexed_db/indexed_db_database.h |
diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h |
index 538a49bede0ee173295e3d17592b1b83016645d0..c301a9bfeed7ec08421f2164a4275f3e2279e7e1 100644 |
--- a/content/browser/indexed_db/indexed_db_database.h |
+++ b/content/browser/indexed_db/indexed_db_database.h |
@@ -20,10 +20,8 @@ |
#include "base/memory/ref_counted.h" |
#include "content/browser/indexed_db/indexed_db.h" |
#include "content/browser/indexed_db/indexed_db_backing_store.h" |
-#include "content/browser/indexed_db/indexed_db_callbacks.h" |
#include "content/browser/indexed_db/indexed_db_metadata.h" |
#include "content/browser/indexed_db/indexed_db_observer.h" |
-#include "content/browser/indexed_db/indexed_db_pending_connection.h" |
#include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" |
#include "content/browser/indexed_db/list_set.h" |
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
@@ -35,14 +33,18 @@ class Origin; |
namespace content { |
class IndexedDBBlobInfo; |
+class IndexedDBChangeHandler; |
class IndexedDBConnection; |
-class IndexedDBDatabaseCallbacks; |
+class IndexedDBContext; |
+class IndexedDBDatabaseError; |
class IndexedDBFactory; |
class IndexedDBKey; |
class IndexedDBKeyPath; |
class IndexedDBKeyRange; |
class IndexedDBObservation; |
class IndexedDBObserverChanges; |
+class IndexedDBPendingConnection; |
+class IndexedDBPendingDelete; |
class IndexedDBTransaction; |
struct IndexedDBValue; |
@@ -80,7 +82,7 @@ class CONTENT_EXPORT IndexedDBDatabase |
void RemoveIndex(int64_t object_store_id, int64_t index_id); |
void OpenConnection(std::unique_ptr<IndexedDBPendingConnection> connection); |
- void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks); |
+ void DeleteDatabase(std::unique_ptr<IndexedDBPendingDelete> pending_delete); |
const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } |
void CreateObjectStore(int64_t transaction_id, |
@@ -150,22 +152,19 @@ class CONTENT_EXPORT IndexedDBDatabase |
int64_t object_store_id, |
int64_t index_id, |
std::unique_ptr<IndexedDBKeyRange> key_range, |
- bool key_only, |
- scoped_refptr<IndexedDBCallbacks> callbacks); |
+ bool key_only); |
void GetAll(int64_t transaction_id, |
int64_t object_store_id, |
int64_t index_id, |
std::unique_ptr<IndexedDBKeyRange> key_range, |
bool key_only, |
- int64_t max_count, |
- scoped_refptr<IndexedDBCallbacks> callbacks); |
+ int64_t max_count); |
void Put(int64_t transaction_id, |
int64_t object_store_id, |
IndexedDBValue* value, |
ScopedVector<storage::BlobDataHandle>* handles, |
std::unique_ptr<IndexedDBKey> key, |
blink::WebIDBPutMode mode, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
const std::vector<IndexKeys>& index_keys); |
void SetIndexKeys(int64_t transaction_id, |
int64_t object_store_id, |
@@ -180,20 +179,15 @@ class CONTENT_EXPORT IndexedDBDatabase |
std::unique_ptr<IndexedDBKeyRange> key_range, |
blink::WebIDBCursorDirection, |
bool key_only, |
- blink::WebIDBTaskType task_type, |
- scoped_refptr<IndexedDBCallbacks> callbacks); |
+ blink::WebIDBTaskType task_type); |
void Count(int64_t transaction_id, |
int64_t object_store_id, |
int64_t index_id, |
- std::unique_ptr<IndexedDBKeyRange> key_range, |
- scoped_refptr<IndexedDBCallbacks> callbacks); |
+ std::unique_ptr<IndexedDBKeyRange> key_range); |
void DeleteRange(int64_t transaction_id, |
int64_t object_store_id, |
- std::unique_ptr<IndexedDBKeyRange> key_range, |
- scoped_refptr<IndexedDBCallbacks> callbacks); |
- void Clear(int64_t transaction_id, |
- int64_t object_store_id, |
- scoped_refptr<IndexedDBCallbacks> callbacks); |
+ std::unique_ptr<IndexedDBKeyRange> key_range); |
+ void Clear(int64_t transaction_id, int64_t object_store_id); |
// Number of connections that have progressed passed initial open call. |
size_t ConnectionCount() const { return connections_.size(); } |
@@ -213,9 +207,9 @@ class CONTENT_EXPORT IndexedDBDatabase |
void DeleteObjectStoreAbortOperation( |
const IndexedDBObjectStoreMetadata& object_store_metadata, |
IndexedDBTransaction* transaction); |
- void VersionChangeOperation(int64_t version, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
- IndexedDBTransaction* transaction); |
+ void VersionChangeOperation( |
+ const IndexedDBPendingConnection* pending_connection, |
+ IndexedDBTransaction* transaction); |
void VersionChangeAbortOperation(int64_t previous_version, |
IndexedDBTransaction* transaction); |
void DeleteIndexOperation(int64_t object_store_id, |
@@ -231,14 +225,12 @@ class CONTENT_EXPORT IndexedDBDatabase |
int64_t index_id, |
std::unique_ptr<IndexedDBKeyRange> key_range, |
indexed_db::CursorType cursor_type, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
IndexedDBTransaction* transaction); |
void GetAllOperation(int64_t object_store_id, |
int64_t index_id, |
std::unique_ptr<IndexedDBKeyRange> key_range, |
indexed_db::CursorType cursor_type, |
int64_t max_count, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
IndexedDBTransaction* transaction); |
struct PutOperationParams; |
void PutOperation(std::unique_ptr<PutOperationParams> params, |
@@ -251,16 +243,15 @@ class CONTENT_EXPORT IndexedDBDatabase |
void CountOperation(int64_t object_store_id, |
int64_t index_id, |
std::unique_ptr<IndexedDBKeyRange> key_range, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
IndexedDBTransaction* transaction); |
void DeleteRangeOperation(int64_t object_store_id, |
std::unique_ptr<IndexedDBKeyRange> key_range, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
IndexedDBTransaction* transaction); |
void ClearOperation(int64_t object_store_id, |
- scoped_refptr<IndexedDBCallbacks> callbacks, |
IndexedDBTransaction* transaction); |
+ IndexedDBContext* context() const; |
+ |
protected: |
IndexedDBDatabase(const base::string16& name, |
IndexedDBBackingStore* backing_store, |
@@ -294,7 +285,7 @@ class CONTENT_EXPORT IndexedDBDatabase |
void ProcessRequestQueue(); |
std::unique_ptr<IndexedDBConnection> CreateConnection( |
- scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, |
+ scoped_refptr<IndexedDBChangeHandler> change_handler, |
int child_process_id); |
IndexedDBTransaction* GetTransaction(int64_t transaction_id) const; |