Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 10 matching lines...) Expand all Loading... | |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 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 StorageQuotaClient_h | 31 #ifndef ListOfElements_h |
| 32 #define StorageQuotaClient_h | 32 #define ListOfElements_h |
| 33 | 33 |
| 34 #include "platform/Supplementable.h" | 34 #include "bindings/core/v8/Dictionary.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "bindings/core/v8/V8StringResource.h" |
| 36 #include "public/platform/WebStorageQuotaType.h" | 36 #include "core/animation/AnimationTestHelper.h" |
| 37 #include "wtf/Forward.h" | 37 #include "core/wawwa/MockAnimationPlayer.h" |
| 38 #include "core/wawwa/ProxyKeyframe.h" | |
| 39 #include "core/wawwa/ProxyPlayer.h" | |
| 40 #include "core/workers/Worker.h" | |
| 41 #include "core/workers/WorkerGlobalScope.h" | |
| 42 #include "wtf/HashMap.h" | |
| 43 #include "wtf/Vector.h" | |
| 44 #include "wtf/text/WTFString.h" | |
| 38 | 45 |
| 39 namespace blink { | 46 namespace blink { |
| 40 | 47 |
| 48 class Dictionary; | |
| 41 class ExecutionContext; | 49 class ExecutionContext; |
| 42 class Page; | 50 class WorkerGlobalScope; |
| 43 class ScriptPromise; | 51 class ExceptionState; |
| 44 class ScriptState; | 52 class MockAnimationPlayer; |
| 45 class StorageErrorCallback; | |
| 46 class StorageQuotaCallback; | |
| 47 | 53 |
| 48 class StorageQuotaClient : public WillBeHeapSupplement<Page> { | 54 class ListOfElements FINAL : public RefCountedWillBeRefCountedGarbageCollected<L istOfElements> { |
| 49 WTF_MAKE_NONCOPYABLE(StorageQuotaClient); | 55 |
| 50 public: | 56 public: |
| 51 StorageQuotaClient() { } | 57 static PassRefPtr<ListOfElements> create() { return adoptRef(new ListOfEleme nts()); } |
|
shans
2014/08/25 11:53:58
We should stick to only Oilpan types - I think thi
| |
| 52 virtual ~StorageQuotaClient() { } | |
| 53 | 58 |
| 54 virtual void requestQuota(ExecutionContext*, blink::WebStorageQuotaType, uns igned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<St orageErrorCallback>) = 0; | 59 Vector<WorkerGlobalScope*> workerGlobalScopeVector; |
| 55 virtual ScriptPromise requestPersistentQuota(ScriptState*, unsigned long lon g newQuotaInBytes) = 0; | 60 void addToWorkerGlobalScopeVector(WorkerGlobalScope * instance); |
| 56 | 61 |
| 57 static const char* supplementName(); | 62 Vector<RefPtr<Worker> > workerVector; |
| 58 static StorageQuotaClient* from(ExecutionContext*); | 63 void addToWorkerVector(PassRefPtr<Worker> instance); |
| 64 | |
| 65 ProxyPlayer* findDictProxyPlayers(String val); | |
| 66 void reportTime(String val, double time); | |
| 67 void addtoMapMockAnimationPlayer(String id, MockAnimationPlayer* instance); | |
| 68 void checkForReport(); | |
| 69 void execute(String action, String id, const Vector<ProxyKeyframe> keyframes , const Timing timingInputDictionary); | |
| 70 | |
| 71 private: | |
| 72 ListOfElements(); | |
| 73 ListOfElements(ListOfElements const&); | |
| 74 void operator=(ListOfElements const&); | |
| 75 HashMap <String, ProxyPlayer*> m_dictProxyPlayers; | |
| 76 HashMap <String, MockAnimationPlayer*> m_dictMockAnimationPlayers; | |
| 77 | |
| 59 }; | 78 }; |
| 60 | 79 |
| 61 void provideStorageQuotaClientTo(Page&, PassOwnPtrWillBeRawPtr<StorageQuotaClien t>); | |
| 62 | |
| 63 } // namespace blink | 80 } // namespace blink |
| 64 | 81 |
| 65 #endif // StorageQuotaClient_h | 82 #endif |
| OLD | NEW |