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=0f0475ffcd9ea6ca7f91616c52c21b3e51b075f3$
13 //
14
15 #include "libcef_dll/cpptoc/before_download_callback_cpptoc.h"
16 #include "libcef_dll/shutdown_checker.h"
17
18 namespace {
19
20 // MEMBER FUNCTIONS - Body may be edited by hand.
21
22 void CEF_CALLBACK
before_download_callback_cont(struct _cef_before_download_callback_t * self,const cef_string_t * download_path,int show_dialog)23 before_download_callback_cont(struct _cef_before_download_callback_t* self,
24 const cef_string_t* download_path,
25 int show_dialog) {
26 shutdown_checker::AssertNotShutdown();
27
28 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
29
30 DCHECK(self);
31 if (!self)
32 return;
33 // Unverified params: download_path
34
35 // Execute
36 CefBeforeDownloadCallbackCppToC::Get(self)->Continue(
37 CefString(download_path), show_dialog ? true : false);
38 }
39
40 } // namespace
41
42 // CONSTRUCTOR - Do not edit by hand.
43
CefBeforeDownloadCallbackCppToC()44 CefBeforeDownloadCallbackCppToC::CefBeforeDownloadCallbackCppToC() {
45 GetStruct()->cont = before_download_callback_cont;
46 }
47
48 // DESTRUCTOR - Do not edit by hand.
49
~CefBeforeDownloadCallbackCppToC()50 CefBeforeDownloadCallbackCppToC::~CefBeforeDownloadCallbackCppToC() {
51 shutdown_checker::AssertNotShutdown();
52 }
53
54 template <>
55 CefRefPtr<CefBeforeDownloadCallback>
56 CefCppToCRefCounted<CefBeforeDownloadCallbackCppToC,
57 CefBeforeDownloadCallback,
58 cef_before_download_callback_t>::
UnwrapDerived(CefWrapperType type,cef_before_download_callback_t * s)59 UnwrapDerived(CefWrapperType type, cef_before_download_callback_t* s) {
60 NOTREACHED() << "Unexpected class type: " << type;
61 return nullptr;
62 }
63
64 template <>
65 CefWrapperType
66 CefCppToCRefCounted<CefBeforeDownloadCallbackCppToC,
67 CefBeforeDownloadCallback,
68 cef_before_download_callback_t>::kWrapperType =
69 WT_BEFORE_DOWNLOAD_CALLBACK;
70