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 26 matching lines...) Expand all Loading... |
37 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class ExecutionContext; | 41 class ExecutionContext; |
42 class StorageErrorCallback; | 42 class StorageErrorCallback; |
43 class StorageQuotaCallback; | 43 class StorageQuotaCallback; |
44 class StorageUsageCallback; | 44 class StorageUsageCallback; |
45 | 45 |
46 class DeprecatedStorageQuota : public RefCountedWillBeGarbageCollectedFinalized<
DeprecatedStorageQuota>, public ScriptWrappable { | 46 class DeprecatedStorageQuota : public RefCountedWillBeGarbageCollectedFinalized<
DeprecatedStorageQuota>, public ScriptWrappable { |
47 DECLARE_GC_INFO; | |
48 public: | 47 public: |
49 enum Type { | 48 enum Type { |
50 Temporary, | 49 Temporary, |
51 Persistent, | 50 Persistent, |
52 }; | 51 }; |
53 | 52 |
54 static PassRefPtrWillBeRawPtr<DeprecatedStorageQuota> create(Type type) | 53 static PassRefPtrWillBeRawPtr<DeprecatedStorageQuota> create(Type type) |
55 { | 54 { |
56 return adoptRefWillBeNoop(new DeprecatedStorageQuota(type)); | 55 return adoptRefWillBeNoop(new DeprecatedStorageQuota(type)); |
57 } | 56 } |
58 | 57 |
59 void queryUsageAndQuota(ExecutionContext*, PassOwnPtr<StorageUsageCallback>,
PassOwnPtr<StorageErrorCallback>); | 58 void queryUsageAndQuota(ExecutionContext*, PassOwnPtr<StorageUsageCallback>,
PassOwnPtr<StorageErrorCallback>); |
60 | 59 |
61 void requestQuota(ExecutionContext*, unsigned long long newQuotaInBytes, Pas
sOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>); | 60 void requestQuota(ExecutionContext*, unsigned long long newQuotaInBytes, Pas
sOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>); |
62 | 61 |
63 ~DeprecatedStorageQuota(); | 62 ~DeprecatedStorageQuota(); |
64 | 63 |
65 void trace(Visitor*) { } | 64 void trace(Visitor*) { } |
66 | 65 |
67 private: | 66 private: |
68 explicit DeprecatedStorageQuota(Type); | 67 explicit DeprecatedStorageQuota(Type); |
69 Type m_type; | 68 Type m_type; |
70 }; | 69 }; |
71 | 70 |
72 } // namespace WebCore | 71 } // namespace WebCore |
73 | 72 |
74 #endif // DeprecatedStorageQuota_h | 73 #endif // DeprecatedStorageQuota_h |
OLD | NEW |