• 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=91e3e2f2fb4914cbe8df7a30938f728a3f147fed$
13 //
14 
15 #include "libcef_dll/cpptoc/media_source_cpptoc.h"
16 #include "libcef_dll/shutdown_checker.h"
17 
18 namespace {
19 
20 // MEMBER FUNCTIONS - Body may be edited by hand.
21 
22 cef_string_userfree_t CEF_CALLBACK
media_source_get_id(struct _cef_media_source_t * self)23 media_source_get_id(struct _cef_media_source_t* self) {
24   shutdown_checker::AssertNotShutdown();
25 
26   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
27 
28   DCHECK(self);
29   if (!self)
30     return NULL;
31 
32   // Execute
33   CefString _retval = CefMediaSourceCppToC::Get(self)->GetId();
34 
35   // Return type: string
36   return _retval.DetachToUserFree();
37 }
38 
media_source_is_cast_source(struct _cef_media_source_t * self)39 int CEF_CALLBACK media_source_is_cast_source(struct _cef_media_source_t* self) {
40   shutdown_checker::AssertNotShutdown();
41 
42   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
43 
44   DCHECK(self);
45   if (!self)
46     return 0;
47 
48   // Execute
49   bool _retval = CefMediaSourceCppToC::Get(self)->IsCastSource();
50 
51   // Return type: bool
52   return _retval;
53 }
54 
media_source_is_dial_source(struct _cef_media_source_t * self)55 int CEF_CALLBACK media_source_is_dial_source(struct _cef_media_source_t* self) {
56   shutdown_checker::AssertNotShutdown();
57 
58   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
59 
60   DCHECK(self);
61   if (!self)
62     return 0;
63 
64   // Execute
65   bool _retval = CefMediaSourceCppToC::Get(self)->IsDialSource();
66 
67   // Return type: bool
68   return _retval;
69 }
70 
71 }  // namespace
72 
73 // CONSTRUCTOR - Do not edit by hand.
74 
CefMediaSourceCppToC()75 CefMediaSourceCppToC::CefMediaSourceCppToC() {
76   GetStruct()->get_id = media_source_get_id;
77   GetStruct()->is_cast_source = media_source_is_cast_source;
78   GetStruct()->is_dial_source = media_source_is_dial_source;
79 }
80 
81 // DESTRUCTOR - Do not edit by hand.
82 
~CefMediaSourceCppToC()83 CefMediaSourceCppToC::~CefMediaSourceCppToC() {
84   shutdown_checker::AssertNotShutdown();
85 }
86 
87 template <>
88 CefRefPtr<CefMediaSource>
89 CefCppToCRefCounted<CefMediaSourceCppToC, CefMediaSource, cef_media_source_t>::
UnwrapDerived(CefWrapperType type,cef_media_source_t * s)90     UnwrapDerived(CefWrapperType type, cef_media_source_t* s) {
91   NOTREACHED() << "Unexpected class type: " << type;
92   return nullptr;
93 }
94 
95 template <>
96 CefWrapperType CefCppToCRefCounted<CefMediaSourceCppToC,
97                                    CefMediaSource,
98                                    cef_media_source_t>::kWrapperType =
99     WT_MEDIA_SOURCE;
100