[email protected] | 60a1d49 | 2011-05-27 09:35:14 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 7b1e41c | 2010-03-09 12:53:54 | [diff] [blame] | 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 | |
[email protected] | acb9472 | 2011-03-18 01:33:34 | [diff] [blame] | 5 | #ifndef CONTENT_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_ |
6 | #define CONTENT_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] | 8bd0fe6 | 2011-01-17 06:44:37 | [diff] [blame] | 10 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" |
11 | #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | ||||
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 12 | |
13 | class RendererWebStorageAreaImpl : public WebKit::WebStorageArea { | ||||
14 | public: | ||||
15 | RendererWebStorageAreaImpl(int64 namespace_id, | ||||
[email protected] | 3363c1f | 2011-05-04 07:27:18 | [diff] [blame] | 16 | const WebKit::WebString& origin); |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 17 | virtual ~RendererWebStorageAreaImpl(); |
18 | |||||
19 | // See WebStorageArea.h for documentation on these functions. | ||||
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 20 | virtual unsigned length(); |
[email protected] | 99ddfd2 | 2009-08-11 04:16:43 | [diff] [blame] | 21 | virtual WebKit::WebString key(unsigned index); |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 22 | virtual WebKit::WebString getItem(const WebKit::WebString& key); |
[email protected] | ee2be5b3 | 2009-11-05 09:13:12 | [diff] [blame] | 23 | virtual void setItem( |
24 | const WebKit::WebString& key, const WebKit::WebString& value, | ||||
[email protected] | f985f3c | 2010-02-13 18:18:41 | [diff] [blame] | 25 | const WebKit::WebURL& url, WebStorageArea::Result& result, |
[email protected] | 60a1d49 | 2011-05-27 09:35:14 | [diff] [blame] | 26 | WebKit::WebString& old_value); |
[email protected] | 037c7002 | 2010-01-26 01:31:22 | [diff] [blame] | 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] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 31 | |
32 | private: | ||||
[email protected] | 3d392a6f | 2009-09-11 03:58:45 | [diff] [blame] | 33 | // The ID we use for all IPC. |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 34 | int64 storage_area_id_; |
[email protected] | 2a10f681 | 2009-07-24 01:22:51 | [diff] [blame] | 35 | }; |
36 | |||||
[email protected] | acb9472 | 2011-03-18 01:33:34 | [diff] [blame] | 37 | #endif // CONTENT_RENDERER_RENDERER_WEBSTORAGEAREA_IMPL_H_ |