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;
        }
 public static int get_refct(cef_jsdialog_callback_t* self)
 {
     get_refct_delegate d;
     var p = self->_base._get_refct;
     if (p == _p2) { d = _d2; }
     else
     {
         d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate));
         if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; }
     }
     return d(self);
 }
 public static int release(cef_jsdialog_callback_t* self)
 {
     release_delegate d;
     var p = self->_base._release;
     if (p == _p1) { d = _d1; }
     else
     {
         d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
         if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; }
     }
     return d(self);
 }
 public static int add_ref(cef_jsdialog_callback_t* self)
 {
     add_ref_delegate d;
     var p = self->_base._add_ref;
     if (p == _p0) { d = _d0; }
     else
     {
         d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
         if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; }
     }
     return d(self);
 }
        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;
        }
 public static void cont(cef_jsdialog_callback_t* self, int success, cef_string_t* user_input)
 {
     cont_delegate d;
     var p = self->_cont;
     if (p == _p3) { d = _d3; }
     else
     {
         d = (cont_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cont_delegate));
         if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; }
     }
     d(self, success, user_input);
 }
 private CefJSDialogCallback(cef_jsdialog_callback_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }
 internal static CefJSDialogCallback FromNativeOrNull(cef_jsdialog_callback_t* ptr)
 {
     if (ptr == null) return null;
     return new CefJSDialogCallback(ptr);
 }
 internal static CefJSDialogCallback FromNative(cef_jsdialog_callback_t* ptr)
 {
     return new CefJSDialogCallback(ptr);
 }