| OLD | NEW |
| 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_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "url/origin.h" | 24 #include "url/origin.h" |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 class IndexedDBBlobInfo; | 27 class IndexedDBBlobInfo; |
| 28 class IndexedDBConnection; | 28 class IndexedDBConnection; |
| 29 class IndexedDBCursor; | 29 class IndexedDBCursor; |
| 30 class IndexedDBDatabase; | 30 class IndexedDBDatabase; |
| 31 struct IndexedDBDataLossInfo; | 31 struct IndexedDBDataLossInfo; |
| 32 struct IndexedDBDatabaseMetadata; | 32 struct IndexedDBDatabaseMetadata; |
| 33 struct IndexedDBReturnValue; | 33 struct IndexedDBReturnValue; |
| 34 class IndexedDBTransaction; |
| 34 struct IndexedDBValue; | 35 struct IndexedDBValue; |
| 35 | 36 |
| 36 class CONTENT_EXPORT IndexedDBCallbacks | 37 class CONTENT_EXPORT IndexedDBCallbacks |
| 37 : public base::RefCounted<IndexedDBCallbacks> { | 38 : public base::RefCounted<IndexedDBCallbacks> { |
| 38 public: | 39 public: |
| 39 IndexedDBCallbacks( | 40 IndexedDBCallbacks( |
| 40 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host, | 41 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host, |
| 41 const url::Origin& origin, | 42 const url::Origin& origin, |
| 42 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info); | 43 ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info); |
| 43 | 44 |
| 44 virtual void OnError(const IndexedDBDatabaseError& error); | 45 virtual void OnError(const IndexedDBDatabaseError& error); |
| 45 | 46 |
| 46 // IndexedDBFactory::GetDatabaseNames | 47 // IndexedDBFactory::GetDatabaseNames |
| 47 virtual void OnSuccess(const std::vector<base::string16>& string); | 48 virtual void OnSuccess(const std::vector<base::string16>& string); |
| 48 | 49 |
| 49 // IndexedDBFactory::Open / DeleteDatabase | 50 // IndexedDBFactory::Open / DeleteDatabase |
| 50 virtual void OnBlocked(int64_t existing_version); | 51 virtual void OnBlocked(int64_t existing_version); |
| 51 | 52 |
| 52 // IndexedDBFactory::Open | 53 // IndexedDBFactory::Open |
| 53 virtual void OnUpgradeNeeded( | 54 virtual void OnUpgradeNeeded( |
| 54 int64_t old_version, | 55 int64_t old_version, |
| 55 std::unique_ptr<IndexedDBConnection> connection, | 56 std::unique_ptr<IndexedDBConnection> connection, |
| 57 IndexedDBTransaction* transaction, |
| 56 const content::IndexedDBDatabaseMetadata& metadata, | 58 const content::IndexedDBDatabaseMetadata& metadata, |
| 57 const IndexedDBDataLossInfo& data_loss_info); | 59 const IndexedDBDataLossInfo& data_loss_info); |
| 58 virtual void OnSuccess(std::unique_ptr<IndexedDBConnection> connection, | 60 virtual void OnSuccess(std::unique_ptr<IndexedDBConnection> connection, |
| 59 const content::IndexedDBDatabaseMetadata& metadata); | 61 const content::IndexedDBDatabaseMetadata& metadata); |
| 60 | 62 |
| 61 // IndexedDBDatabase::OpenCursor | 63 // IndexedDBDatabase::OpenCursor |
| 62 virtual void OnSuccess(scoped_refptr<IndexedDBCursor> cursor, | 64 virtual void OnSuccess(std::unique_ptr<IndexedDBCursor> cursor, |
| 63 const IndexedDBKey& key, | 65 const IndexedDBKey& key, |
| 64 const IndexedDBKey& primary_key, | 66 const IndexedDBKey& primary_key, |
| 65 IndexedDBValue* value); | 67 IndexedDBValue* value); |
| 66 | 68 |
| 67 // IndexedDBCursor::Continue / Advance | 69 // IndexedDBCursor::Continue / Advance |
| 68 virtual void OnSuccess(const IndexedDBKey& key, | 70 virtual void OnSuccess(const IndexedDBKey& key, |
| 69 const IndexedDBKey& primary_key, | 71 const IndexedDBKey& primary_key, |
| 70 IndexedDBValue* value); | 72 IndexedDBValue* value); |
| 71 | 73 |
| 72 // IndexedDBCursor::PrefetchContinue | 74 // IndexedDBCursor::PrefetchContinue |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 133 |
| 132 std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_; | 134 std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_; |
| 133 base::ThreadChecker thread_checker_; | 135 base::ThreadChecker thread_checker_; |
| 134 | 136 |
| 135 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); | 137 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 } // namespace content | 140 } // namespace content |
| 139 | 141 |
| 140 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ | 142 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ |
| OLD | NEW |