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

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

Powered by Google App Engine
This is Rietveld 408576698