OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef ArrayBuffer_h | 26 #ifndef ArrayBuffer_h |
27 #define ArrayBuffer_h | 27 #define ArrayBuffer_h |
28 | 28 |
29 #include "wtf/ArrayBufferContents.h" | 29 #include "wtf/ArrayBufferContents.h" |
30 #include "wtf/HashSet.h" | 30 #include "wtf/HashSet.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
33 #include "wtf/Vector.h" | |
34 #include "wtf/WTFExport.h" | 33 #include "wtf/WTFExport.h" |
35 | 34 |
36 namespace WTF { | 35 namespace WTF { |
37 | 36 |
38 class ArrayBuffer; | 37 class ArrayBuffer; |
39 class ArrayBufferView; | 38 class ArrayBufferView; |
40 | 39 |
41 class WTF_EXPORT ArrayBuffer : public RefCounted<ArrayBuffer> { | 40 class WTF_EXPORT ArrayBuffer : public RefCounted<ArrayBuffer> { |
42 public: | 41 public: |
43 static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned
elementByteSize); | 42 static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned
elementByteSize); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 if (index < 0) | 170 if (index < 0) |
172 index = currentLength + index; | 171 index = currentLength + index; |
173 return clampValue(index, 0, currentLength); | 172 return clampValue(index, 0, currentLength); |
174 } | 173 } |
175 | 174 |
176 } // namespace WTF | 175 } // namespace WTF |
177 | 176 |
178 using WTF::ArrayBuffer; | 177 using WTF::ArrayBuffer; |
179 | 178 |
180 #endif // ArrayBuffer_h | 179 #endif // ArrayBuffer_h |
OLD | NEW |