2010-11-17 18:28:32 +01:00
|
|
|
// Copyright (c) 2010 The Chromium Embedded Framework 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 _BROWSER_WEBSTORAGEAREA_IMPL_H
|
|
|
|
#define _BROWSER_WEBSTORAGEAREA_IMPL_H
|
|
|
|
|
|
|
|
#include "base/basictypes.h"
|
2011-02-15 19:07:24 +01:00
|
|
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
|
2011-12-16 15:51:10 +01:00
|
|
|
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
2010-11-17 18:28:32 +01:00
|
|
|
|
|
|
|
class DOMStorageArea;
|
|
|
|
|
|
|
|
class BrowserWebStorageAreaImpl : public WebKit::WebStorageArea {
|
|
|
|
public:
|
|
|
|
BrowserWebStorageAreaImpl(int64 namespace_id, const WebKit::WebString& origin);
|
|
|
|
virtual ~BrowserWebStorageAreaImpl();
|
|
|
|
|
|
|
|
// See WebStorageArea.h for documentation on these functions.
|
|
|
|
virtual unsigned length();
|
|
|
|
virtual WebKit::WebString key(unsigned index);
|
|
|
|
virtual WebKit::WebString getItem(const WebKit::WebString& key);
|
|
|
|
virtual void setItem(
|
|
|
|
const WebKit::WebString& key, const WebKit::WebString& value,
|
|
|
|
const WebKit::WebURL& url, WebStorageArea::Result& result,
|
2011-07-03 02:03:30 +02:00
|
|
|
WebKit::WebString& old_value);
|
2010-11-17 18:28:32 +01:00
|
|
|
virtual void removeItem(
|
|
|
|
const WebKit::WebString& key, const WebKit::WebURL& url,
|
|
|
|
WebKit::WebString& old_value);
|
|
|
|
virtual void clear(const WebKit::WebURL& url, bool& cleared_something);
|
|
|
|
|
|
|
|
private:
|
|
|
|
// The object is owned by DOMStorageNamespace.
|
|
|
|
DOMStorageArea* area_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _BROWSER_WEBSTORAGEAREA_IMPL_H
|