예제 #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);
        }
예제 #2
0
        private int get_audio_parameters(cef_audio_handler_t *self, cef_browser_t *browser, cef_audio_parameters_t * @params)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);

            var mResult = GetAudioParameters(mBrowser, new CefAudioParameters(@params));

            return(mResult ? 1 : 0);
        }
예제 #3
0
        private int on_console_message(cef_display_handler_t *self, cef_browser_t *browser, CefLogSeverity level, 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, level, mMessage, mSource, line) ? 1 : 0);
        }
        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);
        }
예제 #5
0
        private void on_text_selection_changed(cef_render_handler_t *self, cef_browser_t *browser, cef_string_t *selected_text, cef_range_t *selected_range)
        {
            CheckSelf(self);

            var m_browser        = CefBrowser.FromNative(browser);
            var m_selected_text  = cef_string_t.ToString(selected_text);
            var m_selected_range = new CefRange(selected_range->from, selected_range->to);

            OnTextSelectionChanged(m_browser, m_selected_text, m_selected_range);
        }
        private void on_context_created(cef_render_process_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_v8context_t *context)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_frame   = CefFrame.FromNative(frame);
            var m_context = CefV8Context.FromNative(context);

            OnContextCreated(m_browser, m_frame, m_context);
        }
예제 #7
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);
        }
예제 #8
0
        private int on_print_dialog(cef_print_handler_t *self, cef_browser_t *browser, int has_selection, cef_print_dialog_callback_t *callback)
        {
            CheckSelf(self);

            var mBrowser   = CefBrowser.FromNative(browser);
            var m_callback = CefPrintDialogCallback.FromNative(callback);
            var m_result   = OnPrintDialog(mBrowser, has_selection != 0, m_callback);

            return(m_result ? 1 : 0);
        }
예제 #9
0
        private void on_print_settings(cef_print_handler_t *self, cef_browser_t *browser, cef_print_settings_t *settings, int get_defaults)
        {
            CheckSelf(self);

            var mBrowser   = CefBrowser.FromNative(browser);
            var m_settings = CefPrintSettings.FromNative(settings);

            OnPrintSettings(mBrowser, m_settings, get_defaults != 0);
            m_settings.Dispose();
        }
        private void 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);

            OnRequestGeolocationPermission(m_browser, m_requesting_url, request_id, m_callback);
        }
예제 #11
0
        private cef_cookie_manager_t *get_cookie_manager(cef_request_handler_t *self, cef_browser_t *browser, cef_string_t *main_url)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_mainUrl = cef_string_t.ToString(main_url);

            var manager = GetCookieManager(m_browser, m_mainUrl);

            return(manager != null?manager.ToNative() : null);
        }
예제 #12
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);
        }
예제 #13
0
        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);
        }
예제 #14
0
        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);
        }
예제 #15
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);
        }
예제 #16
0
        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_target_url = cef_string_t.ToString(target_url);

            var result = OnOpenUrlFromTab(m_browser, m_frame, m_target_url, target_disposition, user_gesture);

            return(result ? 1 : 0);
        }
예제 #17
0
        private int can_get_cookies(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request)
        {
            CheckSelf(self);

            var mBrowser = CefBrowser.FromNative(browser);
            var mFrame   = CefFrame.FromNative(frame);
            var mRequest = CefRequest.FromNative(request);

            var mResult = CanGetCookies(mBrowser, mFrame, mRequest);

            return(mResult ? 1 : 0);
        }
예제 #18
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();
        }
예제 #19
0
        private cef_browser_t *get_active_browser(cef_extension_handler_t *self, cef_extension_t *extension, cef_browser_t *browser, int include_incognito)
        {
            CheckSelf(self);

            var m_extension        = CefExtension.FromNative(extension);
            var m_browser          = CefBrowser.FromNative(browser);
            var m_includeIncognito = include_incognito != 0;

            var result = GetActiveBrowser(m_extension, m_browser, m_includeIncognito);

            return(result != null?result.ToNative() : null);
        }
        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);
        }
예제 #21
0
        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;
        }
예제 #22
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);
        }
예제 #23
0
        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();
        }
예제 #24
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_print_job(cef_print_handler_t *self, cef_browser_t *browser, cef_string_t *document_name, cef_string_t *pdf_file_path, cef_print_job_callback_t *callback)
        {
            CheckSelf(self);

            var mBrowser       = CefBrowser.FromNative(browser);
            var m_documentName = cef_string_t.ToString(document_name);
            var m_pdfFilePath  = cef_string_t.ToString(pdf_file_path);
            var m_callback     = CefPrintJobCallback.FromNative(callback);

            var m_result = OnPrintJob(mBrowser, m_documentName, m_pdfFilePath, m_callback);

            return(m_result ? 1 : 0);
        }
예제 #26
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);
        }
예제 #27
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);
        }
예제 #28
0
        private int on_before_plugin_load(cef_request_handler_t *self, cef_browser_t *browser, cef_string_t *url, cef_string_t *policy_url, cef_web_plugin_info_t *info)
        {
            CheckSelf(self);

            var m_browser    = CefBrowser.FromNative(browser);
            var m_url        = cef_string_t.ToString(url);
            var m_policy_url = cef_string_t.ToString(policy_url);
            var m_info       = CefWebPluginInfo.FromNative(info);

            var result = OnBeforePluginLoad(m_browser, m_url, m_policy_url, m_info);

            return(result ? 1 : 0);
        }
예제 #29
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);
        }
예제 #30
0
        private void get_view_rect(cef_render_handler_t *self, cef_browser_t *browser, cef_rect_t *rect)
        {
            CheckSelf(self);

            var          m_browser = CefBrowser.FromNative(browser);
            CefRectangle m_rect;

            GetViewRect(m_browser, out m_rect);

            rect->x      = m_rect.X;
            rect->y      = m_rect.Y;
            rect->width  = m_rect.Width;
            rect->height = m_rect.Height;
        }