github.com/ckxng/wakeup@v0.0.0-20190105202853-90356a5f5a15/include/capi/cef_render_process_handler_capi.h (about) 1 // Copyright (c) 2014 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 37 #ifndef CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ 38 #define CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ 39 #pragma once 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 #include "include/capi/cef_base_capi.h" 46 #include "include/capi/cef_browser_capi.h" 47 #include "include/capi/cef_dom_capi.h" 48 #include "include/capi/cef_frame_capi.h" 49 #include "include/capi/cef_load_handler_capi.h" 50 #include "include/capi/cef_process_message_capi.h" 51 #include "include/capi/cef_v8_capi.h" 52 #include "include/capi/cef_values_capi.h" 53 54 55 /// 56 // Structure used to implement render process callbacks. The functions of this 57 // structure will be called on the render process main thread (TID_RENDERER) 58 // unless otherwise indicated. 59 /// 60 typedef struct _cef_render_process_handler_t { 61 /// 62 // Base structure. 63 /// 64 cef_base_t base; 65 66 /// 67 // Called after the render process main thread has been created. |extra_info| 68 // is a read-only value originating from 69 // cef_browser_process_handler_t::on_render_process_thread_created(). Do not 70 // keep a reference to |extra_info| outside of this function. 71 /// 72 void (CEF_CALLBACK *on_render_thread_created)( 73 struct _cef_render_process_handler_t* self, 74 struct _cef_list_value_t* extra_info); 75 76 /// 77 // Called after WebKit has been initialized. 78 /// 79 void (CEF_CALLBACK *on_web_kit_initialized)( 80 struct _cef_render_process_handler_t* self); 81 82 /// 83 // Called after a browser has been created. When browsing cross-origin a new 84 // browser will be created before the old browser with the same identifier is 85 // destroyed. 86 /// 87 void (CEF_CALLBACK *on_browser_created)( 88 struct _cef_render_process_handler_t* self, 89 struct _cef_browser_t* browser); 90 91 /// 92 // Called before a browser is destroyed. 93 /// 94 void (CEF_CALLBACK *on_browser_destroyed)( 95 struct _cef_render_process_handler_t* self, 96 struct _cef_browser_t* browser); 97 98 /// 99 // Return the handler for browser load status events. 100 /// 101 struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)( 102 struct _cef_render_process_handler_t* self); 103 104 /// 105 // Called before browser navigation. Return true (1) to cancel the navigation 106 // or false (0) to allow the navigation to proceed. The |request| object 107 // cannot be modified in this callback. 108 /// 109 int (CEF_CALLBACK *on_before_navigation)( 110 struct _cef_render_process_handler_t* self, 111 struct _cef_browser_t* browser, struct _cef_frame_t* frame, 112 struct _cef_request_t* request, cef_navigation_type_t navigation_type, 113 int is_redirect); 114 115 /// 116 // Called immediately after the V8 context for a frame has been created. To 117 // retrieve the JavaScript 'window' object use the 118 // cef_v8context_t::get_global() function. V8 handles can only be accessed 119 // from the thread on which they are created. A task runner for posting tasks 120 // on the associated thread can be retrieved via the 121 // cef_v8context_t::get_task_runner() function. 122 /// 123 void (CEF_CALLBACK *on_context_created)( 124 struct _cef_render_process_handler_t* self, 125 struct _cef_browser_t* browser, struct _cef_frame_t* frame, 126 struct _cef_v8context_t* context); 127 128 /// 129 // Called immediately before the V8 context for a frame is released. No 130 // references to the context should be kept after this function is called. 131 /// 132 void (CEF_CALLBACK *on_context_released)( 133 struct _cef_render_process_handler_t* self, 134 struct _cef_browser_t* browser, struct _cef_frame_t* frame, 135 struct _cef_v8context_t* context); 136 137 /// 138 // Called for global uncaught exceptions in a frame. Execution of this 139 // callback is disabled by default. To enable set 140 // CefSettings.uncaught_exception_stack_size > 0. 141 /// 142 void (CEF_CALLBACK *on_uncaught_exception)( 143 struct _cef_render_process_handler_t* self, 144 struct _cef_browser_t* browser, struct _cef_frame_t* frame, 145 struct _cef_v8context_t* context, struct _cef_v8exception_t* exception, 146 struct _cef_v8stack_trace_t* stackTrace); 147 148 /// 149 // Called when a new node in the the browser gets focus. The |node| value may 150 // be NULL if no specific node has gained focus. The node object passed to 151 // this function represents a snapshot of the DOM at the time this function is 152 // executed. DOM objects are only valid for the scope of this function. Do not 153 // keep references to or attempt to access any DOM objects outside the scope 154 // of this function. 155 /// 156 void (CEF_CALLBACK *on_focused_node_changed)( 157 struct _cef_render_process_handler_t* self, 158 struct _cef_browser_t* browser, struct _cef_frame_t* frame, 159 struct _cef_domnode_t* node); 160 161 /// 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. 165 /// 166 int (CEF_CALLBACK *on_process_message_received)( 167 struct _cef_render_process_handler_t* self, 168 struct _cef_browser_t* browser, cef_process_id_t source_process, 169 struct _cef_process_message_t* message); 170 } cef_render_process_handler_t; 171 172 173 #ifdef __cplusplus 174 } 175 #endif 176 177 #endif // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_