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=abd81866575f873556b4ae40313ea65c89219756$
13 //
14
15 #include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h"
16 #include "libcef_dll/cpptoc/resource_handler_cpptoc.h"
17 #include "libcef_dll/ctocpp/browser_ctocpp.h"
18 #include "libcef_dll/ctocpp/frame_ctocpp.h"
19 #include "libcef_dll/ctocpp/request_ctocpp.h"
20
21 namespace {
22
23 // MEMBER FUNCTIONS - Body may be edited by hand.
24
25 cef_resource_handler_t* CEF_CALLBACK
scheme_handler_factory_create(struct _cef_scheme_handler_factory_t * self,cef_browser_t * browser,cef_frame_t * frame,const cef_string_t * scheme_name,cef_request_t * request)26 scheme_handler_factory_create(struct _cef_scheme_handler_factory_t* self,
27 cef_browser_t* browser,
28 cef_frame_t* frame,
29 const cef_string_t* scheme_name,
30 cef_request_t* request) {
31 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
32
33 DCHECK(self);
34 if (!self)
35 return NULL;
36 // Verify param: scheme_name; type: string_byref_const
37 DCHECK(scheme_name);
38 if (!scheme_name)
39 return NULL;
40 // Verify param: request; type: refptr_diff
41 DCHECK(request);
42 if (!request)
43 return NULL;
44 // Unverified params: browser, frame
45
46 // Execute
47 CefRefPtr<CefResourceHandler> _retval =
48 CefSchemeHandlerFactoryCppToC::Get(self)->Create(
49 CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
50 CefString(scheme_name), CefRequestCToCpp::Wrap(request));
51
52 // Return type: refptr_same
53 return CefResourceHandlerCppToC::Wrap(_retval);
54 }
55
56 } // namespace
57
58 // CONSTRUCTOR - Do not edit by hand.
59
CefSchemeHandlerFactoryCppToC()60 CefSchemeHandlerFactoryCppToC::CefSchemeHandlerFactoryCppToC() {
61 GetStruct()->create = scheme_handler_factory_create;
62 }
63
64 // DESTRUCTOR - Do not edit by hand.
65
~CefSchemeHandlerFactoryCppToC()66 CefSchemeHandlerFactoryCppToC::~CefSchemeHandlerFactoryCppToC() {}
67
68 template <>
69 CefRefPtr<CefSchemeHandlerFactory> CefCppToCRefCounted<
70 CefSchemeHandlerFactoryCppToC,
71 CefSchemeHandlerFactory,
UnwrapDerived(CefWrapperType type,cef_scheme_handler_factory_t * s)72 cef_scheme_handler_factory_t>::UnwrapDerived(CefWrapperType type,
73 cef_scheme_handler_factory_t*
74 s) {
75 NOTREACHED() << "Unexpected class type: " << type;
76 return nullptr;
77 }
78
79 template <>
80 CefWrapperType CefCppToCRefCounted<CefSchemeHandlerFactoryCppToC,
81 CefSchemeHandlerFactory,
82 cef_scheme_handler_factory_t>::kWrapperType =
83 WT_SCHEME_HANDLER_FACTORY;
84