• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=5e94a999784332a91c40a4608644bf7dc36e0729$
13 //
14 
15 #include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h"
16 #include "libcef_dll/cpptoc/browser_cpptoc.h"
17 #include "libcef_dll/cpptoc/frame_cpptoc.h"
18 #include "libcef_dll/cpptoc/request_cpptoc.h"
19 #include "libcef_dll/ctocpp/resource_handler_ctocpp.h"
20 
21 // VIRTUAL METHODS - Body may be edited by hand.
22 
23 NO_SANITIZE("cfi-icall")
Create(CefRefPtr<CefBrowser> browser,CefRefPtr<CefFrame> frame,const CefString & scheme_name,CefRefPtr<CefRequest> request)24 CefRefPtr<CefResourceHandler> CefSchemeHandlerFactoryCToCpp::Create(
25     CefRefPtr<CefBrowser> browser,
26     CefRefPtr<CefFrame> frame,
27     const CefString& scheme_name,
28     CefRefPtr<CefRequest> request) {
29   cef_scheme_handler_factory_t* _struct = GetStruct();
30   if (CEF_MEMBER_MISSING(_struct, create))
31     return nullptr;
32 
33   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
34 
35   // Verify param: scheme_name; type: string_byref_const
36   DCHECK(!scheme_name.empty());
37   if (scheme_name.empty())
38     return nullptr;
39   // Verify param: request; type: refptr_diff
40   DCHECK(request.get());
41   if (!request.get())
42     return nullptr;
43   // Unverified params: browser, frame
44 
45   // Execute
46   cef_resource_handler_t* _retval = _struct->create(
47       _struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
48       scheme_name.GetStruct(), CefRequestCppToC::Wrap(request));
49 
50   // Return type: refptr_same
51   return CefResourceHandlerCToCpp::Wrap(_retval);
52 }
53 
54 // CONSTRUCTOR - Do not edit by hand.
55 
CefSchemeHandlerFactoryCToCpp()56 CefSchemeHandlerFactoryCToCpp::CefSchemeHandlerFactoryCToCpp() {}
57 
58 // DESTRUCTOR - Do not edit by hand.
59 
~CefSchemeHandlerFactoryCToCpp()60 CefSchemeHandlerFactoryCToCpp::~CefSchemeHandlerFactoryCToCpp() {}
61 
62 template <>
63 cef_scheme_handler_factory_t* CefCToCppRefCounted<
64     CefSchemeHandlerFactoryCToCpp,
65     CefSchemeHandlerFactory,
UnwrapDerived(CefWrapperType type,CefSchemeHandlerFactory * c)66     cef_scheme_handler_factory_t>::UnwrapDerived(CefWrapperType type,
67                                                  CefSchemeHandlerFactory* c) {
68   NOTREACHED() << "Unexpected class type: " << type;
69   return nullptr;
70 }
71 
72 template <>
73 CefWrapperType CefCToCppRefCounted<CefSchemeHandlerFactoryCToCpp,
74                                    CefSchemeHandlerFactory,
75                                    cef_scheme_handler_factory_t>::kWrapperType =
76     WT_SCHEME_HANDLER_FACTORY;
77