コード例 #1
0
 public static cef_browser_settings_t* Alloc()
 {
     var ptr = (cef_browser_settings_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_browser_settings_t();
     ptr->size = (UIntPtr)_sizeof;
     return ptr;
 }
コード例 #2
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, cef_popup_features_t* popupFeatures, cef_window_info_t* windowInfo, cef_client_t** client, cef_browser_settings_t* settings, 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_popupFeatures = new CefPopupFeatures(popupFeatures);
            var m_windowInfo = CefWindowInfo.FromNative(windowInfo);
            var m_client = CefClient.FromNative(*client);
            var m_settings = new CefBrowserSettings(settings);
            var m_noJavascriptAccess = (*no_javascript_access) != 0;

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

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

            *no_javascript_access = m_noJavascriptAccess ? 1 : 0;

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

            return result ? 1 : 0;
        }
コード例 #3
0
        public static cef_browser_settings_t *Alloc()
        {
            var ptr = (cef_browser_settings_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_browser_settings_t();
            ptr->size = (UIntPtr)_sizeof;
            return(ptr);
        }
コード例 #4
0
 public static void show_dev_tools(cef_browser_host_t* self, cef_window_info_t* windowInfo, cef_client_t* client, cef_browser_settings_t* settings, cef_point_t* inspect_element_at)
 {
     show_dev_tools_delegate d;
     var p = self->_show_dev_tools;
     if (p == _p12) { d = _d12; }
     else
     {
         d = (show_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(show_dev_tools_delegate));
         if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; }
     }
     d(self, windowInfo, client, settings, inspect_element_at);
 }
コード例 #5
0
 public static extern cef_browser_t* create_browser_sync(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_request_context_t* request_context);
コード例 #6
0
ファイル: CefBrowserSettings.cs プロジェクト: kc5nra/cefglue
 internal CefBrowserSettings(cef_browser_settings_t* ptr)
 {
     _self = ptr;
 }
コード例 #7
0
 public static void Free(cef_browser_settings_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
コード例 #8
0
 public static extern int create_browser(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings);