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 21 matching lines...) Expand all Loading... |
32 #define WorkerNavigatorStorageQuota_h | 32 #define WorkerNavigatorStorageQuota_h |
33 | 33 |
34 #include "core/frame/DOMWindowProperty.h" | 34 #include "core/frame/DOMWindowProperty.h" |
35 #include "core/workers/WorkerNavigator.h" | 35 #include "core/workers/WorkerNavigator.h" |
36 #include "modules/quota/DeprecatedStorageQuota.h" | 36 #include "modules/quota/DeprecatedStorageQuota.h" |
37 #include "platform/Supplementable.h" | 37 #include "platform/Supplementable.h" |
38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
| 42 class StorageManager; |
| 43 |
42 class WorkerNavigatorStorageQuota final : public GarbageCollected<WorkerNavigato
rStorageQuota>, public HeapSupplement<WorkerNavigator> { | 44 class WorkerNavigatorStorageQuota final : public GarbageCollected<WorkerNavigato
rStorageQuota>, public HeapSupplement<WorkerNavigator> { |
43 USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorStorageQuota); | 45 USING_GARBAGE_COLLECTED_MIXIN(WorkerNavigatorStorageQuota); |
44 public: | 46 public: |
45 static WorkerNavigatorStorageQuota& from(WorkerNavigator&); | 47 static WorkerNavigatorStorageQuota& from(WorkerNavigator&); |
46 | 48 |
47 static DeprecatedStorageQuota* webkitTemporaryStorage(WorkerNavigator&); | 49 static DeprecatedStorageQuota* webkitTemporaryStorage(WorkerNavigator&); |
48 static DeprecatedStorageQuota* webkitPersistentStorage(WorkerNavigator&); | 50 static DeprecatedStorageQuota* webkitPersistentStorage(WorkerNavigator&); |
| 51 static StorageManager* storage(WorkerNavigator&); |
| 52 |
49 DeprecatedStorageQuota* webkitTemporaryStorage() const; | 53 DeprecatedStorageQuota* webkitTemporaryStorage() const; |
50 DeprecatedStorageQuota* webkitPersistentStorage() const; | 54 DeprecatedStorageQuota* webkitPersistentStorage() const; |
| 55 StorageManager* storage() const; |
51 | 56 |
52 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
53 | 58 |
54 private: | 59 private: |
55 explicit WorkerNavigatorStorageQuota(); | 60 explicit WorkerNavigatorStorageQuota(); |
56 static const char* supplementName(); | 61 static const char* supplementName(); |
57 | 62 |
58 mutable Member<DeprecatedStorageQuota> m_temporaryStorage; | 63 mutable Member<DeprecatedStorageQuota> m_temporaryStorage; |
59 mutable Member<DeprecatedStorageQuota> m_persistentStorage; | 64 mutable Member<DeprecatedStorageQuota> m_persistentStorage; |
| 65 mutable Member<StorageManager> m_storageManager; |
60 }; | 66 }; |
61 | 67 |
62 } // namespace blink | 68 } // namespace blink |
63 | 69 |
64 #endif // WorkerNavigatorStorageQuota_h | 70 #endif // WorkerNavigatorStorageQuota_h |
OLD | NEW |