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

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

Issue 18221003: Convert WebIDBDatabaseImpl to IndexedDBConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 5 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.h"
11 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
12
13 namespace content {
14 class IndexedDBCallbacks;
15 class IndexedDBDatabaseError;
16
17 class CONTENT_EXPORT WebIDBDatabaseImpl {
18 public:
19 WebIDBDatabaseImpl(scoped_refptr<IndexedDBDatabase> db,
20 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks);
21 virtual ~WebIDBDatabaseImpl();
22
23 typedef std::vector<IndexedDBKey> IndexKeys;
24
25 virtual void createObjectStore(long long transaction_id,
26 long long object_store_id,
27 const string16& name,
28 const IndexedDBKeyPath& key_path,
29 bool auto_increment);
30 virtual void deleteObjectStore(long long object_store_id,
31 long long transaction_id);
32 virtual void createTransaction(long long id,
33 const std::vector<int64>& scope,
34 unsigned short mode);
35 virtual void forceClose();
36 virtual void close();
37 virtual void abort(long long transaction_id);
38 virtual void abort(long long transaction_id,
39 const IndexedDBDatabaseError& error);
40 virtual void commit(long long transaction_id);
41
42 virtual void get(long long transaction_id,
43 long long object_store_id,
44 long long index_id,
45 const IndexedDBKeyRange& range,
46 bool key_only,
47 scoped_refptr<IndexedDBCallbacks> callbacks);
48 virtual void put(long long transaction_id,
49 long long object_store_id,
50 std::vector<char>* value,
51 const IndexedDBKey& key,
52 WebKit::WebIDBDatabase::PutMode mode,
53 scoped_refptr<IndexedDBCallbacks> callbacks,
54 const std::vector<int64>& index_ids,
55 const std::vector<IndexKeys>& index_keys);
56 virtual void setIndexKeys(long long transaction_id,
57 long long object_store_id,
58 const IndexedDBKey& key,
59 const std::vector<int64>& index_ids,
60 const std::vector<IndexKeys>& index_keys);
61 virtual void setIndexesReady(long long transaction_id,
62 long long object_store_id,
63 const std::vector<int64>& index_ids);
64 virtual void openCursor(long long transaction_id,
65 long long object_store_id,
66 long long index_id,
67 const IndexedDBKeyRange& range,
68 unsigned short direction,
69 bool key_only,
70 WebKit::WebIDBDatabase::TaskType task_type,
71 scoped_refptr<IndexedDBCallbacks> callbacks);
72 virtual void count(long long transaction_id,
73 long long object_store_id,
74 long long index_id,
75 const IndexedDBKeyRange& range,
76 scoped_refptr<IndexedDBCallbacks> callbacks);
77 virtual void deleteRange(long long transaction_id,
78 long long object_store_id,
79 const IndexedDBKeyRange& range,
80 scoped_refptr<IndexedDBCallbacks> callbacks);
81 virtual void clear(long long transaction_id,
82 long long object_store_id,
83 scoped_refptr<IndexedDBCallbacks> callbacks);
84
85 virtual void createIndex(long long transaction_id,
86 long long object_store_id,
87 long long index_id,
88 const string16& name,
89 const IndexedDBKeyPath& key_path,
90 bool unique,
91 bool multi_entry);
92 virtual void deleteIndex(long long transaction_id,
93 long long object_store_id,
94 long long index_id);
95
96 private:
97 scoped_refptr<IndexedDBDatabase> database_backend_;
98 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_;
99 };
100
101 } // namespace content
102
103 #endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/browser/indexed_db/webidbdatabase_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698