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=824aed5040e7aee5f9bf2079eafdf6d612b7d2d0$
13 //
14
15 #include "libcef_dll/ctocpp/navigation_entry_ctocpp.h"
16 #include "libcef_dll/ctocpp/sslstatus_ctocpp.h"
17 #include "libcef_dll/shutdown_checker.h"
18
19 // VIRTUAL METHODS - Body may be edited by hand.
20
IsValid()21 NO_SANITIZE("cfi-icall") bool CefNavigationEntryCToCpp::IsValid() {
22 shutdown_checker::AssertNotShutdown();
23
24 cef_navigation_entry_t* _struct = GetStruct();
25 if (CEF_MEMBER_MISSING(_struct, is_valid))
26 return false;
27
28 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
29
30 // Execute
31 int _retval = _struct->is_valid(_struct);
32
33 // Return type: bool
34 return _retval ? true : false;
35 }
36
GetURL()37 NO_SANITIZE("cfi-icall") CefString CefNavigationEntryCToCpp::GetURL() {
38 shutdown_checker::AssertNotShutdown();
39
40 cef_navigation_entry_t* _struct = GetStruct();
41 if (CEF_MEMBER_MISSING(_struct, get_url))
42 return CefString();
43
44 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
45
46 // Execute
47 cef_string_userfree_t _retval = _struct->get_url(_struct);
48
49 // Return type: string
50 CefString _retvalStr;
51 _retvalStr.AttachToUserFree(_retval);
52 return _retvalStr;
53 }
54
GetDisplayURL()55 NO_SANITIZE("cfi-icall") CefString CefNavigationEntryCToCpp::GetDisplayURL() {
56 shutdown_checker::AssertNotShutdown();
57
58 cef_navigation_entry_t* _struct = GetStruct();
59 if (CEF_MEMBER_MISSING(_struct, get_display_url))
60 return CefString();
61
62 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
63
64 // Execute
65 cef_string_userfree_t _retval = _struct->get_display_url(_struct);
66
67 // Return type: string
68 CefString _retvalStr;
69 _retvalStr.AttachToUserFree(_retval);
70 return _retvalStr;
71 }
72
GetOriginalURL()73 NO_SANITIZE("cfi-icall") CefString CefNavigationEntryCToCpp::GetOriginalURL() {
74 shutdown_checker::AssertNotShutdown();
75
76 cef_navigation_entry_t* _struct = GetStruct();
77 if (CEF_MEMBER_MISSING(_struct, get_original_url))
78 return CefString();
79
80 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
81
82 // Execute
83 cef_string_userfree_t _retval = _struct->get_original_url(_struct);
84
85 // Return type: string
86 CefString _retvalStr;
87 _retvalStr.AttachToUserFree(_retval);
88 return _retvalStr;
89 }
90
GetTitle()91 NO_SANITIZE("cfi-icall") CefString CefNavigationEntryCToCpp::GetTitle() {
92 shutdown_checker::AssertNotShutdown();
93
94 cef_navigation_entry_t* _struct = GetStruct();
95 if (CEF_MEMBER_MISSING(_struct, get_title))
96 return CefString();
97
98 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
99
100 // Execute
101 cef_string_userfree_t _retval = _struct->get_title(_struct);
102
103 // Return type: string
104 CefString _retvalStr;
105 _retvalStr.AttachToUserFree(_retval);
106 return _retvalStr;
107 }
108
109 NO_SANITIZE("cfi-icall")
110 CefNavigationEntry::TransitionType
GetTransitionType()111 CefNavigationEntryCToCpp::GetTransitionType() {
112 shutdown_checker::AssertNotShutdown();
113
114 cef_navigation_entry_t* _struct = GetStruct();
115 if (CEF_MEMBER_MISSING(_struct, get_transition_type))
116 return TT_EXPLICIT;
117
118 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
119
120 // Execute
121 cef_transition_type_t _retval = _struct->get_transition_type(_struct);
122
123 // Return type: simple
124 return _retval;
125 }
126
HasPostData()127 NO_SANITIZE("cfi-icall") bool CefNavigationEntryCToCpp::HasPostData() {
128 shutdown_checker::AssertNotShutdown();
129
130 cef_navigation_entry_t* _struct = GetStruct();
131 if (CEF_MEMBER_MISSING(_struct, has_post_data))
132 return false;
133
134 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
135
136 // Execute
137 int _retval = _struct->has_post_data(_struct);
138
139 // Return type: bool
140 return _retval ? true : false;
141 }
142
GetCompletionTime()143 NO_SANITIZE("cfi-icall") CefTime CefNavigationEntryCToCpp::GetCompletionTime() {
144 shutdown_checker::AssertNotShutdown();
145
146 cef_navigation_entry_t* _struct = GetStruct();
147 if (CEF_MEMBER_MISSING(_struct, get_completion_time))
148 return CefTime();
149
150 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
151
152 // Execute
153 cef_time_t _retval = _struct->get_completion_time(_struct);
154
155 // Return type: simple
156 return _retval;
157 }
158
GetHttpStatusCode()159 NO_SANITIZE("cfi-icall") int CefNavigationEntryCToCpp::GetHttpStatusCode() {
160 shutdown_checker::AssertNotShutdown();
161
162 cef_navigation_entry_t* _struct = GetStruct();
163 if (CEF_MEMBER_MISSING(_struct, get_http_status_code))
164 return 0;
165
166 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
167
168 // Execute
169 int _retval = _struct->get_http_status_code(_struct);
170
171 // Return type: simple
172 return _retval;
173 }
174
175 NO_SANITIZE("cfi-icall")
GetSSLStatus()176 CefRefPtr<CefSSLStatus> CefNavigationEntryCToCpp::GetSSLStatus() {
177 shutdown_checker::AssertNotShutdown();
178
179 cef_navigation_entry_t* _struct = GetStruct();
180 if (CEF_MEMBER_MISSING(_struct, get_sslstatus))
181 return nullptr;
182
183 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
184
185 // Execute
186 cef_sslstatus_t* _retval = _struct->get_sslstatus(_struct);
187
188 // Return type: refptr_same
189 return CefSSLStatusCToCpp::Wrap(_retval);
190 }
191
192 // CONSTRUCTOR - Do not edit by hand.
193
CefNavigationEntryCToCpp()194 CefNavigationEntryCToCpp::CefNavigationEntryCToCpp() {}
195
196 // DESTRUCTOR - Do not edit by hand.
197
~CefNavigationEntryCToCpp()198 CefNavigationEntryCToCpp::~CefNavigationEntryCToCpp() {
199 shutdown_checker::AssertNotShutdown();
200 }
201
202 template <>
203 cef_navigation_entry_t* CefCToCppRefCounted<
204 CefNavigationEntryCToCpp,
205 CefNavigationEntry,
UnwrapDerived(CefWrapperType type,CefNavigationEntry * c)206 cef_navigation_entry_t>::UnwrapDerived(CefWrapperType type,
207 CefNavigationEntry* c) {
208 NOTREACHED() << "Unexpected class type: " << type;
209 return nullptr;
210 }
211
212 template <>
213 CefWrapperType CefCToCppRefCounted<CefNavigationEntryCToCpp,
214 CefNavigationEntry,
215 cef_navigation_entry_t>::kWrapperType =
216 WT_NAVIGATION_ENTRY;
217