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_PROXY_WEBIDBDATABASE_IMPL_H_ | 5 #ifndef CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ |
6 #define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ | 6 #define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" |
9 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" | 10 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" |
10 | 11 |
11 namespace WebKit { | 12 namespace WebKit { |
12 class WebIDBCallbacks; | 13 class WebIDBCallbacks; |
13 class WebIDBDatabaseCallbacks; | 14 class WebIDBDatabaseCallbacks; |
14 class WebString; | 15 class WebString; |
15 } | 16 } |
16 | 17 |
17 namespace content { | 18 namespace content { |
| 19 class ThreadSafeSender; |
18 | 20 |
19 class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase { | 21 class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase { |
20 public: | 22 public: |
21 explicit RendererWebIDBDatabaseImpl(int32 ipc_database_id, | 23 RendererWebIDBDatabaseImpl(int32 ipc_database_id, |
22 int32 ipc_database_callbacks_id); | 24 int32 ipc_database_callbacks_id, |
| 25 ThreadSafeSender* thread_safe_sender); |
23 virtual ~RendererWebIDBDatabaseImpl(); | 26 virtual ~RendererWebIDBDatabaseImpl(); |
24 | 27 |
25 // WebKit::WebIDBDatabase | 28 // WebKit::WebIDBDatabase |
26 virtual void createObjectStore( | 29 virtual void createObjectStore( |
27 long long transaction_id, | 30 long long transaction_id, |
28 long long objectstore_id, | 31 long long objectstore_id, |
29 const WebKit::WebString& name, | 32 const WebKit::WebString& name, |
30 const WebKit::WebIDBKeyPath& key_path, | 33 const WebKit::WebIDBKeyPath& key_path, |
31 bool auto_increment); | 34 bool auto_increment); |
32 virtual void deleteObjectStore( | 35 virtual void deleteObjectStore( |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool multiEntry); | 92 bool multiEntry); |
90 virtual void deleteIndex(long long transactionId, long | 93 virtual void deleteIndex(long long transactionId, long |
91 long objectStoreId, | 94 long objectStoreId, |
92 long long indexId); | 95 long long indexId); |
93 virtual void abort(long long transaction_id); | 96 virtual void abort(long long transaction_id); |
94 virtual void commit(long long transaction_id); | 97 virtual void commit(long long transaction_id); |
95 | 98 |
96 private: | 99 private: |
97 int32 ipc_database_id_; | 100 int32 ipc_database_id_; |
98 int32 ipc_database_callbacks_id_; | 101 int32 ipc_database_callbacks_id_; |
| 102 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
99 }; | 103 }; |
100 | 104 |
101 } // namespace content | 105 } // namespace content |
102 | 106 |
103 #endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ | 107 #endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_ |
OLD | NEW |