OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GIN_ARRAY_BUFFER_H_ | 5 #ifndef GIN_ARRAY_BUFFER_H_ |
6 #define GIN_ARRAY_BUFFER_H_ | 6 #define GIN_ARRAY_BUFFER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
11 #include "gin/converter.h" | 14 #include "gin/converter.h" |
12 #include "gin/gin_export.h" | 15 #include "gin/gin_export.h" |
13 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
14 | 17 |
15 namespace gin { | 18 namespace gin { |
16 | 19 |
17 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 20 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
18 public: | 21 public: |
19 void* Allocate(size_t length) override; | 22 void* Allocate(size_t length) override; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 74 |
72 template<> | 75 template<> |
73 struct GIN_EXPORT Converter<ArrayBufferView> { | 76 struct GIN_EXPORT Converter<ArrayBufferView> { |
74 static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val, | 77 static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val, |
75 ArrayBufferView* out); | 78 ArrayBufferView* out); |
76 }; | 79 }; |
77 | 80 |
78 } // namespace gin | 81 } // namespace gin |
79 | 82 |
80 #endif // GIN_ARRAY_BUFFER_H_ | 83 #endif // GIN_ARRAY_BUFFER_H_ |
OLD | NEW |