[email protected] | 7b1e41c | 2010-03-09 12:53:54 | [diff] [blame] | 1 | // 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] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 4 | |
5 | #ifndef CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_ | ||||
6 | #define CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame^] | 7 | #pragma once |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 8 | |
9 | #include "base/basictypes.h" | ||||
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 10 | #include "base/string16.h" |
[email protected] | 418ed5ab | 2009-11-12 01:14:49 | [diff] [blame] | 11 | #include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" |
12 | #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | ||||
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 13 | |
14 | class 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] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 21 | virtual unsigned length(); |
[email protected] | 99ddfd2 | 2009-08-11 04:16:43 | [diff] [blame] | 22 | virtual WebKit::WebString key(unsigned index); |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 23 | virtual WebKit::WebString getItem(const WebKit::WebString& key); |
[email protected] | ee2be5b3 | 2009-11-05 09:13:12 | [diff] [blame] | 24 | virtual void setItem( |
25 | const WebKit::WebString& key, const WebKit::WebString& value, | ||||
[email protected] | f985f3c | 2010-02-13 18:18:41 | [diff] [blame] | 26 | const WebKit::WebURL& url, WebStorageArea::Result& result, |
[email protected] | 7b1e41c | 2010-03-09 12:53:54 | [diff] [blame] | 27 | WebKit::WebString& old_value, WebKit::WebFrame* web_view); |
[email protected] | 037c7002 | 2010-01-26 01:31:22 | [diff] [blame] | 28 | 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] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 32 | |
33 | private: | ||||
[email protected] | 3d392a6f | 2009-09-11 03:58:45 | [diff] [blame] | 34 | // The ID we use for all IPC. |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 35 | int64 storage_area_id_; |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 36 | }; |
37 | |||||
[email protected] | 11f485728 | 2009-11-13 19:56:17 | [diff] [blame] | 38 | #endif // CHROME_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_ |