OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl | 9 // third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl |
10 | 10 |
11 // clang-format off | 11 // clang-format off |
12 | 12 |
13 #ifndef VoidCallbackFunction_h | 13 #ifndef VoidCallbackFunction_h |
14 #define VoidCallbackFunction_h | 14 #define VoidCallbackFunction_h |
15 | 15 |
| 16 #include "bindings/core/v8/NativeValueTraits.h" |
16 #include "bindings/core/v8/ScriptWrappable.h" | 17 #include "bindings/core/v8/ScriptWrappable.h" |
17 #include "bindings/core/v8/TraceWrapperV8Reference.h" | 18 #include "bindings/core/v8/TraceWrapperV8Reference.h" |
18 #include "core/CoreExport.h" | 19 #include "core/CoreExport.h" |
19 #include "platform/heap/Handle.h" | 20 #include "platform/heap/Handle.h" |
20 #include "wtf/text/WTFString.h" | 21 #include "wtf/text/WTFString.h" |
21 | 22 |
22 namespace blink { | 23 namespace blink { |
23 | 24 |
24 class ScriptState; | 25 class ScriptState; |
25 | 26 |
(...skipping 12 matching lines...) Expand all Loading... |
38 return m_callback.newLocal(isolate); | 39 return m_callback.newLocal(isolate); |
39 } | 40 } |
40 | 41 |
41 private: | 42 private: |
42 VoidCallbackFunction(ScriptState*, v8::Local<v8::Function>); | 43 VoidCallbackFunction(ScriptState*, v8::Local<v8::Function>); |
43 | 44 |
44 RefPtr<ScriptState> m_scriptState; | 45 RefPtr<ScriptState> m_scriptState; |
45 TraceWrapperV8Reference<v8::Function> m_callback; | 46 TraceWrapperV8Reference<v8::Function> m_callback; |
46 }; | 47 }; |
47 | 48 |
| 49 template <> |
| 50 struct NativeValueTraits<VoidCallbackFunction> { |
| 51 using ImplType = VoidCallbackFunction; |
| 52 CORE_EXPORT static VoidCallbackFunction* nativeValue(v8::Isolate*, v8::Local<v
8::Value>, ExceptionState&); |
| 53 }; |
| 54 |
48 } // namespace blink | 55 } // namespace blink |
49 | 56 |
50 #endif // VoidCallbackFunction_h | 57 #endif // VoidCallbackFunction_h |
OLD | NEW |