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_INDEXED_DB_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 6 #define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/id_map.h" | 12 #include "base/id_map.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/strings/nullable_string16.h" | 14 #include "base/strings/nullable_string16.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "ipc/ipc_sync_message_filter.h" | 16 #include "ipc/ipc_sync_message_filter.h" |
| 17 #include "third_party/WebKit/public/platform/WebBlobInfo.h" |
17 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" | 18 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" |
18 #include "third_party/WebKit/public/platform/WebIDBCursor.h" | 19 #include "third_party/WebKit/public/platform/WebIDBCursor.h" |
19 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" | 20 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" |
20 #include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h" | 21 #include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h" |
21 #include "webkit/child/worker_task_runner.h" | 22 #include "webkit/child/worker_task_runner.h" |
22 | 23 |
23 struct IndexedDBDatabaseMetadata; | 24 struct IndexedDBDatabaseMetadata; |
24 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; | 25 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; |
25 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; | 26 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; |
26 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; | 27 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; |
| 28 struct IndexedDBMsg_CallbacksSuccessValue_Params; |
| 29 struct IndexedDBMsg_CallbacksSuccessValueWithKey_Params; |
27 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; | 30 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; |
28 | 31 |
29 namespace blink { | 32 namespace blink { |
30 class WebData; | 33 class WebData; |
31 } | 34 } |
32 | 35 |
33 namespace content { | 36 namespace content { |
34 class IndexedDBKey; | 37 class IndexedDBKey; |
35 class IndexedDBKeyPath; | 38 class IndexedDBKeyPath; |
36 class IndexedDBKeyRange; | 39 class IndexedDBKeyRange; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 int64 index_id, | 118 int64 index_id, |
116 const IndexedDBKeyRange& key_range, | 119 const IndexedDBKeyRange& key_range, |
117 bool key_only, | 120 bool key_only, |
118 blink::WebIDBCallbacks* callbacks); | 121 blink::WebIDBCallbacks* callbacks); |
119 | 122 |
120 void RequestIDBDatabasePut( | 123 void RequestIDBDatabasePut( |
121 int32 ipc_database_id, | 124 int32 ipc_database_id, |
122 int64 transaction_id, | 125 int64 transaction_id, |
123 int64 object_store_id, | 126 int64 object_store_id, |
124 const blink::WebData& value, | 127 const blink::WebData& value, |
| 128 const blink::WebVector<blink::WebBlobInfo>& blobInfo, |
125 const IndexedDBKey& key, | 129 const IndexedDBKey& key, |
126 blink::WebIDBDatabase::PutMode put_mode, | 130 blink::WebIDBDatabase::PutMode put_mode, |
127 blink::WebIDBCallbacks* callbacks, | 131 blink::WebIDBCallbacks* callbacks, |
128 const blink::WebVector<long long>& index_ids, | 132 const blink::WebVector<long long>& index_ids, |
129 const blink::WebVector<blink::WebVector<blink::WebIDBKey> >& | 133 const blink::WebVector<blink::WebVector<blink::WebIDBKey> >& |
130 index_keys); | 134 index_keys); |
131 | 135 |
132 void RequestIDBDatabaseOpenCursor(int32 ipc_database_id, | 136 void RequestIDBDatabaseOpenCursor(int32 ipc_database_id, |
133 int64 transaction_id, | 137 int64 transaction_id, |
134 int64 object_store_id, | 138 int64 object_store_id, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 190 |
187 void OnSuccessOpenCursor( | 191 void OnSuccessOpenCursor( |
188 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); | 192 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); |
189 void OnSuccessCursorContinue( | 193 void OnSuccessCursorContinue( |
190 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); | 194 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); |
191 void OnSuccessCursorPrefetch( | 195 void OnSuccessCursorPrefetch( |
192 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); | 196 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); |
193 void OnSuccessStringList(int32 ipc_thread_id, | 197 void OnSuccessStringList(int32 ipc_thread_id, |
194 int32 ipc_callbacks_id, | 198 int32 ipc_callbacks_id, |
195 const std::vector<string16>& value); | 199 const std::vector<string16>& value); |
196 void OnSuccessValue(int32 ipc_thread_id, | 200 void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); |
197 int32 ipc_callbacks_id, | 201 void OnSuccessValueWithKey( |
198 const std::string& value); | 202 const IndexedDBMsg_CallbacksSuccessValueWithKey_Params& p); |
199 void OnSuccessValueWithKey(int32 ipc_thread_id, | |
200 int32 ipc_callbacks_id, | |
201 const std::string& value, | |
202 const IndexedDBKey& primary_key, | |
203 const IndexedDBKeyPath& key_path); | |
204 void OnSuccessInteger(int32 ipc_thread_id, | 203 void OnSuccessInteger(int32 ipc_thread_id, |
205 int32 ipc_callbacks_id, | 204 int32 ipc_callbacks_id, |
206 int64 value); | 205 int64 value); |
207 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); | 206 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); |
208 void OnError(int32 ipc_thread_id, | 207 void OnError(int32 ipc_thread_id, |
209 int32 ipc_callbacks_id, | 208 int32 ipc_callbacks_id, |
210 int code, | 209 int code, |
211 const string16& message); | 210 const string16& message); |
212 void OnIntBlocked(int32 ipc_thread_id, | 211 void OnIntBlocked(int32 ipc_thread_id, |
213 int32 ipc_callbacks_id, | 212 int32 ipc_callbacks_id, |
(...skipping 28 matching lines...) Expand all Loading... |
242 std::map<int32, RendererWebIDBCursorImpl*> cursors_; | 241 std::map<int32, RendererWebIDBCursorImpl*> cursors_; |
243 | 242 |
244 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; | 243 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; |
245 | 244 |
246 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 245 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
247 }; | 246 }; |
248 | 247 |
249 } // namespace content | 248 } // namespace content |
250 | 249 |
251 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 250 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
OLD | NEW |