コード例 #1
0
 public unsafe extern int OnBeforePopup(cef_browser_t *browser, cef_frame_t *frame, [Immutable] cef_string_t *target_url, [Immutable] cef_string_t *target_frame_name, CefWindowOpenDisposition target_disposition, int user_gesture, [Immutable] cef_popup_features_t *popupFeatures, cef_window_info_t *windowInfo, cef_client_t **client, cef_browser_settings_t *settings, cef_dictionary_value_t **extra_info, int *no_javascript_access);
コード例 #2
0
 public unsafe int OnBeforePopup(cef_browser_t *browser, cef_frame_t *frame, [Immutable] cef_string_t *target_url, [Immutable] cef_string_t *target_frame_name, CefWindowOpenDisposition target_disposition, int user_gesture, [Immutable] cef_popup_features_t *popupFeatures, cef_window_info_t *windowInfo, cef_client_t **client, cef_browser_settings_t *settings, cef_dictionary_value_t **extra_info, int *no_javascript_access)
 {
     fixed(cef_life_span_handler_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_life_span_handler_t *, cef_browser_t *, cef_frame_t *, cef_string_t *, cef_string_t *, CefWindowOpenDisposition, int, cef_popup_features_t *, cef_window_info_t *, cef_client_t **, cef_browser_settings_t *, cef_dictionary_value_t **, int *, int >)on_before_popup)(self, browser, frame, target_url, target_frame_name, target_disposition, user_gesture, popupFeatures, windowInfo, client, settings, extra_info, no_javascript_access));
     }
 }
コード例 #3
0
        private int on_before_popup(cef_life_span_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_string_t *target_url, cef_string_t *target_frame_name, CefWindowOpenDisposition target_disposition, int user_gesture, cef_popup_features_t *popupFeatures, cef_window_info_t *windowInfo, cef_client_t **client, cef_browser_settings_t *settings, cef_dictionary_value_t **extra_info, int *no_javascript_access)
        {
            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_targetFrameName    = cef_string_t.ToString(target_frame_name);
            var m_userGesture        = user_gesture != 0;
            var m_popupFeatures      = new CefPopupFeatures(popupFeatures);
            var m_windowInfo         = CefWindowInfo.FromNative(windowInfo);
            var m_client             = CefClient.FromNative(*client);
            var m_settings           = new CefBrowserSettings(settings);
            var m_extraInfo          = CefDictionaryValue.FromNativeOrNull(*extra_info);
            var m_noJavascriptAccess = (*no_javascript_access) != 0;

            var o_extraInfo = m_extraInfo;
            var o_client    = m_client;
            var result      = OnBeforePopup(m_browser, m_frame, m_targetUrl, m_targetFrameName, target_disposition, m_userGesture, m_popupFeatures, m_windowInfo, ref m_client, m_settings, ref m_extraInfo, ref m_noJavascriptAccess);

            if ((object)o_client != m_client && m_client != null)
            {
                *client = m_client.ToNative();
            }

            if ((object)o_extraInfo != m_extraInfo)
            {
                *extra_info = m_extraInfo != null?m_extraInfo.ToNative() : null;
            }

            *no_javascript_access = m_noJavascriptAccess ? 1 : 0;

            m_popupFeatures.Dispose();
            m_windowInfo.Dispose();
            m_settings.Dispose();

            return(result ? 1 : 0);
        }