| OLD | NEW |
| 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 "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h" | 11 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h" |
| 12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h" | 12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h" |
| 13 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" | 13 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 class IDBObserver; |
| 16 class WebBlobInfo; | 17 class WebBlobInfo; |
| 17 class WebIDBCallbacks; | 18 class WebIDBCallbacks; |
| 18 class WebIDBDatabaseCallbacks; | 19 class WebIDBDatabaseCallbacks; |
| 19 class WebString; | 20 class WebString; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 class ThreadSafeSender; | 24 class ThreadSafeSender; |
| 24 | 25 |
| 25 class WebIDBDatabaseImpl : public blink::WebIDBDatabase { | 26 class WebIDBDatabaseImpl : public blink::WebIDBDatabase { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 38 void deleteObjectStore(long long transaction_id, | 39 void deleteObjectStore(long long transaction_id, |
| 39 long long object_store_id) override; | 40 long long object_store_id) override; |
| 40 void createTransaction(long long transaction_id, | 41 void createTransaction(long long transaction_id, |
| 41 blink::WebIDBDatabaseCallbacks* callbacks, | 42 blink::WebIDBDatabaseCallbacks* callbacks, |
| 42 const blink::WebVector<long long>& scope, | 43 const blink::WebVector<long long>& scope, |
| 43 blink::WebIDBTransactionMode mode) override; | 44 blink::WebIDBTransactionMode mode) override; |
| 44 | 45 |
| 45 void close() override; | 46 void close() override; |
| 46 void versionChangeIgnored() override; | 47 void versionChangeIgnored() override; |
| 47 | 48 |
| 49 void observe(blink::IDBObserver* observer, long long transactionId) override; |
| 50 void unobserve(blink::IDBObserver* observer) override; |
| 51 |
| 48 void get(long long transactionId, | 52 void get(long long transactionId, |
| 49 long long objectStoreId, | 53 long long objectStoreId, |
| 50 long long indexId, | 54 long long indexId, |
| 51 const blink::WebIDBKeyRange&, | 55 const blink::WebIDBKeyRange&, |
| 52 bool keyOnly, | 56 bool keyOnly, |
| 53 blink::WebIDBCallbacks*) override; | 57 blink::WebIDBCallbacks*) override; |
| 54 void getAll(long long transactionId, | 58 void getAll(long long transactionId, |
| 55 long long objectStoreId, | 59 long long objectStoreId, |
| 56 long long indexId, | 60 long long indexId, |
| 57 const blink::WebIDBKeyRange&, | 61 const blink::WebIDBKeyRange&, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 long long indexId) override; | 111 long long indexId) override; |
| 108 void abort(long long transaction_id) override; | 112 void abort(long long transaction_id) override; |
| 109 void commit(long long transaction_id) override; | 113 void commit(long long transaction_id) override; |
| 110 void ackReceivedBlobs( | 114 void ackReceivedBlobs( |
| 111 const blink::WebVector<blink::WebString>& uuids) override; | 115 const blink::WebVector<blink::WebString>& uuids) override; |
| 112 | 116 |
| 113 private: | 117 private: |
| 114 int32_t ipc_database_id_; | 118 int32_t ipc_database_id_; |
| 115 int32_t ipc_database_callbacks_id_; | 119 int32_t ipc_database_callbacks_id_; |
| 116 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 120 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 121 std::vector<int32_t> observers_id_; |
| 117 }; | 122 }; |
| 118 | 123 |
| 119 } // namespace content | 124 } // namespace content |
| 120 | 125 |
| 121 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ | 126 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_ |
| OLD | NEW |