blob: 6467960366999b5561f8b34a6b4898eec404e4a5 [file] [log] [blame]
[email protected]d0c005a2010-06-09 16:58:321// Copyright (c) 2010 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.
4
[email protected]acb94722011-03-18 01:33:345#ifndef CONTENT_RENDERER_RENDERER_WEBIDBOBJECTSTORE_IMPL_H_
6#define CONTENT_RENDERER_RENDERER_WEBIDBOBJECTSTORE_IMPL_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]d0c005a2010-06-09 16:58:328
9#include "base/basictypes.h"
[email protected]8bd0fe62011-01-17 06:44:3710#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCallbacks.h"
11#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h"
[email protected]d0c005a2010-06-09 16:58:3212
13namespace WebKit {
14class WebFrame;
15class WebIDBCallbacks;
[email protected]e14eab92010-06-14 13:50:1516class WebIDBIndex;
[email protected]5c71640c2010-07-14 14:29:4017class WebIDBKey;
[email protected]5196b0cd2010-08-11 09:03:5218class WebIDBKeyRange;
[email protected]d0c005a2010-06-09 16:58:3219class WebString;
20}
21
22class RendererWebIDBObjectStoreImpl : public WebKit::WebIDBObjectStore {
23 public:
24 explicit RendererWebIDBObjectStoreImpl(int32 idb_object_store_id);
[email protected]3690ebe02011-05-25 09:08:1925 virtual ~RendererWebIDBObjectStoreImpl();
[email protected]d0c005a2010-06-09 16:58:3226
27 // WebKit::WebIDBObjectStore
[email protected]78994ab02010-12-08 18:06:4428 virtual WebKit::WebString name() const;
29 virtual WebKit::WebString keyPath() const;
30 virtual WebKit::WebDOMStringList indexNames() const;
[email protected]5c71640c2010-07-14 14:29:4031
[email protected]78994ab02010-12-08 18:06:4432 virtual void get(const WebKit::WebIDBKey& key,
33 WebKit::WebIDBCallbacks* callbacks,
34 const WebKit::WebIDBTransaction& transaction,
35 WebKit::WebExceptionCode& ec);
36 virtual void put(const WebKit::WebSerializedScriptValue& value,
37 const WebKit::WebIDBKey& key,
[email protected]27585312011-02-02 16:50:4238 PutMode put_mode,
[email protected]78994ab02010-12-08 18:06:4439 WebKit::WebIDBCallbacks* callbacks,
40 const WebKit::WebIDBTransaction& transaction,
41 WebKit::WebExceptionCode& ec);
42 virtual void deleteFunction(const WebKit::WebIDBKey& key,
43 WebKit::WebIDBCallbacks* callbacks,
44 const WebKit::WebIDBTransaction& transaction,
45 WebKit::WebExceptionCode& ec);
[email protected]68fd3222011-02-10 23:06:3146 virtual void clear(WebKit::WebIDBCallbacks* callbacks,
47 const WebKit::WebIDBTransaction& transaction,
48 WebKit::WebExceptionCode& ec);
[email protected]e14eab92010-06-14 13:50:1549
[email protected]78994ab02010-12-08 18:06:4450 virtual WebKit::WebIDBIndex* createIndex(
[email protected]6450c6e02010-10-06 21:27:1751 const WebKit::WebString& name,
52 const WebKit::WebString& key_path,
53 bool unique,
[email protected]fb033cdc2010-10-13 07:19:4254 const WebKit::WebIDBTransaction& transaction,
55 WebKit::WebExceptionCode& ec);
[email protected]e14eab92010-06-14 13:50:1556 // Transfers ownership of the WebIDBIndex to the caller.
[email protected]78994ab02010-12-08 18:06:4457 virtual WebKit::WebIDBIndex* index(const WebKit::WebString& name,
58 WebKit::WebExceptionCode& ec);
59 virtual void deleteIndex(const WebKit::WebString& name,
60 const WebKit::WebIDBTransaction& transaction,
61 WebKit::WebExceptionCode& ec);
[email protected]d5fbd5392010-09-23 13:34:0262
[email protected]78994ab02010-12-08 18:06:4463 virtual void openCursor(const WebKit::WebIDBKeyRange& idb_key_range,
[email protected]d5fbd5392010-09-23 13:34:0264 unsigned short direction,
65 WebKit::WebIDBCallbacks* callbacks,
[email protected]fb033cdc2010-10-13 07:19:4266 const WebKit::WebIDBTransaction& transaction,
67 WebKit::WebExceptionCode& ec);
[email protected]d0c005a2010-06-09 16:58:3268 private:
69 int32 idb_object_store_id_;
70};
71
[email protected]acb94722011-03-18 01:33:3472#endif // CONTENT_RENDERER_RENDERER_WEBIDBOBJECTSTORE_IMPL_H_