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
3 // found in the LICENSE file.
4 
5 // This file has been auto-generated from the Jinja2 template
6 // third_party/blink/renderer/bindings/templates/dictionary_v8.h.tmpl
7 // by the script code_generator_v8.py.
8 // DO NOT MODIFY!
9 
10 // clang-format off
11 #ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_TESTS_RESULTS_CORE_V8_TEST_DICTIONARY_H_
12 #define THIRD_PARTY_BLINK_RENDERER_BINDINGS_TESTS_RESULTS_CORE_V8_TEST_DICTIONARY_H_
13 
14 #include "base/containers/span.h"
15 #include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
16 #include "third_party/blink/renderer/bindings/core/v8/to_v8_for_core.h"
17 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
18 #include "third_party/blink/renderer/bindings/tests/idls/core/test_dictionary.h"
19 #include "third_party/blink/renderer/core/core_export.h"
20 #include "third_party/blink/renderer/platform/heap/handle.h"
21 
22 namespace blink {
23 
24 class ExceptionState;
25 
26 class V8TestDictionary {
27  public:
28   CORE_EXPORT static void ToImpl(v8::Isolate*, v8::Local<v8::Value>, TestDictionary* impl, ExceptionState&);
29 };
30 
31 CORE_EXPORT bool toV8TestDictionary(const TestDictionary*, v8::Local<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate*);
32 
33 template <class CallbackInfo>
V8SetReturnValue(const CallbackInfo & callbackInfo,TestDictionary * impl)34 inline void V8SetReturnValue(const CallbackInfo& callbackInfo, TestDictionary* impl) {
35   V8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
36 }
37 
38 template <class CallbackInfo>
V8SetReturnValue(const CallbackInfo & callbackInfo,TestDictionary * impl,v8::Local<v8::Object> creationContext)39 inline void V8SetReturnValue(const CallbackInfo& callbackInfo, TestDictionary* impl, v8::Local<v8::Object> creationContext) {
40   V8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIsolate()));
41 }
42 
43 template <>
44 struct NativeValueTraits<TestDictionary> : public NativeValueTraitsBase<TestDictionary*> {
45   CORE_EXPORT static TestDictionary* NativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
46 };
47 
48 template <>
49 struct V8TypeOf<TestDictionary> {
50   typedef V8TestDictionary Type;
51 };
52 
53 }  // namespace blink
54 
55 #endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_TESTS_RESULTS_CORE_V8_TEST_DICTIONARY_H_
56