• 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=3302f28c60da03b9f5ba5fa110523b353765d1a3$
13 //
14 
15 #include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h"
16 #include "libcef_dll/cpptoc/command_line_cpptoc.h"
17 #include "libcef_dll/ctocpp/client_ctocpp.h"
18 
19 // VIRTUAL METHODS - Body may be edited by hand.
20 
21 NO_SANITIZE("cfi-icall")
OnContextInitialized()22 void CefBrowserProcessHandlerCToCpp::OnContextInitialized() {
23   cef_browser_process_handler_t* _struct = GetStruct();
24   if (CEF_MEMBER_MISSING(_struct, on_context_initialized))
25     return;
26 
27   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
28 
29   // Execute
30   _struct->on_context_initialized(_struct);
31 }
32 
33 NO_SANITIZE("cfi-icall")
OnBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_line)34 void CefBrowserProcessHandlerCToCpp::OnBeforeChildProcessLaunch(
35     CefRefPtr<CefCommandLine> command_line) {
36   cef_browser_process_handler_t* _struct = GetStruct();
37   if (CEF_MEMBER_MISSING(_struct, on_before_child_process_launch))
38     return;
39 
40   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
41 
42   // Verify param: command_line; type: refptr_diff
43   DCHECK(command_line.get());
44   if (!command_line.get())
45     return;
46 
47   // Execute
48   _struct->on_before_child_process_launch(
49       _struct, CefCommandLineCppToC::Wrap(command_line));
50 }
51 
52 NO_SANITIZE("cfi-icall")
OnScheduleMessagePumpWork(int64 delay_ms)53 void CefBrowserProcessHandlerCToCpp::OnScheduleMessagePumpWork(int64 delay_ms) {
54   cef_browser_process_handler_t* _struct = GetStruct();
55   if (CEF_MEMBER_MISSING(_struct, on_schedule_message_pump_work))
56     return;
57 
58   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
59 
60   // Execute
61   _struct->on_schedule_message_pump_work(_struct, delay_ms);
62 }
63 
64 NO_SANITIZE("cfi-icall")
GetDefaultClient()65 CefRefPtr<CefClient> CefBrowserProcessHandlerCToCpp::GetDefaultClient() {
66   cef_browser_process_handler_t* _struct = GetStruct();
67   if (CEF_MEMBER_MISSING(_struct, get_default_client))
68     return nullptr;
69 
70   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
71 
72   // Execute
73   cef_client_t* _retval = _struct->get_default_client(_struct);
74 
75   // Return type: refptr_same
76   return CefClientCToCpp::Wrap(_retval);
77 }
78 
79 // CONSTRUCTOR - Do not edit by hand.
80 
CefBrowserProcessHandlerCToCpp()81 CefBrowserProcessHandlerCToCpp::CefBrowserProcessHandlerCToCpp() {}
82 
83 // DESTRUCTOR - Do not edit by hand.
84 
~CefBrowserProcessHandlerCToCpp()85 CefBrowserProcessHandlerCToCpp::~CefBrowserProcessHandlerCToCpp() {}
86 
87 template <>
88 cef_browser_process_handler_t* CefCToCppRefCounted<
89     CefBrowserProcessHandlerCToCpp,
90     CefBrowserProcessHandler,
UnwrapDerived(CefWrapperType type,CefBrowserProcessHandler * c)91     cef_browser_process_handler_t>::UnwrapDerived(CefWrapperType type,
92                                                   CefBrowserProcessHandler* c) {
93   NOTREACHED() << "Unexpected class type: " << type;
94   return nullptr;
95 }
96 
97 template <>
98 CefWrapperType
99     CefCToCppRefCounted<CefBrowserProcessHandlerCToCpp,
100                         CefBrowserProcessHandler,
101                         cef_browser_process_handler_t>::kWrapperType =
102         WT_BROWSER_PROCESS_HANDLER;
103