| 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/child/worker_task_runner.h" | 15 #include "content/child/worker_task_runner.h" |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "ipc/ipc_sync_message_filter.h" | 17 #include "ipc/ipc_sync_message_filter.h" |
| 18 #include "third_party/WebKit/public/platform/WebBlobInfo.h" | 18 #include "third_party/WebKit/public/platform/WebBlobInfo.h" |
| 19 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" | 19 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" |
| 20 #include "third_party/WebKit/public/platform/WebIDBCursor.h" | |
| 21 #include "third_party/WebKit/public/platform/WebIDBDatabase.h" | |
| 22 #include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h" | 20 #include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h" |
| 21 #include "third_party/WebKit/public/platform/WebIDBTypes.h" |
| 23 | 22 |
| 24 struct IndexedDBDatabaseMetadata; | 23 struct IndexedDBDatabaseMetadata; |
| 25 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; | 24 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; |
| 26 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; | 25 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; |
| 27 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; | 26 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; |
| 28 struct IndexedDBMsg_CallbacksSuccessValue_Params; | 27 struct IndexedDBMsg_CallbacksSuccessValue_Params; |
| 29 struct IndexedDBMsg_CallbacksSuccessValueWithKey_Params; | 28 struct IndexedDBMsg_CallbacksSuccessValueWithKey_Params; |
| 30 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; | 29 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; |
| 31 | 30 |
| 32 namespace blink { | 31 namespace blink { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 int32 ipc_cursor_id); | 109 int32 ipc_cursor_id); |
| 111 | 110 |
| 112 void RequestIDBDatabaseClose(int32 ipc_database_id, | 111 void RequestIDBDatabaseClose(int32 ipc_database_id, |
| 113 int32 ipc_database_callbacks_id); | 112 int32 ipc_database_callbacks_id); |
| 114 | 113 |
| 115 void RequestIDBDatabaseCreateTransaction( | 114 void RequestIDBDatabaseCreateTransaction( |
| 116 int32 ipc_database_id, | 115 int32 ipc_database_id, |
| 117 int64 transaction_id, | 116 int64 transaction_id, |
| 118 blink::WebIDBDatabaseCallbacks* database_callbacks_ptr, | 117 blink::WebIDBDatabaseCallbacks* database_callbacks_ptr, |
| 119 blink::WebVector<long long> object_store_ids, | 118 blink::WebVector<long long> object_store_ids, |
| 120 blink::WebIDBDatabase::TransactionMode mode); | 119 blink::WebIDBTransactionMode mode); |
| 121 | 120 |
| 122 void RequestIDBDatabaseGet(int32 ipc_database_id, | 121 void RequestIDBDatabaseGet(int32 ipc_database_id, |
| 123 int64 transaction_id, | 122 int64 transaction_id, |
| 124 int64 object_store_id, | 123 int64 object_store_id, |
| 125 int64 index_id, | 124 int64 index_id, |
| 126 const IndexedDBKeyRange& key_range, | 125 const IndexedDBKeyRange& key_range, |
| 127 bool key_only, | 126 bool key_only, |
| 128 blink::WebIDBCallbacks* callbacks); | 127 blink::WebIDBCallbacks* callbacks); |
| 129 | 128 |
| 130 void RequestIDBDatabasePut( | 129 void RequestIDBDatabasePut( |
| 131 int32 ipc_database_id, | 130 int32 ipc_database_id, |
| 132 int64 transaction_id, | 131 int64 transaction_id, |
| 133 int64 object_store_id, | 132 int64 object_store_id, |
| 134 const blink::WebData& value, | 133 const blink::WebData& value, |
| 135 const blink::WebVector<blink::WebBlobInfo>& web_blob_info, | 134 const blink::WebVector<blink::WebBlobInfo>& web_blob_info, |
| 136 const IndexedDBKey& key, | 135 const IndexedDBKey& key, |
| 137 blink::WebIDBDatabase::PutMode put_mode, | 136 blink::WebIDBPutMode put_mode, |
| 138 blink::WebIDBCallbacks* callbacks, | 137 blink::WebIDBCallbacks* callbacks, |
| 139 const blink::WebVector<long long>& index_ids, | 138 const blink::WebVector<long long>& index_ids, |
| 140 const blink::WebVector<blink::WebVector<blink::WebIDBKey> >& index_keys); | 139 const blink::WebVector<blink::WebVector<blink::WebIDBKey> >& index_keys); |
| 141 | 140 |
| 142 void RequestIDBDatabaseOpenCursor(int32 ipc_database_id, | 141 void RequestIDBDatabaseOpenCursor(int32 ipc_database_id, |
| 143 int64 transaction_id, | 142 int64 transaction_id, |
| 144 int64 object_store_id, | 143 int64 object_store_id, |
| 145 int64 index_id, | 144 int64 index_id, |
| 146 const IndexedDBKeyRange& key_range, | 145 const IndexedDBKeyRange& key_range, |
| 147 blink::WebIDBCursor::Direction direction, | 146 blink::WebIDBCursorDirection direction, |
| 148 bool key_only, | 147 bool key_only, |
| 149 blink::WebIDBDatabase::TaskType task_type, | 148 blink::WebIDBTaskType task_type, |
| 150 blink::WebIDBCallbacks* callbacks); | 149 blink::WebIDBCallbacks* callbacks); |
| 151 | 150 |
| 152 void RequestIDBDatabaseCount(int32 ipc_database_id, | 151 void RequestIDBDatabaseCount(int32 ipc_database_id, |
| 153 int64 transaction_id, | 152 int64 transaction_id, |
| 154 int64 object_store_id, | 153 int64 object_store_id, |
| 155 int64 index_id, | 154 int64 index_id, |
| 156 const IndexedDBKeyRange& key_range, | 155 const IndexedDBKeyRange& key_range, |
| 157 blink::WebIDBCallbacks* callbacks); | 156 blink::WebIDBCallbacks* callbacks); |
| 158 | 157 |
| 159 void RequestIDBDatabaseDeleteRange(int32 ipc_database_id, | 158 void RequestIDBDatabaseDeleteRange(int32 ipc_database_id, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 std::map<int32, WebIDBCursorImpl*> cursors_; | 256 std::map<int32, WebIDBCursorImpl*> cursors_; |
| 258 | 257 |
| 259 std::map<int32, WebIDBDatabaseImpl*> databases_; | 258 std::map<int32, WebIDBDatabaseImpl*> databases_; |
| 260 | 259 |
| 261 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 260 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
| 262 }; | 261 }; |
| 263 | 262 |
| 264 } // namespace content | 263 } // namespace content |
| 265 | 264 |
| 266 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 265 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
| OLD | NEW |