• 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=01b8f661ca054d4a48ee00f1163011688b32e9f1$
13 //
14 
15 #include "libcef_dll/cpptoc/callback_cpptoc.h"
16 #include "libcef_dll/shutdown_checker.h"
17 
18 namespace {
19 
20 // MEMBER FUNCTIONS - Body may be edited by hand.
21 
callback_cont(struct _cef_callback_t * self)22 void CEF_CALLBACK callback_cont(struct _cef_callback_t* self) {
23   shutdown_checker::AssertNotShutdown();
24 
25   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26 
27   DCHECK(self);
28   if (!self)
29     return;
30 
31   // Execute
32   CefCallbackCppToC::Get(self)->Continue();
33 }
34 
callback_cancel(struct _cef_callback_t * self)35 void CEF_CALLBACK callback_cancel(struct _cef_callback_t* self) {
36   shutdown_checker::AssertNotShutdown();
37 
38   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
39 
40   DCHECK(self);
41   if (!self)
42     return;
43 
44   // Execute
45   CefCallbackCppToC::Get(self)->Cancel();
46 }
47 
48 }  // namespace
49 
50 // CONSTRUCTOR - Do not edit by hand.
51 
CefCallbackCppToC()52 CefCallbackCppToC::CefCallbackCppToC() {
53   GetStruct()->cont = callback_cont;
54   GetStruct()->cancel = callback_cancel;
55 }
56 
57 // DESTRUCTOR - Do not edit by hand.
58 
~CefCallbackCppToC()59 CefCallbackCppToC::~CefCallbackCppToC() {
60   shutdown_checker::AssertNotShutdown();
61 }
62 
63 template <>
64 CefRefPtr<CefCallback>
65 CefCppToCRefCounted<CefCallbackCppToC, CefCallback, cef_callback_t>::
UnwrapDerived(CefWrapperType type,cef_callback_t * s)66     UnwrapDerived(CefWrapperType type, cef_callback_t* s) {
67   NOTREACHED() << "Unexpected class type: " << type;
68   return nullptr;
69 }
70 
71 template <>
72 CefWrapperType CefCppToCRefCounted<CefCallbackCppToC,
73                                    CefCallback,
74                                    cef_callback_t>::kWrapperType = WT_CALLBACK;
75