Index: content/browser/indexed_db/indexed_db_database_callbacks.h |
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.h b/content/browser/indexed_db/indexed_db_database_callbacks.h |
index 3a8b684b686c387de029cbb7aefd317d266daa42..7c750e414c4cc89691b9750b84dd3db82ccc5d55 100644 |
--- a/content/browser/indexed_db/indexed_db_database_callbacks.h |
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.h |
@@ -5,27 +5,43 @@ |
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ |
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_ |
+#include "base/basictypes.h" |
#include "base/memory/ref_counted.h" |
+#include "content/common/content_export.h" |
namespace content { |
class IndexedDBDatabaseError; |
class IndexedDBDispatcherHost; |
-class IndexedDBDatabaseCallbacks { |
+class CONTENT_EXPORT IndexedDBDatabaseCallbacks |
+ : public base::RefCounted<IndexedDBDatabaseCallbacks> { |
public: |
- IndexedDBDatabaseCallbacks(IndexedDBDispatcherHost* dispatcher_host, |
- int ipc_thread_id, |
- int ipc_database_callbacks_id); |
+ static scoped_refptr<IndexedDBDatabaseCallbacks> Create( |
+ IndexedDBDispatcherHost* dispatcher_host, |
+ int ipc_thread_id, |
+ int ipc_database_callbacks_id) { |
+ return make_scoped_refptr( |
+ new IndexedDBDatabaseCallbacks( |
+ dispatcher_host, ipc_thread_id, ipc_database_callbacks_id)); |
+ } |
+ |
+ virtual void OnForcedClose(); |
+ virtual void OnVersionChange(int64 old_version, int64 new_version); |
+ |
+ virtual void OnAbort(int64 host_transaction_id, |
+ const IndexedDBDatabaseError& error); |
+ virtual void OnComplete(int64 host_transaction_id); |
+ protected: |
+ IndexedDBDatabaseCallbacks( |
+ IndexedDBDispatcherHost* dispatcher_host, |
+ int ipc_thread_id, |
+ int ipc_database_callbacks_id); |
virtual ~IndexedDBDatabaseCallbacks(); |
- virtual void onForcedClose(); |
- virtual void onVersionChange(long long old_version, long long new_version); |
- virtual void onAbort(long long host_transaction_id, |
- const IndexedDBDatabaseError& error); |
- virtual void onComplete(long long host_transaction_id); |
- |
private: |
+ friend class base::RefCounted<IndexedDBDatabaseCallbacks>; |
+ |
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; |
int ipc_thread_id_; |
int ipc_database_callbacks_id_; |