• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 //    * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //    * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // ---------------------------------------------------------------------------
31 //
32 // This file was generated by the CEF translator tool and should not edited
33 // by hand. See the translator.README.txt file in the tools directory for
34 // more information.
35 //
36 // $hash=8c97f9b58c642c144cc37824ad820192640307cb$
37 //
38 
39 #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
40 #define CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
41 #pragma once
42 
43 #include "include/capi/cef_base_capi.h"
44 #include "include/capi/cef_client_capi.h"
45 #include "include/capi/cef_command_line_capi.h"
46 #include "include/capi/cef_values_capi.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 ///
53 // Structure used to implement browser process callbacks. The functions of this
54 // structure will be called on the browser process main thread unless otherwise
55 // indicated.
56 ///
57 typedef struct _cef_browser_process_handler_t {
58   ///
59   // Base structure.
60   ///
61   cef_base_ref_counted_t base;
62 
63   ///
64   // Called on the browser process UI thread immediately after the CEF context
65   // has been initialized.
66   ///
67   void(CEF_CALLBACK* on_context_initialized)(
68       struct _cef_browser_process_handler_t* self);
69 
70   ///
71   // Called before a child process is launched. Will be called on the browser
72   // process UI thread when launching a render process and on the browser
73   // process IO thread when launching a GPU or plugin process. Provides an
74   // opportunity to modify the child process command line. Do not keep a
75   // reference to |command_line| outside of this function.
76   ///
77   void(CEF_CALLBACK* on_before_child_process_launch)(
78       struct _cef_browser_process_handler_t* self,
79       struct _cef_command_line_t* command_line);
80 
81   ///
82   // Called from any thread when work has been scheduled for the browser process
83   // main (UI) thread. This callback is used in combination with CefSettings.
84   // external_message_pump and cef_do_message_loop_work() in cases where the CEF
85   // message loop must be integrated into an existing application message loop
86   // (see additional comments and warnings on CefDoMessageLoopWork). This
87   // callback should schedule a cef_do_message_loop_work() call to happen on the
88   // main (UI) thread. |delay_ms| is the requested delay in milliseconds. If
89   // |delay_ms| is <= 0 then the call should happen reasonably soon. If
90   // |delay_ms| is > 0 then the call should be scheduled to happen after the
91   // specified delay and any currently pending scheduled call should be
92   // cancelled.
93   ///
94   void(CEF_CALLBACK* on_schedule_message_pump_work)(
95       struct _cef_browser_process_handler_t* self,
96       int64 delay_ms);
97 
98   ///
99   // Return the default client for use with a newly created browser window. If
100   // null is returned the browser will be unmanaged (no callbacks will be
101   // executed for that browser) and application shutdown will be blocked until
102   // the browser window is closed manually. This function is currently only used
103   // with the chrome runtime.
104   ///
105   struct _cef_client_t*(CEF_CALLBACK* get_default_client)(
106       struct _cef_browser_process_handler_t* self);
107 } cef_browser_process_handler_t;
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif  // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_
114