summaryrefslogtreecommitdiffstats
path: root/content/common/indexed_db/proxy_webidbindex_impl.h
blob: e95ea75e0003a0bcd5fc577b53e0f32236d369ec (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
// 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_COMMON_INDEXED_DB_PROXY_WEBIDBINDEX_IMPL_H_
#define CONTENT_COMMON_INDEXED_DB_PROXY_WEBIDBINDEX_IMPL_H_
#pragma once

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

class RendererWebIDBIndexImpl : public WebKit::WebIDBIndex {
 public:
  explicit RendererWebIDBIndexImpl(int32 idb_index_id);
  virtual ~RendererWebIDBIndexImpl();

  // WebKit::WebIDBIndex
  virtual void openObjectCursor(const WebKit::WebIDBKeyRange& range,
                                unsigned short direction,
                                WebKit::WebIDBCallbacks* callbacks,
                                const WebKit::WebIDBTransaction& transaction,
                                WebKit::WebExceptionCode& ec);
  virtual void openKeyCursor(const WebKit::WebIDBKeyRange& range,
                             unsigned short direction,
                             WebKit::WebIDBCallbacks* callbacks,
                             const WebKit::WebIDBTransaction& transaction,
                             WebKit::WebExceptionCode& ec);
  virtual void count(const WebKit::WebIDBKeyRange& range,
                     WebKit::WebIDBCallbacks* callbacks,
                     const WebKit::WebIDBTransaction& transaction,
                     WebKit::WebExceptionCode& ec);
  virtual void getObject(const WebKit::WebIDBKeyRange& key_range,
                         WebKit::WebIDBCallbacks* callbacks,
                         const WebKit::WebIDBTransaction& transaction,
                         WebKit::WebExceptionCode& ec);
  virtual void getKey(const WebKit::WebIDBKeyRange& key_range,
                      WebKit::WebIDBCallbacks* callbacks,
                      const WebKit::WebIDBTransaction& transaction,
                      WebKit::WebExceptionCode& ec);

 private:
  int32 idb_index_id_;
};

#endif  // CONTENT_COMMON_INDEXED_DB_PROXY_WEBIDBINDEX_IMPL_H_