| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 DeprecatedStorageInfo_h | 31 #ifndef DeprecatedStorageInfo_h |
| 32 #define DeprecatedStorageInfo_h | 32 #define DeprecatedStorageInfo_h |
| 33 | 33 |
| 34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
| 35 #include "heap/Handle.h" | |
| 36 #include "modules/quota/DeprecatedStorageQuota.h" | |
| 37 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
| 38 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 39 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
| 40 | 38 |
| 41 namespace WebCore { | 39 namespace WebCore { |
| 42 | 40 |
| 41 class DeprecatedStorageQuota; |
| 43 class ExecutionContext; | 42 class ExecutionContext; |
| 44 class StorageErrorCallback; | 43 class StorageErrorCallback; |
| 45 class StorageQuotaCallback; | 44 class StorageQuotaCallback; |
| 46 class StorageUsageCallback; | 45 class StorageUsageCallback; |
| 47 | 46 |
| 48 class DeprecatedStorageInfo : public RefCountedWillBeGarbageCollectedFinalized<D
eprecatedStorageInfo>, public ScriptWrappable { | 47 class DeprecatedStorageInfo : public RefCounted<DeprecatedStorageInfo>, public S
criptWrappable { |
| 49 DECLARE_GC_INFO; | |
| 50 public: | 48 public: |
| 51 enum { | 49 enum { |
| 52 TEMPORARY, | 50 TEMPORARY, |
| 53 PERSISTENT, | 51 PERSISTENT, |
| 54 }; | 52 }; |
| 55 | 53 |
| 56 static PassRefPtrWillBeRawPtr<DeprecatedStorageInfo> create() | 54 static PassRefPtr<DeprecatedStorageInfo> create() |
| 57 { | 55 { |
| 58 return adoptRefWillBeNoop(new DeprecatedStorageInfo()); | 56 return adoptRef(new DeprecatedStorageInfo()); |
| 59 } | 57 } |
| 60 | 58 |
| 61 void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<Stora
geUsageCallback>, PassOwnPtr<StorageErrorCallback>); | 59 void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<Stora
geUsageCallback>, PassOwnPtr<StorageErrorCallback>); |
| 62 | 60 |
| 63 void requestQuota(ExecutionContext*, int storageType, unsigned long long new
QuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>
); | 61 void requestQuota(ExecutionContext*, int storageType, unsigned long long new
QuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>
); |
| 64 | 62 |
| 65 ~DeprecatedStorageInfo(); | 63 ~DeprecatedStorageInfo(); |
| 66 | 64 |
| 67 void trace(Visitor*); | |
| 68 | |
| 69 private: | 65 private: |
| 70 DeprecatedStorageInfo(); | 66 DeprecatedStorageInfo(); |
| 71 | 67 |
| 72 DeprecatedStorageQuota* getStorageQuota(int storageType); | 68 DeprecatedStorageQuota* getStorageQuota(int storageType); |
| 73 | 69 |
| 74 mutable RefPtrWillBeMember<DeprecatedStorageQuota> m_temporaryStorage; | 70 mutable RefPtr<DeprecatedStorageQuota> m_temporaryStorage; |
| 75 mutable RefPtrWillBeMember<DeprecatedStorageQuota> m_persistentStorage; | 71 mutable RefPtr<DeprecatedStorageQuota> m_persistentStorage; |
| 76 }; | 72 }; |
| 77 | 73 |
| 78 } // namespace WebCore | 74 } // namespace WebCore |
| 79 | 75 |
| 80 #endif // DeprecatedStorageInfo_h | 76 #endif // DeprecatedStorageInfo_h |
| OLD | NEW |