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

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

Powered by Google App Engine
This is Rietveld 408576698