| 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_DATABASE_CALLBACKS_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 class IndexedDBDatabaseError; | 15 class IndexedDBDatabaseError; |
| 16 class IndexedDBDispatcherHost; | 16 class IndexedDBDispatcherHost; |
| 17 class IndexedDBObserverChanges; |
| 17 | 18 |
| 18 class CONTENT_EXPORT IndexedDBDatabaseCallbacks | 19 class CONTENT_EXPORT IndexedDBDatabaseCallbacks |
| 19 : public base::RefCounted<IndexedDBDatabaseCallbacks> { | 20 : public base::RefCounted<IndexedDBDatabaseCallbacks> { |
| 20 public: | 21 public: |
| 21 IndexedDBDatabaseCallbacks(IndexedDBDispatcherHost* dispatcher_host, | 22 IndexedDBDatabaseCallbacks(IndexedDBDispatcherHost* dispatcher_host, |
| 22 int ipc_thread_id, | 23 int ipc_thread_id, |
| 23 int ipc_database_callbacks_id); | 24 int ipc_database_callbacks_id); |
| 24 | 25 |
| 25 virtual void OnForcedClose(); | 26 virtual void OnForcedClose(); |
| 26 virtual void OnVersionChange(int64_t old_version, int64_t new_version); | 27 virtual void OnVersionChange(int64_t old_version, int64_t new_version); |
| 27 | 28 |
| 28 virtual void OnAbort(int64_t host_transaction_id, | 29 virtual void OnAbort(int64_t host_transaction_id, |
| 29 const IndexedDBDatabaseError& error); | 30 const IndexedDBDatabaseError& error); |
| 30 virtual void OnComplete(int64_t host_transaction_id); | 31 virtual void OnComplete(int64_t host_transaction_id); |
| 32 virtual void OnDatabaseChange( |
| 33 std::unique_ptr<IndexedDBObserverChanges> changes); |
| 31 | 34 |
| 32 protected: | 35 protected: |
| 33 virtual ~IndexedDBDatabaseCallbacks(); | 36 virtual ~IndexedDBDatabaseCallbacks(); |
| 34 | 37 |
| 35 private: | 38 private: |
| 36 friend class base::RefCounted<IndexedDBDatabaseCallbacks>; | 39 friend class base::RefCounted<IndexedDBDatabaseCallbacks>; |
| 37 | 40 |
| 38 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; | 41 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; |
| 39 int ipc_thread_id_; | 42 int ipc_thread_id_; |
| 40 int ipc_database_callbacks_id_; | 43 int ipc_database_callbacks_id_; |
| 41 | 44 |
| 42 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacks); | 45 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacks); |
| 43 }; | 46 }; |
| 44 | 47 |
| 45 } // namespace content | 48 } // namespace content |
| 46 | 49 |
| 47 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ | 50 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ |
| OLD | NEW |