OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DOMArrayBufferDeallocationObserver_h | 5 #ifndef DOMArrayBufferDeallocationObserver_h |
6 #define DOMArrayBufferDeallocationObserver_h | 6 #define DOMArrayBufferDeallocationObserver_h |
7 | 7 |
8 #include "wtf/ArrayBufferDeallocationObserver.h" | 8 #include "wtf/ArrayBufferDeallocationObserver.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class DOMArrayBufferDeallocationObserver final : public WTF::ArrayBufferDealloca
tionObserver { | 12 class DOMArrayBufferDeallocationObserver final : public WTF::ArrayBufferDealloca
tionObserver { |
13 public: | 13 public: |
14 static DOMArrayBufferDeallocationObserver* instance(); | 14 static DOMArrayBufferDeallocationObserver& instance(); |
15 | 15 |
16 virtual void arrayBufferDeallocated(unsigned sizeInBytes) override; | 16 virtual void arrayBufferDeallocated(unsigned sizeInBytes) override; |
17 | 17 |
18 protected: | 18 protected: |
19 virtual void blinkAllocatedMemory(unsigned sizeInBytes) override; | 19 virtual void blinkAllocatedMemory(unsigned sizeInBytes) override; |
20 }; | 20 }; |
21 | 21 |
22 } // namespace blink | 22 } // namespace blink |
23 | 23 |
24 #endif // DOMArrayBufferDeallocationObserver_h | 24 #endif // DOMArrayBufferDeallocationObserver_h |
OLD | NEW |