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

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

Issue 16573003: Remove content/browser dependency on WebKit::WebIDBCallbacks and WebKit::WebIDBDatabaseCallbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix namespace issues 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
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_wrapper.h" 10 #include "content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h"
11 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" 11 #include "third_party/WebKit/public/platform/WebIDBDatabase.h"
12 12
13 namespace WebKit { 13 namespace WebKit {
14 class WebIDBDatabaseCallbacks;
15 class WebIDBDatabaseError; 14 class WebIDBDatabaseError;
16 class WebIDBDatabaseMetadata; 15 class WebIDBDatabaseMetadata;
17 } 16 }
18 17
19 namespace content { 18 namespace content {
19 class IndexedDBCallbacksBase;
20 class IndexedDBDatabase; 20 class IndexedDBDatabase;
21 class IndexedDBDatabaseCallbacks;
21 class IndexedDBDatabaseCallbacksWrapper; 22 class IndexedDBDatabaseCallbacksWrapper;
22 23
23 // See comment in WebIDBFactory for a high level overview these classes. 24 class CONTENT_EXPORT WebIDBDatabaseImpl {
24 class CONTENT_EXPORT WebIDBDatabaseImpl
25 : NON_EXPORTED_BASE(public WebKit::WebIDBDatabase) {
26 public: 25 public:
27 WebIDBDatabaseImpl( 26 WebIDBDatabaseImpl(
28 scoped_refptr<IndexedDBDatabase> db, 27 scoped_refptr<IndexedDBDatabase> db,
29 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> callbacks); 28 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> callbacks);
30 virtual ~WebIDBDatabaseImpl(); 29 virtual ~WebIDBDatabaseImpl();
31 30
32 virtual void createObjectStore(long long transaction_id, 31 virtual void createObjectStore(long long transaction_id,
33 long long object_store_id, 32 long long object_store_id,
34 const WebKit::WebString& name, 33 const WebKit::WebString& name,
35 const WebKit::WebIDBKeyPath& key_path, 34 const WebKit::WebIDBKeyPath& key_path,
36 bool auto_increment); 35 bool auto_increment);
37 virtual void deleteObjectStore(long long object_store_id, 36 virtual void deleteObjectStore(long long object_store_id,
38 long long transaction_id); 37 long long transaction_id);
39 virtual void createTransaction(long long id, 38 virtual void createTransaction(long long id,
40 WebKit::WebIDBDatabaseCallbacks* callbacks, 39 IndexedDBDatabaseCallbacks* callbacks,
41 const WebKit::WebVector<long long>& scope, 40 const WebKit::WebVector<long long>& scope,
42 unsigned short mode); 41 unsigned short mode);
43 virtual void forceClose(); 42 virtual void forceClose();
44 virtual void close(); 43 virtual void close();
45 virtual void abort(long long transaction_id); 44 virtual void abort(long long transaction_id);
46 virtual void abort(long long transaction_id, 45 virtual void abort(long long transaction_id,
47 const WebKit::WebIDBDatabaseError& error); 46 const WebKit::WebIDBDatabaseError& error);
48 virtual void commit(long long transaction_id); 47 virtual void commit(long long transaction_id);
49 48
50 virtual void get(long long transaction_id, 49 virtual void get(long long transaction_id,
51 long long object_store_id, 50 long long object_store_id,
52 long long index_id, 51 long long index_id,
53 const WebKit::WebIDBKeyRange& range, 52 const WebKit::WebIDBKeyRange& range,
54 bool key_only, 53 bool key_only,
55 WebKit::WebIDBCallbacks* callbacks); 54 IndexedDBCallbacksBase* callbacks);
56 virtual void put(long long transaction_id, 55 virtual void put(long long transaction_id,
57 long long object_store_id, 56 long long object_store_id,
58 const WebKit::WebData& value, 57 const WebKit::WebData& value,
59 const WebKit::WebIDBKey& key, 58 const WebKit::WebIDBKey& key,
60 PutMode mode, 59 WebKit::WebIDBDatabase::PutMode mode,
61 WebKit::WebIDBCallbacks* callbacks, 60 IndexedDBCallbacksBase* callbacks,
62 const WebKit::WebVector<long long>& index_ids, 61 const WebKit::WebVector<long long>& index_ids,
63 const WebKit::WebVector<WebIndexKeys>& index_keys); 62 const WebKit::WebVector<
64 virtual void setIndexKeys(long long transaction_id, 63 WebKit::WebIDBDatabase::WebIndexKeys>& index_keys);
65 long long object_store_id, 64 virtual void setIndexKeys(
66 const WebKit::WebIDBKey& key, 65 long long transaction_id,
67 const WebKit::WebVector<long long>& index_ids, 66 long long object_store_id,
68 const WebKit::WebVector<WebIndexKeys>& index_keys); 67 const WebKit::WebIDBKey& key,
68 const WebKit::WebVector<long long>& index_ids,
69 const WebKit::WebVector<WebKit::WebIDBDatabase::WebIndexKeys>&
70 index_keys);
69 virtual void setIndexesReady(long long transaction_id, 71 virtual void setIndexesReady(long long transaction_id,
70 long long object_store_id, 72 long long object_store_id,
71 const WebKit::WebVector<long long>& index_ids); 73 const WebKit::WebVector<long long>& index_ids);
72 virtual void openCursor(long long transaction_id, 74 virtual void openCursor(long long transaction_id,
73 long long object_store_id, 75 long long object_store_id,
74 long long index_id, 76 long long index_id,
75 const WebKit::WebIDBKeyRange& range, 77 const WebKit::WebIDBKeyRange& range,
76 unsigned short direction, 78 unsigned short direction,
77 bool key_only, 79 bool key_only,
78 TaskType task_type, 80 WebKit::WebIDBDatabase::TaskType task_type,
79 WebKit::WebIDBCallbacks* callbacks); 81 IndexedDBCallbacksBase* callbacks);
80 virtual void count(long long transaction_id, 82 virtual void count(long long transaction_id,
81 long long object_store_id, 83 long long object_store_id,
82 long long index_id, 84 long long index_id,
83 const WebKit::WebIDBKeyRange& range, 85 const WebKit::WebIDBKeyRange& range,
84 WebKit::WebIDBCallbacks* callbacks); 86 IndexedDBCallbacksBase* callbacks);
85 virtual void deleteRange(long long transaction_id, 87 virtual void deleteRange(long long transaction_id,
86 long long object_store_id, 88 long long object_store_id,
87 const WebKit::WebIDBKeyRange& range, 89 const WebKit::WebIDBKeyRange& range,
88 WebKit::WebIDBCallbacks* callbacks); 90 IndexedDBCallbacksBase* callbacks);
89 virtual void clear(long long transaction_id, 91 virtual void clear(long long transaction_id,
90 long long object_store_id, 92 long long object_store_id,
91 WebKit::WebIDBCallbacks* callbacks); 93 IndexedDBCallbacksBase* callbacks);
92 94
93 virtual void createIndex(long long transaction_id, 95 virtual void createIndex(long long transaction_id,
94 long long object_store_id, 96 long long object_store_id,
95 long long index_id, 97 long long index_id,
96 const WebKit::WebString& name, 98 const WebKit::WebString& name,
97 const WebKit::WebIDBKeyPath& key_path, 99 const WebKit::WebIDBKeyPath& key_path,
98 bool unique, 100 bool unique,
99 bool multi_entry); 101 bool multi_entry);
100 virtual void deleteIndex(long long transaction_id, 102 virtual void deleteIndex(long long transaction_id,
101 long long object_store_id, 103 long long object_store_id,
102 long long index_id); 104 long long index_id);
103 105
104 private: 106 private:
105 scoped_refptr<IndexedDBDatabase> database_backend_; 107 scoped_refptr<IndexedDBDatabase> database_backend_;
106 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_; 108 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_;
107 }; 109 };
108 110
109 } // namespace content 111 } // namespace content
110 112
111 #endif // CONTENT_BROWSER_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 113 #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