Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1352)

Unified Diff: content/browser/indexed_db/webidbdatabase_impl.h

Issue 15564008: Migrate the IndexedDB backend from Blink to Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Coding style fixes Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/webidbdatabase_impl.h
diff --git a/content/browser/indexed_db/webidbdatabase_impl.h b/content/browser/indexed_db/webidbdatabase_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..5307a9d7590c6ae32158a0a7a3e4553d894458c5
--- /dev/null
+++ b/content/browser/indexed_db/webidbdatabase_impl.h
@@ -0,0 +1,109 @@
+// Copyright (c) 2013 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 CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
+#define CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
+
+#include "base/memory/ref_counted.h"
+#include "content/browser/indexed_db/indexed_db_database.h"
+#include "content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebIDBDatabase.h"
+
+namespace WebKit {
+class WebIDBDatabaseCallbacks;
+class WebIDBDatabaseError;
+class WebIDBDatabaseMetadata;
+}
+
+namespace content {
+class IndexedDBDatabase;
+class IndexedDBDatabaseCallbacksWrapper;
+
+// See comment in WebIDBFactory for a high level overview these classes.
+class WebIDBDatabaseImpl : public WebKit::WebIDBDatabase {
+ public:
+ WebIDBDatabaseImpl(scoped_refptr<IndexedDBDatabase>,
+ scoped_refptr<IndexedDBDatabaseCallbacksWrapper>);
+ virtual ~WebIDBDatabaseImpl();
+
+ virtual void createObjectStore(long long transaction_id,
+ long long object_store_id,
+ const WebKit::WebString& name,
+ const WebKit::WebIDBKeyPath&,
+ bool auto_increment);
+ virtual void deleteObjectStore(long long object_store_id,
+ long long transaction_id);
+ virtual void createTransaction(long long id,
+ WebKit::WebIDBDatabaseCallbacks*,
+ const WebKit::WebVector<long long>&,
+ unsigned short mode);
+ virtual void forceClose();
+ virtual void close();
+ virtual void abort(long long transaction_id);
+ virtual void abort(long long transaction_id,
+ const WebKit::WebIDBDatabaseError&);
+ virtual void commit(long long transaction_id);
+
+ virtual void get(long long transaction_id,
+ long long object_store_id,
+ long long index_id,
+ const WebKit::WebIDBKeyRange&,
+ bool key_only,
+ WebKit::WebIDBCallbacks*);
+ virtual void put(long long transaction_id,
+ long long object_store_id,
+ const WebKit::WebData& value,
+ const WebKit::WebIDBKey&,
+ PutMode,
+ WebKit::WebIDBCallbacks*,
+ const WebKit::WebVector<long long>& index_ids,
+ const WebKit::WebVector<WebIndexKeys>&);
+ virtual void setIndexKeys(long long transaction_id,
+ long long object_store_id,
+ const WebKit::WebIDBKey&,
+ const WebKit::WebVector<long long>& index_ids,
+ const WebKit::WebVector<WebIndexKeys>&);
+ virtual void setIndexesReady(long long transaction_id,
+ long long object_store_id,
+ const WebKit::WebVector<long long>& index_ids);
+ virtual void openCursor(long long transaction_id,
+ long long object_store_id,
+ long long index_id,
+ const WebKit::WebIDBKeyRange&,
+ unsigned short direction,
+ bool key_only,
+ TaskType,
+ WebKit::WebIDBCallbacks*);
+ virtual void count(long long transaction_id,
+ long long object_store_id,
+ long long index_id,
+ const WebKit::WebIDBKeyRange&,
+ WebKit::WebIDBCallbacks*);
+ virtual void deleteRange(long long transaction_id,
+ long long object_store_id,
+ const WebKit::WebIDBKeyRange&,
+ WebKit::WebIDBCallbacks*);
+ virtual void clear(long long transaction_id,
+ long long object_store_id,
+ WebKit::WebIDBCallbacks*);
+
+ virtual void createIndex(long long transaction_id,
+ long long object_store_id,
+ long long index_id,
+ const WebKit::WebString& name,
+ const WebKit::WebIDBKeyPath&,
+ bool unique,
+ bool multi_entry);
+ virtual void deleteIndex(long long transaction_id,
+ long long object_store_id,
+ long long index_id);
+
+ private:
+ scoped_refptr<IndexedDBDatabase> database_backend_;
+ scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698