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

Side by Side Diff: third_party/WebKit/Source/wtf/Uint32Array.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 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 | « third_party/WebKit/Source/wtf/Uint16Array.h ('k') | third_party/WebKit/Source/wtf/Uint8Array.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 * 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 16 matching lines...) Expand all
27 #ifndef Uint32Array_h 27 #ifndef Uint32Array_h
28 #define Uint32Array_h 28 #define Uint32Array_h
29 29
30 #include "wtf/IntegralTypedArrayBase.h" 30 #include "wtf/IntegralTypedArrayBase.h"
31 31
32 namespace WTF { 32 namespace WTF {
33 33
34 class ArrayBuffer; 34 class ArrayBuffer;
35 35
36 class Uint32Array final : public IntegralTypedArrayBase<unsigned> { 36 class Uint32Array final : public IntegralTypedArrayBase<unsigned> {
37 public: 37 public:
38 static inline PassRefPtr<Uint32Array> create(unsigned length); 38 static inline PassRefPtr<Uint32Array> create(unsigned length);
39 static inline PassRefPtr<Uint32Array> create(const unsigned* array, unsigned length); 39 static inline PassRefPtr<Uint32Array> create(const unsigned* array,
40 static inline PassRefPtr<Uint32Array> create(PassRefPtr<ArrayBuffer>, unsign ed byteOffset, unsigned length); 40 unsigned length);
41 static inline PassRefPtr<Uint32Array> create(PassRefPtr<ArrayBuffer>,
42 unsigned byteOffset,
43 unsigned length);
41 44
42 using TypedArrayBase<unsigned>::set; 45 using TypedArrayBase<unsigned>::set;
43 using IntegralTypedArrayBase<unsigned>::set; 46 using IntegralTypedArrayBase<unsigned>::set;
44 47
45 ViewType type() const override 48 ViewType type() const override { return TypeUint32; }
46 {
47 return TypeUint32;
48 }
49 49
50 private: 50 private:
51 inline Uint32Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned le ngth); 51 inline Uint32Array(PassRefPtr<ArrayBuffer>,
52 // Make constructor visible to superclass. 52 unsigned byteOffset,
53 friend class TypedArrayBase<unsigned>; 53 unsigned length);
54 // Make constructor visible to superclass.
55 friend class TypedArrayBase<unsigned>;
54 }; 56 };
55 57
56 PassRefPtr<Uint32Array> Uint32Array::create(unsigned length) 58 PassRefPtr<Uint32Array> Uint32Array::create(unsigned length) {
57 { 59 return TypedArrayBase<unsigned>::create<Uint32Array>(length);
58 return TypedArrayBase<unsigned>::create<Uint32Array>(length);
59 } 60 }
60 61
61 PassRefPtr<Uint32Array> Uint32Array::create(const unsigned* array, unsigned leng th) 62 PassRefPtr<Uint32Array> Uint32Array::create(const unsigned* array,
62 { 63 unsigned length) {
63 return TypedArrayBase<unsigned>::create<Uint32Array>(array, length); 64 return TypedArrayBase<unsigned>::create<Uint32Array>(array, length);
64 } 65 }
65 66
66 PassRefPtr<Uint32Array> Uint32Array::create(PassRefPtr<ArrayBuffer> buffer, unsi gned byteOffset, unsigned length) 67 PassRefPtr<Uint32Array> Uint32Array::create(PassRefPtr<ArrayBuffer> buffer,
67 { 68 unsigned byteOffset,
68 return TypedArrayBase<unsigned>::create<Uint32Array>(buffer, byteOffset, len gth); 69 unsigned length) {
70 return TypedArrayBase<unsigned>::create<Uint32Array>(buffer, byteOffset,
71 length);
69 } 72 }
70 73
71 Uint32Array::Uint32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, un signed length) 74 Uint32Array::Uint32Array(PassRefPtr<ArrayBuffer> buffer,
72 : IntegralTypedArrayBase<unsigned>(buffer, byteOffset, length) 75 unsigned byteOffset,
73 { 76 unsigned length)
74 } 77 : IntegralTypedArrayBase<unsigned>(buffer, byteOffset, length) {}
75 78
76 } // namespace WTF 79 } // namespace WTF
77 80
78 using WTF::Uint32Array; 81 using WTF::Uint32Array;
79 82
80 #endif // Uint32Array_h 83 #endif // Uint32Array_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Uint16Array.h ('k') | third_party/WebKit/Source/wtf/Uint8Array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698