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