Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / browser / indexed_db / indexed_db_database_callbacks.h
blobad16a04b1d72c6ae555ab377b8ee0df065fc22ad
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
12 namespace content {
13 class IndexedDBDatabaseError;
14 class IndexedDBDispatcherHost;
16 class CONTENT_EXPORT IndexedDBDatabaseCallbacks
17 : public base::RefCounted<IndexedDBDatabaseCallbacks> {
18 public:
19 IndexedDBDatabaseCallbacks(IndexedDBDispatcherHost* dispatcher_host,
20 int ipc_thread_id,
21 int ipc_database_callbacks_id);
23 virtual void OnForcedClose();
24 virtual void OnVersionChange(int64 old_version, int64 new_version);
26 virtual void OnAbort(int64 host_transaction_id,
27 const IndexedDBDatabaseError& error);
28 virtual void OnComplete(int64 host_transaction_id);
30 protected:
31 virtual ~IndexedDBDatabaseCallbacks();
33 private:
34 friend class base::RefCounted<IndexedDBDatabaseCallbacks>;
36 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
37 int ipc_thread_id_;
38 int ipc_database_callbacks_id_;
40 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacks);
43 } // namespace content
45 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_