1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 // 5 // --------------------------------------------------------------------------- 6 // 7 // This file was generated by the CEF translator tool. If making changes by 8 // hand only do so within the body of existing method and function 9 // implementations. See the translator.README.txt file in the tools directory 10 // for more information. 11 // 12 // $hash=bcf0ccd2d4220eaa8f31b1f4f9b64440f81f563e$ 13 // 14 15 #include "libcef_dll/cpptoc/v8stack_frame_cpptoc.h" 16 17 namespace { 18 19 // MEMBER FUNCTIONS - Body may be edited by hand. 20 v8stack_frame_is_valid(struct _cef_v8stack_frame_t * self)21int CEF_CALLBACK v8stack_frame_is_valid(struct _cef_v8stack_frame_t* self) { 22 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 24 DCHECK(self); 25 if (!self) 26 return 0; 27 28 // Execute 29 bool _retval = CefV8StackFrameCppToC::Get(self)->IsValid(); 30 31 // Return type: bool 32 return _retval; 33 } 34 35 cef_string_userfree_t CEF_CALLBACK v8stack_frame_get_script_name(struct _cef_v8stack_frame_t * self)36v8stack_frame_get_script_name(struct _cef_v8stack_frame_t* self) { 37 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 38 39 DCHECK(self); 40 if (!self) 41 return NULL; 42 43 // Execute 44 CefString _retval = CefV8StackFrameCppToC::Get(self)->GetScriptName(); 45 46 // Return type: string 47 return _retval.DetachToUserFree(); 48 } 49 50 cef_string_userfree_t CEF_CALLBACK v8stack_frame_get_script_name_or_source_url(struct _cef_v8stack_frame_t * self)51v8stack_frame_get_script_name_or_source_url(struct _cef_v8stack_frame_t* self) { 52 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 53 54 DCHECK(self); 55 if (!self) 56 return NULL; 57 58 // Execute 59 CefString _retval = 60 CefV8StackFrameCppToC::Get(self)->GetScriptNameOrSourceURL(); 61 62 // Return type: string 63 return _retval.DetachToUserFree(); 64 } 65 66 cef_string_userfree_t CEF_CALLBACK v8stack_frame_get_function_name(struct _cef_v8stack_frame_t * self)67v8stack_frame_get_function_name(struct _cef_v8stack_frame_t* self) { 68 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 69 70 DCHECK(self); 71 if (!self) 72 return NULL; 73 74 // Execute 75 CefString _retval = CefV8StackFrameCppToC::Get(self)->GetFunctionName(); 76 77 // Return type: string 78 return _retval.DetachToUserFree(); 79 } 80 81 int CEF_CALLBACK v8stack_frame_get_line_number(struct _cef_v8stack_frame_t * self)82v8stack_frame_get_line_number(struct _cef_v8stack_frame_t* self) { 83 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 84 85 DCHECK(self); 86 if (!self) 87 return 0; 88 89 // Execute 90 int _retval = CefV8StackFrameCppToC::Get(self)->GetLineNumber(); 91 92 // Return type: simple 93 return _retval; 94 } 95 v8stack_frame_get_column(struct _cef_v8stack_frame_t * self)96int CEF_CALLBACK v8stack_frame_get_column(struct _cef_v8stack_frame_t* self) { 97 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 98 99 DCHECK(self); 100 if (!self) 101 return 0; 102 103 // Execute 104 int _retval = CefV8StackFrameCppToC::Get(self)->GetColumn(); 105 106 // Return type: simple 107 return _retval; 108 } 109 v8stack_frame_is_eval(struct _cef_v8stack_frame_t * self)110int CEF_CALLBACK v8stack_frame_is_eval(struct _cef_v8stack_frame_t* self) { 111 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 112 113 DCHECK(self); 114 if (!self) 115 return 0; 116 117 // Execute 118 bool _retval = CefV8StackFrameCppToC::Get(self)->IsEval(); 119 120 // Return type: bool 121 return _retval; 122 } 123 124 int CEF_CALLBACK v8stack_frame_is_constructor(struct _cef_v8stack_frame_t * self)125v8stack_frame_is_constructor(struct _cef_v8stack_frame_t* self) { 126 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 127 128 DCHECK(self); 129 if (!self) 130 return 0; 131 132 // Execute 133 bool _retval = CefV8StackFrameCppToC::Get(self)->IsConstructor(); 134 135 // Return type: bool 136 return _retval; 137 } 138 139 } // namespace 140 141 // CONSTRUCTOR - Do not edit by hand. 142 CefV8StackFrameCppToC()143CefV8StackFrameCppToC::CefV8StackFrameCppToC() { 144 GetStruct()->is_valid = v8stack_frame_is_valid; 145 GetStruct()->get_script_name = v8stack_frame_get_script_name; 146 GetStruct()->get_script_name_or_source_url = 147 v8stack_frame_get_script_name_or_source_url; 148 GetStruct()->get_function_name = v8stack_frame_get_function_name; 149 GetStruct()->get_line_number = v8stack_frame_get_line_number; 150 GetStruct()->get_column = v8stack_frame_get_column; 151 GetStruct()->is_eval = v8stack_frame_is_eval; 152 GetStruct()->is_constructor = v8stack_frame_is_constructor; 153 } 154 155 // DESTRUCTOR - Do not edit by hand. 156 ~CefV8StackFrameCppToC()157CefV8StackFrameCppToC::~CefV8StackFrameCppToC() {} 158 159 template <> 160 CefRefPtr<CefV8StackFrame> CefCppToCRefCounted< 161 CefV8StackFrameCppToC, 162 CefV8StackFrame, UnwrapDerived(CefWrapperType type,cef_v8stack_frame_t * s)163 cef_v8stack_frame_t>::UnwrapDerived(CefWrapperType type, 164 cef_v8stack_frame_t* s) { 165 NOTREACHED() << "Unexpected class type: " << type; 166 return nullptr; 167 } 168 169 template <> 170 CefWrapperType CefCppToCRefCounted<CefV8StackFrameCppToC, 171 CefV8StackFrame, 172 cef_v8stack_frame_t>::kWrapperType = 173 WT_V8STACK_FRAME; 174