• 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=5332b8cb609fa0f5b98e607878678808d21da3a4$
13  //
14  
15  #include "libcef_dll/cpptoc/print_dialog_callback_cpptoc.h"
16  #include "libcef_dll/cpptoc/print_settings_cpptoc.h"
17  #include "libcef_dll/shutdown_checker.h"
18  
19  namespace {
20  
21  // MEMBER FUNCTIONS - Body may be edited by hand.
22  
23  void CEF_CALLBACK
print_dialog_callback_cont(struct _cef_print_dialog_callback_t * self,struct _cef_print_settings_t * settings)24  print_dialog_callback_cont(struct _cef_print_dialog_callback_t* self,
25                             struct _cef_print_settings_t* settings) {
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: settings; type: refptr_same
34    DCHECK(settings);
35    if (!settings)
36      return;
37  
38    // Execute
39    CefPrintDialogCallbackCppToC::Get(self)->Continue(
40        CefPrintSettingsCppToC::Unwrap(settings));
41  }
42  
43  void CEF_CALLBACK
print_dialog_callback_cancel(struct _cef_print_dialog_callback_t * self)44  print_dialog_callback_cancel(struct _cef_print_dialog_callback_t* self) {
45    shutdown_checker::AssertNotShutdown();
46  
47    // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
48  
49    DCHECK(self);
50    if (!self)
51      return;
52  
53    // Execute
54    CefPrintDialogCallbackCppToC::Get(self)->Cancel();
55  }
56  
57  }  // namespace
58  
59  // CONSTRUCTOR - Do not edit by hand.
60  
CefPrintDialogCallbackCppToC()61  CefPrintDialogCallbackCppToC::CefPrintDialogCallbackCppToC() {
62    GetStruct()->cont = print_dialog_callback_cont;
63    GetStruct()->cancel = print_dialog_callback_cancel;
64  }
65  
66  // DESTRUCTOR - Do not edit by hand.
67  
~CefPrintDialogCallbackCppToC()68  CefPrintDialogCallbackCppToC::~CefPrintDialogCallbackCppToC() {
69    shutdown_checker::AssertNotShutdown();
70  }
71  
72  template <>
73  CefRefPtr<CefPrintDialogCallback> CefCppToCRefCounted<
74      CefPrintDialogCallbackCppToC,
75      CefPrintDialogCallback,
UnwrapDerived(CefWrapperType type,cef_print_dialog_callback_t * s)76      cef_print_dialog_callback_t>::UnwrapDerived(CefWrapperType type,
77                                                  cef_print_dialog_callback_t*
78                                                      s) {
79    NOTREACHED() << "Unexpected class type: " << type;
80    return nullptr;
81  }
82  
83  template <>
84  CefWrapperType CefCppToCRefCounted<CefPrintDialogCallbackCppToC,
85                                     CefPrintDialogCallback,
86                                     cef_print_dialog_callback_t>::kWrapperType =
87      WT_PRINT_DIALOG_CALLBACK;
88