• 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=c71d6fd8b0ee493102fdae90612f15b01e4a9f6b$
13 //
14 
15 #include "libcef_dll/ctocpp/resolve_callback_ctocpp.h"
16 #include "libcef_dll/shutdown_checker.h"
17 #include "libcef_dll/transfer_util.h"
18 
19 // VIRTUAL METHODS - Body may be edited by hand.
20 
21 NO_SANITIZE("cfi-icall")
OnResolveCompleted(cef_errorcode_t result,const std::vector<CefString> & resolved_ips)22 void CefResolveCallbackCToCpp::OnResolveCompleted(
23     cef_errorcode_t result,
24     const std::vector<CefString>& resolved_ips) {
25   shutdown_checker::AssertNotShutdown();
26 
27   cef_resolve_callback_t* _struct = GetStruct();
28   if (CEF_MEMBER_MISSING(_struct, on_resolve_completed))
29     return;
30 
31   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
32 
33   // Unverified params: resolved_ips
34 
35   // Translate param: resolved_ips; type: string_vec_byref_const
36   cef_string_list_t resolved_ipsList = cef_string_list_alloc();
37   DCHECK(resolved_ipsList);
38   if (resolved_ipsList)
39     transfer_string_list_contents(resolved_ips, resolved_ipsList);
40 
41   // Execute
42   _struct->on_resolve_completed(_struct, result, resolved_ipsList);
43 
44   // Restore param:resolved_ips; type: string_vec_byref_const
45   if (resolved_ipsList)
46     cef_string_list_free(resolved_ipsList);
47 }
48 
49 // CONSTRUCTOR - Do not edit by hand.
50 
CefResolveCallbackCToCpp()51 CefResolveCallbackCToCpp::CefResolveCallbackCToCpp() {}
52 
53 // DESTRUCTOR - Do not edit by hand.
54 
~CefResolveCallbackCToCpp()55 CefResolveCallbackCToCpp::~CefResolveCallbackCToCpp() {
56   shutdown_checker::AssertNotShutdown();
57 }
58 
59 template <>
60 cef_resolve_callback_t* CefCToCppRefCounted<
61     CefResolveCallbackCToCpp,
62     CefResolveCallback,
UnwrapDerived(CefWrapperType type,CefResolveCallback * c)63     cef_resolve_callback_t>::UnwrapDerived(CefWrapperType type,
64                                            CefResolveCallback* c) {
65   NOTREACHED() << "Unexpected class type: " << type;
66   return nullptr;
67 }
68 
69 template <>
70 CefWrapperType CefCToCppRefCounted<CefResolveCallbackCToCpp,
71                                    CefResolveCallback,
72                                    cef_resolve_callback_t>::kWrapperType =
73     WT_RESOLVE_CALLBACK;
74