• 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=01d0b01e291c90ceba7c416ff9dd56c10eb46f3b$
13 //
14 
15 #include "libcef_dll/ctocpp/media_sink_ctocpp.h"
16 #include "libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h"
17 #include "libcef_dll/ctocpp/media_source_ctocpp.h"
18 #include "libcef_dll/shutdown_checker.h"
19 
20 // VIRTUAL METHODS - Body may be edited by hand.
21 
GetId()22 NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetId() {
23   shutdown_checker::AssertNotShutdown();
24 
25   cef_media_sink_t* _struct = GetStruct();
26   if (CEF_MEMBER_MISSING(_struct, get_id))
27     return CefString();
28 
29   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
30 
31   // Execute
32   cef_string_userfree_t _retval = _struct->get_id(_struct);
33 
34   // Return type: string
35   CefString _retvalStr;
36   _retvalStr.AttachToUserFree(_retval);
37   return _retvalStr;
38 }
39 
GetName()40 NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetName() {
41   shutdown_checker::AssertNotShutdown();
42 
43   cef_media_sink_t* _struct = GetStruct();
44   if (CEF_MEMBER_MISSING(_struct, get_name))
45     return CefString();
46 
47   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
48 
49   // Execute
50   cef_string_userfree_t _retval = _struct->get_name(_struct);
51 
52   // Return type: string
53   CefString _retvalStr;
54   _retvalStr.AttachToUserFree(_retval);
55   return _retvalStr;
56 }
57 
GetDescription()58 NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetDescription() {
59   shutdown_checker::AssertNotShutdown();
60 
61   cef_media_sink_t* _struct = GetStruct();
62   if (CEF_MEMBER_MISSING(_struct, get_description))
63     return CefString();
64 
65   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
66 
67   // Execute
68   cef_string_userfree_t _retval = _struct->get_description(_struct);
69 
70   // Return type: string
71   CefString _retvalStr;
72   _retvalStr.AttachToUserFree(_retval);
73   return _retvalStr;
74 }
75 
76 NO_SANITIZE("cfi-icall")
GetIconType()77 CefMediaSink::IconType CefMediaSinkCToCpp::GetIconType() {
78   shutdown_checker::AssertNotShutdown();
79 
80   cef_media_sink_t* _struct = GetStruct();
81   if (CEF_MEMBER_MISSING(_struct, get_icon_type))
82     return CEF_MSIT_GENERIC;
83 
84   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
85 
86   // Execute
87   cef_media_sink_icon_type_t _retval = _struct->get_icon_type(_struct);
88 
89   // Return type: simple
90   return _retval;
91 }
92 
93 NO_SANITIZE("cfi-icall")
GetDeviceInfo(CefRefPtr<CefMediaSinkDeviceInfoCallback> callback)94 void CefMediaSinkCToCpp::GetDeviceInfo(
95     CefRefPtr<CefMediaSinkDeviceInfoCallback> callback) {
96   shutdown_checker::AssertNotShutdown();
97 
98   cef_media_sink_t* _struct = GetStruct();
99   if (CEF_MEMBER_MISSING(_struct, get_device_info))
100     return;
101 
102   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
103 
104   // Verify param: callback; type: refptr_diff
105   DCHECK(callback.get());
106   if (!callback.get())
107     return;
108 
109   // Execute
110   _struct->get_device_info(
111       _struct, CefMediaSinkDeviceInfoCallbackCppToC::Wrap(callback));
112 }
113 
IsCastSink()114 NO_SANITIZE("cfi-icall") bool CefMediaSinkCToCpp::IsCastSink() {
115   shutdown_checker::AssertNotShutdown();
116 
117   cef_media_sink_t* _struct = GetStruct();
118   if (CEF_MEMBER_MISSING(_struct, is_cast_sink))
119     return false;
120 
121   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
122 
123   // Execute
124   int _retval = _struct->is_cast_sink(_struct);
125 
126   // Return type: bool
127   return _retval ? true : false;
128 }
129 
IsDialSink()130 NO_SANITIZE("cfi-icall") bool CefMediaSinkCToCpp::IsDialSink() {
131   shutdown_checker::AssertNotShutdown();
132 
133   cef_media_sink_t* _struct = GetStruct();
134   if (CEF_MEMBER_MISSING(_struct, is_dial_sink))
135     return false;
136 
137   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
138 
139   // Execute
140   int _retval = _struct->is_dial_sink(_struct);
141 
142   // Return type: bool
143   return _retval ? true : false;
144 }
145 
146 NO_SANITIZE("cfi-icall")
IsCompatibleWith(CefRefPtr<CefMediaSource> source)147 bool CefMediaSinkCToCpp::IsCompatibleWith(CefRefPtr<CefMediaSource> source) {
148   shutdown_checker::AssertNotShutdown();
149 
150   cef_media_sink_t* _struct = GetStruct();
151   if (CEF_MEMBER_MISSING(_struct, is_compatible_with))
152     return false;
153 
154   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
155 
156   // Verify param: source; type: refptr_same
157   DCHECK(source.get());
158   if (!source.get())
159     return false;
160 
161   // Execute
162   int _retval = _struct->is_compatible_with(
163       _struct, CefMediaSourceCToCpp::Unwrap(source));
164 
165   // Return type: bool
166   return _retval ? true : false;
167 }
168 
169 // CONSTRUCTOR - Do not edit by hand.
170 
CefMediaSinkCToCpp()171 CefMediaSinkCToCpp::CefMediaSinkCToCpp() {}
172 
173 // DESTRUCTOR - Do not edit by hand.
174 
~CefMediaSinkCToCpp()175 CefMediaSinkCToCpp::~CefMediaSinkCToCpp() {
176   shutdown_checker::AssertNotShutdown();
177 }
178 
179 template <>
180 cef_media_sink_t*
181 CefCToCppRefCounted<CefMediaSinkCToCpp, CefMediaSink, cef_media_sink_t>::
UnwrapDerived(CefWrapperType type,CefMediaSink * c)182     UnwrapDerived(CefWrapperType type, CefMediaSink* c) {
183   NOTREACHED() << "Unexpected class type: " << type;
184   return nullptr;
185 }
186 
187 template <>
188 CefWrapperType CefCToCppRefCounted<CefMediaSinkCToCpp,
189                                    CefMediaSink,
190                                    cef_media_sink_t>::kWrapperType =
191     WT_MEDIA_SINK;
192