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=8fecb808fb6a84d630d1e8c5380a5ffd900b3654$
13 //
14
15 #include "libcef_dll/ctocpp/file_dialog_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")
Continue(int selected_accept_filter,const std::vector<CefString> & file_paths)22 void CefFileDialogCallbackCToCpp::Continue(
23 int selected_accept_filter,
24 const std::vector<CefString>& file_paths) {
25 shutdown_checker::AssertNotShutdown();
26
27 cef_file_dialog_callback_t* _struct = GetStruct();
28 if (CEF_MEMBER_MISSING(_struct, cont))
29 return;
30
31 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
32
33 // Verify param: selected_accept_filter; type: simple_byval
34 DCHECK_GE(selected_accept_filter, 0);
35 if (selected_accept_filter < 0)
36 return;
37 // Unverified params: file_paths
38
39 // Translate param: file_paths; type: string_vec_byref_const
40 cef_string_list_t file_pathsList = cef_string_list_alloc();
41 DCHECK(file_pathsList);
42 if (file_pathsList)
43 transfer_string_list_contents(file_paths, file_pathsList);
44
45 // Execute
46 _struct->cont(_struct, selected_accept_filter, file_pathsList);
47
48 // Restore param:file_paths; type: string_vec_byref_const
49 if (file_pathsList)
50 cef_string_list_free(file_pathsList);
51 }
52
Cancel()53 NO_SANITIZE("cfi-icall") void CefFileDialogCallbackCToCpp::Cancel() {
54 shutdown_checker::AssertNotShutdown();
55
56 cef_file_dialog_callback_t* _struct = GetStruct();
57 if (CEF_MEMBER_MISSING(_struct, cancel))
58 return;
59
60 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
61
62 // Execute
63 _struct->cancel(_struct);
64 }
65
66 // CONSTRUCTOR - Do not edit by hand.
67
CefFileDialogCallbackCToCpp()68 CefFileDialogCallbackCToCpp::CefFileDialogCallbackCToCpp() {}
69
70 // DESTRUCTOR - Do not edit by hand.
71
~CefFileDialogCallbackCToCpp()72 CefFileDialogCallbackCToCpp::~CefFileDialogCallbackCToCpp() {
73 shutdown_checker::AssertNotShutdown();
74 }
75
76 template <>
77 cef_file_dialog_callback_t* CefCToCppRefCounted<
78 CefFileDialogCallbackCToCpp,
79 CefFileDialogCallback,
UnwrapDerived(CefWrapperType type,CefFileDialogCallback * c)80 cef_file_dialog_callback_t>::UnwrapDerived(CefWrapperType type,
81 CefFileDialogCallback* c) {
82 NOTREACHED() << "Unexpected class type: " << type;
83 return nullptr;
84 }
85
86 template <>
87 CefWrapperType CefCToCppRefCounted<CefFileDialogCallbackCToCpp,
88 CefFileDialogCallback,
89 cef_file_dialog_callback_t>::kWrapperType =
90 WT_FILE_DIALOG_CALLBACK;
91