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