• 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=970ecf239bb133f5c62c372762e00ba913e492a2$
13 //
14 
15 #include "libcef_dll/ctocpp/pdf_print_callback_ctocpp.h"
16 #include "libcef_dll/shutdown_checker.h"
17 
18 // VIRTUAL METHODS - Body may be edited by hand.
19 
20 NO_SANITIZE("cfi-icall")
OnPdfPrintFinished(const CefString & path,bool ok)21 void CefPdfPrintCallbackCToCpp::OnPdfPrintFinished(const CefString& path,
22                                                    bool ok) {
23   shutdown_checker::AssertNotShutdown();
24 
25   cef_pdf_print_callback_t* _struct = GetStruct();
26   if (CEF_MEMBER_MISSING(_struct, on_pdf_print_finished))
27     return;
28 
29   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
30 
31   // Verify param: path; type: string_byref_const
32   DCHECK(!path.empty());
33   if (path.empty())
34     return;
35 
36   // Execute
37   _struct->on_pdf_print_finished(_struct, path.GetStruct(), ok);
38 }
39 
40 // CONSTRUCTOR - Do not edit by hand.
41 
CefPdfPrintCallbackCToCpp()42 CefPdfPrintCallbackCToCpp::CefPdfPrintCallbackCToCpp() {}
43 
44 // DESTRUCTOR - Do not edit by hand.
45 
~CefPdfPrintCallbackCToCpp()46 CefPdfPrintCallbackCToCpp::~CefPdfPrintCallbackCToCpp() {
47   shutdown_checker::AssertNotShutdown();
48 }
49 
50 template <>
51 cef_pdf_print_callback_t* CefCToCppRefCounted<
52     CefPdfPrintCallbackCToCpp,
53     CefPdfPrintCallback,
UnwrapDerived(CefWrapperType type,CefPdfPrintCallback * c)54     cef_pdf_print_callback_t>::UnwrapDerived(CefWrapperType type,
55                                              CefPdfPrintCallback* c) {
56   NOTREACHED() << "Unexpected class type: " << type;
57   return nullptr;
58 }
59 
60 template <>
61 CefWrapperType CefCToCppRefCounted<CefPdfPrintCallbackCToCpp,
62                                    CefPdfPrintCallback,
63                                    cef_pdf_print_callback_t>::kWrapperType =
64     WT_PDF_PRINT_CALLBACK;
65