Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: content/child/indexed_db/indexed_db_dispatcher.h

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle the rest of Josh's feedback. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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> >& index_keys);
130 index_keys);
131 134
132 void RequestIDBDatabaseOpenCursor(int32 ipc_database_id, 135 void RequestIDBDatabaseOpenCursor(int32 ipc_database_id,
133 int64 transaction_id, 136 int64 transaction_id,
134 int64 object_store_id, 137 int64 object_store_id,
135 int64 index_id, 138 int64 index_id,
136 const IndexedDBKeyRange& key_range, 139 const IndexedDBKeyRange& key_range,
137 unsigned short direction, 140 unsigned short direction,
138 bool key_only, 141 bool key_only,
139 blink::WebIDBDatabase::TaskType task_type, 142 blink::WebIDBDatabase::TaskType task_type,
140 blink::WebIDBCallbacks* callbacks); 143 blink::WebIDBCallbacks* callbacks);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 189
187 void OnSuccessOpenCursor( 190 void OnSuccessOpenCursor(
188 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); 191 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p);
189 void OnSuccessCursorContinue( 192 void OnSuccessCursorContinue(
190 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); 193 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p);
191 void OnSuccessCursorPrefetch( 194 void OnSuccessCursorPrefetch(
192 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); 195 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p);
193 void OnSuccessStringList(int32 ipc_thread_id, 196 void OnSuccessStringList(int32 ipc_thread_id,
194 int32 ipc_callbacks_id, 197 int32 ipc_callbacks_id,
195 const std::vector<string16>& value); 198 const std::vector<string16>& value);
196 void OnSuccessValue(int32 ipc_thread_id, 199 void OnSuccessValue(const IndexedDBMsg_CallbacksSuccessValue_Params& p);
197 int32 ipc_callbacks_id, 200 void OnSuccessValueWithKey(
198 const std::string& value); 201 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, 202 void OnSuccessInteger(int32 ipc_thread_id,
205 int32 ipc_callbacks_id, 203 int32 ipc_callbacks_id,
206 int64 value); 204 int64 value);
207 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id); 205 void OnSuccessUndefined(int32 ipc_thread_id, int32 ipc_callbacks_id);
208 void OnError(int32 ipc_thread_id, 206 void OnError(int32 ipc_thread_id,
209 int32 ipc_callbacks_id, 207 int32 ipc_callbacks_id,
210 int code, 208 int code,
211 const string16& message); 209 const string16& message);
212 void OnIntBlocked(int32 ipc_thread_id, 210 void OnIntBlocked(int32 ipc_thread_id,
213 int32 ipc_callbacks_id, 211 int32 ipc_callbacks_id,
(...skipping 28 matching lines...) Expand all
242 std::map<int32, RendererWebIDBCursorImpl*> cursors_; 240 std::map<int32, RendererWebIDBCursorImpl*> cursors_;
243 241
244 std::map<int32, RendererWebIDBDatabaseImpl*> databases_; 242 std::map<int32, RendererWebIDBDatabaseImpl*> databases_;
245 243
246 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); 244 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher);
247 }; 245 };
248 246
249 } // namespace content 247 } // namespace content
250 248
251 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ 249 #endif // CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698