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=452f119327aff2ec0aaed162adf85bbd239b9033$
13 //
14
15 #include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h"
16 #include "libcef_dll/cpptoc/client_cpptoc.h"
17 #include "libcef_dll/ctocpp/command_line_ctocpp.h"
18
19 namespace {
20
21 // MEMBER FUNCTIONS - Body may be edited by hand.
22
browser_process_handler_on_context_initialized(struct _cef_browser_process_handler_t * self)23 void CEF_CALLBACK browser_process_handler_on_context_initialized(
24 struct _cef_browser_process_handler_t* self) {
25 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
26
27 DCHECK(self);
28 if (!self)
29 return;
30
31 // Execute
32 CefBrowserProcessHandlerCppToC::Get(self)->OnContextInitialized();
33 }
34
browser_process_handler_on_before_child_process_launch(struct _cef_browser_process_handler_t * self,struct _cef_command_line_t * command_line)35 void CEF_CALLBACK browser_process_handler_on_before_child_process_launch(
36 struct _cef_browser_process_handler_t* self,
37 struct _cef_command_line_t* command_line) {
38 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
39
40 DCHECK(self);
41 if (!self)
42 return;
43 // Verify param: command_line; type: refptr_diff
44 DCHECK(command_line);
45 if (!command_line)
46 return;
47
48 // Execute
49 CefBrowserProcessHandlerCppToC::Get(self)->OnBeforeChildProcessLaunch(
50 CefCommandLineCToCpp::Wrap(command_line));
51 }
52
browser_process_handler_on_schedule_message_pump_work(struct _cef_browser_process_handler_t * self,int64 delay_ms)53 void CEF_CALLBACK browser_process_handler_on_schedule_message_pump_work(
54 struct _cef_browser_process_handler_t* self,
55 int64 delay_ms) {
56 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
57
58 DCHECK(self);
59 if (!self)
60 return;
61
62 // Execute
63 CefBrowserProcessHandlerCppToC::Get(self)->OnScheduleMessagePumpWork(
64 delay_ms);
65 }
66
browser_process_handler_get_default_client(struct _cef_browser_process_handler_t * self)67 struct _cef_client_t* CEF_CALLBACK browser_process_handler_get_default_client(
68 struct _cef_browser_process_handler_t* self) {
69 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
70
71 DCHECK(self);
72 if (!self)
73 return NULL;
74
75 // Execute
76 CefRefPtr<CefClient> _retval =
77 CefBrowserProcessHandlerCppToC::Get(self)->GetDefaultClient();
78
79 // Return type: refptr_same
80 return CefClientCppToC::Wrap(_retval);
81 }
82
83 } // namespace
84
85 // CONSTRUCTOR - Do not edit by hand.
86
CefBrowserProcessHandlerCppToC()87 CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC() {
88 GetStruct()->on_context_initialized =
89 browser_process_handler_on_context_initialized;
90 GetStruct()->on_before_child_process_launch =
91 browser_process_handler_on_before_child_process_launch;
92 GetStruct()->on_schedule_message_pump_work =
93 browser_process_handler_on_schedule_message_pump_work;
94 GetStruct()->get_default_client = browser_process_handler_get_default_client;
95 }
96
97 // DESTRUCTOR - Do not edit by hand.
98
~CefBrowserProcessHandlerCppToC()99 CefBrowserProcessHandlerCppToC::~CefBrowserProcessHandlerCppToC() {}
100
101 template <>
102 CefRefPtr<CefBrowserProcessHandler> CefCppToCRefCounted<
103 CefBrowserProcessHandlerCppToC,
104 CefBrowserProcessHandler,
UnwrapDerived(CefWrapperType type,cef_browser_process_handler_t * s)105 cef_browser_process_handler_t>::UnwrapDerived(CefWrapperType type,
106 cef_browser_process_handler_t*
107 s) {
108 NOTREACHED() << "Unexpected class type: " << type;
109 return nullptr;
110 }
111
112 template <>
113 CefWrapperType
114 CefCppToCRefCounted<CefBrowserProcessHandlerCppToC,
115 CefBrowserProcessHandler,
116 cef_browser_process_handler_t>::kWrapperType =
117 WT_BROWSER_PROCESS_HANDLER;
118