| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef NavigatorStorageQuota_h | 31 #ifndef NavigatorStorageQuota_h |
| 32 #define NavigatorStorageQuota_h | 32 #define NavigatorStorageQuota_h |
| 33 | 33 |
| 34 #include "core/frame/DOMWindowProperty.h" | 34 #include "core/frame/DOMWindowProperty.h" |
| 35 #include "heap/Handle.h" | |
| 36 #include "modules/quota/DeprecatedStorageQuota.h" | |
| 37 #include "platform/Supplementable.h" | 35 #include "platform/Supplementable.h" |
| 38 | 36 |
| 39 namespace WebCore { | 37 namespace WebCore { |
| 40 | 38 |
| 39 class DeprecatedStorageQuota; |
| 41 class Frame; | 40 class Frame; |
| 42 class Navigator; | 41 class Navigator; |
| 43 class StorageQuota; | 42 class StorageQuota; |
| 44 | 43 |
| 45 class NavigatorStorageQuota FINAL : public Supplement<Navigator>, public DOMWind
owProperty { | 44 class NavigatorStorageQuota FINAL : public Supplement<Navigator>, public DOMWind
owProperty { |
| 46 public: | 45 public: |
| 47 virtual ~NavigatorStorageQuota(); | 46 virtual ~NavigatorStorageQuota(); |
| 48 static NavigatorStorageQuota* from(Navigator*); | 47 static NavigatorStorageQuota* from(Navigator*); |
| 49 | 48 |
| 50 static StorageQuota* storageQuota(Navigator*); | 49 static StorageQuota* storageQuota(Navigator*); |
| 51 static DeprecatedStorageQuota* webkitTemporaryStorage(Navigator*); | 50 static DeprecatedStorageQuota* webkitTemporaryStorage(Navigator*); |
| 52 static DeprecatedStorageQuota* webkitPersistentStorage(Navigator*); | 51 static DeprecatedStorageQuota* webkitPersistentStorage(Navigator*); |
| 53 | 52 |
| 54 StorageQuota* storageQuota() const; | 53 StorageQuota* storageQuota() const; |
| 55 DeprecatedStorageQuota* webkitTemporaryStorage() const; | 54 DeprecatedStorageQuota* webkitTemporaryStorage() const; |
| 56 DeprecatedStorageQuota* webkitPersistentStorage() const; | 55 DeprecatedStorageQuota* webkitPersistentStorage() const; |
| 57 | 56 |
| 58 private: | 57 private: |
| 59 explicit NavigatorStorageQuota(Frame*); | 58 explicit NavigatorStorageQuota(Frame*); |
| 60 static const char* supplementName(); | 59 static const char* supplementName(); |
| 61 | 60 |
| 62 mutable RefPtrWillBePersistent<StorageQuota> m_storageQuota; | 61 mutable RefPtr<StorageQuota> m_storageQuota; |
| 63 mutable RefPtrWillBePersistent<DeprecatedStorageQuota> m_temporaryStorage; | 62 mutable RefPtr<DeprecatedStorageQuota> m_temporaryStorage; |
| 64 mutable RefPtrWillBePersistent<DeprecatedStorageQuota> m_persistentStorage; | 63 mutable RefPtr<DeprecatedStorageQuota> m_persistentStorage; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace WebCore | 66 } // namespace WebCore |
| 68 | 67 |
| 69 #endif // NavigatorStorageQuota_h | 68 #endif // NavigatorStorageQuota_h |
| OLD | NEW |