blob: 5ce935f944976693852901344ea340edb8f58125 [file] [log] [blame]
[email protected]2a10f6812009-07-24 01:22:511// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2// source code is governed by a BSD-style license that can be found in the
3// LICENSE file.
4
5#ifndef CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_
6#define CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_
7
8#include "base/basictypes.h"
[email protected]2a10f6812009-07-24 01:22:519#include "base/string16.h"
[email protected]418ed5ab2009-11-12 01:14:4910#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
11#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
[email protected]2a10f6812009-07-24 01:22:5112
13class RendererWebStorageAreaImpl : public WebKit::WebStorageArea {
14 public:
15 RendererWebStorageAreaImpl(int64 namespace_id,
16 const WebKit::WebString& origin);
17 virtual ~RendererWebStorageAreaImpl();
18
19 // See WebStorageArea.h for documentation on these functions.
[email protected]2a10f6812009-07-24 01:22:5120 virtual unsigned length();
[email protected]99ddfd22009-08-11 04:16:4321 virtual WebKit::WebString key(unsigned index);
[email protected]2a10f6812009-07-24 01:22:5122 virtual WebKit::WebString getItem(const WebKit::WebString& key);
[email protected]ee2be5b32009-11-05 09:13:1223 virtual void setItem(
24 const WebKit::WebString& key, const WebKit::WebString& value,
[email protected]037c70022010-01-26 01:31:2225 const WebKit::WebURL& url, bool& quota_exception,
26 WebKit::WebString& old_value);
27 virtual void removeItem(
28 const WebKit::WebString& key, const WebKit::WebURL& url,
29 WebKit::WebString& old_value);
30 virtual void clear(const WebKit::WebURL& url, bool& cleared_something);
[email protected]2a10f6812009-07-24 01:22:5131
32 private:
[email protected]3d392a6f2009-09-11 03:58:4533 // The ID we use for all IPC.
[email protected]2a10f6812009-07-24 01:22:5134 int64 storage_area_id_;
[email protected]2a10f6812009-07-24 01:22:5135};
36
[email protected]11f4857282009-11-13 19:56:1737#endif // CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_