OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #ifndef CHROME_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ | 5 #ifndef CHROME_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
6 #define CHROME_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ | 6 #define CHROME_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/common/dom_storage_type.h" | 9 #include "chrome/common/dom_storage_type.h" |
10 #include "webkit/api/public/WebStorageNamespace.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" |
11 | 11 |
12 class RendererWebStorageNamespaceImpl : public WebKit::WebStorageNamespace { | 12 class RendererWebStorageNamespaceImpl : public WebKit::WebStorageNamespace { |
13 public: | 13 public: |
14 explicit RendererWebStorageNamespaceImpl(DOMStorageType storage_type); | 14 explicit RendererWebStorageNamespaceImpl(DOMStorageType storage_type); |
15 RendererWebStorageNamespaceImpl( | 15 RendererWebStorageNamespaceImpl( |
16 DOMStorageType storage_type, int64 namespace_id); | 16 DOMStorageType storage_type, int64 namespace_id); |
17 | 17 |
18 // See WebStorageNamespace.h for documentation on these functions. | 18 // See WebStorageNamespace.h for documentation on these functions. |
19 virtual ~RendererWebStorageNamespaceImpl(); | 19 virtual ~RendererWebStorageNamespaceImpl(); |
20 virtual WebKit::WebStorageArea* createStorageArea( | 20 virtual WebKit::WebStorageArea* createStorageArea( |
21 const WebKit::WebString& origin); | 21 const WebKit::WebString& origin); |
22 virtual WebKit::WebStorageNamespace* copy(); | 22 virtual WebKit::WebStorageNamespace* copy(); |
23 virtual void close(); | 23 virtual void close(); |
24 | 24 |
25 private: | 25 private: |
26 // Used during lazy initialization of namespace_id_. | 26 // Used during lazy initialization of namespace_id_. |
27 const DOMStorageType storage_type_; | 27 const DOMStorageType storage_type_; |
28 | 28 |
29 // Our namespace ID. Lazily initialized. | 29 // Our namespace ID. Lazily initialized. |
30 int64 namespace_id_; | 30 int64 namespace_id_; |
31 | 31 |
32 // namespace_id_ should equal this iff its unitialized. | 32 // namespace_id_ should equal this iff its unitialized. |
33 static const int64 kUninitializedNamespaceId = -1; | 33 static const int64 kUninitializedNamespaceId = -1; |
34 }; | 34 }; |
35 | 35 |
36 #endif // CHROME_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ | 36 #endif // CHROME_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
OLD | NEW |