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 17 matching lines...) Expand all Loading... |
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 "modules/quota/DeprecatedStorageQuota.h" | 35 #include "modules/quota/DeprecatedStorageQuota.h" |
36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
38 #include "wtf/PassRefPtr.h" | |
39 #include "wtf/RefCounted.h" | |
40 #include "wtf/RefPtr.h" | |
41 | 38 |
42 namespace WebCore { | 39 namespace WebCore { |
43 | 40 |
44 class ExecutionContext; | 41 class ExecutionContext; |
45 class StorageErrorCallback; | 42 class StorageErrorCallback; |
46 class StorageQuotaCallback; | 43 class StorageQuotaCallback; |
47 class StorageUsageCallback; | 44 class StorageUsageCallback; |
48 | 45 |
49 class DeprecatedStorageInfo : public RefCountedWillBeGarbageCollectedFinalized<D
eprecatedStorageInfo>, public ScriptWrappable { | 46 class DeprecatedStorageInfo : public GarbageCollectedFinalized<DeprecatedStorage
Info>, public ScriptWrappable { |
50 public: | 47 public: |
51 enum { | 48 enum { |
52 TEMPORARY, | 49 TEMPORARY, |
53 PERSISTENT, | 50 PERSISTENT, |
54 }; | 51 }; |
55 | 52 |
56 static PassRefPtrWillBeRawPtr<DeprecatedStorageInfo> create() | 53 static DeprecatedStorageInfo* create() |
57 { | 54 { |
58 return adoptRefWillBeNoop(new DeprecatedStorageInfo()); | 55 return new DeprecatedStorageInfo(); |
59 } | 56 } |
60 | 57 |
61 void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<Stora
geUsageCallback>, PassOwnPtr<StorageErrorCallback>); | 58 void queryUsageAndQuota(ExecutionContext*, int storageType, PassOwnPtr<Stora
geUsageCallback>, PassOwnPtr<StorageErrorCallback>); |
62 | 59 |
63 void requestQuota(ExecutionContext*, int storageType, unsigned long long new
QuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>
); | 60 void requestQuota(ExecutionContext*, int storageType, unsigned long long new
QuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>
); |
64 | 61 |
65 ~DeprecatedStorageInfo(); | 62 ~DeprecatedStorageInfo(); |
66 | 63 |
67 void trace(Visitor*); | 64 void trace(Visitor*); |
68 | 65 |
69 private: | 66 private: |
70 DeprecatedStorageInfo(); | 67 DeprecatedStorageInfo(); |
71 | 68 |
72 DeprecatedStorageQuota* getStorageQuota(int storageType); | 69 DeprecatedStorageQuota* getStorageQuota(int storageType); |
73 | 70 |
74 mutable RefPtrWillBeMember<DeprecatedStorageQuota> m_temporaryStorage; | 71 mutable Member<DeprecatedStorageQuota> m_temporaryStorage; |
75 mutable RefPtrWillBeMember<DeprecatedStorageQuota> m_persistentStorage; | 72 mutable Member<DeprecatedStorageQuota> m_persistentStorage; |
76 }; | 73 }; |
77 | 74 |
78 } // namespace WebCore | 75 } // namespace WebCore |
79 | 76 |
80 #endif // DeprecatedStorageInfo_h | 77 #endif // DeprecatedStorageInfo_h |
OLD | NEW |