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

Side by Side Diff: content/browser/indexed_db/webidbdatabase_impl.h

Issue 15659013: Revert "Migrate the IndexedDB backend from Blink to Chromium" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
6 #define CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "content/browser/indexed_db/indexed_db_database.h"
10 #include "content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebIDBDatabase.h"
12
13 namespace WebKit {
14 class WebIDBDatabaseCallbacks;
15 class WebIDBDatabaseError;
16 class WebIDBDatabaseMetadata;
17 }
18
19 namespace content {
20 class IndexedDBDatabase;
21 class IndexedDBDatabaseCallbacksWrapper;
22
23 // See comment in WebIDBFactory for a high level overview these classes.
24 class WebIDBDatabaseImpl : public WebKit::WebIDBDatabase {
25 public:
26 WebIDBDatabaseImpl(
27 scoped_refptr<IndexedDBDatabase> db,
28 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> callbacks);
29 virtual ~WebIDBDatabaseImpl();
30
31 virtual void createObjectStore(long long transaction_id,
32 long long object_store_id,
33 const WebKit::WebString& name,
34 const WebKit::WebIDBKeyPath& key_path,
35 bool auto_increment);
36 virtual void deleteObjectStore(long long object_store_id,
37 long long transaction_id);
38 virtual void createTransaction(long long id,
39 WebKit::WebIDBDatabaseCallbacks* callbacks,
40 const WebKit::WebVector<long long>& scope,
41 unsigned short mode);
42 virtual void forceClose();
43 virtual void close();
44 virtual void abort(long long transaction_id);
45 virtual void abort(long long transaction_id,
46 const WebKit::WebIDBDatabaseError& error);
47 virtual void commit(long long transaction_id);
48
49 virtual void get(long long transaction_id,
50 long long object_store_id,
51 long long index_id,
52 const WebKit::WebIDBKeyRange& range,
53 bool key_only,
54 WebKit::WebIDBCallbacks* callbacks);
55 virtual void put(long long transaction_id,
56 long long object_store_id,
57 const WebKit::WebData& value,
58 const WebKit::WebIDBKey& key,
59 PutMode mode,
60 WebKit::WebIDBCallbacks* callbacks,
61 const WebKit::WebVector<long long>& index_ids,
62 const WebKit::WebVector<WebIndexKeys>& index_keys);
63 virtual void setIndexKeys(long long transaction_id,
64 long long object_store_id,
65 const WebKit::WebIDBKey& key,
66 const WebKit::WebVector<long long>& index_ids,
67 const WebKit::WebVector<WebIndexKeys>& index_keys);
68 virtual void setIndexesReady(long long transaction_id,
69 long long object_store_id,
70 const WebKit::WebVector<long long>& index_ids);
71 virtual void openCursor(long long transaction_id,
72 long long object_store_id,
73 long long index_id,
74 const WebKit::WebIDBKeyRange& range,
75 unsigned short direction,
76 bool key_only,
77 TaskType task_type,
78 WebKit::WebIDBCallbacks* callbacks);
79 virtual void count(long long transaction_id,
80 long long object_store_id,
81 long long index_id,
82 const WebKit::WebIDBKeyRange& range,
83 WebKit::WebIDBCallbacks* callbacks);
84 virtual void deleteRange(long long transaction_id,
85 long long object_store_id,
86 const WebKit::WebIDBKeyRange& range,
87 WebKit::WebIDBCallbacks* callbacks);
88 virtual void clear(long long transaction_id,
89 long long object_store_id,
90 WebKit::WebIDBCallbacks* callbacks);
91
92 virtual void createIndex(long long transaction_id,
93 long long object_store_id,
94 long long index_id,
95 const WebKit::WebString& name,
96 const WebKit::WebIDBKeyPath& key_path,
97 bool unique,
98 bool multi_entry);
99 virtual void deleteIndex(long long transaction_id,
100 long long object_store_id,
101 long long index_id);
102
103 private:
104 scoped_refptr<IndexedDBDatabase> database_backend_;
105 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_;
106 };
107
108 } // namespace content
109
110 #endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/webidbcursor_impl.cc ('k') | content/browser/indexed_db/webidbdatabase_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698