OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 class Uint8Array : public IntegralTypedArrayBase<unsigned char> { | 36 class Uint8Array : public IntegralTypedArrayBase<unsigned char> { |
37 public: | 37 public: |
38 static inline PassRefPtr<Uint8Array> create(unsigned length); | 38 static inline PassRefPtr<Uint8Array> create(unsigned length); |
39 static inline PassRefPtr<Uint8Array> create(const unsigned char* array, unsi
gned length); | 39 static inline PassRefPtr<Uint8Array> create(const unsigned char* array, unsi
gned length); |
40 static inline PassRefPtr<Uint8Array> create(PassRefPtr<ArrayBuffer>, unsigne
d byteOffset, unsigned length); | 40 static inline PassRefPtr<Uint8Array> create(PassRefPtr<ArrayBuffer>, unsigne
d byteOffset, unsigned length); |
41 | 41 |
42 using TypedArrayBase<unsigned char>::set; | 42 using TypedArrayBase<unsigned char>::set; |
43 using IntegralTypedArrayBase<unsigned char>::set; | 43 using IntegralTypedArrayBase<unsigned char>::set; |
44 | 44 |
45 virtual ViewType type() const override | 45 ViewType type() const override |
46 { | 46 { |
47 return TypeUint8; | 47 return TypeUint8; |
48 } | 48 } |
49 | 49 |
50 protected: | 50 protected: |
51 inline Uint8Array(PassRefPtr<ArrayBuffer>, | 51 inline Uint8Array(PassRefPtr<ArrayBuffer>, |
52 unsigned byteOffset, | 52 unsigned byteOffset, |
53 unsigned length); | 53 unsigned length); |
54 // Make constructor visible to superclass. | 54 // Make constructor visible to superclass. |
55 friend class TypedArrayBase<unsigned char>; | 55 friend class TypedArrayBase<unsigned char>; |
(...skipping 17 matching lines...) Expand all Loading... |
73 Uint8Array::Uint8Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsi
gned length) | 73 Uint8Array::Uint8Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsi
gned length) |
74 : IntegralTypedArrayBase<unsigned char>(buffer, byteOffset, length) | 74 : IntegralTypedArrayBase<unsigned char>(buffer, byteOffset, length) |
75 { | 75 { |
76 } | 76 } |
77 | 77 |
78 } // namespace WTF | 78 } // namespace WTF |
79 | 79 |
80 using WTF::Uint8Array; | 80 using WTF::Uint8Array; |
81 | 81 |
82 #endif // Uint8Array_h | 82 #endif // Uint8Array_h |
OLD | NEW |