2017-01-11 00:00:30 +01:00
|
|
|
// Copyright (c) 2017 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.
|
|
|
|
//
|
2017-07-27 01:19:27 +02:00
|
|
|
// $hash=e01bc9ce18da170e968017ba0de8928090283f03$
|
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"
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
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) {
|
|
|
|
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
|
|
|
|
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;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
2017-07-27 01:19:27 +02:00
|
|
|
base::AtomicRefCount CefCToCppRefCounted<
|
|
|
|
CefDownloadImageCallbackCToCpp,
|
|
|
|
CefDownloadImageCallback,
|
|
|
|
cef_download_image_callback_t>::DebugObjCt ATOMIC_DECLARATION;
|
2016-01-19 21:09:01 +01:00
|
|
|
#endif
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType
|
|
|
|
CefCToCppRefCounted<CefDownloadImageCallbackCToCpp,
|
|
|
|
CefDownloadImageCallback,
|
|
|
|
cef_download_image_callback_t>::kWrapperType =
|
|
|
|
WT_DOWNLOAD_IMAGE_CALLBACK;
|