Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: Source/wtf/ArrayBuffer.h

Issue 1183763003: Remove ArrayBufferDeallocationObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: s_ prefix Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebKit.cpp ('k') | Source/wtf/ArrayBufferContents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // ranging from |begin| upto but not including |end|. 58 // ranging from |begin| upto but not including |end|.
59 inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const; 59 inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const;
60 inline PassRefPtr<ArrayBuffer> slice(int begin) const; 60 inline PassRefPtr<ArrayBuffer> slice(int begin) const;
61 61
62 void addView(ArrayBufferView*); 62 void addView(ArrayBufferView*);
63 void removeView(ArrayBufferView*); 63 void removeView(ArrayBufferView*);
64 64
65 bool transfer(ArrayBufferContents&); 65 bool transfer(ArrayBufferContents&);
66 bool isNeutered() { return m_isNeutered; } 66 bool isNeutered() { return m_isNeutered; }
67 67
68 void setDeallocationObserver(ArrayBufferDeallocationObserver& observer)
69 {
70 m_contents.setDeallocationObserver(observer);
71 }
72 void setDeallocationObserverWithoutAllocationNotification(ArrayBufferDealloc ationObserver& observer)
73 {
74 m_contents.setDeallocationObserverWithoutAllocationNotification(observer );
75 }
76
77 ~ArrayBuffer() { } 68 ~ArrayBuffer() { }
78 69
79 protected: 70 protected:
80 inline explicit ArrayBuffer(ArrayBufferContents&); 71 inline explicit ArrayBuffer(ArrayBufferContents&);
81 72
82 private: 73 private:
83 static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned elementByteSize, ArrayBufferContents::InitializationPolicy); 74 static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned elementByteSize, ArrayBufferContents::InitializationPolicy);
84 static inline PassRefPtr<ArrayBuffer> createOrNull(unsigned numElements, uns igned elementByteSize, ArrayBufferContents::InitializationPolicy); 75 static inline PassRefPtr<ArrayBuffer> createOrNull(unsigned numElements, uns igned elementByteSize, ArrayBufferContents::InitializationPolicy);
85 76
86 inline PassRefPtr<ArrayBuffer> sliceImpl(unsigned begin, unsigned end) const ; 77 inline PassRefPtr<ArrayBuffer> sliceImpl(unsigned begin, unsigned end) const ;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (index < 0) 185 if (index < 0)
195 index = currentLength + index; 186 index = currentLength + index;
196 return clampValue(index, 0, currentLength); 187 return clampValue(index, 0, currentLength);
197 } 188 }
198 189
199 } // namespace WTF 190 } // namespace WTF
200 191
201 using WTF::ArrayBuffer; 192 using WTF::ArrayBuffer;
202 193
203 #endif // ArrayBuffer_h 194 #endif // ArrayBuffer_h
OLDNEW
« no previous file with comments | « Source/web/WebKit.cpp ('k') | Source/wtf/ArrayBufferContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698