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

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

Issue 2500263003: Port messages sent by WebIDBCursorImpl to Mojo. (Closed)
Patch Set: Address dcheng@'s comments. Created 4 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 5 #ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/common/indexed_db/indexed_db.mojom.h" 14 #include "content/common/indexed_db/indexed_db.mojom.h"
15 #include "content/common/indexed_db/indexed_db_constants.h" 15 #include "content/common/indexed_db/indexed_db_constants.h"
16 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h" 16 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h"
17 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h" 17 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h"
18 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" 18 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
19 19
20 namespace blink { 20 namespace blink {
21 class WebBlobInfo; 21 class WebBlobInfo;
22 class WebIDBCallbacks; 22 class WebIDBCallbacks;
23 class WebIDBObserver; 23 class WebIDBObserver;
24 class WebString; 24 class WebString;
25 } 25 }
26 26
27 namespace content { 27 namespace content {
28 class ThreadSafeSender;
29 28
30 class CONTENT_EXPORT WebIDBDatabaseImpl 29 class CONTENT_EXPORT WebIDBDatabaseImpl
31 : public NON_EXPORTED_BASE(blink::WebIDBDatabase) { 30 : public NON_EXPORTED_BASE(blink::WebIDBDatabase) {
32 public: 31 public:
33 WebIDBDatabaseImpl(indexed_db::mojom::DatabaseAssociatedPtrInfo database, 32 WebIDBDatabaseImpl(indexed_db::mojom::DatabaseAssociatedPtrInfo database,
34 scoped_refptr<base::SingleThreadTaskRunner> io_runner, 33 scoped_refptr<base::SingleThreadTaskRunner> io_runner);
35 scoped_refptr<ThreadSafeSender> thread_safe_sender);
36 ~WebIDBDatabaseImpl() override; 34 ~WebIDBDatabaseImpl() override;
37 35
38 // blink::WebIDBDatabase 36 // blink::WebIDBDatabase
39 void createObjectStore(long long transaction_id, 37 void createObjectStore(long long transaction_id,
40 long long objectstore_id, 38 long long objectstore_id,
41 const blink::WebString& name, 39 const blink::WebString& name,
42 const blink::WebIDBKeyPath& key_path, 40 const blink::WebIDBKeyPath& key_path,
43 bool auto_increment) override; 41 bool auto_increment) override;
44 void deleteObjectStore(long long transaction_id, 42 void deleteObjectStore(long long transaction_id,
45 long long object_store_id) override; 43 long long object_store_id) override;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 133
136 // Maximum size (in bytes) of value/key pair allowed for put requests. Any 134 // Maximum size (in bytes) of value/key pair allowed for put requests. Any
137 // requests larger than this size will be rejected. 135 // requests larger than this size will be rejected.
138 // Used by unit tests to exercise behavior without allocating huge chunks 136 // Used by unit tests to exercise behavior without allocating huge chunks
139 // of memory. 137 // of memory.
140 size_t max_put_value_size_ = kMaxIDBMessageSizeInBytes; 138 size_t max_put_value_size_ = kMaxIDBMessageSizeInBytes;
141 139
142 IOThreadHelper* helper_; 140 IOThreadHelper* helper_;
143 std::set<int32_t> observer_ids_; 141 std::set<int32_t> observer_ids_;
144 scoped_refptr<base::SingleThreadTaskRunner> io_runner_; 142 scoped_refptr<base::SingleThreadTaskRunner> io_runner_;
145 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
146 }; 143 };
147 144
148 } // namespace content 145 } // namespace content
149 146
150 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ 147 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/indexed_db/webidbcursor_impl_unittest.cc ('k') | content/child/indexed_db/webidbdatabase_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698