summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_webidbdatabase_impl.h
blob: 5d45ac77b7494fbcbcd50927c553c6d47aeed6c8 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) 2010 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 CHROME_RENDERER_RENDERER_WEBIDBDATABASE_IMPL_H_
#define CHROME_RENDERER_RENDERER_WEBIDBDATABASE_IMPL_H_
#pragma once

#include "base/basictypes.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabase.h"

namespace WebKit {
class WebFrame;
class WebIDBCallbacks;
class WebString;
class WebIDBTransaction;
}

class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase {
 public:
  explicit RendererWebIDBDatabaseImpl(int32 idb_database_id);
  virtual ~RendererWebIDBDatabaseImpl();

  // WebKit::WebIDBDatabase
  virtual WebKit::WebString name() const;
  virtual WebKit::WebString description() const;
  virtual WebKit::WebString version() const;
  virtual WebKit::WebDOMStringList objectStores() const;
  virtual WebKit::WebIDBObjectStore* createObjectStore(
      const WebKit::WebString& name,
      const WebKit::WebString& key_path,
      bool auto_increment,
      const WebKit::WebIDBTransaction& transaction,
      WebKit::WebExceptionCode& ec);
  virtual void removeObjectStore(
      const WebKit::WebString& name,
      const WebKit::WebIDBTransaction& transaction,
      WebKit::WebExceptionCode& ec);
  virtual void setVersion(
      const WebKit::WebString& version, WebKit::WebIDBCallbacks* callbacks,
      WebKit::WebExceptionCode& ec);
  virtual WebKit::WebIDBTransaction* transaction(
      const WebKit::WebDOMStringList& names,
      unsigned short mode, unsigned long timeout,
      WebKit::WebExceptionCode& ec);

 private:
  int32 idb_database_id_;
};

#endif  // CHROME_RENDERER_RENDERER_WEBIDBDATABASE_IMPL_H_