2022-01-06 19:34:35 +01:00
|
|
|
// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
|
2016-01-19 21:09:01 +01:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2022-01-06 19:34:35 +01:00
|
|
|
// $hash=8568e306d0db860b1cd222f7c6dba344f349cb2d$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/download_image_callback_ctocpp.h"
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/cpptoc/image_cpptoc.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-01-19 21:09:01 +01:00
|
|
|
void CefDownloadImageCallbackCToCpp::OnDownloadImageFinished(
|
2017-05-17 11:29:28 +02:00
|
|
|
const CefString& image_url,
|
|
|
|
int http_status_code,
|
2016-01-19 21:09:01 +01:00
|
|
|
CefRefPtr<CefImage> image) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
cef_download_image_callback_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_download_image_finished))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: image_url; type: string_byref_const
|
|
|
|
DCHECK(!image_url.empty());
|
|
|
|
if (image_url.empty())
|
|
|
|
return;
|
|
|
|
// Unverified params: image
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_download_image_finished(_struct, image_url.GetStruct(),
|
|
|
|
http_status_code,
|
|
|
|
CefImageCppToC::Wrap(image));
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefDownloadImageCallbackCToCpp::CefDownloadImageCallbackCToCpp() {}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefDownloadImageCallbackCToCpp::~CefDownloadImageCallbackCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_download_image_callback_t* CefCToCppRefCounted<
|
|
|
|
CefDownloadImageCallbackCToCpp,
|
|
|
|
CefDownloadImageCallback,
|
|
|
|
cef_download_image_callback_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefDownloadImageCallback* c) {
|
2016-01-19 21:09:01 +01:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType
|
|
|
|
CefCToCppRefCounted<CefDownloadImageCallbackCToCpp,
|
|
|
|
CefDownloadImageCallback,
|
|
|
|
cef_download_image_callback_t>::kWrapperType =
|
|
|
|
WT_DOWNLOAD_IMAGE_CALLBACK;
|