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=c028de29ae5b48ed41d4e8b8ae3df9a0ee765e14$
13 //
14
15 #include "libcef_dll/cpptoc/scheme_registrar_cpptoc.h"
16
17 namespace {
18
19 // MEMBER FUNCTIONS - Body may be edited by hand.
20
21 int CEF_CALLBACK
scheme_registrar_add_custom_scheme(struct _cef_scheme_registrar_t * self,const cef_string_t * scheme_name,int options)22 scheme_registrar_add_custom_scheme(struct _cef_scheme_registrar_t* self,
23 const cef_string_t* scheme_name,
24 int options) {
25 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26
27 DCHECK(self);
28 if (!self)
29 return 0;
30 // Verify param: scheme_name; type: string_byref_const
31 DCHECK(scheme_name);
32 if (!scheme_name)
33 return 0;
34
35 // Execute
36 bool _retval = CefSchemeRegistrarCppToC::Get(self)->AddCustomScheme(
37 CefString(scheme_name), options);
38
39 // Return type: bool
40 return _retval;
41 }
42
43 } // namespace
44
45 // CONSTRUCTOR - Do not edit by hand.
46
CefSchemeRegistrarCppToC()47 CefSchemeRegistrarCppToC::CefSchemeRegistrarCppToC() {
48 GetStruct()->add_custom_scheme = scheme_registrar_add_custom_scheme;
49 }
50
51 // DESTRUCTOR - Do not edit by hand.
52
~CefSchemeRegistrarCppToC()53 CefSchemeRegistrarCppToC::~CefSchemeRegistrarCppToC() {}
54
55 template <>
56 CefOwnPtr<CefSchemeRegistrar> CefCppToCScoped<
57 CefSchemeRegistrarCppToC,
58 CefSchemeRegistrar,
UnwrapDerivedOwn(CefWrapperType type,cef_scheme_registrar_t * s)59 cef_scheme_registrar_t>::UnwrapDerivedOwn(CefWrapperType type,
60 cef_scheme_registrar_t* s) {
61 NOTREACHED() << "Unexpected class type: " << type;
62 return CefOwnPtr<CefSchemeRegistrar>();
63 }
64
65 template <>
66 CefRawPtr<CefSchemeRegistrar> CefCppToCScoped<
67 CefSchemeRegistrarCppToC,
68 CefSchemeRegistrar,
UnwrapDerivedRaw(CefWrapperType type,cef_scheme_registrar_t * s)69 cef_scheme_registrar_t>::UnwrapDerivedRaw(CefWrapperType type,
70 cef_scheme_registrar_t* s) {
71 NOTREACHED() << "Unexpected class type: " << type;
72 return nullptr;
73 }
74
75 template <>
76 CefWrapperType CefCppToCScoped<CefSchemeRegistrarCppToC,
77 CefSchemeRegistrar,
78 cef_scheme_registrar_t>::kWrapperType =
79 WT_SCHEME_REGISTRAR;
80