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=7cb000dca30be501541fc16036c585a3cd6618cb$ 13 // 14 15 #include "libcef_dll/cpptoc/download_item_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 download_item_callback_cancel(struct _cef_download_item_callback_t * self)23download_item_callback_cancel(struct _cef_download_item_callback_t* self) { 24 shutdown_checker::AssertNotShutdown(); 25 26 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 27 28 DCHECK(self); 29 if (!self) 30 return; 31 32 // Execute 33 CefDownloadItemCallbackCppToC::Get(self)->Cancel(); 34 } 35 36 void CEF_CALLBACK download_item_callback_pause(struct _cef_download_item_callback_t * self)37download_item_callback_pause(struct _cef_download_item_callback_t* self) { 38 shutdown_checker::AssertNotShutdown(); 39 40 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 41 42 DCHECK(self); 43 if (!self) 44 return; 45 46 // Execute 47 CefDownloadItemCallbackCppToC::Get(self)->Pause(); 48 } 49 50 void CEF_CALLBACK download_item_callback_resume(struct _cef_download_item_callback_t * self)51download_item_callback_resume(struct _cef_download_item_callback_t* self) { 52 shutdown_checker::AssertNotShutdown(); 53 54 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 55 56 DCHECK(self); 57 if (!self) 58 return; 59 60 // Execute 61 CefDownloadItemCallbackCppToC::Get(self)->Resume(); 62 } 63 64 } // namespace 65 66 // CONSTRUCTOR - Do not edit by hand. 67 CefDownloadItemCallbackCppToC()68CefDownloadItemCallbackCppToC::CefDownloadItemCallbackCppToC() { 69 GetStruct()->cancel = download_item_callback_cancel; 70 GetStruct()->pause = download_item_callback_pause; 71 GetStruct()->resume = download_item_callback_resume; 72 } 73 74 // DESTRUCTOR - Do not edit by hand. 75 ~CefDownloadItemCallbackCppToC()76CefDownloadItemCallbackCppToC::~CefDownloadItemCallbackCppToC() { 77 shutdown_checker::AssertNotShutdown(); 78 } 79 80 template <> 81 CefRefPtr<CefDownloadItemCallback> CefCppToCRefCounted< 82 CefDownloadItemCallbackCppToC, 83 CefDownloadItemCallback, UnwrapDerived(CefWrapperType type,cef_download_item_callback_t * s)84 cef_download_item_callback_t>::UnwrapDerived(CefWrapperType type, 85 cef_download_item_callback_t* 86 s) { 87 NOTREACHED() << "Unexpected class type: " << type; 88 return nullptr; 89 } 90 91 template <> 92 CefWrapperType CefCppToCRefCounted<CefDownloadItemCallbackCppToC, 93 CefDownloadItemCallback, 94 cef_download_item_callback_t>::kWrapperType = 95 WT_DOWNLOAD_ITEM_CALLBACK; 96