OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 DOMWindowQuota_h | 31 #ifndef DOMWindowQuota_h |
32 #define DOMWindowQuota_h | 32 #define DOMWindowQuota_h |
33 | 33 |
34 #include "core/dom/ContextLifecycleObserver.h" | |
35 #include "platform/Supplementable.h" | 34 #include "platform/Supplementable.h" |
36 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
37 | 36 |
38 namespace blink { | 37 namespace blink { |
39 | 38 |
40 class DeprecatedStorageInfo; | 39 class DeprecatedStorageInfo; |
41 class DOMWindow; | 40 class DOMWindow; |
42 class LocalDOMWindow; | 41 class LocalDOMWindow; |
43 | 42 |
44 class DOMWindowQuota final : public GarbageCollected<DOMWindowQuota>, | 43 class DOMWindowQuota final : public GarbageCollected<DOMWindowQuota>, |
45 public Supplement<LocalDOMWindow>, | 44 public Supplement<LocalDOMWindow> { |
46 public ContextClient { | |
47 USING_GARBAGE_COLLECTED_MIXIN(DOMWindowQuota); | 45 USING_GARBAGE_COLLECTED_MIXIN(DOMWindowQuota); |
48 | 46 |
49 public: | 47 public: |
50 static DOMWindowQuota& from(LocalDOMWindow&); | 48 static DOMWindowQuota& from(LocalDOMWindow&); |
51 static DeprecatedStorageInfo* webkitStorageInfo(DOMWindow&); | 49 static DeprecatedStorageInfo* webkitStorageInfo(DOMWindow&); |
52 DeprecatedStorageInfo* webkitStorageInfo() const; | 50 DeprecatedStorageInfo* webkitStorageInfo() const; |
53 | 51 |
54 DECLARE_TRACE(); | 52 DECLARE_TRACE(); |
55 | 53 |
56 private: | 54 private: |
57 explicit DOMWindowQuota(LocalDOMWindow&); | 55 explicit DOMWindowQuota(LocalDOMWindow&); |
58 static const char* supplementName(); | 56 static const char* supplementName(); |
59 | 57 |
60 mutable Member<DeprecatedStorageInfo> m_storageInfo; | 58 mutable Member<DeprecatedStorageInfo> m_storageInfo; |
61 }; | 59 }; |
62 | 60 |
63 } // namespace blink | 61 } // namespace blink |
64 | 62 |
65 #endif // DOMWindowQuota_h | 63 #endif // DOMWindowQuota_h |
OLD | NEW |