OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "content/common/dom_storage_common.h" | |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
12 #include "webkit/dom_storage/dom_storage_types.h" | 11 #include "webkit/dom_storage/dom_storage_types.h" |
13 // The above is to include the ENABLE_NEW_DOM_STORAGE_BACKEND flag | 12 // The above is to include the ENABLE_NEW_DOM_STORAGE_BACKEND flag |
14 // in all consumers. | 13 // in all consumers. |
15 | 14 |
16 class RendererWebStorageNamespaceImpl : public WebKit::WebStorageNamespace { | 15 class RendererWebStorageNamespaceImpl : public WebKit::WebStorageNamespace { |
17 public: | 16 public: |
18 explicit RendererWebStorageNamespaceImpl(DOMStorageType storage_type); | 17 // The default constructor creates a local storage namespace, the second |
19 RendererWebStorageNamespaceImpl(DOMStorageType storage_type, | 18 // constructor should be used for session storage namepaces. |
20 int64 namespace_id); | 19 RendererWebStorageNamespaceImpl(); |
| 20 explicit RendererWebStorageNamespaceImpl(int64 namespace_id); |
21 | 21 |
22 // See WebStorageNamespace.h for documentation on these functions. | 22 // See WebStorageNamespace.h for documentation on these functions. |
23 virtual ~RendererWebStorageNamespaceImpl(); | 23 virtual ~RendererWebStorageNamespaceImpl(); |
24 virtual WebKit::WebStorageArea* createStorageArea( | 24 virtual WebKit::WebStorageArea* createStorageArea( |
25 const WebKit::WebString& origin); | 25 const WebKit::WebString& origin); |
26 virtual WebKit::WebStorageNamespace* copy(); | 26 virtual WebKit::WebStorageNamespace* copy(); |
27 virtual void close(); | 27 virtual void close(); |
28 | 28 |
29 private: | 29 private: |
30 int64 namespace_id_; | 30 int64 namespace_id_; |
31 }; | 31 }; |
32 | 32 |
33 #endif // CONTENT_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ | 33 #endif // CONTENT_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
OLD | NEW |