summaryrefslogtreecommitdiff
path: root/libcef_dll/ctocpp/test/test_server_ctocpp.cc
diff options
context:
space:
mode:
authorInna Palant <ipalant@google.com>2023-12-12 19:56:22 -0800
committerInna Palant <ipalant@google.com>2023-12-12 19:56:22 -0800
commit1ee1f36e3b492d7a6a0bf2367fe509365853aeaa (patch)
treea5790e155ff0d998639beb6172dfa0feb294aac9 /libcef_dll/ctocpp/test/test_server_ctocpp.cc
parent1e76199e6f0ded437fca14eb9e512e0c6bd0fc1e (diff)
parentc33b736614ef77e4048cee551999a656a5ef465f (diff)
downloadcef-1ee1f36e3b492d7a6a0bf2367fe509365853aeaa.tar.gz
Merge remote-tracking branch 'origin/upstream'main
Import b/312293934
Diffstat (limited to 'libcef_dll/ctocpp/test/test_server_ctocpp.cc')
-rw-r--r--libcef_dll/ctocpp/test/test_server_ctocpp.cc103
1 files changed, 103 insertions, 0 deletions
diff --git a/libcef_dll/ctocpp/test/test_server_ctocpp.cc b/libcef_dll/ctocpp/test/test_server_ctocpp.cc
new file mode 100644
index 00000000..132f7117
--- /dev/null
+++ b/libcef_dll/ctocpp/test/test_server_ctocpp.cc
@@ -0,0 +1,103 @@
+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights
+// 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.
+//
+// $hash=c28a94226a89e94a765d19e7d59bfa8a50efe295$
+//
+
+#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(
+ uint16 port,
+ bool https_server,
+ cef_test_cert_type_t https_cert_type,
+ CefRefPtr<CefTestServerHandler> handler) {
+ shutdown_checker::AssertNotShutdown();
+
+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
+
+ // Verify param: handler; type: refptr_diff
+ DCHECK(handler.get());
+ if (!handler.get()) {
+ return nullptr;
+ }
+
+ // Execute
+ cef_test_server_t* _retval = cef_test_server_create_and_start(
+ port, https_server, https_cert_type,
+ CefTestServerHandlerCppToC::Wrap(handler));
+
+ // 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();
+ if (CEF_MEMBER_MISSING(_struct, stop)) {
+ return;
+ }
+
+ // 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();
+ if (CEF_MEMBER_MISSING(_struct, get_origin)) {
+ return CefString();
+ }
+
+ // 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) {
+ NOTREACHED() << "Unexpected class type: " << type;
+ return nullptr;
+}
+
+template <>
+CefWrapperType CefCToCppRefCounted<CefTestServerCToCpp,
+ CefTestServer,
+ cef_test_server_t>::kWrapperType =
+ WT_TEST_SERVER;