• 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=b63f665e68e4dc6269c3e88b81068190ea90abb3$
13 //
14 
15 #include "libcef_dll/cpptoc/process_message_cpptoc.h"
16 #include "libcef_dll/cpptoc/list_value_cpptoc.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 // GLOBAL FUNCTIONS - Body may be edited by hand.
20 
cef_process_message_create(const cef_string_t * name)21 CEF_EXPORT cef_process_message_t* cef_process_message_create(
22     const cef_string_t* name) {
23   shutdown_checker::AssertNotShutdown();
24 
25   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26 
27   // Verify param: name; type: string_byref_const
28   DCHECK(name);
29   if (!name)
30     return NULL;
31 
32   // Execute
33   CefRefPtr<CefProcessMessage> _retval =
34       CefProcessMessage::Create(CefString(name));
35 
36   // Return type: refptr_same
37   return CefProcessMessageCppToC::Wrap(_retval);
38 }
39 
40 namespace {
41 
42 // MEMBER FUNCTIONS - Body may be edited by hand.
43 
process_message_is_valid(struct _cef_process_message_t * self)44 int CEF_CALLBACK process_message_is_valid(struct _cef_process_message_t* self) {
45   shutdown_checker::AssertNotShutdown();
46 
47   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
48 
49   DCHECK(self);
50   if (!self)
51     return 0;
52 
53   // Execute
54   bool _retval = CefProcessMessageCppToC::Get(self)->IsValid();
55 
56   // Return type: bool
57   return _retval;
58 }
59 
60 int CEF_CALLBACK
process_message_is_read_only(struct _cef_process_message_t * self)61 process_message_is_read_only(struct _cef_process_message_t* self) {
62   shutdown_checker::AssertNotShutdown();
63 
64   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
65 
66   DCHECK(self);
67   if (!self)
68     return 0;
69 
70   // Execute
71   bool _retval = CefProcessMessageCppToC::Get(self)->IsReadOnly();
72 
73   // Return type: bool
74   return _retval;
75 }
76 
77 struct _cef_process_message_t* CEF_CALLBACK
process_message_copy(struct _cef_process_message_t * self)78 process_message_copy(struct _cef_process_message_t* self) {
79   shutdown_checker::AssertNotShutdown();
80 
81   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
82 
83   DCHECK(self);
84   if (!self)
85     return NULL;
86 
87   // Execute
88   CefRefPtr<CefProcessMessage> _retval =
89       CefProcessMessageCppToC::Get(self)->Copy();
90 
91   // Return type: refptr_same
92   return CefProcessMessageCppToC::Wrap(_retval);
93 }
94 
95 cef_string_userfree_t CEF_CALLBACK
process_message_get_name(struct _cef_process_message_t * self)96 process_message_get_name(struct _cef_process_message_t* self) {
97   shutdown_checker::AssertNotShutdown();
98 
99   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
100 
101   DCHECK(self);
102   if (!self)
103     return NULL;
104 
105   // Execute
106   CefString _retval = CefProcessMessageCppToC::Get(self)->GetName();
107 
108   // Return type: string
109   return _retval.DetachToUserFree();
110 }
111 
112 struct _cef_list_value_t* CEF_CALLBACK
process_message_get_argument_list(struct _cef_process_message_t * self)113 process_message_get_argument_list(struct _cef_process_message_t* self) {
114   shutdown_checker::AssertNotShutdown();
115 
116   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
117 
118   DCHECK(self);
119   if (!self)
120     return NULL;
121 
122   // Execute
123   CefRefPtr<CefListValue> _retval =
124       CefProcessMessageCppToC::Get(self)->GetArgumentList();
125 
126   // Return type: refptr_same
127   return CefListValueCppToC::Wrap(_retval);
128 }
129 
130 }  // namespace
131 
132 // CONSTRUCTOR - Do not edit by hand.
133 
CefProcessMessageCppToC()134 CefProcessMessageCppToC::CefProcessMessageCppToC() {
135   GetStruct()->is_valid = process_message_is_valid;
136   GetStruct()->is_read_only = process_message_is_read_only;
137   GetStruct()->copy = process_message_copy;
138   GetStruct()->get_name = process_message_get_name;
139   GetStruct()->get_argument_list = process_message_get_argument_list;
140 }
141 
142 // DESTRUCTOR - Do not edit by hand.
143 
~CefProcessMessageCppToC()144 CefProcessMessageCppToC::~CefProcessMessageCppToC() {
145   shutdown_checker::AssertNotShutdown();
146 }
147 
148 template <>
149 CefRefPtr<CefProcessMessage> CefCppToCRefCounted<
150     CefProcessMessageCppToC,
151     CefProcessMessage,
UnwrapDerived(CefWrapperType type,cef_process_message_t * s)152     cef_process_message_t>::UnwrapDerived(CefWrapperType type,
153                                           cef_process_message_t* s) {
154   NOTREACHED() << "Unexpected class type: " << type;
155   return nullptr;
156 }
157 
158 template <>
159 CefWrapperType CefCppToCRefCounted<CefProcessMessageCppToC,
160                                    CefProcessMessage,
161                                    cef_process_message_t>::kWrapperType =
162     WT_PROCESS_MESSAGE;
163