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

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

Issue 18241003: IndexedDB: Remove IndexedDBCallbacksWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
6 #define CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/browser/indexed_db/indexed_db_database.h" 9 #include "content/browser/indexed_db/indexed_db_database.h"
10 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" 10 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
11 11
12 namespace content { 12 namespace content {
13 class IndexedDBCallbacksBase; 13 class IndexedDBCallbacks;
14 class IndexedDBDatabase; 14 class IndexedDBDatabase;
15 class IndexedDBDatabaseCallbacks; 15 class IndexedDBDatabaseCallbacks;
16 class IndexedDBDatabaseError; 16 class IndexedDBDatabaseError;
17 17
18 class CONTENT_EXPORT WebIDBDatabaseImpl { 18 class CONTENT_EXPORT WebIDBDatabaseImpl {
19 public: 19 public:
20 WebIDBDatabaseImpl( 20 WebIDBDatabaseImpl(scoped_refptr<IndexedDBDatabase> db,
21 scoped_refptr<IndexedDBDatabase> db, 21 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks);
22 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks);
23 virtual ~WebIDBDatabaseImpl(); 22 virtual ~WebIDBDatabaseImpl();
24 23
25 typedef std::vector<IndexedDBKey> IndexKeys; 24 typedef std::vector<IndexedDBKey> IndexKeys;
26 25
27 virtual void createObjectStore(long long transaction_id, 26 virtual void createObjectStore(long long transaction_id,
28 long long object_store_id, 27 long long object_store_id,
29 const string16& name, 28 const string16& name,
30 const IndexedDBKeyPath& key_path, 29 const IndexedDBKeyPath& key_path,
31 bool auto_increment); 30 bool auto_increment);
32 virtual void deleteObjectStore(long long object_store_id, 31 virtual void deleteObjectStore(long long object_store_id,
33 long long transaction_id); 32 long long transaction_id);
34 virtual void createTransaction(long long id, 33 virtual void createTransaction(long long id,
35 const std::vector<int64>& scope, 34 const std::vector<int64>& scope,
36 unsigned short mode); 35 unsigned short mode);
37 virtual void forceClose(); 36 virtual void forceClose();
38 virtual void close(); 37 virtual void close();
39 virtual void abort(long long transaction_id); 38 virtual void abort(long long transaction_id);
40 virtual void abort(long long transaction_id, 39 virtual void abort(long long transaction_id,
41 const IndexedDBDatabaseError& error); 40 const IndexedDBDatabaseError& error);
42 virtual void commit(long long transaction_id); 41 virtual void commit(long long transaction_id);
43 42
44 virtual void get(long long transaction_id, 43 virtual void get(long long transaction_id,
45 long long object_store_id, 44 long long object_store_id,
46 long long index_id, 45 long long index_id,
47 const IndexedDBKeyRange& range, 46 const IndexedDBKeyRange& range,
48 bool key_only, 47 bool key_only,
49 IndexedDBCallbacksBase* callbacks); 48 scoped_refptr<IndexedDBCallbacks> callbacks);
50 virtual void put(long long transaction_id, 49 virtual void put(long long transaction_id,
51 long long object_store_id, 50 long long object_store_id,
52 std::vector<char>* value, 51 std::vector<char>* value,
53 const IndexedDBKey& key, 52 const IndexedDBKey& key,
54 WebKit::WebIDBDatabase::PutMode mode, 53 WebKit::WebIDBDatabase::PutMode mode,
55 IndexedDBCallbacksBase* callbacks, 54 scoped_refptr<IndexedDBCallbacks> callbacks,
56 const std::vector<int64>& index_ids, 55 const std::vector<int64>& index_ids,
57 const std::vector<IndexKeys>& index_keys); 56 const std::vector<IndexKeys>& index_keys);
58 virtual void setIndexKeys(long long transaction_id, 57 virtual void setIndexKeys(long long transaction_id,
59 long long object_store_id, 58 long long object_store_id,
60 const IndexedDBKey& key, 59 const IndexedDBKey& key,
61 const std::vector<int64>& index_ids, 60 const std::vector<int64>& index_ids,
62 const std::vector<IndexKeys>& index_keys); 61 const std::vector<IndexKeys>& index_keys);
63 virtual void setIndexesReady(long long transaction_id, 62 virtual void setIndexesReady(long long transaction_id,
64 long long object_store_id, 63 long long object_store_id,
65 const std::vector<int64>& index_ids); 64 const std::vector<int64>& index_ids);
66 virtual void openCursor(long long transaction_id, 65 virtual void openCursor(long long transaction_id,
67 long long object_store_id, 66 long long object_store_id,
68 long long index_id, 67 long long index_id,
69 const IndexedDBKeyRange& range, 68 const IndexedDBKeyRange& range,
70 unsigned short direction, 69 unsigned short direction,
71 bool key_only, 70 bool key_only,
72 WebKit::WebIDBDatabase::TaskType task_type, 71 WebKit::WebIDBDatabase::TaskType task_type,
73 IndexedDBCallbacksBase* callbacks); 72 scoped_refptr<IndexedDBCallbacks> callbacks);
74 virtual void count(long long transaction_id, 73 virtual void count(long long transaction_id,
75 long long object_store_id, 74 long long object_store_id,
76 long long index_id, 75 long long index_id,
77 const IndexedDBKeyRange& range, 76 const IndexedDBKeyRange& range,
78 IndexedDBCallbacksBase* callbacks); 77 scoped_refptr<IndexedDBCallbacks> callbacks);
79 virtual void deleteRange(long long transaction_id, 78 virtual void deleteRange(long long transaction_id,
80 long long object_store_id, 79 long long object_store_id,
81 const IndexedDBKeyRange& range, 80 const IndexedDBKeyRange& range,
82 IndexedDBCallbacksBase* callbacks); 81 scoped_refptr<IndexedDBCallbacks> callbacks);
83 virtual void clear(long long transaction_id, 82 virtual void clear(long long transaction_id,
84 long long object_store_id, 83 long long object_store_id,
85 IndexedDBCallbacksBase* callbacks); 84 scoped_refptr<IndexedDBCallbacks> callbacks);
86 85
87 virtual void createIndex(long long transaction_id, 86 virtual void createIndex(long long transaction_id,
88 long long object_store_id, 87 long long object_store_id,
89 long long index_id, 88 long long index_id,
90 const string16& name, 89 const string16& name,
91 const IndexedDBKeyPath& key_path, 90 const IndexedDBKeyPath& key_path,
92 bool unique, 91 bool unique,
93 bool multi_entry); 92 bool multi_entry);
94 virtual void deleteIndex(long long transaction_id, 93 virtual void deleteIndex(long long transaction_id,
95 long long object_store_id, 94 long long object_store_id,
96 long long index_id); 95 long long index_id);
97 96
98 private: 97 private:
99 scoped_refptr<IndexedDBDatabase> database_backend_; 98 scoped_refptr<IndexedDBDatabase> database_backend_;
100 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_; 99 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_;
101 }; 100 };
102 101
103 } // namespace content 102 } // namespace content
104 103
105 #endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 104 #endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698