OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ |
6 #define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ | 6 #define CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 static WebStorageAreaImpl* FromConnectionId(int id); | 22 static WebStorageAreaImpl* FromConnectionId(int id); |
23 | 23 |
24 WebStorageAreaImpl(int64 namespace_id, const GURL& origin); | 24 WebStorageAreaImpl(int64 namespace_id, const GURL& origin); |
25 virtual ~WebStorageAreaImpl(); | 25 virtual ~WebStorageAreaImpl(); |
26 | 26 |
27 // See WebStorageArea.h for documentation on these functions. | 27 // See WebStorageArea.h for documentation on these functions. |
28 virtual unsigned length(); | 28 virtual unsigned length(); |
29 virtual WebKit::WebString key(unsigned index); | 29 virtual WebKit::WebString key(unsigned index); |
30 virtual WebKit::WebString getItem(const WebKit::WebString& key); | 30 virtual WebKit::WebString getItem(const WebKit::WebString& key); |
| 31 virtual bool containsItem(const WebKit::WebString& key); |
31 virtual void setItem( | 32 virtual void setItem( |
32 const WebKit::WebString& key, const WebKit::WebString& value, | 33 const WebKit::WebString& key, const WebKit::WebString& value, |
33 const WebKit::WebURL& page_url, WebStorageArea::Result& result); | 34 const WebKit::WebURL& page_url, WebStorageArea::Result& result); |
34 virtual void removeItem( | 35 virtual void removeItem( |
35 const WebKit::WebString& key, const WebKit::WebURL& page_url); | 36 const WebKit::WebString& key, const WebKit::WebURL& page_url); |
36 virtual void clear(const WebKit::WebURL& url); | 37 virtual void clear(const WebKit::WebURL& url); |
37 | 38 |
38 private: | 39 private: |
39 int connection_id_; | 40 int connection_id_; |
40 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_; | 41 scoped_refptr<dom_storage::DomStorageCachedArea> cached_area_; |
41 }; | 42 }; |
42 | 43 |
43 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ | 44 #endif // CONTENT_RENDERER_DOM_STORAGE_WEBSTORAGEAREA_IMPL_H_ |
OLD | NEW |