private int on_console_message(cef_display_handler_t *self, cef_browser_t *browser, cef_string_t *message, cef_string_t *source, int line) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mMessage = cef_string_t.ToString(message); var mSource = cef_string_t.ToString(source); return(OnConsoleMessage(mBrowser, mMessage, mSource, line) ? 1 : 0); }
private int on_drag_enter(cef_drag_handler_t *self, cef_browser_t *browser, cef_drag_data_t *dragData, CefDragOperationsMask mask) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_dragData = CefDragData.FromNative(dragData); var m_result = OnDragEnter(m_browser, m_dragData, mask); return(m_result ? 1 : 0); }
private void on_address_change(cef_display_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_string_t *url) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mUrl = cef_string_t.ToString(url); OnAddressChange(mBrowser, mFrame, mUrl); }
private int on_before_unload_dialog(cef_jsdialog_handler_t *self, cef_browser_t *browser, cef_string_t *message_text, int is_reload, cef_jsdialog_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_message_text = cef_string_t.ToString(message_text); var m_callback = CefJSDialogCallback.FromNative(callback); return(OnBeforeUnloadDialog(m_browser, m_message_text, is_reload != 0, m_callback) ? 1 : 0); }
private void on_resource_load_complete(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, CefUrlRequestStatus status, long received_content_length) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mRequest = CefRequest.FromNative(request); var mResponse = CefResponse.FromNative(response); OnResourceLoadComplete(mBrowser, mFrame, mRequest, mResponse, status, received_content_length); }
private void on_load_error(cef_load_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, CefErrorCode errorCode, cef_string_t *errorText, cef_string_t *failedUrl) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_errorText = cef_string_t.ToString(errorText); var m_failedUrl = cef_string_t.ToString(failedUrl); OnLoadError(m_browser, m_frame, errorCode, m_errorText, m_failedUrl); }
private int start_dragging(cef_render_handler_t *self, cef_browser_t *browser, cef_drag_data_t *drag_data, CefDragOperationsMask allowed_ops, int x, int y) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_dragData = CefDragData.FromNative(drag_data); var m_result = StartDragging(m_browser, m_dragData, allowed_ops, x, y); return(m_result ? 1 : 0); }
private int on_request_geolocation_permission(cef_geolocation_handler_t *self, cef_browser_t *browser, cef_string_t *requesting_url, int request_id, cef_geolocation_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_requesting_url = cef_string_t.ToString(requesting_url); var m_callback = CefGeolocationCallback.FromNative(callback); var m_result = OnRequestGeolocationPermission(m_browser, m_requesting_url, request_id, m_callback); return(m_result ? 1 : 0); }
private int on_quota_request(cef_request_handler_t *self, cef_browser_t *browser, cef_string_t *origin_url, long new_size, cef_request_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_origin_url = cef_string_t.ToString(origin_url); var m_callback = CefRequestCallback.FromNative(callback); var result = OnQuotaRequest(m_browser, m_origin_url, new_size, m_callback); return(result ? 1 : 0); }
private void on_uncaught_exception(cef_render_process_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_v8context_t *context, cef_v8exception_t *exception, cef_v8stack_trace_t *stackTrace) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mContext = CefV8Context.FromNative(context); var mException = CefV8Exception.FromNative(exception); var mStackTrace = CefV8StackTrace.FromNative(stackTrace); OnUncaughtException(mBrowser, mFrame, mContext, mException, mStackTrace); }
private void on_protocol_execution(cef_request_handler_t *self, cef_browser_t *browser, cef_string_t *url, int *allow_os_execution) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_url = cef_string_t.ToString(url); bool m_allow_os_execution; OnProtocolExecution(m_browser, m_url, out m_allow_os_execution); *allow_os_execution = m_allow_os_execution ? 1 : 0; }
private int on_before_navigation(cef_render_process_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, CefNavigationType navigation_type, int is_redirect) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_request = CefRequest.FromNative(request); var result = OnBeforeNavigation(m_browser, m_frame, m_request, navigation_type, is_redirect != 0); return(result ? 1 : 0); }
private void on_download_updated(cef_download_handler_t *self, cef_browser_t *browser, cef_download_item_t *download_item, cef_download_item_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_download_item = CefDownloadItem.FromNative(download_item); var m_callback = CefDownloadItemCallback.FromNative(callback); OnDownloadUpdated(m_browser, m_download_item, m_callback); m_download_item.Dispose(); }
private void on_before_download(cef_download_handler_t *self, cef_browser_t *browser, cef_download_item_t *download_item, cef_string_t *suggested_name, cef_before_download_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_download_item = CefDownloadItem.FromNative(download_item); var m_suggested_name = cef_string_t.ToString(suggested_name); var m_callback = CefBeforeDownloadCallback.FromNative(callback); OnBeforeDownload(m_browser, m_download_item, m_suggested_name, m_callback); m_download_item.Dispose(); }
private int on_open_urlfrom_tab(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_string_t *target_url, CefWindowOpenDisposition target_disposition, int user_gesture) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_targetUrl = cef_string_t.ToString(target_url); var m_userGesture = user_gesture != 0; var m_result = OnOpenUrlFromTab(m_browser, m_frame, m_targetUrl, target_disposition, m_userGesture); return(m_result ? 1 : 0); }
private int on_process_message_received(cef_render_process_handler_t *self, cef_browser_t *browser, CefProcessId source_process, cef_process_message_t *message) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_message = CefProcessMessage.FromNative(message); var result = OnProcessMessageReceived(m_browser, source_process, m_message); m_message.Dispose(); return(result ? 1 : 0); }
private int on_before_browse(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, int is_redirect) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_request = CefRequest.FromNative(request); var m_isRedirect = is_redirect != 0; var result = OnBeforeBrowse(m_browser, m_frame, m_request, m_isRedirect); return(result ? 1 : 0); }
private int on_certificate_error(cef_request_handler_t *self, cef_browser_t *browser, CefErrorCode cert_error, cef_string_t *request_url, cef_sslinfo_t *ssl_info, cef_request_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_request_url = cef_string_t.ToString(request_url); var m_ssl_info = CefSslInfo.FromNative(ssl_info); var m_callback = CefRequestCallback.FromNativeOrNull(callback); var result = OnCertificateError(m_browser, cert_error, m_request_url, m_ssl_info, m_callback); return(result ? 1 : 0); }
private int on_resource_response(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_request = CefRequest.FromNative(request); var m_response = CefResponse.FromNative(response); var m_result = OnResourceResponse(m_browser, m_frame, m_request, m_response); return(m_result ? 1 : 0); }
private void on_before_context_menu(cef_context_menu_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_context_menu_params_t * @params, cef_menu_model_t *model) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mState = CefContextMenuParams.FromNative(@params); var mModel = CefMenuModel.FromNative(model); OnBeforeContextMenu(mBrowser, mFrame, mState, mModel); mState.Dispose(); mModel.Dispose(); }
private int on_file_dialog(cef_dialog_handler_t *self, cef_browser_t *browser, CefFileDialogMode mode, cef_string_t *title, cef_string_t *default_file_path, cef_string_list *accept_filters, int selected_accept_filter, cef_file_dialog_callback_t *callback) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mTitle = cef_string_t.ToString(title); var mDefaultFilePath = cef_string_t.ToString(default_file_path); var mAcceptFilters = cef_string_list.ToArray(accept_filters); var mCallback = CefFileDialogCallback.FromNative(callback); var result = OnFileDialog(mBrowser, mode, mTitle, mDefaultFilePath, mAcceptFilters, selected_accept_filter, mCallback); return(result ? 1 : 0); }
private void on_cursor_change(cef_render_handler_t *self, cef_browser_t *browser, IntPtr cursor, CefCursorType type, cef_cursor_info_t *custom_cursor_info) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_cefCursorInfo = type == CefCursorType.Custom ? new CefCursorInfo(custom_cursor_info) : null; OnCursorChange(m_browser, cursor, type, m_cefCursorInfo); if (m_cefCursorInfo != null) { m_cefCursorInfo.Dispose(); } }
private int get_screen_info(cef_render_handler_t *self, cef_browser_t *browser, cef_screen_info_t *screen_info) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_screenInfo = new CefScreenInfo(screen_info); var result = GetScreenInfo(m_browser, m_screenInfo); m_screenInfo.Dispose(); m_browser.Dispose(); return(result ? 1 : 0); }
private int on_context_menu_command(cef_context_menu_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_context_menu_params_t * @params, int command_id, CefEventFlags event_flags) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mState = CefContextMenuParams.FromNative(@params); var result = OnContextMenuCommand(mBrowser, mFrame, mState, command_id, event_flags); mState.Dispose(); return(result ? 1 : 0); }
private cef_resource_handler_t *get_resource_handler(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_request = CefRequest.FromNative(request); var handler = GetResourceHandler(m_browser, m_frame, m_request); m_request.Dispose(); return(handler != null?handler.ToNative() : null); }
private void on_focused_node_changed(cef_render_process_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_domnode_t *node) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_node = CefDomNode.FromNativeOrNull(node); OnFocusedNodeChanged(m_browser, m_frame, m_node); if (m_node != null) { m_node.Dispose(); } }
private int get_auth_credentials(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, int isProxy, cef_string_t *host, int port, cef_string_t *realm, cef_string_t *scheme, cef_auth_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_frame = CefFrame.FromNative(frame); var m_host = cef_string_t.ToString(host); var m_realm = cef_string_t.ToString(realm); var m_scheme = cef_string_t.ToString(scheme); var m_callback = CefAuthCallback.FromNative(callback); var result = GetAuthCredentials(m_browser, m_frame, isProxy != 0, m_host, port, m_realm, m_scheme, m_callback); return(result ? 1 : 0); }
private int run_context_menu(cef_context_menu_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_context_menu_params_t * @params, cef_menu_model_t *model, cef_run_context_menu_callback_t *callback) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mParameters = CefContextMenuParams.FromNative(@params); var mModel = CefMenuModel.FromNative(model); var mCallback = CefRunContextMenuCallback.FromNative(callback); var result = RunContextMenu(mBrowser, mFrame, mParameters, mModel, mCallback); mParameters.Dispose(); mModel.Dispose(); return(result ? 1 : 0); }
private int on_key_event(cef_keyboard_handler_t *self, cef_browser_t *browser, cef_key_event_t * @event, IntPtr os_event) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_event = CefKeyEvent.FromNative(@event); // TODO: wrap cef_event_handle_t (os_event) IntPtr m_os_event = IntPtr.Zero; if (os_event != IntPtr.Zero) { } var result = OnKeyEvent(m_browser, m_event, m_os_event); return(result ? 1 : 0); }
private int on_jsdialog(cef_jsdialog_handler_t *self, cef_browser_t *browser, cef_string_t *origin_url, cef_string_t *accept_lang, CefJSDialogType dialog_type, cef_string_t *message_text, cef_string_t *default_prompt_text, cef_jsdialog_callback_t *callback, int *suppress_message) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_origin_url = cef_string_t.ToString(origin_url); var m_accept_lang = cef_string_t.ToString(accept_lang); var m_message_text = cef_string_t.ToString(message_text); var m_default_prompt_text = cef_string_t.ToString(default_prompt_text); var m_callback = CefJSDialogCallback.FromNative(callback); bool m_suppress_message; var result = OnJSDialog(m_browser, m_origin_url, m_accept_lang, dialog_type, m_message_text, m_default_prompt_text, m_callback, out m_suppress_message); *suppress_message = m_suppress_message ? 1 : 0; return(result ? 1 : 0); }