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=3f55a43485f2833e5000e7444d57ef47ff7af0e9$
13 //
14
15 #include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h"
16
17 // VIRTUAL METHODS - Body may be edited by hand.
18
19 NO_SANITIZE("cfi-icall")
AddCustomScheme(const CefString & scheme_name,int options)20 bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name,
21 int options) {
22 cef_scheme_registrar_t* _struct = GetStruct();
23 if (CEF_MEMBER_MISSING(_struct, add_custom_scheme))
24 return false;
25
26 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
27
28 // Verify param: scheme_name; type: string_byref_const
29 DCHECK(!scheme_name.empty());
30 if (scheme_name.empty())
31 return false;
32
33 // Execute
34 int _retval =
35 _struct->add_custom_scheme(_struct, scheme_name.GetStruct(), options);
36
37 // Return type: bool
38 return _retval ? true : false;
39 }
40
41 // CONSTRUCTOR - Do not edit by hand.
42
CefSchemeRegistrarCToCpp()43 CefSchemeRegistrarCToCpp::CefSchemeRegistrarCToCpp() {}
44
45 // DESTRUCTOR - Do not edit by hand.
46
~CefSchemeRegistrarCToCpp()47 CefSchemeRegistrarCToCpp::~CefSchemeRegistrarCToCpp() {}
48
49 template <>
50 cef_scheme_registrar_t* CefCToCppScoped<
51 CefSchemeRegistrarCToCpp,
52 CefSchemeRegistrar,
UnwrapDerivedOwn(CefWrapperType type,CefOwnPtr<CefSchemeRegistrar> c)53 cef_scheme_registrar_t>::UnwrapDerivedOwn(CefWrapperType type,
54 CefOwnPtr<CefSchemeRegistrar> c) {
55 NOTREACHED() << "Unexpected class type: " << type;
56 return nullptr;
57 }
58
59 template <>
60 cef_scheme_registrar_t* CefCToCppScoped<
61 CefSchemeRegistrarCToCpp,
62 CefSchemeRegistrar,
UnwrapDerivedRaw(CefWrapperType type,CefRawPtr<CefSchemeRegistrar> c)63 cef_scheme_registrar_t>::UnwrapDerivedRaw(CefWrapperType type,
64 CefRawPtr<CefSchemeRegistrar> c) {
65 NOTREACHED() << "Unexpected class type: " << type;
66 return nullptr;
67 }
68
69 template <>
70 CefWrapperType CefCToCppScoped<CefSchemeRegistrarCToCpp,
71 CefSchemeRegistrar,
72 cef_scheme_registrar_t>::kWrapperType =
73 WT_SCHEME_REGISTRAR;
74