summaryrefslogtreecommitdiffstats
path: root/content/browser/in_process_webkit/indexed_db_database_callbacks.h
blob: 6fefcc625c0c182347ae85c697e7f6ecd35ed12f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DATABASE_CALLBACKS_H_
#define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DATABASE_CALLBACKS_H_

#include "base/memory/ref_counted.h"
#include "third_party/WebKit/public/platform/WebIDBDatabaseCallbacks.h"

namespace content {
class IndexedDBDispatcherHost;

class IndexedDBDatabaseCallbacks : public WebKit::WebIDBDatabaseCallbacks {
 public:
  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 WebKit::WebIDBDatabaseError&);
  virtual void onComplete(long long host_transaction_id);

 private:
  scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
  int ipc_thread_id_;
  int ipc_database_callbacks_id_;
};

}  // namespace content

#endif  // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DATABASE_CALLBACKS_H_