• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=081579d10d7dd1ad8906d54350c2b63f97930fd2$
13 //
14 
15 #include "libcef_dll/cpptoc/navigation_entry_cpptoc.h"
16 #include "libcef_dll/cpptoc/sslstatus_cpptoc.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 namespace {
20 
21 // MEMBER FUNCTIONS - Body may be edited by hand.
22 
23 int CEF_CALLBACK
navigation_entry_is_valid(struct _cef_navigation_entry_t * self)24 navigation_entry_is_valid(struct _cef_navigation_entry_t* self) {
25   shutdown_checker::AssertNotShutdown();
26 
27   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
28 
29   DCHECK(self);
30   if (!self)
31     return 0;
32 
33   // Execute
34   bool _retval = CefNavigationEntryCppToC::Get(self)->IsValid();
35 
36   // Return type: bool
37   return _retval;
38 }
39 
40 cef_string_userfree_t CEF_CALLBACK
navigation_entry_get_url(struct _cef_navigation_entry_t * self)41 navigation_entry_get_url(struct _cef_navigation_entry_t* self) {
42   shutdown_checker::AssertNotShutdown();
43 
44   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
45 
46   DCHECK(self);
47   if (!self)
48     return NULL;
49 
50   // Execute
51   CefString _retval = CefNavigationEntryCppToC::Get(self)->GetURL();
52 
53   // Return type: string
54   return _retval.DetachToUserFree();
55 }
56 
57 cef_string_userfree_t CEF_CALLBACK
navigation_entry_get_display_url(struct _cef_navigation_entry_t * self)58 navigation_entry_get_display_url(struct _cef_navigation_entry_t* self) {
59   shutdown_checker::AssertNotShutdown();
60 
61   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
62 
63   DCHECK(self);
64   if (!self)
65     return NULL;
66 
67   // Execute
68   CefString _retval = CefNavigationEntryCppToC::Get(self)->GetDisplayURL();
69 
70   // Return type: string
71   return _retval.DetachToUserFree();
72 }
73 
74 cef_string_userfree_t CEF_CALLBACK
navigation_entry_get_original_url(struct _cef_navigation_entry_t * self)75 navigation_entry_get_original_url(struct _cef_navigation_entry_t* self) {
76   shutdown_checker::AssertNotShutdown();
77 
78   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
79 
80   DCHECK(self);
81   if (!self)
82     return NULL;
83 
84   // Execute
85   CefString _retval = CefNavigationEntryCppToC::Get(self)->GetOriginalURL();
86 
87   // Return type: string
88   return _retval.DetachToUserFree();
89 }
90 
91 cef_string_userfree_t CEF_CALLBACK
navigation_entry_get_title(struct _cef_navigation_entry_t * self)92 navigation_entry_get_title(struct _cef_navigation_entry_t* self) {
93   shutdown_checker::AssertNotShutdown();
94 
95   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
96 
97   DCHECK(self);
98   if (!self)
99     return NULL;
100 
101   // Execute
102   CefString _retval = CefNavigationEntryCppToC::Get(self)->GetTitle();
103 
104   // Return type: string
105   return _retval.DetachToUserFree();
106 }
107 
108 cef_transition_type_t CEF_CALLBACK
navigation_entry_get_transition_type(struct _cef_navigation_entry_t * self)109 navigation_entry_get_transition_type(struct _cef_navigation_entry_t* self) {
110   shutdown_checker::AssertNotShutdown();
111 
112   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
113 
114   DCHECK(self);
115   if (!self)
116     return TT_EXPLICIT;
117 
118   // Execute
119   cef_transition_type_t _retval =
120       CefNavigationEntryCppToC::Get(self)->GetTransitionType();
121 
122   // Return type: simple
123   return _retval;
124 }
125 
126 int CEF_CALLBACK
navigation_entry_has_post_data(struct _cef_navigation_entry_t * self)127 navigation_entry_has_post_data(struct _cef_navigation_entry_t* self) {
128   shutdown_checker::AssertNotShutdown();
129 
130   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
131 
132   DCHECK(self);
133   if (!self)
134     return 0;
135 
136   // Execute
137   bool _retval = CefNavigationEntryCppToC::Get(self)->HasPostData();
138 
139   // Return type: bool
140   return _retval;
141 }
142 
143 cef_time_t CEF_CALLBACK
navigation_entry_get_completion_time(struct _cef_navigation_entry_t * self)144 navigation_entry_get_completion_time(struct _cef_navigation_entry_t* self) {
145   shutdown_checker::AssertNotShutdown();
146 
147   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
148 
149   DCHECK(self);
150   if (!self)
151     return CefTime();
152 
153   // Execute
154   cef_time_t _retval = CefNavigationEntryCppToC::Get(self)->GetCompletionTime();
155 
156   // Return type: simple
157   return _retval;
158 }
159 
160 int CEF_CALLBACK
navigation_entry_get_http_status_code(struct _cef_navigation_entry_t * self)161 navigation_entry_get_http_status_code(struct _cef_navigation_entry_t* self) {
162   shutdown_checker::AssertNotShutdown();
163 
164   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
165 
166   DCHECK(self);
167   if (!self)
168     return 0;
169 
170   // Execute
171   int _retval = CefNavigationEntryCppToC::Get(self)->GetHttpStatusCode();
172 
173   // Return type: simple
174   return _retval;
175 }
176 
177 struct _cef_sslstatus_t* CEF_CALLBACK
navigation_entry_get_sslstatus(struct _cef_navigation_entry_t * self)178 navigation_entry_get_sslstatus(struct _cef_navigation_entry_t* self) {
179   shutdown_checker::AssertNotShutdown();
180 
181   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
182 
183   DCHECK(self);
184   if (!self)
185     return NULL;
186 
187   // Execute
188   CefRefPtr<CefSSLStatus> _retval =
189       CefNavigationEntryCppToC::Get(self)->GetSSLStatus();
190 
191   // Return type: refptr_same
192   return CefSSLStatusCppToC::Wrap(_retval);
193 }
194 
195 }  // namespace
196 
197 // CONSTRUCTOR - Do not edit by hand.
198 
CefNavigationEntryCppToC()199 CefNavigationEntryCppToC::CefNavigationEntryCppToC() {
200   GetStruct()->is_valid = navigation_entry_is_valid;
201   GetStruct()->get_url = navigation_entry_get_url;
202   GetStruct()->get_display_url = navigation_entry_get_display_url;
203   GetStruct()->get_original_url = navigation_entry_get_original_url;
204   GetStruct()->get_title = navigation_entry_get_title;
205   GetStruct()->get_transition_type = navigation_entry_get_transition_type;
206   GetStruct()->has_post_data = navigation_entry_has_post_data;
207   GetStruct()->get_completion_time = navigation_entry_get_completion_time;
208   GetStruct()->get_http_status_code = navigation_entry_get_http_status_code;
209   GetStruct()->get_sslstatus = navigation_entry_get_sslstatus;
210 }
211 
212 // DESTRUCTOR - Do not edit by hand.
213 
~CefNavigationEntryCppToC()214 CefNavigationEntryCppToC::~CefNavigationEntryCppToC() {
215   shutdown_checker::AssertNotShutdown();
216 }
217 
218 template <>
219 CefRefPtr<CefNavigationEntry> CefCppToCRefCounted<
220     CefNavigationEntryCppToC,
221     CefNavigationEntry,
UnwrapDerived(CefWrapperType type,cef_navigation_entry_t * s)222     cef_navigation_entry_t>::UnwrapDerived(CefWrapperType type,
223                                            cef_navigation_entry_t* s) {
224   NOTREACHED() << "Unexpected class type: " << type;
225   return nullptr;
226 }
227 
228 template <>
229 CefWrapperType CefCppToCRefCounted<CefNavigationEntryCppToC,
230                                    CefNavigationEntry,
231                                    cef_navigation_entry_t>::kWrapperType =
232     WT_NAVIGATION_ENTRY;
233