blob: a79f45f43362be9c16ee775288130737b900873b (
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
47
|
// 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_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
#define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "third_party/WebKit/public/platform/WebStorageArea.h"
#include "third_party/WebKit/public/platform/WebString.h"
class GURL;
namespace dom_storage {
class DomStorageCachedArea;
}
namespace content {
class WebStorageAreaImpl : public WebKit::WebStorageArea {
public:
static WebStorageAreaImpl* FromConnectionId(int id);
WebStorageAreaImpl(int64 namespace_id, const GURL& origin);
virtual ~WebStorageAreaImpl();
// 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& page_url, WebStorageArea::Result& result);
virtual void removeItem(
const WebKit::WebString& key, const WebKit::WebURL& page_url);
virtual void clear(const WebKit::WebURL& url);
virtual size_t memoryBytesUsedByCache() const;
private:
int connection_id_;
scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_;
};
} // namespace content
#endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_
|