2023-01-02 23:47:15 +01:00
|
|
|
// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights
|
2022-07-29 18:34:30 +02: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.
|
|
|
|
//
|
2023-06-01 16:07:20 +02:00
|
|
|
// $hash=9d289e78e4406bbe55872a7132531c0b9673bc47$
|
2022-07-29 18:34:30 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/test/test_server_ctocpp.h"
|
|
|
|
#include "libcef_dll/cpptoc/test/test_server_handler_cpptoc.h"
|
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
CefRefPtr<CefTestServer> CefTestServer::CreateAndStart(
|
2023-06-01 16:07:20 +02:00
|
|
|
uint16_t port,
|
2022-07-29 18:34:30 +02:00
|
|
|
bool https_server,
|
2022-08-04 18:37:12 +02:00
|
|
|
cef_test_cert_type_t https_cert_type,
|
2022-07-29 18:34:30 +02:00
|
|
|
CefRefPtr<CefTestServerHandler> handler) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: handler; type: refptr_diff
|
|
|
|
DCHECK(handler.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!handler.get()) {
|
2022-07-29 18:34:30 +02:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-07-29 18:34:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_test_server_t* _retval = cef_test_server_create_and_start(
|
2022-08-04 18:37:12 +02:00
|
|
|
port, https_server, https_cert_type,
|
|
|
|
CefTestServerHandlerCppToC::Wrap(handler));
|
2022-07-29 18:34:30 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefTestServerCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall") void CefTestServerCToCpp::Stop() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_test_server_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, stop)) {
|
2022-07-29 18:34:30 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-07-29 18:34:30 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->stop(_struct);
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall") CefString CefTestServerCToCpp::GetOrigin() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_test_server_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_origin)) {
|
2022-07-29 18:34:30 +02:00
|
|
|
return CefString();
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-07-29 18:34:30 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_string_userfree_t _retval = _struct->get_origin(_struct);
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefTestServerCToCpp::CefTestServerCToCpp() {}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefTestServerCToCpp::~CefTestServerCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
cef_test_server_t*
|
|
|
|
CefCToCppRefCounted<CefTestServerCToCpp, CefTestServer, cef_test_server_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, CefTestServer* c) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2022-07-29 18:34:30 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefTestServerCToCpp,
|
|
|
|
CefTestServer,
|
|
|
|
cef_test_server_t>::kWrapperType =
|
|
|
|
WT_TEST_SERVER;
|