blob: 532933b0aca77ead6518d97280c66c38ef2996b2 [file] [log] [blame]
[email protected]7b1e41c2010-03-09 12:53:541// 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.
[email protected]2a10f6812009-07-24 01:22:514
5#ifndef CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_
6#define CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]2a10f6812009-07-24 01:22:518
9#include "base/basictypes.h"
[email protected]2a10f6812009-07-24 01:22:5110#include "base/string16.h"
[email protected]418ed5ab2009-11-12 01:14:4911#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
12#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
[email protected]2a10f6812009-07-24 01:22:5113
14class RendererWebStorageAreaImpl : public WebKit::WebStorageArea {
15 public:
16 RendererWebStorageAreaImpl(int64 namespace_id,
17 const WebKit::WebString& origin);
18 virtual ~RendererWebStorageAreaImpl();
19
20 // See WebStorageArea.h for documentation on these functions.
[email protected]2a10f6812009-07-24 01:22:5121 virtual unsigned length();
[email protected]99ddfd22009-08-11 04:16:4322 virtual WebKit::WebString key(unsigned index);
[email protected]2a10f6812009-07-24 01:22:5123 virtual WebKit::WebString getItem(const WebKit::WebString& key);
[email protected]ee2be5b32009-11-05 09:13:1224 virtual void setItem(
25 const WebKit::WebString& key, const WebKit::WebString& value,
[email protected]f985f3c2010-02-13 18:18:4126 const WebKit::WebURL& url, WebStorageArea::Result& result,
[email protected]7b1e41c2010-03-09 12:53:5427 WebKit::WebString& old_value, WebKit::WebFrame* web_view);
[email protected]037c70022010-01-26 01:31:2228 virtual void removeItem(
29 const WebKit::WebString& key, const WebKit::WebURL& url,
30 WebKit::WebString& old_value);
31 virtual void clear(const WebKit::WebURL& url, bool& cleared_something);
[email protected]2a10f6812009-07-24 01:22:5132
33 private:
[email protected]3d392a6f2009-09-11 03:58:4534 // The ID we use for all IPC.
[email protected]2a10f6812009-07-24 01:22:5135 int64 storage_area_id_;
[email protected]2a10f6812009-07-24 01:22:5136};
37
[email protected]11f4857282009-11-13 19:56:1738#endif // CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_