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=388a87f728a292dc4e2101724656ac09b8fdaa1d$
13 //
14
15 #include "libcef_dll/cpptoc/pdf_print_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
pdf_print_callback_on_pdf_print_finished(struct _cef_pdf_print_callback_t * self,const cef_string_t * path,int ok)23 pdf_print_callback_on_pdf_print_finished(struct _cef_pdf_print_callback_t* self,
24 const cef_string_t* path,
25 int ok) {
26 shutdown_checker::AssertNotShutdown();
27
28 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
29
30 DCHECK(self);
31 if (!self)
32 return;
33 // Verify param: path; type: string_byref_const
34 DCHECK(path);
35 if (!path)
36 return;
37
38 // Execute
39 CefPdfPrintCallbackCppToC::Get(self)->OnPdfPrintFinished(CefString(path),
40 ok ? true : false);
41 }
42
43 } // namespace
44
45 // CONSTRUCTOR - Do not edit by hand.
46
CefPdfPrintCallbackCppToC()47 CefPdfPrintCallbackCppToC::CefPdfPrintCallbackCppToC() {
48 GetStruct()->on_pdf_print_finished = pdf_print_callback_on_pdf_print_finished;
49 }
50
51 // DESTRUCTOR - Do not edit by hand.
52
~CefPdfPrintCallbackCppToC()53 CefPdfPrintCallbackCppToC::~CefPdfPrintCallbackCppToC() {
54 shutdown_checker::AssertNotShutdown();
55 }
56
57 template <>
58 CefRefPtr<CefPdfPrintCallback> CefCppToCRefCounted<
59 CefPdfPrintCallbackCppToC,
60 CefPdfPrintCallback,
UnwrapDerived(CefWrapperType type,cef_pdf_print_callback_t * s)61 cef_pdf_print_callback_t>::UnwrapDerived(CefWrapperType type,
62 cef_pdf_print_callback_t* s) {
63 NOTREACHED() << "Unexpected class type: " << type;
64 return nullptr;
65 }
66
67 template <>
68 CefWrapperType CefCppToCRefCounted<CefPdfPrintCallbackCppToC,
69 CefPdfPrintCallback,
70 cef_pdf_print_callback_t>::kWrapperType =
71 WT_PDF_PRINT_CALLBACK;
72