| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 NativeValueTraits_h | 5 #ifndef NativeValueTraits_h |
| 6 #define NativeValueTraits_h | 6 #define NativeValueTraits_h |
| 7 | 7 |
| 8 #include <type_traits> | 8 #include <type_traits> |
| 9 #include "bindings/core/v8/IDLTypesBase.h" | 9 #include "bindings/core/v8/IDLTypesBase.h" |
| 10 #include "platform/wtf/Allocator.h" |
| 10 #include "v8/include/v8.h" | 11 #include "v8/include/v8.h" |
| 11 #include "wtf/Allocator.h" | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class ExceptionState; | 15 class ExceptionState; |
| 16 | 16 |
| 17 // NativeValueTraitsBase is supposed to be inherited by NativeValueTraits | 17 // NativeValueTraitsBase is supposed to be inherited by NativeValueTraits |
| 18 // classes. They serve as a way to hold the ImplType typedef without requiring | 18 // classes. They serve as a way to hold the ImplType typedef without requiring |
| 19 // all NativeValueTraits specializations to declare it. | 19 // all NativeValueTraits specializations to declare it. |
| 20 // | 20 // |
| 21 // The primary template below is used by NativeValueTraits specializations with | 21 // The primary template below is used by NativeValueTraits specializations with |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // This declaration serves only as a blueprint for specializations: the | 62 // This declaration serves only as a blueprint for specializations: the |
| 63 // return type can change, but all specializations are expected to provide a | 63 // return type can change, but all specializations are expected to provide a |
| 64 // nativeValue() method that takes the 3 arguments below. | 64 // nativeValue() method that takes the 3 arguments below. |
| 65 static inline typename NativeValueTraitsBase<T>::ImplType | 65 static inline typename NativeValueTraitsBase<T>::ImplType |
| 66 nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); | 66 nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| 70 | 70 |
| 71 #endif // NativeValueTraits_h | 71 #endif // NativeValueTraits_h |
| OLD | NEW |