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 DOMTypedArray_h | 5 #ifndef DOMTypedArray_h |
6 #define DOMTypedArray_h | 6 #define DOMTypedArray_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/dom/DOMArrayBufferView.h" | 9 #include "core/dom/DOMArrayBufferView.h" |
10 #include "core/dom/DOMSharedArrayBuffer.h" | 10 #include "core/dom/DOMSharedArrayBuffer.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 unsigned length() const { return View()->length(); } | 72 unsigned length() const { return View()->length(); } |
73 // Invoked by the indexed getter. Does not perform range checks; caller | 73 // Invoked by the indexed getter. Does not perform range checks; caller |
74 // is responsible for doing so and returning undefined as necessary. | 74 // is responsible for doing so and returning undefined as necessary. |
75 ValueType Item(unsigned index) const { return View()->Item(index); } | 75 ValueType Item(unsigned index) const { return View()->Item(index); } |
76 | 76 |
77 v8::Local<v8::Object> Wrap(v8::Isolate*, | 77 v8::Local<v8::Object> Wrap(v8::Isolate*, |
78 v8::Local<v8::Object> creation_context) override; | 78 v8::Local<v8::Object> creation_context) override; |
79 | 79 |
80 private: | 80 private: |
81 explicit DOMTypedArray(PassRefPtr<WTFTypedArray> buffer_view) | 81 explicit DOMTypedArray(PassRefPtr<WTFTypedArray> buffer_view) |
82 : DOMArrayBufferView(buffer_view) {} | 82 : DOMArrayBufferView(std::move(buffer_view)) {} |
83 DOMTypedArray(PassRefPtr<WTFTypedArray> buffer_view, | 83 DOMTypedArray(PassRefPtr<WTFTypedArray> buffer_view, |
84 DOMArrayBufferBase* dom_array_buffer) | 84 DOMArrayBufferBase* dom_array_buffer) |
85 : DOMArrayBufferView(buffer_view, dom_array_buffer) {} | 85 : DOMArrayBufferView(std::move(buffer_view), dom_array_buffer) {} |
86 }; | 86 }; |
87 | 87 |
88 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 88 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
89 DOMTypedArray<WTF::Int8Array, v8::Int8Array>; | 89 DOMTypedArray<WTF::Int8Array, v8::Int8Array>; |
90 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 90 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
91 DOMTypedArray<WTF::Int16Array, v8::Int16Array>; | 91 DOMTypedArray<WTF::Int16Array, v8::Int16Array>; |
92 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 92 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
93 DOMTypedArray<WTF::Int32Array, v8::Int32Array>; | 93 DOMTypedArray<WTF::Int32Array, v8::Int32Array>; |
94 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 94 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
95 DOMTypedArray<WTF::Uint8Array, v8::Uint8Array>; | 95 DOMTypedArray<WTF::Uint8Array, v8::Uint8Array>; |
(...skipping 15 matching lines...) Expand all Loading... |
111 typedef DOMTypedArray<WTF::Uint8ClampedArray, v8::Uint8ClampedArray> | 111 typedef DOMTypedArray<WTF::Uint8ClampedArray, v8::Uint8ClampedArray> |
112 DOMUint8ClampedArray; | 112 DOMUint8ClampedArray; |
113 typedef DOMTypedArray<WTF::Uint16Array, v8::Uint16Array> DOMUint16Array; | 113 typedef DOMTypedArray<WTF::Uint16Array, v8::Uint16Array> DOMUint16Array; |
114 typedef DOMTypedArray<WTF::Uint32Array, v8::Uint32Array> DOMUint32Array; | 114 typedef DOMTypedArray<WTF::Uint32Array, v8::Uint32Array> DOMUint32Array; |
115 typedef DOMTypedArray<WTF::Float32Array, v8::Float32Array> DOMFloat32Array; | 115 typedef DOMTypedArray<WTF::Float32Array, v8::Float32Array> DOMFloat32Array; |
116 typedef DOMTypedArray<WTF::Float64Array, v8::Float64Array> DOMFloat64Array; | 116 typedef DOMTypedArray<WTF::Float64Array, v8::Float64Array> DOMFloat64Array; |
117 | 117 |
118 } // namespace blink | 118 } // namespace blink |
119 | 119 |
120 #endif // DOMTypedArray_h | 120 #endif // DOMTypedArray_h |
OLD | NEW |