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

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

Issue 10197001: IndexedDB: chromium side of IDBCursor.advance(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Additional key/value/primarykey for the current cursor Created 8 years, 8 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ 5 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ 6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "base/nullable_string16.h" 13 #include "base/nullable_string16.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "ipc/ipc_sync_message_filter.h" 15 #include "ipc/ipc_sync_message_filter.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExceptionCode.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbac ks.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseCallbac ks.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransactionCall backs.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransactionCall backs.h"
22 #include "webkit/glue/worker_task_runner.h" 22 #include "webkit/glue/worker_task_runner.h"
23 23
24 class IndexedDBKey; 24 class IndexedDBKey;
25 class IndexedDBKeyRange; 25 class IndexedDBKeyRange;
26 struct IndexedDBMsg_CallbacksSuccessCursorAdvance_Params;
26 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params; 27 struct IndexedDBMsg_CallbacksSuccessCursorContinue_Params;
27 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; 28 struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params;
28 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; 29 struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params;
29 class RendererWebIDBCursorImpl; 30 class RendererWebIDBCursorImpl;
30 31
31 namespace IPC { 32 namespace IPC {
32 class Message; 33 class Message;
33 } 34 }
34 35
35 namespace WebKit { 36 namespace WebKit {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 WebKit::WebIDBCallbacks* callbacks, 80 WebKit::WebIDBCallbacks* callbacks,
80 const string16& origin, 81 const string16& origin,
81 WebKit::WebFrame* web_frame); 82 WebKit::WebFrame* web_frame);
82 83
83 void RequestIDBCursorUpdate( 84 void RequestIDBCursorUpdate(
84 const content::SerializedScriptValue& value, 85 const content::SerializedScriptValue& value,
85 WebKit::WebIDBCallbacks* callbacks_ptr, 86 WebKit::WebIDBCallbacks* callbacks_ptr,
86 int32 idb_cursor_id, 87 int32 idb_cursor_id,
87 WebKit::WebExceptionCode* ec); 88 WebKit::WebExceptionCode* ec);
88 89
90 void RequestIDBCursorAdvance(
91 unsigned long count,
92 WebKit::WebIDBCallbacks* callbacks_ptr,
93 int32 idb_cursor_id,
94 WebKit::WebExceptionCode* ec);
95
89 void RequestIDBCursorContinue( 96 void RequestIDBCursorContinue(
90 const IndexedDBKey& key, 97 const IndexedDBKey& key,
91 WebKit::WebIDBCallbacks* callbacks_ptr, 98 WebKit::WebIDBCallbacks* callbacks_ptr,
92 int32 idb_cursor_id, 99 int32 idb_cursor_id,
93 WebKit::WebExceptionCode* ec); 100 WebKit::WebExceptionCode* ec);
94 101
95 void RequestIDBCursorPrefetch( 102 void RequestIDBCursorPrefetch(
96 int n, 103 int n,
97 WebKit::WebIDBCallbacks* callbacks_ptr, 104 WebKit::WebIDBCallbacks* callbacks_ptr,
98 int32 idb_cursor_id, 105 int32 idb_cursor_id,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 int32 response_id, 230 int32 response_id,
224 int32 object_id); 231 int32 object_id);
225 void OnSuccessIndexedDBKey(int32 thread_id, 232 void OnSuccessIndexedDBKey(int32 thread_id,
226 int32 response_id, 233 int32 response_id,
227 const IndexedDBKey& key); 234 const IndexedDBKey& key);
228 void OnSuccessIDBTransaction(int32 thread_id, 235 void OnSuccessIDBTransaction(int32 thread_id,
229 int32 response_id, 236 int32 response_id,
230 int32 object_id); 237 int32 object_id);
231 void OnSuccessOpenCursor( 238 void OnSuccessOpenCursor(
232 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p); 239 const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p);
240 void OnSuccessCursorAdvance(
241 const IndexedDBMsg_CallbacksSuccessCursorAdvance_Params& p);
233 void OnSuccessCursorContinue( 242 void OnSuccessCursorContinue(
234 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p); 243 const IndexedDBMsg_CallbacksSuccessCursorContinue_Params& p);
235 void OnSuccessCursorPrefetch( 244 void OnSuccessCursorPrefetch(
236 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p); 245 const IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params& p);
237 void OnSuccessStringList(int32 thread_id, 246 void OnSuccessStringList(int32 thread_id,
238 int32 response_id, 247 int32 response_id,
239 const std::vector<string16>& value); 248 const std::vector<string16>& value);
240 void OnSuccessSerializedScriptValue( 249 void OnSuccessSerializedScriptValue(
241 int32 thread_id, 250 int32 thread_id,
242 int32 response_id, 251 int32 response_id,
(...skipping 20 matching lines...) Expand all
263 IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer> 272 IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer>
264 pending_database_callbacks_; 273 pending_database_callbacks_;
265 274
266 // Map from cursor id to RendererWebIDBCursorImpl. 275 // Map from cursor id to RendererWebIDBCursorImpl.
267 std::map<int32, RendererWebIDBCursorImpl*> cursors_; 276 std::map<int32, RendererWebIDBCursorImpl*> cursors_;
268 277
269 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); 278 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher);
270 }; 279 };
271 280
272 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_ 281 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698