bool ICookieManager.FlushStore(ICompletionCallback callback) { if (managerReady) { return(manager.FlushStore(callback)); } throw new InvalidOperationException(NotInitialziedExceptionMsg); }
/// <summary> /// Gets the default cookie manager associated with the IWebBrowser /// </summary> /// <param name="browser">The ChromiumWebBrowser instance this method extends</param> /// <param name="callback">If not null it will be executed asnychronously on the /// CEF IO thread after the manager's storage has been initialized.</param> /// <returns>Cookie Manager</returns> public static ICookieManager GetCookieManager(this IWebBrowser browser, ICompletionCallback callback = null) { var host = browser.GetBrowserHost(); ThrowExceptionIfBrowserHostNull(host); var requestContext = host.RequestContext; if (requestContext == null) { throw new Exception("RequestContext is null, unable to obtain cookie manager"); } return(requestContext.GetDefaultCookieManager(callback)); }
public void RegisterCallback(Guid messageId, ICompletionCallback callback) { _completionCallbacksById.TryAdd(messageId, callback); }
/// <summary> /// Returns the global cookie manager. By default data will be stored at CefSettings.CachePath if specified or in memory otherwise. /// Using this method is equivalent to calling Cef.GetGlobalRequestContext().GetCookieManager() /// The cookie managers storage is created in an async fashion, whilst this method may return a cookie manager instance, /// there may be a short delay before you can Get/Write cookies. /// To be sure the cookie manager has been initialized use one of the following /// - Access the ICookieManager after ICompletionCallback.OnComplete has been called /// - Access the ICookieManager instance in IBrowserProcessHandler.OnContextInitialized. /// - Use the ChromiumWebBrowser BrowserInitialized (OffScreen) or IsBrowserInitializedChanged (WinForms/WPF) events. /// </summary> /// <param name="callback">If non-NULL it will be executed asynchronously on the CEF UI thread after the manager's storage has been initialized.</param> /// <returns>A the global cookie manager or null if the RequestContext has not yet been initialized.</returns> public static ICookieManager GetGlobalCookieManager(ICompletionCallback callback = null) { return(Core.Cef.GetGlobalCookieManager(callback)); }
/// <inheritdoc/> public void CloseAllConnections(ICompletionCallback callback) { requestContext.CloseAllConnections(callback); }
/// <inheritdoc/> public ICookieManager GetCookieManager(ICompletionCallback callback) { return(requestContext.GetCookieManager(callback)); }
/// <inheritdoc/> public void ClearCertificateExceptions(ICompletionCallback callback) { requestContext.ClearCertificateExceptions(callback); }
/// <inheritdoc/> public void ClearHttpAuthCredentials(ICompletionCallback callback = null) { requestContext.ClearHttpAuthCredentials(callback); }
private void SendInternal(IMessage message, ICompletionCallback callback) { var sequence = _ringBuffer.Next(); var data = _ringBuffer[sequence]; data.MessageTargetHandlerData.Message = message; data.MessageTargetHandlerData.Callback = callback; data.MessageTargetHandlerData.TargetPeer = null; data.MessageTargetHandlerData.IsAcknowledgement = false; data.NetworkSenderData.WireMessages = new List<WireSendingMessage>(2); _ringBuffer.Publish(sequence); }
public ICompletionCallback Send(ICommand message, ICompletionCallback callback = null) { var nonNullCallback = callback ?? new DefaultCompletionCallback(); SendInternal(message, nonNullCallback); return nonNullCallback; }
public ICookieManager GetDefaultCookieManager(ICompletionCallback callback) { return(null); //throw new NotImplementedException(); }
public void CloseAllConnections(ICompletionCallback callback) { throw new NotImplementedException(); }
public void ClearCertificateExceptions(ICompletionCallback callback) { /// return; throw new NotImplementedException(); }
public IMessageHolder SetCallback(ICompletionCallback<SendResult> callback) { message.Callback = callback; return this; }
void ICookieManager.SetSupportedSchemes(string[] schemes, bool includeDefaults, ICompletionCallback callback) { if (managerReady) { manager.SetSupportedSchemes(schemes, includeDefaults, callback); } throw new InvalidOperationException(NotInitialziedExceptionMsg); }