| 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_CallbacksUpgradeNeeded_Params; | 30 struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; |
| 30 | 31 |
| 31 namespace blink { | 32 namespace blink { |
| 32 class WebData; | 33 class WebData; |
| 33 } | 34 } |
| 34 | 35 |
| 35 namespace content { | 36 namespace content { |
| 36 class IndexedDBKey; | 37 class IndexedDBKey; |
| 37 class IndexedDBKeyPath; | 38 class IndexedDBKeyPath; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 blink::WebIDBTransactionMode mode); | 122 blink::WebIDBTransactionMode mode); |
| 122 | 123 |
| 123 void RequestIDBDatabaseGet(int32 ipc_database_id, | 124 void RequestIDBDatabaseGet(int32 ipc_database_id, |
| 124 int64 transaction_id, | 125 int64 transaction_id, |
| 125 int64 object_store_id, | 126 int64 object_store_id, |
| 126 int64 index_id, | 127 int64 index_id, |
| 127 const IndexedDBKeyRange& key_range, | 128 const IndexedDBKeyRange& key_range, |
| 128 bool key_only, | 129 bool key_only, |
| 129 blink::WebIDBCallbacks* callbacks); | 130 blink::WebIDBCallbacks* callbacks); |
| 130 | 131 |
| 132 void RequestIDBDatabaseGetAll(int32 ipc_database_id, |
| 133 int64 transaction_id, |
| 134 int64 object_store_id, |
| 135 const IndexedDBKeyRange& key_range, |
| 136 int64 max_count, |
| 137 blink::WebIDBCallbacks* callbacks); |
| 138 |
| 131 void RequestIDBDatabasePut( | 139 void RequestIDBDatabasePut( |
| 132 int32 ipc_database_id, | 140 int32 ipc_database_id, |
| 133 int64 transaction_id, | 141 int64 transaction_id, |
| 134 int64 object_store_id, | 142 int64 object_store_id, |
| 135 const blink::WebData& value, | 143 const blink::WebData& value, |
| 136 const blink::WebVector<blink::WebBlobInfo>& web_blob_info, | 144 const blink::WebVector<blink::WebBlobInfo>& web_blob_info, |
| 137 const IndexedDBKey& key, | 145 const IndexedDBKey& key, |
| 138 blink::WebIDBPutMode put_mode, | 146 blink::WebIDBPutMode put_mode, |
| 139 blink::WebIDBCallbacks* callbacks, | 147 blink::WebIDBCallbacks* callbacks, |
| 140 const blink::WebVector<long long>& index_ids, | 148 const blink::WebVector<long long>& index_ids, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void OnSuccessOpenCursor( | 210 void OnSuccessOpenCursor( |
| 203 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); | 211 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); |
| 204 void OnSuccessCursorContinue( | 212 void OnSuccessCursorContinue( |
| 205 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); | 213 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); |
| 206 void OnSuccessCursorPrefetch( | 214 void OnSuccessCursorPrefetch( |
| 207 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); | 215 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); |
| 208 void OnSuccessStringList(int32 ipc_thread_id, | 216 void OnSuccessStringList(int32 ipc_thread_id, |
| 209 int32 ipc_callbacks_id, | 217 int32 ipc_callbacks_id, |
| 210 const std::vector<base::string16>& value); | 218 const std::vector<base::string16>& value); |
| 211 void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); | 219 void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p); |
| 220 void OnSuccessArray(const IndexedDBMsg_CallbacksSuccessArray_Params& p); |
| 212 void OnSuccessInteger(int32 ipc_thread_id, | 221 void OnSuccessInteger(int32 ipc_thread_id, |
| 213 int32 ipc_callbacks_id, | 222 int32 ipc_callbacks_id, |
| 214 int64 value); | 223 int64 value); |
| 215 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); | 224 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); |
| 216 void OnError(int32 ipc_thread_id, | 225 void OnError(int32 ipc_thread_id, |
| 217 int32 ipc_callbacks_id, | 226 int32 ipc_callbacks_id, |
| 218 int code, | 227 int code, |
| 219 const base::string16& message); | 228 const base::string16& message); |
| 220 void OnIntBlocked(int32 ipc_thread_id, | 229 void OnIntBlocked(int32 ipc_thread_id, |
| 221 int32 ipc_callbacks_id, | 230 int32 ipc_callbacks_id, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 std::map<int32, WebIDBCursorImpl*> cursors_; | 265 std::map<int32, WebIDBCursorImpl*> cursors_; |
| 257 | 266 |
| 258 std::map<int32, WebIDBDatabaseImpl*> databases_; | 267 std::map<int32, WebIDBDatabaseImpl*> databases_; |
| 259 | 268 |
| 260 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 269 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
| 261 }; | 270 }; |
| 262 | 271 |
| 263 } // namespace content | 272 } // namespace content |
| 264 | 273 |
| 265 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ | 274 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ |
| OLD | NEW |