OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks); | 29 void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks); |
30 void Continue(scoped_ptr<IndexedDBKey> key, | 30 void Continue(scoped_ptr<IndexedDBKey> key, |
31 scoped_ptr<IndexedDBKey> primary_key, | 31 scoped_ptr<IndexedDBKey> primary_key, |
32 scoped_refptr<IndexedDBCallbacks> callbacks); | 32 scoped_refptr<IndexedDBCallbacks> callbacks); |
33 void PrefetchContinue(int number_to_fetch, | 33 void PrefetchContinue(int number_to_fetch, |
34 scoped_refptr<IndexedDBCallbacks> callbacks); | 34 scoped_refptr<IndexedDBCallbacks> callbacks); |
35 void PrefetchReset(int used_prefetches, int unused_prefetches); | 35 void PrefetchReset(int used_prefetches, int unused_prefetches); |
36 | 36 |
37 const IndexedDBKey& key() const { return cursor_->key(); } | 37 const IndexedDBKey& key() const { return cursor_->key(); } |
38 const IndexedDBKey& primary_key() const { return cursor_->primary_key(); } | 38 const IndexedDBKey& primary_key() const { return cursor_->primary_key(); } |
39 std::string* Value() const { | 39 IndexedDBValue* Value() const { |
40 return (cursor_type_ == indexed_db::CURSOR_KEY_ONLY) ? NULL | 40 return (cursor_type_ == indexed_db::CURSOR_KEY_ONLY) ? NULL |
41 : cursor_->Value(); | 41 : cursor_->Value(); |
42 } | 42 } |
43 void Close(); | 43 void Close(); |
44 | 44 |
45 void CursorIterationOperation(scoped_ptr<IndexedDBKey> key, | 45 void CursorIterationOperation(scoped_ptr<IndexedDBKey> key, |
46 scoped_ptr<IndexedDBKey> primary_key, | 46 scoped_ptr<IndexedDBKey> primary_key, |
47 scoped_refptr<IndexedDBCallbacks> callbacks, | 47 scoped_refptr<IndexedDBCallbacks> callbacks, |
48 IndexedDBTransaction* transaction); | 48 IndexedDBTransaction* transaction); |
49 void CursorAdvanceOperation(uint32 count, | 49 void CursorAdvanceOperation(uint32 count, |
(...skipping 17 matching lines...) Expand all Loading... |
67 scoped_ptr<IndexedDBBackingStore::Cursor> cursor_; | 67 scoped_ptr<IndexedDBBackingStore::Cursor> cursor_; |
68 // Must be destroyed before transaction_. | 68 // Must be destroyed before transaction_. |
69 scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_; | 69 scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_; |
70 | 70 |
71 bool closed_; | 71 bool closed_; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace content | 74 } // namespace content |
75 | 75 |
76 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ | 76 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ |
OLD | NEW |