1 // Copyright (c) 2017 Marshall A. Greenblatt. All rights reserved.
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
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
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.
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.
30 // ---------------------------------------------------------------------------
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
37 #ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
38 #define CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_
41 #include "include/capi/cef_base_capi.h"
42 #include "include/capi/cef_context_menu_handler_capi.h"
43 #include "include/capi/cef_dialog_handler_capi.h"
44 #include "include/capi/cef_display_handler_capi.h"
45 #include "include/capi/cef_download_handler_capi.h"
46 #include "include/capi/cef_drag_handler_capi.h"
47 #include "include/capi/cef_find_handler_capi.h"
48 #include "include/capi/cef_focus_handler_capi.h"
49 #include "include/capi/cef_geolocation_handler_capi.h"
50 #include "include/capi/cef_jsdialog_handler_capi.h"
51 #include "include/capi/cef_keyboard_handler_capi.h"
52 #include "include/capi/cef_life_span_handler_capi.h"
53 #include "include/capi/cef_load_handler_capi.h"
54 #include "include/capi/cef_process_message_capi.h"
55 #include "include/capi/cef_render_handler_capi.h"
56 #include "include/capi/cef_request_handler_capi.h"
64 // Implement this structure to provide handler implementations.
66 typedef struct _cef_client_t {
70 cef_base_ref_counted_t base;
73 // Return the handler for context menus. If no handler is provided the default
74 // implementation will be used.
76 struct _cef_context_menu_handler_t* (CEF_CALLBACK *get_context_menu_handler)(
77 struct _cef_client_t* self);
80 // Return the handler for dialogs. If no handler is provided the default
81 // implementation will be used.
83 struct _cef_dialog_handler_t* (CEF_CALLBACK *get_dialog_handler)(
84 struct _cef_client_t* self);
87 // Return the handler for browser display state events.
89 struct _cef_display_handler_t* (CEF_CALLBACK *get_display_handler)(
90 struct _cef_client_t* self);
93 // Return the handler for download events. If no handler is returned downloads
94 // will not be allowed.
96 struct _cef_download_handler_t* (CEF_CALLBACK *get_download_handler)(
97 struct _cef_client_t* self);
100 // Return the handler for drag events.
102 struct _cef_drag_handler_t* (CEF_CALLBACK *get_drag_handler)(
103 struct _cef_client_t* self);
106 // Return the handler for find result events.
108 struct _cef_find_handler_t* (CEF_CALLBACK *get_find_handler)(
109 struct _cef_client_t* self);
112 // Return the handler for focus events.
114 struct _cef_focus_handler_t* (CEF_CALLBACK *get_focus_handler)(
115 struct _cef_client_t* self);
118 // Return the handler for geolocation permissions requests. If no handler is
119 // provided geolocation access will be denied by default.
121 struct _cef_geolocation_handler_t* (CEF_CALLBACK *get_geolocation_handler)(
122 struct _cef_client_t* self);
125 // Return the handler for JavaScript dialogs. If no handler is provided the
126 // default implementation will be used.
128 struct _cef_jsdialog_handler_t* (CEF_CALLBACK *get_jsdialog_handler)(
129 struct _cef_client_t* self);
132 // Return the handler for keyboard events.
134 struct _cef_keyboard_handler_t* (CEF_CALLBACK *get_keyboard_handler)(
135 struct _cef_client_t* self);
138 // Return the handler for browser life span events.
140 struct _cef_life_span_handler_t* (CEF_CALLBACK *get_life_span_handler)(
141 struct _cef_client_t* self);
144 // Return the handler for browser load status events.
146 struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
147 struct _cef_client_t* self);
150 // Return the handler for off-screen rendering events.
152 struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)(
153 struct _cef_client_t* self);
156 // Return the handler for browser request events.
158 struct _cef_request_handler_t* (CEF_CALLBACK *get_request_handler)(
159 struct _cef_client_t* self);
162 // Called when a new message is received from a different process. Return true
163 // (1) if the message was handled or false (0) otherwise. Do not keep a
164 // reference to or attempt to access the message outside of this callback.
166 int (CEF_CALLBACK *on_process_message_received)(struct _cef_client_t* self,
167 struct _cef_browser_t* browser, cef_process_id_t source_process,
168 struct _cef_process_message_t* message);
176 #endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_