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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // ranging from |begin| upto but not including |end|. | 59 // ranging from |begin| upto but not including |end|. |
60 inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const; | 60 inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const; |
61 inline PassRefPtr<ArrayBuffer> slice(int begin) const; | 61 inline PassRefPtr<ArrayBuffer> slice(int begin) const; |
62 | 62 |
63 void addView(ArrayBufferView*); | 63 void addView(ArrayBufferView*); |
64 void removeView(ArrayBufferView*); | 64 void removeView(ArrayBufferView*); |
65 | 65 |
66 bool transfer(ArrayBufferContents&); | 66 bool transfer(ArrayBufferContents&); |
67 bool isNeutered() { return m_isNeutered; } | 67 bool isNeutered() { return m_isNeutered; } |
68 | 68 |
69 void setDeallocationObserver(ArrayBufferDeallocationObserver* observer) | 69 void setDeallocationObserver(ArrayBufferDeallocationObserver& observer) |
70 { | 70 { |
71 m_contents.setDeallocationObserver(observer); | 71 m_contents.setDeallocationObserver(observer); |
72 } | 72 } |
73 void setDeallocationObserverWithoutAllocationNotification(ArrayBufferDealloc
ationObserver* observer) | 73 void setDeallocationObserverWithoutAllocationNotification(ArrayBufferDealloc
ationObserver& observer) |
74 { | 74 { |
75 m_contents.setDeallocationObserverWithoutAllocationNotification(observer
); | 75 m_contents.setDeallocationObserverWithoutAllocationNotification(observer
); |
76 } | 76 } |
77 | 77 |
78 ~ArrayBuffer() { } | 78 ~ArrayBuffer() { } |
79 | 79 |
80 protected: | 80 protected: |
81 inline explicit ArrayBuffer(ArrayBufferContents&); | 81 inline explicit ArrayBuffer(ArrayBufferContents&); |
82 | 82 |
83 private: | 83 private: |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 if (index < 0) | 195 if (index < 0) |
196 index = currentLength + index; | 196 index = currentLength + index; |
197 return clampValue(index, 0, currentLength); | 197 return clampValue(index, 0, currentLength); |
198 } | 198 } |
199 | 199 |
200 } // namespace WTF | 200 } // namespace WTF |
201 | 201 |
202 using WTF::ArrayBuffer; | 202 using WTF::ArrayBuffer; |
203 | 203 |
204 #endif // ArrayBuffer_h | 204 #endif // ArrayBuffer_h |
OLD | NEW |