Chromium Code Reviews| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 13 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 14 #include "content/browser/indexed_db/indexed_db_database.h" | 14 #include "content/browser/indexed_db/indexed_db_database.h" |
| 15 #include "content/common/indexed_db/indexed_db_key_range.h" | 15 #include "content/common/indexed_db/indexed_db_key_range.h" |
|
jsbell
2014/06/09 16:38:27
Need to #include "third_party/WebKit/public/platfo
Pritam Nikam
2014/06/11 14:05:16
Done.
| |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class IndexedDBTransaction; | 19 class IndexedDBTransaction; |
| 20 | 20 |
| 21 class CONTENT_EXPORT IndexedDBCursor | 21 class CONTENT_EXPORT IndexedDBCursor |
| 22 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBCursor>) { | 22 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBCursor>) { |
| 23 public: | 23 public: |
| 24 IndexedDBCursor(scoped_ptr<IndexedDBBackingStore::Cursor> cursor, | 24 IndexedDBCursor(scoped_ptr<IndexedDBBackingStore::Cursor> cursor, |
| 25 indexed_db::CursorType cursor_type, | 25 indexed_db::CursorType cursor_type, |
| 26 IndexedDBDatabase::TaskType task_type, | 26 blink::TaskType task_type, |
| 27 IndexedDBTransaction* transaction); | 27 IndexedDBTransaction* transaction); |
| 28 | 28 |
| 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 leveldb::Status PrefetchReset(int used_prefetches, int unused_prefetches); | 35 leveldb::Status PrefetchReset(int used_prefetches, int unused_prefetches); |
| 36 | 36 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 52 void CursorPrefetchIterationOperation( | 52 void CursorPrefetchIterationOperation( |
| 53 int number_to_fetch, | 53 int number_to_fetch, |
| 54 scoped_refptr<IndexedDBCallbacks> callbacks, | 54 scoped_refptr<IndexedDBCallbacks> callbacks, |
| 55 IndexedDBTransaction* transaction); | 55 IndexedDBTransaction* transaction); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 friend class base::RefCounted<IndexedDBCursor>; | 58 friend class base::RefCounted<IndexedDBCursor>; |
| 59 | 59 |
| 60 ~IndexedDBCursor(); | 60 ~IndexedDBCursor(); |
| 61 | 61 |
| 62 IndexedDBDatabase::TaskType task_type_; | 62 blink::TaskType task_type_; |
| 63 indexed_db::CursorType cursor_type_; | 63 indexed_db::CursorType cursor_type_; |
| 64 const scoped_refptr<IndexedDBTransaction> transaction_; | 64 const scoped_refptr<IndexedDBTransaction> transaction_; |
| 65 | 65 |
| 66 // Must be destroyed before transaction_. | 66 // Must be destroyed before transaction_. |
| 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 DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor); | 73 DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace content | 76 } // namespace content |
| 77 | 77 |
| 78 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ | 78 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ |
| OLD | NEW |