| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/strings/nullable_string16.h" | 15 #include "base/strings/nullable_string16.h" |
| 16 #include "content/child/worker_task_runner.h" | 16 #include "content/child/worker_task_runner.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "ipc/ipc_sync_message_filter.h" | 18 #include "ipc/ipc_sync_message_filter.h" |
| 19 #include "third_party/WebKit/public/platform/WebBlobInfo.h" | 19 #include "third_party/WebKit/public/platform/WebBlobInfo.h" |
| 20 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" | 20 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" |
| 21 #include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h" | 21 #include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h" |
| 22 #include "third_party/WebKit/public/platform/WebIDBTypes.h" | 22 #include "third_party/WebKit/public/platform/WebIDBTypes.h" |
| 23 | 23 |
| 24 struct IndexedDBDatabaseMetadata; | 24 struct IndexedDBDatabaseMetadata; |
| 25 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; | 25 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; |
| 26 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; | 26 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; |
| 27 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; | 27 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; |
| 28 struct IndexedDBMsg_CallbacksSuccessArray_Params; |
| 28 struct IndexedDBMsg_CallbacksSuccessValue_Params; | 29 struct IndexedDBMsg_CallbacksSuccessValue_Params; |
| 29 struct IndexedDBMsg_CallbacksSuccessValueWithKey_Params; | 30 struct IndexedDBMsg_CallbacksSuccessValueWithKey_Params; |
| 30 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; | 31 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 class WebData; | 34 class WebData; |
| 34 } | 35 } |
| 35 | 36 |
| 36 namespace content { | 37 namespace content { |
| 37 class IndexedDBKey; | 38 class IndexedDBKey; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 blink::WebIDBTransactionMode mode); | 123 blink::WebIDBTransactionMode mode); |
| 123 | 124 |
| 124 void RequestIDBDatabaseGet(int32 ipc_database_id, | 125 void RequestIDBDatabaseGet(int32 ipc_database_id, |
| 125 int64 transaction_id, | 126 int64 transaction_id, |
| 126 int64 object_store_id, | 127 int64 object_store_id, |
| 127 int64 index_id, | 128 int64 index_id, |
| 128 const IndexedDBKeyRange& key_range, | 129 const IndexedDBKeyRange& key_range, |
| 129 bool key_only, | 130 bool key_only, |
| 130 blink::WebIDBCallbacks* callbacks); | 131 blink::WebIDBCallbacks* callbacks); |
| 131 | 132 |
| 133 void RequestIDBDatabaseGetAll(int32 ipc_database_id, |
| 134 int64 transaction_id, |
| 135 int64 object_store_id, |
| 136 const IndexedDBKeyRange& key_range, |
| 137 int64 max_count, |
| 138 blink::WebIDBCallbacks* callbacks); |
| 139 |
| 132 void RequestIDBDatabasePut( | 140 void RequestIDBDatabasePut( |
| 133 int32 ipc_database_id, | 141 int32 ipc_database_id, |
| 134 int64 transaction_id, | 142 int64 transaction_id, |
| 135 int64 object_store_id, | 143 int64 object_store_id, |
| 136 const blink::WebData& value, | 144 const blink::WebData& value, |
| 137 const blink::WebVector<blink::WebBlobInfo>& web_blob_info, | 145 const blink::WebVector<blink::WebBlobInfo>& web_blob_info, |
| 138 const IndexedDBKey& key, | 146 const IndexedDBKey& key, |
| 139 blink::WebIDBPutMode put_mode, | 147 blink::WebIDBPutMode put_mode, |
| 140 blink::WebIDBCallbacks* callbacks, | 148 blink::WebIDBCallbacks* callbacks, |
| 141 const blink::WebVector<long long>& index_ids, | 149 const blink::WebVector<long long>& index_ids, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void OnSuccessOpenCursor( | 211 void OnSuccessOpenCursor( |
| 204 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); | 212 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); |
| 205 void OnSuccessCursorContinue( | 213 void OnSuccessCursorContinue( |
| 206 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); | 214 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); |
| 207 void OnSuccessCursorPrefetch( | 215 void OnSuccessCursorPrefetch( |
| 208 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); | 216 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); |
| 209 void OnSuccessStringList(int32 ipc_thread_id, | 217 void OnSuccessStringList(int32 ipc_thread_id, |
| 210 int32 ipc_callbacks_id, | 218 int32 ipc_callbacks_id, |
| 211 const std::vector<base::string16>& value); | 219 const std::vector<base::string16>& value); |
| 212 void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); | 220 void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); |
| 221 void OnSuccessArray(const IndexedDBMsg_CallbacksSuccessArray_Params& p); |
| 213 void OnSuccessValueWithKey( | 222 void OnSuccessValueWithKey( |
| 214 const IndexedDBMsg_CallbacksSuccessValueWithKey_Params& p); | 223 const IndexedDBMsg_CallbacksSuccessValueWithKey_Params& p); |
| 215 void OnSuccessInteger(int32 ipc_thread_id, | 224 void OnSuccessInteger(int32 ipc_thread_id, |
| 216 int32 ipc_callbacks_id, | 225 int32 ipc_callbacks_id, |
| 217 int64 value); | 226 int64 value); |
| 218 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); | 227 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); |
| 219 void OnError(int32 ipc_thread_id, | 228 void OnError(int32 ipc_thread_id, |
| 220 int32 ipc_callbacks_id, | 229 int32 ipc_callbacks_id, |
| 221 int code, | 230 int code, |
| 222 const base::string16& message); | 231 const base::string16& message); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 std::map<int32, WebIDBCursorImpl*> cursors_; | 268 std::map<int32, WebIDBCursorImpl*> cursors_; |
| 260 | 269 |
| 261 std::map<int32, WebIDBDatabaseImpl*> databases_; | 270 std::map<int32, WebIDBDatabaseImpl*> databases_; |
| 262 | 271 |
| 263 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 272 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
| 264 }; | 273 }; |
| 265 | 274 |
| 266 } // namespace content | 275 } // namespace content |
| 267 | 276 |
| 268 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 277 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
| OLD | NEW |