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

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

Issue 1180713004: Remove unused code from WTF TypedArrays (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/wtf/ArrayBufferView.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 28 matching lines...) Expand all
39 39
40 class WTF_EXPORT ArrayBuffer : public RefCounted<ArrayBuffer> { 40 class WTF_EXPORT ArrayBuffer : public RefCounted<ArrayBuffer> {
41 public: 41 public:
42 static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned elementByteSize); 42 static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned elementByteSize);
43 static inline PassRefPtr<ArrayBuffer> create(ArrayBuffer*); 43 static inline PassRefPtr<ArrayBuffer> create(ArrayBuffer*);
44 static inline PassRefPtr<ArrayBuffer> create(const void* source, unsigned by teLength); 44 static inline PassRefPtr<ArrayBuffer> create(const void* source, unsigned by teLength);
45 static inline PassRefPtr<ArrayBuffer> create(ArrayBufferContents&); 45 static inline PassRefPtr<ArrayBuffer> create(ArrayBufferContents&);
46 46
47 static inline PassRefPtr<ArrayBuffer> createOrNull(unsigned numElements, uns igned elementByteSize); 47 static inline PassRefPtr<ArrayBuffer> createOrNull(unsigned numElements, uns igned elementByteSize);
48 48
49 // Only for use by Uint8ClampedArray::createUninitialized, 49 // Only for use by XMLHttpRequest::responseArrayBuffer and Internals::serial izeObject
50 // XMLHttpRequest::responseArrayBuffer and Internals::serializeObject
51 // (through DOMArrayBuffer::createUninitialized). 50 // (through DOMArrayBuffer::createUninitialized).
52 static inline PassRefPtr<ArrayBuffer> createUninitialized(unsigned numElemen ts, unsigned elementByteSize); 51 static inline PassRefPtr<ArrayBuffer> createUninitialized(unsigned numElemen ts, unsigned elementByteSize);
53 52
54 inline void* data(); 53 inline void* data();
55 inline const void* data() const; 54 inline const void* data() const;
56 inline unsigned byteLength() const; 55 inline unsigned byteLength() const;
57 56
58 // Creates a new ArrayBuffer object with copy of bytes in this object 57 // Creates a new ArrayBuffer object with copy of bytes in this object
59 // ranging from |begin| upto but not including |end|. 58 // ranging from |begin| upto but not including |end|.
60 inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const; 59 inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (index < 0) 194 if (index < 0)
196 index = currentLength + index; 195 index = currentLength + index;
197 return clampValue(index, 0, currentLength); 196 return clampValue(index, 0, currentLength);
198 } 197 }
199 198
200 } // namespace WTF 199 } // namespace WTF
201 200
202 using WTF::ArrayBuffer; 201 using WTF::ArrayBuffer;
203 202
204 #endif // ArrayBuffer_h 203 #endif // ArrayBuffer_h
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/ArrayBufferView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698