internal Browser(IChannelOwner parent, string guid, BrowserInitializer initializer) : base(parent, guid) { Channel = new BrowserChannel(guid, parent.Connection, this); IsConnected = true; Channel.Closed += (sender, e) => DidClose(); _initializer = initializer; }
internal Browser(IChannelOwner parent, string guid, BrowserInitializer initializer) : base(parent, guid) { Channel = new Microsoft.Playwright.Transport.Channels.BrowserChannel(guid, parent.Connection, this); IsConnected = true; Channel.Closed += (_, _) => DidClose(); _initializer = initializer; }
internal Browser(ConnectionScope scope, string guid, BrowserInitializer initializer) { _scope = scope.CreateChild(guid); _channel = new BrowserChannel(guid, scope, this); IsConnected = true; _channel.Closed += (sender, e) => { IsConnected = false; _isClosedOrClosing = true; Disconnected?.Invoke(this, EventArgs.Empty); _scope.Dispose(); _closedTcs.TrySetResult(true); }; }
private static void Main() { HookAssemblyResolve(BrowserInitializer.PATH_CEF, BrowserInitializer.PATH_LIB); AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.ThreadException += ApplicationOnThreadException; Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnProcessExit; var stage1 = BrowserInitializer.InitStage1(); Logger.GetLogger().Info($"Loaded libcef.dll -> {stage1}"); LaunchBrowser(); }
internal ChromiumBrowser(IChannelOwner parent, string guid, BrowserInitializer initializer) : base(parent, guid, initializer) { }
public Browser(ConnectionScope scope, string guid, BrowserInitializer initializer) { _scope = scope; _channel = new BrowserChannel(guid, scope, this); }