OLD | NEW |
(Empty) | |
| 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 |
| 3 // LICENSE file. |
| 4 |
| 5 #ifndef CHROME_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
| 6 #define CHROME_RENDERER_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "webkit/api/public/WebStorageNamespace.h" |
| 10 |
| 11 class RendererWebStorageNamespaceImpl : public WebKit::WebStorageNamespace { |
| 12 public: |
| 13 explicit RendererWebStorageNamespaceImpl(bool is_local_storage); |
| 14 RendererWebStorageNamespaceImpl(bool is_local_storage, int64 namespace_id); |
| 15 |
| 16 // See WebStorageNamespace.h for documentation on these functions. |
| 17 virtual ~RendererWebStorageNamespaceImpl(); |
| 18 virtual WebKit::WebStorageArea* createStorageArea( |
| 19 const WebKit::WebString& origin); |
| 20 virtual WebKit::WebStorageNamespace* copy(); |
| 21 virtual void close(); |
| 22 |
| 23 private: |
| 24 // Are we local storage (as opposed to session storage). Used during lazy |
| 25 // initialization of namespace_id_. |
| 26 bool is_local_storage_; |
| 27 |
| 28 // Our namespace ID. Lazily initialized. |
| 29 int64 namespace_id_; |
| 30 |
| 31 // namespace_id_ should equal this iff its unitialized. |
| 32 static const int64 kUninitializedNamespaceId = -1; |
| 33 }; |
| 34 |
| 35 #endif // CHROME_RENDERER_WEBSTORAGENAMESPACE_IMPL_H_ |
OLD | NEW |