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; }
public CefWindowInfoLinuxImpl(cef_window_info_t* ptr) : base(false) { if (CefRuntime.Platform != CefRuntimePlatform.Linux) throw new InvalidOperationException(); _self = (cef_window_info_t_linux*)ptr; }
public CefWindowInfoMacImpl(cef_window_info_t* ptr) : base(false) { if (CefRuntime.Platform != CefRuntimePlatform.MacOSX) throw new InvalidOperationException(); _self = (cef_window_info_t_mac*)ptr; }
internal static CefWindowInfo FromNative(cef_window_info_t* ptr) { switch (CefRuntime.Platform) { case CefRuntimePlatform.Windows: return new CefWindowInfoWindowsImpl(ptr); case CefRuntimePlatform.Linux: return new CefWindowInfoLinuxImpl(ptr); case CefRuntimePlatform.MacOSX: return new CefWindowInfoMacImpl(ptr); default: throw new NotSupportedException(); } }
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); }
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);
public static extern int create_browser(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings);