• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2021 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=202d1371e39e1211d2db18afcc0610a341725b2b$
13 //
14 
15 #include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h"
16 #include "libcef_dll/shutdown_checker.h"
17 
18 // VIRTUAL METHODS - Body may be edited by hand.
19 
20 NO_SANITIZE("cfi-icall")
GetLocalizedString(int string_id,CefString & string)21 bool CefResourceBundleHandlerCToCpp::GetLocalizedString(int string_id,
22                                                         CefString& string) {
23   shutdown_checker::AssertNotShutdown();
24 
25   cef_resource_bundle_handler_t* _struct = GetStruct();
26   if (CEF_MEMBER_MISSING(_struct, get_localized_string))
27     return false;
28 
29   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
30 
31   // Execute
32   int _retval = _struct->get_localized_string(_struct, string_id,
33                                               string.GetWritableStruct());
34 
35   // Return type: bool
36   return _retval ? true : false;
37 }
38 
39 NO_SANITIZE("cfi-icall")
GetDataResource(int resource_id,void * & data,size_t & data_size)40 bool CefResourceBundleHandlerCToCpp::GetDataResource(int resource_id,
41                                                      void*& data,
42                                                      size_t& data_size) {
43   shutdown_checker::AssertNotShutdown();
44 
45   cef_resource_bundle_handler_t* _struct = GetStruct();
46   if (CEF_MEMBER_MISSING(_struct, get_data_resource))
47     return false;
48 
49   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
50 
51   // Execute
52   int _retval =
53       _struct->get_data_resource(_struct, resource_id, &data, &data_size);
54 
55   // Return type: bool
56   return _retval ? true : false;
57 }
58 
59 NO_SANITIZE("cfi-icall")
GetDataResourceForScale(int resource_id,ScaleFactor scale_factor,void * & data,size_t & data_size)60 bool CefResourceBundleHandlerCToCpp::GetDataResourceForScale(
61     int resource_id,
62     ScaleFactor scale_factor,
63     void*& data,
64     size_t& data_size) {
65   shutdown_checker::AssertNotShutdown();
66 
67   cef_resource_bundle_handler_t* _struct = GetStruct();
68   if (CEF_MEMBER_MISSING(_struct, get_data_resource_for_scale))
69     return false;
70 
71   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
72 
73   // Execute
74   int _retval = _struct->get_data_resource_for_scale(
75       _struct, resource_id, scale_factor, &data, &data_size);
76 
77   // Return type: bool
78   return _retval ? true : false;
79 }
80 
81 // CONSTRUCTOR - Do not edit by hand.
82 
CefResourceBundleHandlerCToCpp()83 CefResourceBundleHandlerCToCpp::CefResourceBundleHandlerCToCpp() {}
84 
85 // DESTRUCTOR - Do not edit by hand.
86 
~CefResourceBundleHandlerCToCpp()87 CefResourceBundleHandlerCToCpp::~CefResourceBundleHandlerCToCpp() {
88   shutdown_checker::AssertNotShutdown();
89 }
90 
91 template <>
92 cef_resource_bundle_handler_t* CefCToCppRefCounted<
93     CefResourceBundleHandlerCToCpp,
94     CefResourceBundleHandler,
UnwrapDerived(CefWrapperType type,CefResourceBundleHandler * c)95     cef_resource_bundle_handler_t>::UnwrapDerived(CefWrapperType type,
96                                                   CefResourceBundleHandler* c) {
97   NOTREACHED() << "Unexpected class type: " << type;
98   return nullptr;
99 }
100 
101 template <>
102 CefWrapperType
103     CefCToCppRefCounted<CefResourceBundleHandlerCToCpp,
104                         CefResourceBundleHandler,
105                         cef_resource_bundle_handler_t>::kWrapperType =
106         WT_RESOURCE_BUNDLE_HANDLER;
107