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 DOMArrayBuffer_h | 5 #ifndef DOMArrayBuffer_h |
6 #define DOMArrayBuffer_h | 6 #define DOMArrayBuffer_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/dom/DOMArrayBufferDeallocationObserver.h" | 10 #include "core/dom/DOMArrayBufferDeallocationObserver.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 { | 54 { |
55 return create(buffer()->slice(begin)); | 55 return create(buffer()->slice(begin)); |
56 } | 56 } |
57 bool transfer(WTF::ArrayBufferContents& result) { return buffer()->transfer(
result); } | 57 bool transfer(WTF::ArrayBufferContents& result) { return buffer()->transfer(
result); } |
58 bool isNeutered() { return buffer()->isNeutered(); } | 58 bool isNeutered() { return buffer()->isNeutered(); } |
59 void setDeallocationObserver(DOMArrayBufferDeallocationObserver& observer) | 59 void setDeallocationObserver(DOMArrayBufferDeallocationObserver& observer) |
60 { | 60 { |
61 buffer()->setDeallocationObserver(observer); | 61 buffer()->setDeallocationObserver(observer); |
62 } | 62 } |
63 | 63 |
64 virtual v8::Local<v8::Object> wrap(v8::Local<v8::Object> creationContext, v8
::Isolate*) override; | 64 virtual v8::Local<v8::Object> wrap(v8::Isolate*, v8::Local<v8::Object> creat
ionContext) override; |
65 virtual v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const Wrapp
erTypeInfo*, v8::Local<v8::Object> wrapper) override; | 65 virtual v8::Local<v8::Object> associateWithWrapper(v8::Isolate*, const Wrapp
erTypeInfo*, v8::Local<v8::Object> wrapper) override; |
66 | 66 |
67 private: | 67 private: |
68 explicit DOMArrayBuffer(PassRefPtr<WTF::ArrayBuffer> buffer) | 68 explicit DOMArrayBuffer(PassRefPtr<WTF::ArrayBuffer> buffer) |
69 : m_buffer(buffer) | 69 : m_buffer(buffer) |
70 { | 70 { |
71 ASSERT(m_buffer); | 71 ASSERT(m_buffer); |
72 } | 72 } |
73 | 73 |
74 RefPtr<WTF::ArrayBuffer> m_buffer; | 74 RefPtr<WTF::ArrayBuffer> m_buffer; |
75 }; | 75 }; |
76 | 76 |
77 } // namespace blink | 77 } // namespace blink |
78 | 78 |
79 #endif // DOMArrayBuffer_h | 79 #endif // DOMArrayBuffer_h |
OLD | NEW |